arduino + servo hookup

Hi there,

I have a project where I want an arduino to run on a battery for as long as possible, and every now and then power a servo (for just a few seconds each day). Most of the time the arduino will be sleeping, and the servo will have it's power cut via a relay.

What would be the best way to design a battery power source for this so that it lasts as long as possible?

Here's what I came up with:

1) just power everything off 4 AA batteries (+ capacitors etc. to arduino from brown out)

2) 4 AA batteries just for servo + 2 AA batteries for arduino

3) 3 banks of 2 AA batteries. The arduino runs off 1 bank (2 batteries) and the other 2 banks are used to power the servo. The arduino will "mix and match" the 3 banks using switching relays so that it can "switch" which bank it (and the servo) runs off depending on voltage levels (so all 6 batteries deplete evenly)

... I like the idea of option 3, even though it sounds complicated it might be worth the effort, given that my servo is used rarely (and won't draw power when not in use).

What do you think? Is this doable? Or is there a better way?

Cheers

How long do you wish to run for? Weeks? Days?

Weedpharma

I like #2. Make sure you use a minimal '328P design and not a full Arduino, so that when the Arduino is sleeping you're not powering a regulator and USB interface and power LED, etc.

Hey guys, thanks for the replies.

I'm hoping to make this run for "months" - given that the servo will be powered up and turning just a few seconds each day.

Thanks for the heads up CrossRoads - yep, I plan on using a minimal (not full arduino) in my final design/product, or a 3.3v pro mini (bypassing the regulator).

Is there any specific reason why #3 is a bad idea? That seems better to me, given that in #2 the 2 sets of batteries will run out at different times.

Doesn't the servo need 6V (#2) and not 3V (#3)? Use 4 Cs, or 4Ds if you really want it to last, and keep it simple.

Yep, the servo will run on 4 AA batteries (2 banks) - for example:

bank 1 = 2xAA bank 2 = 2xAA bank 3 = 2xAA

... the arduino will run on bank 1, and the servo will run on banks 2 & 3. When the arduino detects that bank 1 is low it will switch some relays so arduno runs off bank 2 and servo runs off bank 1 and 3.

I agree with the KISS principle, but if some extra challenge/work up front will make a better product then I'm all for it.

I'm trying to keep it as compact as possible, so was hoping to avoid C or D batteries.

I'm not sure yet how exactly I would make the "switching" work, but my gut feeling is that it is possible with some switching relays and coding smarts :)

mikgol: Is there any specific reason why #3 is a bad idea?

Yes - vastly too complex, operating relays is almost as bad as operating the servo. You will lose out any efficiency on the relays.

mikgol: That seems better to me, given that in #2 the 2 sets of batteries will run out at different times.

Are you sure? Which will expire first, and why?

Hey Paul,

...

Paul__B: Yes - vastly too complex, operating relays is almost as bad as operating the servo. You will lose out any efficiency on the relays. Are you sure? Which will expire first, and why?

... the relays will be "switched" just a couple of times a day. I had a project where there was a servo (detached - not getting a signal) but the servo still drew some current while "off", which is why I want to use a relay - since the servo will only be used for a few seconds each day (to turn a tap on or off)

... regarding the batteries being depleted at different times - this is obvious as the arduino will run 24/7 from batteries X, while the servo will be powered from batteries Y at intermediate times (not that often), so it's obvious that one set of batteries will need replacing unless by pure coincidence the arduino draws as much power as the servo (averaged out, since the servo is off 99% of the time)

Other than being "too complex" to design initially, wouldn't #3 work "better" considering it would balance battery drain between the servo and arduino?