Servo current spike

I'm trying to finish up my door unlocking project, and have run across a problem. Another group member did the actual opener trigger part, which waves a pipe cleaner mounted on a servo in front of the motion detector. That all works fine. But it's battery powered, and I'd like to have the option of powering it from the mains.

He used an Arduino Nano to drive the servo, and everything is powered by a "breadboard power supply" rated at 700 ma at the 5V output, running off a 9V alkaline battery.

formatting link
ard_Power_Supply.html

I tried running this from a wall wart 9V switching supply rated at 650 ma. It doesn't work. The LEDs on the Nano and the power module switch on and off, rebooting I assume when the voltage drops, and nothing ever boots successfully. Also, a brand new carbon/zinc 9V battery produces the same result. The only thing that works is an alkaline 9V.

It turns out that this effect is also produced when only the servo and power module are on the board, so it appears to have nothing to do with the Nano.

It seems to me that the controller chip in the servo must be causing a large current spike when it boots up. When powered by alkaline, after the bootup it works fine, drawing about 75 ma when the shaft is turning. So something must be happening only when power is first applied.

Is this typical of servos? Are there small servos which are known not to have such a problem? Has anyone had good luck with a particular model? I'm talking about small hobby servos. I don't see any specs about maximum current draw.

Reply to
Peabody
Loading thread data ...

It's typical of dc motors, which is what drives the servo. Many PSUs will let you hang a massive cap on them to handle the surge, but some won't.

NT

Reply to
tabbypurr

I'd probably feed the computer through a diode, probably a schottky diode for lowest voltage drop, and hang a capacitor across the rail to the computer (after the diode). Hard to say what value capacitor you need, I'd probably start around here:

formatting link

Reminds me of a friend who made his own car alarm 30 years ago. It went haywire when the car was started. Until a diode and capacitor were added.

Reply to
John Smith

Why not use heat to trip the motion detector (assuming it's a PIR type, not ultrasonic) ? Like, a small light bulb or a 1/w resistor?

It shouldn't take much power.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

I've had that problem. Put a big cap from supply to ground, 100uf, 470uf...

Reply to
sdy

If I add a cap to the 5V output of the power module, then it will be charging at the same time as the servo spike is happening. So i think it wou;d only make things worse. I would need to add it to the 9V supply, and there's no easy way to do that.

What I don't understand is why there would be a large current draw on power up. It would almost have to be a case of one or more motor windings being shorted to ground before the embedded controller gets underway. But the motors are powered through H bridges, and they should be designed so that nothing flows except under the direction of the controller chip in the servo. I would just think it would be part of a good design to make sure these big flows don't happen.

Well, I may order another servo and see what happens with it. They can't all be this way.

Reply to
Peabody

There can't be many electronic systems which don't take a current draw on power up which is larger than the steady running current.

It's usually part of good design to make sure these big flows are taken care of. Within limits. And that's usually done by getting a capacitor to provide transient current as necessary. Some strategically placed diodes may be needed so that power transients in one part of the system don't affect other parts.

Do you have any test equipment which could capture transients on the power rails? I'd want to know what the power rails do, at power up, and when motors start running. Once I know that I can figure out how to satisfy the transient demands without my sensitive logic/computer circuits throwing a fit. Transients may not matter at all as long as they're kept away from sensitive circuits.

Reply to
John Smith

Well, lots of professional equipment has precharge for filter capacitors, or inrush limiting or the like, so that the peak is not much higher, or in fact lower, than maximum operating current.

Not that I'd expect a servo to have that.

As for the servo, is it just made poorly, and actually shorting its supply for a moment?

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams

put the big cap on the Nano and put a diode in series with the supply

-Lasse

Reply to
Lasse Langwadt Christensen

all motors.

motors can take large current surges, use a separate power-supply to run the servo, or put a diode and a big capacitor before the arduino, and use a separate regulator to run the servo

--
This email has not been checked by half-arsed antivirus software
Reply to
Jasen Betts

The cap charges all the time, but dumps it's charge when the load needs it. This is what happenning to me:the load of the servo is dropping the battery voltage below a critical level and the ucontroller stops; battery recovers in a few msecs and Arduino re-starts....

Reply to
sdy

you need to have a Diode between the suppy and cpu.. place a large cap on the cpu side and supply the servo driver directly from the supply.

if this is only a very short time the cap on the CPU side will maintain the voltage for it.

Reply to
M Philbrook

Here's my scope display showing the voltage across a 1-ohm resistor in series with the 5V supply to the servo:

formatting link

The current spike starts at about 700 mA, and lasts for 22 mSec.

This project resides on a breadboard, and is powered by a breadboard power module mounted at one end. If I add any capacitance to the 5V supply, it seems it would just add additional current draw since it would be charging up at the same time the servo is spiking. I have tried adding up to

220 ufd, and that didn't help. But I haven't tried the diode. The failure is in the ultimate 9V supply, so that's really where I need the capacitance. There's just no easy way to add that.

Since it does work with a 9V battery, I'll just use that and call it a day. But for my future servo projects, I'll have to plan for this spike. I ordered a differnt servo, an HXT500 micro servo, and it produces the same power-up spike, although it only lasts half as long. So apparently this is typical behavior. Someone suggested that a digital servo might not produce such a spike, but it appears they draw more current when idle.

Reply to
Peabody

You aren't looking at this correctly. The problem is the power to the CPU is dropping. Adding raw capacitance is going to be hard to support a 700 mA load for 22 ms.

C dV = I dt, C = I dt / dV

Keeping the voltage drop to 0.25 means you need a 61,600 uF cap. Don't think that is going to work.

Instead look at this diagram which I think is what you have.

9V 5V Power in +----+ Power Out -->>------| 5V |----->>--------+-----------> Servo +----+ | | | | +-----------> CPU V

The problem is the shared 5 volt rail is dragged down by the servo. If you add the diode and cap you get this.

9V 5V Power in +----+ Power Out -->>------| 5V |----->>--------+-----------> Servo +----+ | | | | +--|>|---+--> CPU V | --- --- | V

In this case the diode will prevent a low voltage on the 5 volt rail from dragging down the CPU supply. The capacitor will hold up the CPU voltage. This will require a much smaller cap. C dV = I dt. The CPU current is a lot less so the required capacitance will be a lot less, maybe as small as

100 uF.
--

Rick C 

Viewed the eclipse at Wintercrest Farms, 
on the centerline of totality since 1998
Reply to
rickman

Why? More than one person has painstakingly explained to you why you need a diode.

Did anyone suggest that you need a diode so that the servo doesn't drag down the supply to the computer? Today's computers can run for a long time on only a capacitor. As long as there's a diode to stop the capacitor discharging into the servo.

But hey, if you know best then why are you asking for advice?

Reply to
John Smith

700ma inrush for a servo sounds like an awful lot! Never had one pull that. Is it a really big servo or just a hobby one? If a hobby one, try another.
Reply to
sdy

On Friday, October 20, 2017 at 3:54:06 PM UTC-7, Peabody wrote: ...

rge

up

ng

I'm

I had a similar problem when I designed this about 10 years ago.

formatting link

This normally runs of 4 AA batteries powering both servos and the CPU.

When the batteries were new there was no problem but as they aged their vol tage would drop excessively with the inrush of the servos. Down to about 3 or 4v was common I seem to remember.

I solved this by having a step-up converter from the battery to about 6V fo llowed by an LDO to the 5V required by the electronics. A 2200uF capacitor visible in the photo held up the voltage of the 6v rail for some 10's of m illiseconds under extreme drop-outs while the boost converter would keep th e 5v rail within spec even down to about 2-3v from the battery.

This solution was successful and we shipped about 1500 of these boards over a few years.

kevin

Reply to
kevin93

On Friday, October 27, 2017 at 7:12:11 PM UTC-7, sdy wrote: ..

to

I'm

t. Is it a really big servo or just a hobby one? If a hobby one, try anothe r.

I would expect the peak current to be almost the same as the stall current.

When the position command is given that is different from the current posit ion the servo driver will drive the stationery motor as hard as it can to m ove to the commanded position.

Many of the servo data sheets have the stall current - this one for example shows 550mA

formatting link
uct). More powerful ones can expect to have greater stall currents.

This stall current will tend to vary proportionally with supply voltage.

kevin

Reply to
kevin93

I don't think that's the problem. Remember that the circuit works fine when an alkaline 9V is used. It's when another

9V source is used that the problem occurs. Also, when things don't work, both the Nano LED and the power module LED go dark. To me that means that the 5V supply is sufficient when the 9V source is sufficient, but the alternate 9V source isn't up to the task. The problem is the 9V source. I don't see how it could be otherwise, else the 9V alkaline wouldn't work either, but it does.

If that's the case, then adding caps or diodes to the 5V supply isn't going to change things. What's needed is a cap on the 9V supply that would provide additional current when the 5V module is switched on and the spike occurs.

Again, the circuit is turned on by the on/off switch in the

5V power module. At that point, the cap will be discharged. It will be trying to charge at the same time as the servo spike is taking place, which will just place an additional load on the 5V supply and the 9V source.

The whole issue for me on this is whether it's typical that a mini servo produces this kind of spike when it's powered up. In other words, is this something I'm going to have to deal with every time I use a servo. It matters because, in this case for exmple, except for that spike, the maximum current draw of the entire circuit is only about 120 ma. So it makes a big differnce in chosing a power supply. And I think the answer is that this spike IS pretty typical. Unfortunately.

Reply to
Peabody

I guess I was just having trouble understanding how a discharged capacitor, diode or no diode, on the 5V supply could prevent the 9V source from failing. The circuit works fine when a 9V alkaline is used. With no capacitor or diode.

But of course I could be wrong. So I will try the diode.

Reply to
Peabody

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.