go away spammer

Author Topic: One battery or two?  (Read 2030 times)

0 Members and 1 Guest are viewing this topic.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
One battery or two?
« on: December 10, 2012, 03:15:51 PM »
I am designing a circuit for an ATmega328P to control Dynamixel servos.

I want to run 12Volts to the servos, to give them the power they need.

My question is, should I run the same 12 volts through a 5V regulator for the ATmega328p, or should I use a second say 6Volt battery  for the Atmega?


Offline MrWizard

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Re: One battery or two?
« Reply #1 on: December 10, 2012, 03:23:10 PM »
Separate batteries are always better.

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: One battery or two?
« Reply #2 on: December 10, 2012, 03:24:31 PM »
Separate batteries are always better.

Thanks for the response, just so I understand, is it significantly better, or just a bit better?


Offline MrWizard

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Re: One battery or two?
« Reply #3 on: December 10, 2012, 03:29:35 PM »
To give the mcu a steady and stable current is keeping strange malfunctions out.
Servo's, dc motors, etc are not giving a stable current, because they start, stop and reverse giving a peak/spike/jitter, which can affect the mcu, the more things attached, the more draw. So you can take the voltage down so much that the mcu reacts different. With 2 small servo's there is not too much problems, but bigger, stronger, quicker is asking for problems.
« Last Edit: December 10, 2012, 03:33:52 PM by MrWizard »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: One battery or two?
« Reply #4 on: December 10, 2012, 05:09:16 PM »
Managing two batteries is a pain. Charging them separately, one running out while the other still has juice, etc. I have this problem on my rover with the old, RC-truck based design, and I will be switching to shared power for the re-build.

Any decent voltage regulator will be able to compensate for the voltage spikes. (Note: 7805 isn't particularly "decent" these days -- very old design.) Put something like a 1000 uF electrolytic capacitor in front of the regulator, perhaps with a fast diode in front of it to provide some additional sag protection, and a 100 uF electrolytic and a 4.7 uF ceramic after the electrolytic, and you'll do fine. Warning: read the data sheet for your regulator -- some regulators have specific requirements on capacitance (not too high, or not too low.) The LM350 has ripple rejection of 86 dB, but requires an idle current and adjusting resistor divider. The LF50ABV has > 80 dB ripple rejection, has ultra-low drop-out (0.35V or so) and has been very stable for me.

Or use a switch-mode power converter for more efficient voltage conversion. Those will almost entirely de-couple you from input spikes (at the cost of some generated output ripple.) Either a hobby-RC UBEC (warning: quality may be spotty) or something like the converters from Pololu, or some DC DC power converter module from digi-key or mouser or similar.

If you REALLY care, put a 10 uH 1A inductor followed by another 100 uF capacitor after the regulator, and you'll have power so clean you could drive a stereo pre-amplifier with it :-) Another option is to use a switch-mode to take it to 5.5V, and the the ULDO regulator for a rock-stable 5.0V, with about 85% efficiency (depending on efficiency of the switch mode regulator.) This is a very clean power section:



Most microcontrollers have de-coupling capacitors mounted right at the uC, though, so a simple voltage regulator plus capacitor combo is probably all you need.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: One battery or two?
« Reply #5 on: December 10, 2012, 06:06:43 PM »
Hi,

I want to run 12Volts to the servos, to give them the power they need.

My question is, should I run the same 12 volts through a 5V regulator for the ATmega328p, or should I use a second say 6Volt battery  for the Atmega?
Go with a single battery, using two is a poor substitute for doing it right and two batteries will never be fully discharged at the same time.

I'll suggest using a switch mode regulator, either one from Dimension Engineering that is a 3-pin drop-in replacement for the 7805 or, if you want to save some cash, make one yourself (either a switcher or, if the current demand on the 5V line is fairly even, a filtered chopper, perhaps followed by an LDO regulator).

If you use a linear regulator, you'll loose more than you use. Whether that is a problem depends on how much current you need on the 5V line of course.

To keep the two "sides" from influencing each other, just connect them both right at the battery terminals (both +12V and ground) and don't use thin wire - something like what's used on your mains wired lamps or heavier. The battery is the lowest impedance in the crcuit, so this wiring "pattern" will keep servo- and motor noise from spreading to the logics department via the wiring.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: One battery or two?
« Reply #6 on: December 10, 2012, 11:07:49 PM »
I use both methods with Dynamixel servos.  The single battery approach is definitely nicer.  I use 3S LiPos with these regulators. I buy lots of these, as well as the 3 pin molex connectors to hook up my servos to... and other related hardware.

That said, I've only done the single-battery approach with a 3x AX-12 bot so far.  I'll have a 3x MX-28 + 2x AX-12 bot in a month or two though.  The double battery approach used a 3S LiPo and a 2S LiPo, since the Axon couldn't take a 3S directly (though I now know I could have just replaced the capacitor on the Axon.
I

Offline ErikYTopic starter

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: One battery or two?
« Reply #7 on: December 11, 2012, 04:49:59 AM »
Everyone,

Thanks a lot for the detailed information, very helpful!

I definitely would prefer to use 1 for obvious reasons.

I will take all of your information into consideration as I design my next augmented microcontroller.

Once I have the design done, I will post it up, and hopefully some of you guys can give me your thoughts.

Thanks!

 


Get Your Ad Here

data_list