TinyLoad – Simple Electronic Load based on ATtiny45/85

TinyLoad – Simple Electronic Load based on ATtiny45/85

TinyLoad is a simple electronic constant current dummy load. The ATtiny measures voltage, current and temperature of the heat sink, calculates power, energy and battery capacity, controls the fan and displays all relevant data on the OLED. The button is used to switch between power/resistance and energy/capacity display.

The electronic load control circuit, which essentially consists of a potentiometer, an operational amplifier, a MOSFET and a shunt resistor, ensures that the same current flows regardless of the voltage applied.

For this purpose, a 100 milliohms shunt consisting of three 300 milliohms resistors in parallel for proper heat dissipation is located in the load circuit, via which the current is measured. The LMV358 rail-to-rail OpAmp compares this with the target value, which is specified via a 10-turn 10k potentiometer and a 100k resistor and accordingly controls the gate of an IRL540N logic level power MOSFET, which in turn adjusts the current through its internal resistance set in this way. The current measured at the shunt is also amplified by a second OpAmp and measured by the ADC of the ATtiny. The voltage is measured using a voltage divider. The temperature of the MOSFET is measured by a 10k 3950B NTC thermistor. If necessary, the fan is switched on via a MOSFET.

Measurements

For the most accurate measurement possible with maximum measurement resolution, both the 5V supply voltage and the two internal reference voltages in connection with the ADC of the ATtiny are used. First, the supply voltage and the 2.56V reference are measured using the 1.1V reference and corresponding calibration factors are calculated. For each pending measurement, it is first checked which of the three voltage references (5V, 2.56V or 1.1V) is most suitable. This is then used for the measurement via the ADC. For all ADC measurements, the ATtiny is set to sleep mode in order to avoid noise that is generated by the MCU (ADC noise canceler). To further increase the measurement resolution, 64 measurements are carried out in succession (oversampling) and the measured values are added up. The averaging is only carried out at the end of the further calculations in order not to lose any measurement resolution. The measurement accuracy depends essentially on the accuracy of the internal 1.1V reference. This can be calibrated manually if necessary.

Schematic

References

source: https://github.com/wagiminator/ATtiny85-TinyLoad

Please follow and like us:
Pin Share
About mixos

Mike is the founder and editor of Electronics-Lab.com, an electronics engineering community/news and project sharing platform. He studied Electronics and Physics and enjoys everything that has moving electrons and fun. His interests lying on solar cells, microcontrollers and switchmode power supplies. Feel free to reach him for feedback, random tips or just to say hello :-)

view all posts by admin
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives