servo interference

djmikeys

New Member
I was wondering if anyone has come across the problem which occurs when you have a servo motor being controlled by some sort of sensor? I have had this twice now with both weight and sound sensors. The motor appears to interfer with the sensor reading going into my pic 08m. I have managed to get around it both times by simply powering the servo by a completely seperate power supply but with a common ground. This is an expensive and bulky way to fix such a small glitch.
Does anyone have any suggestions of easier ways to get around this problem?
 

demonicpicaxeguy

Senior Member
servo's can bring in quite a large amount of noise depending on the servo although some don't seem to make any at all

you don't nessarily need to use two power supplies you could drop a 7805 regulator in to the equation a simple google search will give you a few usable circuits for it just connect the positive pin from the servo before the regulator

also sticking a capacitor across the + and -supply for the servo, i've found has reduced the noise down to an acceptable level for a pic to keep functioning if you're not able to get a regulator in a hurry

using power supplies is an easy way to solve the noise interferance problem while learning

this isn't for a project that due tomorrow or next week is it


Edited by - demonicpicaxeguy on 22/08/2007 10:57:00
 

boriz

Senior Member
A servo will cause two main forms of interference. One is the spikes accompanying any DC motor that uses brushes, the other is the drop in voltage as the motor loads the supply. The former is relatively easy to suppress using small capacitors around the motor, and sometimes RF chokes for high frequency stuff.

The latter is a little more difficult to deal with. Any power supply (voltage source) will have a characteristic internal resistance. This forms a potential divider with your load and the voltage measured from the PSU output is the voltage measured at the centre of this divider. Internal resistance will be a couple of ohms or less, depending on the supply. This is why the terminal voltage drops a little when you apply a load.

A DC motor at startup is drawing much more current than when it is running at normal speed. Servos have lots of startups. A hefty electrolytic capacitor near the motor will take the load briefly during this short period and reduce the drop caused on the PSU voltage.

In general, the easiest solution, aside from using separate supplies, is to make sure the supplies internal resistance is low enough so that the expected loads will not cause a significant voltage drop. As a rule of thumb, mains powered PSUs with a higher current rating will have a lower internal resistance. Although your servo might just draw 500mA, I would recommend at least a 1A or 2A supply. The greater the overhead, the lower the voltage drop will be and the less it will effect your microcontroller.

Generally, re-chargeable batteries have a lower internal resistance than other types. I have had reasonable results using this method: Power the PICAXE from 4 rechargeable AA NI-MH batteries (4.8v) using a series rectifier diode which drops the voltage to around 4v. Power the servo directly from the battery. Use electrolytic capacitors near the PICAXE to smooth the supply and maintain the voltage when the motor causes drops in the battery voltage (during which the diode stops conducting and may even become reverse biased)

Remember though, the PICAXE ADC uses its supply voltage as a reference so any variation (due to batteries running low or whatever) will effect the reading. For accuracy in this respect, a 5v regulator, such as the old 7805, is essential.


 

BeanieBots

Moderator
The problem will be there with any motor not just servos.
There are two ways of dealing with it. One is to prevent the noise being made in the first place and the other is to prevent the circuit from being susceptible to noise.
Neither method will ever be perfect so it's always a good idea to address both.

Prevention:-
Fit suppressor caps to the motor. One between each terminal and the motor case. A third one between the two terminals. Keep capacitor leads as short as possible. These will keep brush arcing down and significantly reduce airborn electrical noise.
Fit both large and small capacitors to the supply leads going to the servos. These will prevent spikes comming back down the line and help maintain supply voltage during high current spikes.
'Isolate' the PICAXE supply line with a diode or resistor. Fit a large capacitor (1000uF) to the PICAXE supply. If the servo power lines spikes low, the capacitor will power the PICAXE until the supply recovers.
Fit 100nF as close as possible to the PICAXE. This helps to protect against high frequency power supply noise but also protects the servo from the PICAXE! Yes, it goes both ways. The servo does not want to see all that high frequency crud that the PICAXE puts on the power rail any more than the PICAXE wants to see the motor noise.
Possibly the most crucial thing with high current motors is good layout and correct wire gauge.
 
Top