Power issues driving servos

Hey everybody,

I've built a quadruped walker and am having issues with voltage dropping ( I think ). It's running on an arduino mega 2560. There are 12 servos in total, and I know I am driving them at close to their torque limit. It's wired with the servos in parallel with each other and the Arduino. The battery is connected straight to the servos and is a 6V pack charged to about 6.5V. The problem I'm having is that when the walker is on the ground, after it starts walking the Arduino resets. Is this likely happening because the voltage is dropping because of too much current draw? I'm pretty sure the code is working because if I raise the robot into the air ( no load on the legs ) it is able to run through the walking pattern without issue.

Battery: 5 cell, 1600 mAh, 6V NiMH battery pack

Am I right in the diagnosis? What can I try to either fix it or help narrow down the problem for sure?

Thanks in advance!

For current your use power voltage could be 4 ~6 V, now power Arduino could be a problem.

sonnyyu:

cmkpl:
It is more common that we can use a portable USB power supply for charging up mobile phones. I know that Arduino accepts USB power as its power supply. By reading the schematic, I found that there is no voltage regulator for USB power supply.

My question is, how can I make a regulator for input voltage 4-5V and output voltage is more or less 5.0V for arduino? Or can we buy directly from eBay or somewhere else?

It is useful as I have one USB phone charger.

Thanks.

What you ask is SEPIC or Buck–Boost dc converter, Google it.

Buck (Step-down) - The output voltage is lower than the input voltage
Boost (Step-up) - The output voltage is higher than the input voltage
SEPIC - The output voltage can be lower or higher than the input voltage or equal to input voltage
Buck–Boost converter - The output voltage is of the same polarity of the input, and can be lower or higher than the input or equal to input.

or u could make up u own one, use 1 Buck + 1 Boost or 1 Boost + 1 Buck or isolated ?uk or -5V + ?uk converter ...

electronics is art.

Your case is luck, since you have a build in linear regulator (function like Buck), all you need is "1 Boost + 1 Buck", i.e. Boost to 7.5 V then feed Arduino Vin.

Ok, if I understand you right the boost circtuit will ensure that even when the battery gets low voltage because of high load, the boost will ensure that it is still above the 6V needed for the built in regulator. For example, if the battery goes down to 4V, so the servos will get 4V, but the boost converter will only drop to say 6.5V which is still enough for the linear regulator to stay constant.

I will see if I have anything laying around for this, and if not get it in my next order.

Thanks for your help!

Mini DC 2.5-6V to 4-12V 5V Step Up Converter Voltage Regulator Charging Module

Step Up Converter, Ebay, $4.90

Take look at edge of PCB, It is guaranty no QA for production. But it is sold dirty cheap at Shenzhen market. I guess "you get what you pay for"

I will see if I have anything laying around for this, and if not get it in my next order.

OP, there are a couple of things you should do here, and a couple you could do.

First, I presume the same battery pack powers the Arduino and the servos. It's not
stated specifically. Running them both off the same battery is always gonna be a
problem.

You should add some extra filtering across the servo power buss right where the
battery connects. Eg, 220-470 uF electrolytic and 0.1uF bypass. You can get big
swings in the servo buss voltage due to wiring inductance. For ref, see here
http://www.4qdtec.com/pwm-01.html#cap

Secondly, on my walkers I usually use a separate battery for the controller than for
the servos. It doesn't have to be so high an energy rating. Little 9V block, or even
a couple of 3.6V Li AA cells.

Alternately, you might try first adding the caps above, and then add a 1.5V alkaline
to the top of the NiMh chain to power the Arduino and see if that keeps it from
resetting.

That will get you going until you switch over to the boost converter, but even
there, you still might want to add the caps as indicated above.

The module shipped with 5 V output preset. Change R1 and R2 to make other output voltage.

@oric_dan: Thanks for the suggestions. I should have mentioned that I had tried a 100uf capacitor and it didn't help. After seeing your suggestion of 220-470, I tried tossing in a few larger ones I had and it seems to be enough to keep it walking!

This should at least tide me over until I build a proper power board.

ProudPenguin:
@oric_dan: Thanks for the suggestions. I should have mentioned that I had tried a 100uf capacitor and it didn't help. After seeing your suggestion of 220-470, I tried tossing in a few larger ones I had and it seems to be enough to keep it walking!

This should at least tide me over until I build a proper power board.

The higher the load on the battery, in your case 12 servos, the higher value
electrolytic cap you need to use. Mainly just a matter of Ic = C dV/dt, so a
larger C produces a smaller "voltage sag" (dV/dt) for the same current supplied
by the cap.

The other thing is, the longer and thinner the battery wires are, the greater
the inductance and the larger the inductive spike. You will notice on RC
cars/etc, where they pull huge currents for the motors, they use very thick
and very short wires. This is partly because they usually don't use a reservoir
[electrolytic] cap, in order to save space.