stop noise from motor to Arduino/MCU

Thread Starter

bug13

Joined Feb 13, 2012
2,002
In addition to the cap across the motor it is often good to add a pair from each motor lead to the frame of the motor. What you are seeing is brush noise.
I don't have 1nF cap, but I have tried 100nF, see no significant improvement, should I get some 1nF caps and try it?
 
Last edited:

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi guys

So I have tried all the suggestions, I don't have 1nF cap, so I have used some 100nF cap between motor case and ground.

the cap values in () bracket are the one I have tried with or without, I see no improvement.

I am pretty convinced that I need some better motors, as I have tried the same circuit with a motor from a printer, it have little noise (~2-300mV Vpp on the Arduino, not 2-6Vpp with this yellow motor).

here is my circuit, any idea before I go and buy some other motors?

PS: I tried the following circuit, but with different PS (different ground too) still no good.

 

ronv

Joined Nov 12, 2008
3,770
I suppose it could be a measurement problem. Try hooking your ground lead to ground and then scoping ground. If you still see the noise it is a problem with your scope measurement.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
I suppose it could be a measurement problem. Try hooking your ground lead to ground and then scoping ground. If you still see the noise it is a problem with your scope measurement.
I did the measurement as you suggested, and I still see the noise, so how can I measure it correctly?

And I have also tried connect the scope ground to the scope directly, it picked up the noise as well when the motor is on.
 

ronv

Joined Nov 12, 2008
3,770
Make sure you use a regular scope probe with a short ground clip. It might help to have the motor case tied to earth ground.
 

GopherT

Joined Nov 23, 2012
8,009
This scope may be poorly shielded inside. The motor may be sending EMF directly to the scope if you still see the hairy signal when the leads are grounded to each other. The shielding on the leads may also be a problem if they came with the scope shown in previous post. Just a guess but worth checking out if you can borrow some probes from elsewhere.

Also, make sure you use real coaxial shielded scope probes - not just a pair of wires with alligator clips on them. In that case, picking up stray signals is almost assured. I am just mentioning this since I don't see scope probes in the earlier photo.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Just a guess but worth checking out if you can borrow some probes from elsewhere.
.
I have borrowed a set of Tektronix probes from my tutor, still very noisey. Before I was using an original Rigol probes.

I think I need to get some better motors now.
 

pilko

Joined Dec 8, 2008
213
@ bug13
Re your schematic in post 23. I do not see a 100nF cap between the Arduino supply and ground. It is important and should be as close to the chip as physically possible.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
@ bug13
Re your schematic in post 23. I do not see a 100nF cap between the Arduino supply and ground. It is important and should be as close to the chip as physically possible.
I am using a Arduino Uno board, I think it should have a 100nF close to the chip already.
 

donpetru

Joined Nov 14, 2008
185
Try using an optocoupler between control circuit (Arduino board) and power motor (H bridge). After you attach the optocoupler, mounted, between the power GND and GND Arduino board, one capacitor ~1nF - 1kV.
After doing the above changes, then use galvanically isolated power supply. Ideal would be to use two power supplies but you can use a single source of 9Vdc with the condition: after doing the changes that I have told you, then properly decoupled power Arduino boards through a LC filter consisting of a capacitor of 100nF and a series of 10 ... 100uH inductor.
 

GopherT

Joined Nov 23, 2012
8,009
Try using an optocoupler between control circuit (Arduino board) and power motor (H bridge). After you attach the optocoupler, mounted, between the power GND and GND Arduino board, one capacitor ~1nF - 1kV.
After doing the above changes, then use galvanically isolated power supply. Ideal would be to use two power supplies but you can use a single source of 9Vdc with the condition: after doing the changes that I have told you, then properly decoupled power Arduino boards through a LC filter consisting of a capacitor of 100nF and a series of 10 ... 100uH inductor.

He is getting the noise when the probe leads are connected directly to each other. Even some good leads. Opto coupler won't help that.

It may be his scope (internal shielding) or ...?
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Thanks guys, I think I will get some other motors and try. As in my test, I replaced my motor with a motor from a printer, same circuit, it works no problem.

As for my scope, I am using Rigol ds2072, and it was hacked to ds2202 with the instructions from EEVBlog
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Just an follow up: (just in case it might be useful for someone else)

I have replaced the motors with other ones, noise disappear.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Just as an aside to the issue you have had, I have been installing and designing custom servo systems for many years using various types of motors, The servo motion controllers I have used are PC based, the normal P.C. power supply common is referenced to earth ground, the analogue control from the motion control is connected to a PWM servo drive, the power supply common of which is also connected to earth ground.
It is very important to connect these to a central ground point and ensure that the frame of the motor is connected to this point.
I think your problem could also have been solved by correct bonding of both system commons.
Just my 2¢
Max.
 

gootee

Joined Apr 24, 2007
447
Faraday's Law.

Your wiring is making antennas for time-varying magnetic fields.

ALL wire pairs must have NO GAP between the wires. Same goes for PCB traces. Each circuit loop should not enclose any geometric area.

Tightly twist together all wire pairs, such as power supply voltage and ground, signal and ground, etc., ALL the way to both ends, with three or four twists per inch, or more.

If any loop has any enclosed geometric area, it is an antenna. You will probably have to re-arrange you PCB conductors, too. But start with the loose wiring.

If you have any single wire going anywhere by itself, you're doing it wrong.

Some loops will transmit and some will receive. Close ALL of them, everywhere. (One good reason to use a ground plane on PCBs is that it makes it MUCH easier, almost automatic, to minimize the enclosed loop areas.) Pay special attention to all high-current loops.

Shielding, especially aluminum, does almost nothing to magnetic fields.
 
Last edited:

Thread Starter

bug13

Joined Feb 13, 2012
2,002
...If you have any single wire going anywhere by itself, you're doing it wrong....
Thanks for your reply, I will keep those in mind in my next prototype, my little robot works ok now, I will keep it as it it for this one.


Shielding, especially aluminum, does almost nothing to magnetic fields.
Oh I don't know that, what is the best material for shielding? and what can I use from home if I don't have some suitable shielding material?
 

Dritech

Joined Sep 21, 2011
901
From the datasheet of the H-bridge it looks like the motor ground and the logic ground are connected internally. So it is useless separating them externally.
 

gootee

Joined Apr 24, 2007
447
<snipped>

Shielding, especially aluminum, does almost nothing to magnetic fields.
Oh I don't know that, what is the best material for shielding? and what can I use from home if I don't have some suitable shielding material?
If you ever really need to shield a magnetic field, one of the best materials is called Mu Metal.

Regarding materials that you might normally have around home, maybe you would get some magnetic shielding effect from some iron-based metal, such as steel (or iron).

The best solution is just to not make antenna loops for the time-varying magnetic fields. Twisted pairs are fairly good. Ground planes are fairly good.

For example, if you make a linear power supply, i.e. with AC transformer, rectifiers, and reservoir capacitors, you have to make sure that all AC and rectified AC pairs have loops with minimized area enclosed. So you twist all of the transformer windings' pairs, and be very careful to make short runs with closely-coupled conductors, to the rectifiers and caps. And if one of the primary winding's wires goes by itself to a fuse and/or power switch, on the schematic, you have to know to take the other one along with it, and back, even though it doesn't appear to "need" to go that way, "electrically".

Then if it's powering an audio power amplifier, for example, the input signal and ground pairs must be tightly-coupled (twisted, or twisted and shielded, or coaxed), from the (isolated from chassis!) input jack to the amplifier circuit input. Otherwise, the AC fields could induce significant current in the input pair's loop, which would then induce a "hum" voltage across the input resistor of a high-gain power amplifier...
 
Top