Let's Make Robots!

Where is all this noise coming from?

Hey folks,

I am finally getting around to Walter's autonomous drive mode and have run into a noise issue. It seems that my motor driver (this one) is affecting my sharp IR sensors. I am still running the motor driver off of a 14.4V DeWalt drill battery as I can't afford proper batteries yet (I don't know if that makes a difference). The Picaxe 40x1 is powered by 5 AA's with a 7805 regulator (included with the regulator is a 220uf+ cap, a 10uf+ cap and a 100nf ceramic cap in a regular configuration). Of course, the regulator and motor driver share a ground. It seems, with the motor battery disconected, my sharps are a-ok spitting out a value of about 10 or so with nothing in front. However, when the motor battery is plugged in, they jump up to about 50 or 60 (on average) while fluxuating as high as 80 and as low as 1 in short bursts. Even more odd, when the motor driver battery starts going dead, the problem seems to be resolved. Is there a way to isolate the motor driver or can I get rid of this noise another way? Big caps somewhere, maybe?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

For flybacks on the relay coils, you'd only need something common, like a 1N914, or 1N4148, as the relay coils do not carry a lot of current.

THe 500 ohm resistors are used in place of your connections to the h-bridge. Wire each PICAxe pin to ground through the resistors, run your code, and see if the noise shows up on the Sharps. If noise on the Sharps with just resistors on outputs, then the PICAxe needs some caps etc. If no noise, then the relay h-bridge needs noise suppresion.

The PS-2501 opto used in a similar h-bridge Brooksware did could work decently, probably need an added transisotr on the output to drive the driver and relays sufficiently.

 

Hello CTC,

I thought of a couple of points to add.

Electric Motors produce a lot of noise; one of the major issues is the spikes caused by the field current collapse, either during the trailing edge of the PWM Pulse or the brush moving to the next commutator

These spikes can be very high voltage; normal practice is to place diodes to shunt any over voltage. Other than the noise reason; these are used is this voltage can easily cook the electronics driving them, the same thing happens when the current is removed from a relay. The reason I brought this up is that it does not look like your driver board does no have flyback diodes on the relays. Now this is not the source of your noise, you would get a glitch when changing the motor direction.

Now the advice you have received from Robologist is spot on but there is perhaps another source of noise which needs to be considered.

When your Microcontroller starts to out put the PWM stream the current demand of the Microcontroller will put a noise signature back on the supply rail. This may be propagated to the sensor and shows up in the signal. This can be corrected by a small decoupling capacity mounted across the rails as close the Microcontroller as possible, I normally do this with most chips especially TTL.

A quick check might be to remove the motor board put say a 0.5KΩ resistor across the PWM and relay control ports (on your microcontroller board) and see if the problem goes away, if it does it is noise from the motor control, if is stays put a few decoupling caps (0.1-µF ceramic). Oh and I would put the Flyback diodes across the relay coils (get them around the right way ;-) ).

All the best

 

CtC is using BOAs Brilliant Hybrid H-Bridge Robologist Mod on Walter, that has the flybacks on. I had not thought about the relay coils themselves though, possible noise. But the noise is seen when the motor battery voltage is up, which seems to point all to a possible ground loop between the 2 sources. The test you prescribe sounds like a great trial to run. Good idea on the bypass caps too, good to have a collection of 0.1 uF just to drop in near every chip, though I think the PICAxe board might have them already.

I would really hope the relays aren't flicking so often as to cause any appreciable noise. I know I didn't publish any code, but I have a deadband in the DPDT changeover so it doesn't vibrate when close to "stop."

My money is on the motors themselves causing the noise.

If it is electrical noise then you should use shielded cable between the sensors and the processor with the shield grounded at the processor end. The bare copper in this picture is the shield wire.

productLarge_3548.jpg

As well as a capacitor near the sensor as suggested by robologist, a 0.1uF monolythic between each analog input and ground would help.

 productLarge_5067.jpg

You can also get clip on ferrite suppression sleeves.

productLarge_1641.jpg

 And ferrite chokes

productLarge_10161.jpg

 Also suppression chokes

productLarge_1630.jpg

You should be able to get this stuff at radio shack or some other electronics store.

Could you give me a run-down on this inductor you speak of?
Here's a possible, 22uH inductor at Digikey. Looks sorta like a blue resistor. Devices like this are often use to smooth out the reference supply voltage to get accurate measurements on ADC devices. The 22 micro Henry is a sorta WAG based on 19 kHz noise. Note that inductors are also called chokes by strange shirtless people on other hemispheres. The ferrite that Oddbot also mentioned is also a good possible addition as well, again on the tie between the ground between the 2 sides.

Issues with Sharps can sometimes be resloved at the sensor. Here's a related solution for a different problem, that still might work in cleaning up the Sharps.

Also, a note from another source :

Note: it is very important to put a good capacitor (something like 22uF) between GND and Vcc, directly on the sensor itself, in order to reduce the noise on the 5V power supply due to the current required by the emitting LED. In the other hand, avoid the use of a capacitor between the signal output and GND or Vcc: it may dramatically reduce the sensor dynamics (low pass filter).

I know these aren't the same as what Walter is doing, but I think they might help isolate power issues anyway. Another possiblity is to place a good inductor on the ground connection between the motor controller and the rest of the grounds.