Multiple servo switch on load issue

Hello,

Not so much intrinsically Arduino related, but I figure other Arduino users may have encountered this :wink:

I have 10 digital servos (all 6v capable and of various but reputable brands) plugged into 2 Arduinos - they are powered via their own supply connected to a DC benchtop supply set at 6v and at full current allowance - the unit is rated at 5A continuous.

If I run all servos at once under moderate load and speeds the supply seems to cope just fine with the current demands.

However, to get it into a running state I have to plug the servos in after having switched on the supply. If I switch it on with all servos plugged in (even if they are at their home positions already), the supply will say it's providing 2.7V at 5A (or whatever I limit the current to on the supply) and the servos wont operate.

It is only when I disconnect around half of the servos before powering the unit on that it will go straight to 6v and display a nice and expected low unloaded holding current when I switch it on (mA's). I can then plug the rest in one by one, and the supply and system operates as I would expect it to, that is, until I switch it off again and the problem starts over.

I get similar behavior with a 6V wall-wart power supply - although I get slightly different numbers probably as the current is limited to 2A on that particular unit.

Questions:
~ Why the 2.7V and seemingly damaging currents upon switch on ?
~ How to get around it? Maybe some kind of electronic version of the 'slowly adding the servos' solution ?

Any help appreciated :kissing:

Ok,

I'll bite.

Forget the arduinos for now..... What happens to the voltage if you turn on the power with all the motors connected at the HOME position?

If the voltage is good, then you can move forward and get things working.

If it is bad, turn off the power and disconnect one and try it with only 5.

Go through this trying one at a time to see if there is one in particular which is "killing" the supply.

Work out if there are any problems with any/some of the motors. Work from there.

Good luck.

Hope to hear back with good news!

Do you know what is the stall current of each servo and what is the total stall current for all servos combined?

It is likely that the servos will draw a lot of current until they settle at their stable positions - and they all do this at the same time at power-on.

I wonder if this is a case where a current limiting power supply is too clever for the application. Something that could supply more amps for a short period (a few seconds) may be better.

...R

1:1:
If I switch it on with all servos plugged in (even if they are at their home positions already), the supply will say it's providing 2.7V at 5A (or whatever I limit the current to on the supply) and the servos wont operate.

Furthermore, once it is in an operational state I can concurrently send all servos from min pos to max pos at full speed and the supply will not current limit until about 4A - i.e. at 5 I see no limiting - however, with the supply set at 5A on turn on, it'll poop its pants as discussed ::slight_smile:

It is, as suggested, directly related to the power consumption of the servos - and I should say that I have 4 different types of servos, and indeed some are more powerful than others so 5 is the average amount I have to disconnect. (I just didn't want to bog down the discussion with too much detail)

Regardless of figuring out which one is to blame and whatnot and especially considering that the system works once it's plugged and is under 'stress' am I being unreasonable in expecting this not be happen anyway?

And I guess, more to the point >> what is a workaround that doesn't involve:

~ experimenting with a higher rated power $upply
~ fiddling with little plugs all the time as I am currently doing :disappointed_relieved:

Is it as simple as having a large cap always connected across the supply?

And to answer your questions directly:

no problems with the servos that I can see - any combination of an average of over about 5 will kill it.

stall currents - yes, and it is more than 5A when they are all combined - however, I ask why a servo would draw that when powered up? The problem persists, when they start away from at home, when they start at home and even when they aren't being supplied PWM position.

Not saying you're wrong - just saying, um, I guess 'damn!' and 'you sure?'

:wink:

Should also make it clear, the 2.7 and 5A will hold - it's not something that sorts itself out.

It might (very tentative might) help if you connect a resistor (say 4700 ohms) between each servo signal wire and GND to ensure the signal is steady in the interval while the Arduino is going through its reset routine.

I'm assuming from your lack of mentioning it that the Arduino power is quite separate from the servo power supply so that the Arduino is not affected by the fall to 2.7v.

...R

Yeah, a big cap may help. It all depends on for HOW LONG the start up "problem" happens.
If the cap isn't big enough, then it won't work.

And as pointed out by Robin2: Make sure the power supply to the Arduino is isolated from the supply for the motors.

Either a whole different one, or a lot of good decoupling.

Yes, different power supply :slight_smile:

So maybe just a big cap and pot in series in over the terminal (i.e. in parallel with the servos) - I can dial in the time constant with the pot that way, or should I say 'just mess around for while and see if it works'.

Need to make sure the cap and the pot are happy sinking and sourcing the current demand?

Hrrrrm, also what numbers would be a good starting point in terms of capacitance and R ? aand, something I never learned but what type of cap is best suited to this job, standard ceramic ?

Time for thinking :frowning:

1:1:
So maybe just a big cap and pot in series in over the terminal (i.e. in parallel with the servos) - I can dial in the time constant with the pot that way, or should I say 'just mess around for while and see if it works'.

I have no idea where the idea for a pot has come from.

The purpose of a big capacitor is to act as an energy reservoir to meet short term peaks. It does not need any resistor in that role.

I suggested putting a 4k7 resistor between the servo signal wire and GND to stabilize the signal - that has nothing to do with providing power, and nothing to do with the capacitor. (And I have no idea whether it will be beneficial in your case, but it is a cheap experiment)

...R

The idea for a pot came from me.

A capacitor in series with a wire is a cap in series with a resistance - together they form a 1st order RC circuit, a very fast one. By adding a pot I can dial in the time-constant and effectively change the duration that it is effective. It's pretty much a blunt LPF - with that in mind you can see that I'm thinking about "HOW LONG the start up "problem" happens" (to quote lost_and_confused) ... and how to potentially deal with it.

The reason I'm not sure why your suggestion of a resistor will work is that this issue happens whatever state the arduino is in (or for that matter any other servo PWM source such a Pololu) - I mentioned this in post #4.

Also I'm not sure what you mean by 'stabilize the signal' - keen to learn though :smiley_cat:

Responding to Repl #10

It seems to me if you have a resistor in series with the capacitor it will "resist" the flow of current to your servos - the very opposite of what you want - but I confess this is not something I am confident about.

The idea of the resistor between the servo signal and GND is to deal with the short period while the Arduino is going through its reset process and has not yet got to the code

myServo.write(pos)

Up to that point the signal line may be floating and some servos behave strangely in that situation. I found the resistor was helpful in preventing unwanted excursions during the startup period. If the servo is not trying to move it may draw less current.

...R

As the supplies are independent the behavior will happen regardless of if the arduino or pololu servo driver are sending PWM, resetting, on or off. The signal lines shouldn't be floating in at least two of those cases, however the issue persists.

Also, keep in mind a wire is a resistance, so any discussion pertaining to a cap on its lonesome for the sake of completeness should be analyzed as a first order RC circuit - just with a very low R value.

As the servos might need a little time to sort themselves out upon power up, using just a cap with no added resistance will lead to a very small RC time-constant, something that might not be sufficient. By adding a pot I can sweep values until I hopefully find a threshold that makes it happy.

That's the plan at least - fingers crossed.

If I wasn't tied up with other tasks I'd be down to the local electronics supplier already :wink:

The alternative would be to hold the resistance constant - i.e. use no pot - then buy a bunch of caps to 'sweep' the RC time constant that way. More expensive, and less resolution in the variation...

4700uF electrolytic (16v) allowed 8 servos to start - will try ganging two in parallel and see what happens next :slight_smile:

and yeees, extra resistance wasn't required - obviously not what I expected! :-[

The signal lines shouldn't be floating in at least two of those cases, however the issue persists.

I wonder how many catastrophes have happened because things "shouldn't" have ...
The Titanic and the Space Shuttle spring to mind.

Also, keep in mind a wire is a resistance,

IMHO this is grossly over theorizing the problem

...R

You're implying that I shouldn't assume things or catastrophe awaits, it's possible yes, but improbable given the circumstances. (strawman argument in essence?)

...you then humbly imply that I shouldn't over theorize.

You simply mean to say that we'd get along better if I had the same ideas and experience as you? (The porridge is juuuust right :slight_smile: )

So far it would appear that I don't - but lets not let that stop us from learning right?

To me more specific:

You suggest that lines supplying PWM should start floating when I power up a unit that they are supplying? That's not something I have the conceptual background to appreciate. Elaboration, if possible ?

Also RC circuit theory isn't exactly egghead territory - (obviously) I'm no expert - but I do understand you can't comprehend them without understanding the (basic) nature of resistance.

1:1:
You suggest that lines supplying PWM should start floating when I power up a unit that they are supplying? T

What I suggested was to connect some 4k7 resistors between the signal wires and GND and see if that was beneficial for your problem. That takes about 5 minutes of your time.

I am not suggestiing what I have quoted above. I am trying to put in your head the idea that when the Arduino starts it is not outputting any servo signal and the poor servo has to figure out all on its lonesome what it should do. Some servos are not happy in that situation. This is not theory.

...R

Once again (feels like the third time, but I'm going to refrain from counting) I reiterate that in tests where the arduino (and also pololu servo driver) are already powered on the issue persists. They are on separate supplies, something you assumed in post #6.

So while agree with you on your second point re. startup signals being for all intents and purposes random (or prone to give unexpected results etc.) - it would seem it is not relevant to this case - yes/no ?

Also:

  • So you're suggesting I 'should' have 10 4k7 resistors on me? ...imminent shuttle disaster? :astonished:
  • You haven't explained what/how resistors would help - I think you said 'steady' the signal- I'm keen to learn (not being sarcastic). You're tying the line to GND - a pull down resistor?
  • Did you by chance miss the part where the cap helped? i.e. likely just need another cap in parallel or a larger value single unit and I'm good

Phew ! something about some Arduino forum users that gets me going I tells ya.

Discussion is robust :wink:

1:1:
Phew ! something about some Arduino forum users that gets me going I tells ya.

"Tell me about it"

You are making a big deal about something that was never intended to be a big deal. And maybe I missed a simple answer that would have made it clear that it was not a solution. If you look at the Reply where I I first mentioned it you will see that I was not really expecting much from the idea. However, all along I have had the impression that the problem you are describing is a startup problem.

When you say "I reiterate that in tests where the arduino (and also pololu servo driver) are already powered on the issue persists" do you mean that you power up the Arduino to the point where it is issuing servo signals and then "throw the switch" to connect power to all of the servos at one time?

And (sorry if I am asking you to repeat yourself) if you "throw the switch" in the same way but without the Arduino powered does the same thing happen?

If it does, it suggests to me that the power supply for the servos is inadequate and the simple way to test that is to try a bigger power supply.

I know very little about electronic theory. I just know that the 4k7 resistor solved a startup problem for me where the servo was moving while the Arduino was resetting.

...R