ATtiny13 TinyUPS

2个月前

简介:TinyUPS is a simple 5V/2.5A uninterruptible power supply with a li-ion battery as a buffer

开源协议: Public Domain

  • 393
  • 2
  • 10

描述

1. Overview

TinyUPS is a simple 5V/2.5A uninterruptible power supply with a li-ion battery as a buffer, a load sharing power path management system and an ATtiny13 for monitoring power supply and battery charge level as well as for communication with the connected device.

641681075.jpg

2. Working Principle

If external power is connected to the tinyUPS the input voltage or vcc of the ATtiny13 is delivered by this source, otherwise by the battery. The ATtiny13 monitors the input voltage and tells the connected device to shutdown by pulling the SHUTDOWN-line low when the input voltage falls below a certain threshold (SHUTDOWNLEVEL). This happens when the external power source is diconnected or disabled and the battery level falls below this threshold. After waiting a certain time (SHUTDOWNTIMER) to allow the connected device to safely shut down, the ATtiny13 deactivates the boost converter and turns off the power to the connected device. If the input voltage rises again above a certain threshold (POWERONLEVEL) it activates the boost converter and turns on the power to the connected device. This happens when the external power source is available again. When power is turned on a BOOTUPTIMER starts to count. If a shutdown is initiated before the boot up is completed, the left-over time is added to the SHUTDOWNTIMER in order to allow the connected device to completely boot up and shut down. A shutdown can also be initiated by pressing and holding the button or by setting the REQUEST-line to high (>0.7V) for 2 seconds. After such shutdowns the power will not be turned on again automatically. The power to the connected device can be turned on manually by pressing the button or setting the REQUEST-line to high if the battery level is above a certain threshold (USERPOWERLEVEL) or the external power source is connected.

The SHUTDOWN pin of the tinyUPS is an open collector output. The connected device must have an internal or external pullup resistor on the SHUTDOWN line! This is necessary because of the different voltage levels.

The ATtiny13 spends most of the time in power-down sleep mode to save energy. The watch dog timer wakes it up every 8 seconds. It will also wake up if the button was pressed or the REQUEST-line was changed (pin change interrupt). After doing its stuff the ATtiny13 sleeps again. The current status of the tinyUPS is indicated by 5 LEDs:

LED State
VIN: on external power is connected
CHARGE: on battery is charging
FULL: on battery is fully charged (is only shown if external power is connected)
STATUS: steady on normal power-on operation
STATUS: blinking in shutdown sequence
STATUS: short flashes in standby (short flash occurs every 8 seconds)
VOUT: on output power is turned on

Although it would be possible to supply the connected device via the battery and charge the battery at the same time, this is absolutely not a recommended way. In this case, most charging ICs such as the TP4056 are unable to determine whether the battery is fully charged. The battery would be charged forever, which would destroy it in the long run. A load sharing system was therefore integrated, which separates the battery from the load when an external power is present. While the battery is being charged, the connected device is powered by the external power supply. For more details on the working principle of the load sharing power path management circuit refer to http://ww1.microchip.com/downloads/en/appnotes/01149c.pdf.

tinyUPS.png

3. Performance

External power supply should be capable of delivering enough power to charge the battery and to power the connected device simultaneously. The maximum battery charging current is set to 1000mA but you can set a lower limit by selecting a different value of R3. The output voltage of the external power supply must not exceed 5.2V! Choose a good 18650 Li-Ion battery with a low internal resistance which is capable of delivering up to 6A!

Parameter Value
Input Voltage 4.5 - 5.2 V
Output Voltage 4.8 - 5.2 V
Output Current Max 2.5 A
Standby Current 95 uA

tinyUPS_bat_efficiency.pngtinyUPS_ext_efficiency_2.pngtinyUPS_extpwroff.pngtinyUPS_extpwron.pngtinyUPS_ripple.png

文档

ATtiny13 TinyUPS

在编辑器中打开

BOM

暂无

工程成员

登录注册之后才可以进行评论操作
工程所有者当前已关闭评论
征集令发布者当前已关闭评论
全部评论 2

costar

┈┈┈┈▕▔▔ ╲┈┈┈┈
┈┈┈┈┈▏   ▕┈┈┈┈
┈┈┈┈┈▏   ▕▂▂▂┈
▂▂▂▂╱┈┈┈▕▂▂▂▏
▉▉▉┈┈┈┈┈▕▂▂▂▏
▉▉▉┈┈┈┈┈▕▂▂▂▏
▔▔▔▔╲▂▂▂▕▂▂▂▏

2020-05-06 04:05:15
回复

XIII

┈┈┈┈▕▔▔ ╲┈┈┈┈
┈┈┈┈┈▏   ▕┈┈┈┈
┈┈┈┈┈▏   ▕▂▂▂┈
▂▂▂▂╱┈┈┈▕▂▂▂▏
▉▉▉┈┈┈┈┈▕▂▂▂▏
▉▉▉┈┈┈┈┈▕▂▂▂▏
▔▔▔▔╲▂▂▂▕▂▂▂▏




2020-05-05 19:29:46
回复

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn