Hao Jie Arduino Uninterruptible Power Supply (UPS) Improved | Chan's Kingdom
SD Wing Zero Custom is done! Click here to check it out!

Ad 468 X 60

built of paper.

Sunday, October 30, 2016


Arduino Uninterruptible Power Supply (UPS) Improved

A reader left a comment on my UPS post, he asked me to share the ‘improved’ design.

I would not really categorise it as an ‘improved’ design because I simply removed the P-MOSFET.

I also added a switch when they would not want the Arduino to be powered on.


Arduino UPS

The UPS was meant to power up an Arduino Nano, from USB or a Li-Ion Battery.

I hope this blogpost will be helpful for anyone doing a small UPS for Arduino. Cheers


  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Chan HJ
An enthusiast in papercraft. Paper model designing sounds fun too! More about me at my Blog Bio or


  1. Thank you, friend! That's the thing I was looking for! I visited many sites. And finally I found it here! Thank you!

  2. By the way. Maybe you know. My next step is to use few batarries. I guess It would be 3 battaries with 3.7 V.
    How can I use them in the same way? I mean to have this 3 * 3.7V = 11.1V for my load and charge them when I need to?

  3. Hi there. :) Sorry for not knowing how to pronounce your name, you are from Russia I presume?
    For charging cells in series I think you would need what they call a "balance cell charger". TP4056 is only meant for a single cell, so you would need to design your own system. Maybe some voltage isolator coupled with TP4056 might do the work. Sorry, could not help much in this as I have no experience in doing this.

  4. You can call me Vova;)
    I guess I'm gonna use some kind of connection. Battaries will be connected, but when we gonna charge them, we gonna disconnect them from each other and use tp4056(for example) for every battary. The question is how make it easy:) I'm gonna think about it:)

  5. Hi Vova. :)
    I think it would be really difficult to charge 3 Li-Ion cells in series.
    But why do you need 3 in series in the first place? And if you think your project is a bit private, feel free to discuss through my email:chanhj01@hotmail.com

  6. Hao Jie! Never mind about privacy. I don't mind. If people would see smth interesting in out dialog, that is great!
    So about the project.
    1) The point is I need about 10V in my device. Device will be mobile. So that is why I need Li-Ion cells.
    2) But when I wanna charge cells I gonna put my device somewhere, to the place with power source.
    3) tp4056 for every cell can be in device or in the place with power source.
    4) So I think, for example, when I put device somehow cells are disconnected from others mechanicaly and now there are separate cells which I can charge due to tp4056.
    Smth like this:)

  7. If your device is not consuming large power, you can consider a boost converter.
    So, a Li-ion cell supply 3.7V--> Boost Converter to pump up the voltage into 10V--> your device.
    However, because you are using only one cell, the operating hour will decrease by half approximately. But your charging solution will be a simple TP4056.

  8. That is good idea! Unfortunately I didn't work with cells before. So I doubt about time it can work. I have arduino and motor DC that is rarely works. My goal is to make it work for about hour maybe less. Will one cell enought?

  9. You mean your Arduino and Motor are not turned on very often?
    If that is the case, one cell should be able to last you for an hour...
    The calculation will be using the battery capacity.Normally a 18650 is rated for 3.7V 2000mah, which gives you 7.4Wh.
    Arduino consume about 50mA at 5V idling, so 0.25W.
    I suppose your motor is a 12V, maybe 500mA? So it will consume 7.5W.
    So your device (arduino + motor) will take up 7.5+0.25=7.75W.
    To simplify the calculation, I'll assume the converter has 100% efficiency, which is not practical, normally is 80-90%. The operating time is total capacity divided by the Wattage consumed, 7.5Wh/7.75W = 0.97h, and that is if your motor is constantly turned on.
    Hope that makes sense. :)

  10. This comment has been removed by the author.

  11. That is great calculation! Thanks! I'm now no more afraid of using it! So I would try it!
    By the way, what kind of converter can you advise? I will buy that my nearest shop has, but anyway I would appriciate your opinion.

  12. I am not really familiar with Russia's electronics field, but I guess Ebay should be a common place to start? :)
    I would start with something like this off the shelf.
    So just choose a converter that can fit your needs from whereever you can find.
    Good luck with your project, looking forward to hear some updates form you. :)

  13. This comment has been removed by a blog administrator.

  14. Holy shit m8 you're a genius!
    I'm actually new to the arduino stuff, we only got gizduino here (still arduino) and I was wondering what projects should I make. Didn't know this was possible. I was checking your older post minutes ago and this is an improvement. I'll start the project soon so I don't have to buy an
    uninterruptible power supply in the Philippines
    . Mind if I save the schematic diagram?

  15. Hi there! I was thinking about UPS for arduino on my own, and I came out with pretty same circuit, but with few differences.
    I'm using Schottky diodes (they have smaller voltage drop), and diode D1 is connected directly to the output, not to the input - to bypass switching regulator, because 5V to 5V conversion could be not efficient and could even damage the regulator in some cases. Also regulator may limit the current of external power supply.

    1. I forgot to mention - D2 must be moved to the output of the regulator too.
      So in result, D1 connected between external power supply and to the UPS output, and D2 connected between switching regulator output and UPS output.
      In such case, there will be a little drop of voltage (near 0.2 for MBR1040 for example) on the UPS output (you can compensate it if your DC-DC converter have regulated output) which can be ignored, but your converter will not limit the current and couldn't be damaged.

    2. Hi! Thanks for the comment, that is certainly another viable circuit. My thought that time was to let the boost regulator handle the voltage drop across the diode.
      One possible odd scenario I can think of that will cause some problem with your circuit is when your 5V_USB supply is not that well regulated and drops a bit, let say to 4.95V.
      The boost converter is always active, so the output is at a constant 5V. In this case, which one will get to pass the 5V?
      Just my thought at hte moment and I am really nitpicking here though, haha.

  16. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article. switching power supply

  17. This comment has been removed by a blog administrator.

  18. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Power Efficiency Guide Review

  19. This comment has been removed by the author.

  20. I am really happy with your blog because your article is very unique and powerful for new reader.
    UPS (Uninterruptible Power Supply)

  21. Good Post and informative one. Thank you for sharing this good article, it was so good to read and very useful to update my skill as updated one.
    UPS (Uninterruptible Power Supply)