Hello All,
I'm working on a simple Arduino Duemilanove based robot system. The robot uses two Parallax (Futaba) continuous rotation servo motors in its drivetrain, and my goal is to power the robot with a single 6 AA battery pack/5V USB port. Currently, based on the recommended circuit at Servo - Arduino Reference, the motors are hooked directly to the +5V regulated rail on the Arduino. The system seems to work fine, with minimal noise once the servos get going and some noise when the servos change states.
The lowest noise peak I've been able to pull on the +5V rail is approx. 3V; this was achieved by rapidly switching both servo directions while drawing power from a USB port. Generally, it takes the regulator ~50ms to recover to 5V after a change in servo directions when running on 6 AA batteries (~175ms on USB power). Almost no noise has been observed on the 3.3V port.
My question is as follows: will this amount of ripple noise in the power supply cause any damage to the regulator, the ATMega328 (apparently rated at 1.8V-5.5V) and other onboard Arduino components, or the USB port? Note that this robot is intended as an educational kit, so it should be simple while remaining fail-safe.
you might just add another voltage regulator to power the servo's, or just run them straight off the batteries if possible. you could cause a brownout and reset the arduino, and although it can run off lower voltages, i dont think it can while remaining at the 16mhz clock speed.
I agree with everything weirdo557 has written. I'm also building robot kits for education.
I'd add most robot systems have some sort of sensors, often some are analogue. The ADC, and its reference voltage is sensitive to electrical noise. It gets much harder to get a robot working reliably with noise on the sensors.
Many of the robot builders recommend isolating the microcontroller power from the motors. You might have two battery supplies, one for the motors, and the other for the Arduino. The Arduino will probably use less than 50mA, and so could run from a relatively small battery compared to the motors.
HTH
GB
To stop electrical noise you need to decouple or isolate the voltage supply of the motor and arduino.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
I'm not suggesting doing without proper power regulation.
I am suggesting using a separate power supply for the Arduino as well. It can be relatively light, because the power needs are small, and it significantly reduces a class of problems which are quite hard to diagnose, especially for school children.
I accept it is a 'braces and belt' solution.
GB
What about a 1 ohm resistor in series with the servos? It picks up most of the voltage noise and only dissipates ~90mWrms. Is this a bad idea, or could it be a potential solution?
I suggest you drive the servos directly from the batterys and not from the regulated arduino power. Also, a USB port will only supply ~500ma at most, so the servos will not perform well under any real load.
It picks up most of the voltage noise ...
I'm not sure what you mean.
What does the noise look like (with and without the resistor) on an oscilloscope?
Is it 'uniformly attenuated', or something else because the resistor has some inductance?
GB
I'm describing the spike of current draw whenever the servo changes directions (that is, if the servo is connected directly to the Arduino regulator). If a resistor is placed in series, it limits the servo voltage if current spikes too high.
In terms of describing the noise: the voltage on the regulator output (with no resistor) drops by approx. 2V when the motors change directions. It then returns to ~5V as the current works its way back down.
I think posters believe that the kind of noise you described is unlikely to permanently harm the voltage regulator or ATmega. I think the FTDI chip should be okay too.
I think that amount of noise is enough to disturb readings from the ADC if the servo's are on the ATmega side of the regulator.
I believe posters believe it would be better to drive the servo's directly from the battery, and not via the Arduino voltage regulator.
Even then, the voltage drop you see (without the resistor) may be enough to cause the Arduino's voltage regulator to drop out even when the servos are directly powered from the same battery (though good batteries should be better than the voltage regulator).
That's why I suggested two power supplies to reduce likely problems.
I'd encourage you to measure the drop when the servo's are running straight from the batteries with your 1ohm resistor, and see if that looks noticeably better.
HTH
GB
That works quite well, in fact :). There is literally no scope-observable dropout on the Arduino's 5V port. Of course, the servos run hot. They seem to be getting too much voltage when they're hooked to the 9V battery supply through a 1ohm resistor. I'm thinking a low dropout 5V regulator with some buffer capacitors, tied to the battery (essentially what weirdo557 suggested above) as an efficient fix for that issue.
Can anybody see an advantage to multiple source system over this one?
By the way, thanks to all for your advice!
They seem to be getting too much voltage when they're hooked to the 9V battery
They're what, 6V servos?
Spec says 4-6V.
And they run hot, running them at 9V?
They run warm; it may be a normal temperature. Should 9V be okay?
Should 9V be okay?
No! 9 volts is exceeding the maximum voltage specification for most any hobby type servo. 6 volts max is the the standard spec, and you risk damage to the servo if you exceed it.
Lefty
That's what I had assumed. Thanks for the advice!
... I'm thinking a low dropout 5V regulator
You wouldn't need a low drop out regulator for 5V from 9V, but if you use 6 AA rechargeable, there is a bit more of an issue.
If you use 9V, and want 6V or less, unless you use something more advanced (switched mode power supply), something is going to drop the voltage and dissipate it as heat.
I'd suggest you might consider 6 AA rechargeable batteries for the servo's (approx. 7.2V) and protect the servos with a diode. (Rechargeable batteries are more ecological than disposables too)
GB
[edit]Ooops, posted them out of order[/edit]
That works quite well, in fact . There is literally no scope-observable dropout on the Arduino's 5V port.
Excellent.
Now that you have moved the servo's from the Arduino voltage regulator, you have lots of flexibility.
I'd suggest using rechargeable batteries, which are a much lower voltage anyway. (e.g. 6 x 1.2 = 7.2V)
HTH
GB
The issue I've found is that the spike on the battery as the servos change directions is just barely above the dropout of the Arduino's onboard regulator. So bringing the voltage on the batteries down can bring back the noise.