Close
0%
0%

ATtiny85 based Lithium-Ion Battery Power Bank

This circuit allows the use of a 3.7V Lithium-Ion battery cell, such as the popular 18650 cells, to power or charge 5.0V devices

Public Chat
Similar projects worth following
An AtTiny85 based Lithium-Ion battery voltage boost, monitor, and protection circuit. These types of devices are sometimes referred to as Power Banks or Portable Chargers. This circuit allows the use of a 3.7V Lithium-Ion battery cell, such as the popular 18650 cells, to power or charge 5.0V (or higher) devices and provides voltage regulation and over discharge protection. A flashing red LED is used to indicate when the battery is getting low. Once the battery voltage dips below the desired cut-off voltage, the micro-controller disconnects the battery from the power output terminals. An optional LCD display can be attached to monitor and display the Battery and Output voltages in real time.Schematic and source code can be found on GitHub at: https://github.com/JWahaus/TinyLIon

The DC boost module used for stepping up the battery's output voltage is rated at 2A and can boost the output voltage as high as 28V if desired.  The boost module has a potentiometer for adjusting the output voltage.  When using the LCD connector the output voltage should be kept between 4.5V and 7.0V since the LCD is directly powered from the boost module's generated output voltage.

  Some practical guidance when using this circuit:  Although the boost module in this circuit is rated at 2A it is likely not a good idea to draw this much current continuously when using this module as it will get very hot as you approach the module's upper limits.   Keep in mind when calculating current draw that the battery's current draw will be higher than the output current.  For example if the output is using 5V at 1 amp (5 watts of power) then the boost module (assuming 90% efficiency) is using 1.5 amps at 3.7 volts.

  Update:  I've done some testing on just how much current this power bank can supply at 5V.   I also monitored the temperature of the voltage boost converter to see if it gets too hot during high current draw.

The upper usable limit this circuit can produce is about 1.2 Amps at 5.1 Volts.  That's just enough to power the Raspberry Pi 3 with 7" TFT display, camera, and wireless keyboard to which it's attached for around 2 hours.  The temperature of the boost module got up to around 70C which is pretty hot to the touch but within the acceptable temperature range.

To find the absolute maximum current this circuit can supply I attached a 3.3 Ohm resistor to the current monitor's leads and it briefly hit 1.48 Amps @ 4.9V before the current monitor's display cut out due to low voltage.  This resistor will draw 1.5 Amps at 5 Volts.

Portable Network Graphics (PNG) - 22.27 kB - 10/24/2018 at 09:18

Preview
Download

  • 1 × BATTERY - 3.7v Lithium-Ion Cell (18650)
  • 1 × 100uF capacitor
  • 1 × 2K Resistor
  • 1 × 1K Resistor
  • 1 × 330 Ohm Resistor

View all 16 components

View project log

Enjoy this project?

Share

Discussions

av wrote 12/21/2020 at 11:57 point

Hi there i have been working on project that involves measuring voltage divider using attiny85.

while measuring the voltage  level of the voltage divider circuit the voltage value deviates from actual theoretical value and i am not able to understand why is it happening can u help me understand the problem!  

  Are you sure? yes | no

Jeff Wahaus wrote 12/06/2018 at 13:44 point

I'm planning on building another one of this but next time with two cells instead of one.  Stepping down the voltage of two batteries in series in combination with a cheep 3A DC buck converter should be a better choice for high current draw applications.   I should be able to get 5V @ 2A with this configuration, maybe even 3A.

  Are you sure? yes | no

Jeff Wahaus wrote 11/05/2018 at 23:19 point

I've 3D printed a cover with exposed 18650 battery.  The on/off switch has been enlarged and enhanced by a 3D printed extension. piece

  Are you sure? yes | no

Jeff Wahaus wrote 10/23/2018 at 22:33 point

Some notable features of the ATtiny85 source code for this project:

* The ATtiny85 supply voltage is accurately measured without using an I/O pin.

* The ADC Low Noise mode is used when performing ADC readings resulting in a ten fold increase in accuracy.

* A Sleep_Delay() function is implemented which puts the ATtiny85 to sleep during long delays resulting in a major reduction of power consumption of the monitor/protection circuit.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates