5V Arduino UPS

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
Hello, this is my first time posting on this forum.
I needed some ideas or figures that would help me build a backup power system for running an arduino (nano+couple of servos). The system would primarily run on 5v received from an adapter/wall wart, however, during an event of loss of power, the UPS system would kick in and keep the system running. I was thinking about using Li-ion or Li-po batteries. But it requires the UPS system to stop charging at 4.2V for this case but recharge when when the battery voltage drops again. Any idea?
Sorry for the long post :p
 

MrChips

Joined Oct 2, 2009
30,824
Welcome to AAC. We hope you find this site very useful.

Your post was not long by any means. It is better to take the extra words to explain clearly what you are attempting to do.

Good luck on your project.
 

#12

Joined Nov 30, 2010
18,224
Lithium batteries are pretty picky about their charging current. Maybe you'd be better off with (4) ni-cad AA batteries?
 

sirch2

Joined Jan 21, 2013
1,037
Is size a consideration? If not I'd think about a 6V lead acid assuming your Arduino has a regulator so you don't need to supply it with 5V. You could then just run the whole thing off a 6V trickle charger.
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
Is size a consideration? If not I'd think about a 6V lead acid assuming your Arduino has a regulator so you don't need to supply it with 5V. You could then just run the whole thing off a 6V trickle charger.
Unfortunately, it is. I have to mount it on a door and have to control some things based on command provided through a bluetooth module on the arduino or from a vibration sensor. That why I wanted to use lithium batteries as they have high power density with low weight/mass footprint. And it is also supposed to keep the system operating for a good 2-3hrs. I was planning to use a 3.7V 3Ah lipo pack.
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
Lithium batteries are pretty picky about their charging current. Maybe you'd be better off with (4) ni-cad AA batteries?
How long would it last if the ardunio was idling with a servo and bluetooth connected to it? Would it be enough? I would it be around 2000mAh? Please correct me if I am wrong. And also, aren't ni-cds susceptible to memory loss? However, I believe ni-cads would also be a more cost effective solution.
 

THE_RB

Joined Feb 11, 2008
5,438
Just use the lithium battery to run the arduino at 4.2v, and use a 4.2v regulator to charge it (or a 4.7-4.8v regulator and a series diode).

The regulator will stop the battery from overcharging. It will always be kept topped up or "floating".
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
Just use the lithium battery to run the arduino at 4.2v, and use a 4.2v regulator to charge it (or a 4.7-4.8v regulator and a series diode).

The regulator will stop the battery from overcharging. It will always be kept topped up or "floating".
Haha, I am new to this. So, basically 4.2V regulator will prevent overcharging plus a series diode? What would the diode help in this case?
And also, would the arduino operate at 4.2V? Or should I just use a voltage boost module to get it up to a clean 5V input for the arduino.
 

KL7AJ

Joined Nov 4, 2008
2,229
Lithium batteries are pretty picky about their charging current. Maybe you'd be better off with (4) ni-cad AA batteries?
This is true...but it would be a great exercise in creating a smart charger in Arduino....certainly a worthy project!
 

shteii01

Joined Feb 19, 2010
4,644
Haha, I am new to this. So, basically 4.2V regulator will prevent overcharging plus a series diode? What would the diode help in this case?
And also, would the arduino operate at 4.2V? Or should I just use a voltage boost module to get it up to a clean 5V input for the arduino.
If I remember right Arduino recommends psu that provides at least 7 volts. A typical is something like 9-12 volts, your choice. An absolute maximum, expect the board to fail, is 20 volts.

From Nano website:
Input Voltage (recommended) 7-12 V
Input Voltage (limits) 6-20 V


It may run at 5 volts, it does run when powered from USB which is 5 volts. But! It will not have enough "juice" to power things connected to it. Some of the connected peripherals will work and some will not. I think it mostly depend on how much current they draw from the Arduino board. That is why they recommend at least 7 volts to power the board.
 

poopscoop

Joined Dec 12, 2012
140
Arduino is powered through a 7805, which has a pretty high dropout, thus the need for 7V. You can, on some boards, bypass the voltage regulator and run it closer to 5V, but do so at your own risk. There is NO reverse polarity protection.

It might run on 4V, you'd have to test, but I doubt it'd run on 4.2V - the dropout of the regulator.

As with anything involving battery design, you should first figure out current draw. Arduino specifies a maximum current draw that is pretty low (USB level, so .5A?), so unless you're running peripherals on their own power rail, you probably don't need much power.

4x AA Alkaline batteries would work, and duracell puts out 10 year guarantees. I'd go that route. If you want, you can use a voltage divider and a testing sequence to have arduino test the state of the batteries itself every so many weeks.
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
If I remember right Arduino recommends psu that provides at least 7 volts. A typical is something like 9-12 volts, your choice. An absolute maximum, expect the board to fail, is 20 volts.

From Nano website:
Input Voltage (recommended) 7-12 V
Input Voltage (limits) 6-20 V


It may run at 5 volts, it does run when powered from USB which is 5 volts. But! It will not have enough "juice" to power things connected to it. Some of the connected peripherals will work and some will not. I think it mostly depend on how much current they draw from the Arduino board. That is why they recommend at least 7 volts to power the board.
Oh, so, can't I have the servos receive power from the external source (5V) as they may burn out the Arduino board? I think it is possible to run the logic part of the arduino using 5V but have it control the servo through a digital pin without receiving power from the arduino itself. Or, I might just have the voltage boost to 9V. Thanks!
 

shteii01

Joined Feb 19, 2010
4,644
Oh, so, can't I have the servos receive power from the external source (5V) as they may burn out the Arduino board? I think it is possible to run the logic part of the arduino using 5V but have it control the servo through a digital pin without receiving power from the arduino itself. Or, I might just have the voltage boost to 9V. Thanks!
I don't think servos will burn out the board.

I think servos might need more current then the board can provide. The website says something about the board being able to provide 40 mA from each IO pin. How much do the servos need? How many servos do you have? I don't know, but you do.
 

poopscoop

Joined Dec 12, 2012
140
Yes, you can use arduino to operate BJT's or MOSFETs, which will operate your servos. This allows the servos to run on a higher voltage and current than would be possible with the arduino pins.

When you say "Boost Voltage" you make us think you are using a boost converter. Just to be clear, if you boost the voltage you aren't increasing the power. If you use a more powerful source, then you are increasing the power.
 

poopscoop

Joined Dec 12, 2012
140
I don't think servos will burn out the board.

I think servos might need more current then the board can provide. The website says something about the board being able to provide 40 mA from each IO pin. How much do the servos need? How many servos do you have? I don't know, but you do.
Arduino has a total maximum current, so depending on your servos, and how many are switching on at the same time, you can easily exceed the maximum current of the board. Just because you have 20 pins at 40mA does not mean you can provide 800mA. The data sheet will have specifics as to what the maximum current of the board is.

For simplicity sake, I recommend a 9-12v power supply. Run your servos through MOSFETs. For battery back up, come back to us with an idea of maximum current and typical current use per unit of time.
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
Yes, you can use arduino to operate BJT's or MOSFETs, which will operate your servos. This allows the servos to run on a higher voltage and current than would be possible with the arduino pins.

When you say "Boost Voltage" you make us think you are using a boost converter. Just to be clear, if you boost the voltage you aren't increasing the power. If you use a more powerful source, then you are increasing the power.
Yes, I wanted to use a voltage booster-converter to satisfy the need, voltage wise. And, as I was thinking about using lipos, it would probably provide enough amperes to run the circuit without any problem. I was thinking about using maybe a 5.6kg servo to turn a dead bolt on a door. And upon restriction, the servo might pull too much current. For the back-up part of the solution, can I use a pre-built system such as this: (sorry for the ext. link)
http://www.adafruit.com/products/390
If so, is there any way to minimize the cost on this?
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
I am uncertain about the current that would be drawn by this system but here is the setup that I was willing to make:
An arduino nano, a servo, a piezo buzzer/vibration detector, a bluetooth module (HC-05) + a servo (22.5g and over). If I need to, I might run the power to these peripherals through external voltage rails from the breadboard/protoboard.
 

poopscoop

Joined Dec 12, 2012
140
Yes, I wanted to use a voltage booster-converter to satisfy the need, voltage wise. And, as I was thinking about using lipos, it would probably provide enough amperes to run the circuit without any problem. I was thinking about using maybe a 5.6kg servo to turn a dead bolt on a door. And upon restriction, the servo might pull too much current. For the back-up part of the solution, can I use a pre-built system such as this: (sorry for the ext. link)
http://www.adafruit.com/products/390
If so, is there any way to minimize the cost on this?
If cost is the priority, I'm going to reiterate the alkaline battery solution. Your solution will work, but you'll have to do some searching to find a charge controller that is cheaper than 17 bucks.

Servos usually have some kind of feedback mechanism, so if the servo is stuck it should be pretty easy for arduino to identify the situation and cut power to it.
 

Thread Starter

The Chosen 0ne

Joined Apr 15, 2014
16
I was wondering, if I do want to take the route of lithium, can I have a trickle charger connecting the battery and the power to the arduino in a parallel circuit, so, that the power can be distributed to the two different components and when the power is lost, the arduino can continue pulling current from the parallel connection to the battery. Would this a possible solution? And also, what may be the best trickle charging current for a lithium or is trickle charging for lithiums completely forbidden? haha Because I have seen exit signs using lithium batteries for backup.
 
Top