I've never needed to use a servo before, so know little about them. But now I'm involved in a project in which a servo is controlled by an Arduino Nano, and the servo is behaving badly. It generates a large current spike when power is first applied to it, but not at any other time. I'd like to find out if this is typical behaviour for servos, and in any case get an idea of how it is generating that spike - in terms of what must be happening with the H-bridge elements to produce it.
The servo is a generic - the label says it's an "Analog Servo". I guess that's a genuine Analog Servo, and not some cheap imitation. The label also says:
1.5/1.8 Kgf.cm
21.0/25.2 oz.in
0.12/0.1 s/60
From my reading, that's not a particularly powerful servo, and in fact when it is doing its thing per the Nano firmware, it draws about 75 ma when moving fairly slowly, which is all it's intended to do. But when power is first applied, it generates a large current spike. I know that because while an alkaline 9V battery regulated to 5V works fine, my wall wart switching 9V supply, rated at 650 ma, goes into shutdown, and the Nano goes into boot oscillation.
The 5V regulator is a "breadboard power supply" module. When I boot using my wall wart, both the regulator's LED and the Nano's LED cycle on and off together, and a complete boot never takes place. I've used the wall wart in a variety of situations, and have always found it to work well until now. The breadboard power module is rated at 700 ma.
I've tried booting with the control line tied high and tied low, and I've let the Nano begin sending the proper PWM signals before connecting 5V to the servo power pin, but always get the same boot cycling using the wall wart when power is first applied to the servo. And if I put the servo on a separate breadboard with just it and the power module, the power module cycles the same way. So this has nothing to do with the Nano.
I don't really have good test equipment, but when trying to read the powerup current draw, my digital meter flashes "425" briefly. I don't really know if that's a good number, but I suspect it may be, and that more current than that may be flowing at some point. The needle of my analog meter moves much too slowly to indicate what's going on. The spike is apparently very brief.
I have found that placing a resistor of about 3 ohms in the 5V line going to the servo makes it work sometimes with the wall wart. But it's very finicky, and too much resistance means it won't behave right later on.
So from my reading, it seems to me that for a very brief instant while the controller embedded in the servo initializes, some, or possibly all, of the h-bridge transistors which provide power to the motor windings, are fully on. I don't know how you would draw half an amp through one of these little motors otherwise. Does that sound right? If so, why wouldn't a proper design prevent the spike from happening? It seems that pullup or pulldown resistors on the gates would prevent any of those transistors from turning on until the controller tells them to. Is that asking too much?
I have an HXT500 on the way from Ebay, and it will be interesting to see if it has the same spike. If it does, then obviously I don't understand how the embedded controller and the H's work.
Well, I'm just trying to understand whether this is just a bad copy, or a bad generic design, or whether this behavior is typical and something I should provide for in future servo circuits. And if it is typical, I need to understand why it needs to be typical.
Thanks for any comments.
And by the way, if I insert a one ohm resistor in the servo power line, and put the scope leads across the resistor, and trigger on a rising edge, it seems the voltage drop would let me calculate the maximum current flow (using the alkaline battery). Does that sound right, or is there a better way?