Author Topic: motor filter does not reduce the noise  (Read 1223 times)

0 Members and 1 Guest are viewing this topic.

Offline spook1Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
motor filter does not reduce the noise
« on: December 17, 2012, 10:06:15 AM »
Hello folks,

I am building a simple robot, and according to my manual I need to implement a filter to get rid of motor noise.
When I connect a scope to my motor leads I see high voltage spikes (up to 2 volts).
After I apply the filter as described (image below) I still see the spikes on my electronics leads.



imageshack.us/f/838/imagefilter.gif/

I suspect that my filter needs a much highers LC value to get a nice and flat voltage for my electronics.

Am i right or am i missing something?

Kind regards

Martin
« Last Edit: December 17, 2012, 10:20:18 AM by spook1 »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: motor filter does not reduce the noise
« Reply #1 on: December 17, 2012, 01:06:04 PM »
Try also putting some ceramic capacitors right across the motor connectors, on the actual motors. Start with 10 nF ceramics. Ideally, you use three: One across the leads, one from lead A to chassis/ground, and one from lead B to chassis/ground.

The filter you're showing also doesn't put a coil on the ground wire, so perhaps there can be some leakage there. A common mode choke across the motor drive leads might also do something.

Finally, a 7805 is a very old linear regulator. You can find other regulators with much better noise immunity, such as an LM350 or a LF50ABV.
You also want a significantly bigger capacitor in front of the regulator -- say, 100 uF electrolytic. Another 10 uF after the regulator would also be good.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: motor filter does not reduce the noise
« Reply #2 on: December 17, 2012, 07:51:47 PM »
How long is the ground lead of your scope probe?
It is very likely that the noise is being picked up by the probes ground lead and is not really in the circuit.

Here is some info:
http://portal.national.com/rap/Story/0,1562,18,00.html

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: motor filter does not reduce the noise
« Reply #3 on: December 17, 2012, 09:05:27 PM »
Hi,

I suspect that my filter needs a much highers LC value to get a nice and flat voltage for my electronics.

Am i right or am i missing something?

You're probably very spot on, as DC motors have a lot of relatively low frequency noise, while your filter is mostly good for noise in the MHz spectrum.

Use at least 470nF for C1 and C2 and 1mH is a good candidate for L1.
Make C3 100F (or loose it and make C1 and C2 47F to 100F).

Place the filter as close to the motor as possible and connect the other end of the wires from the filter right at the terminals of the battery, where the fuse should go as well.
The wires from the battery to the 7805 should go directly to the battery terminals as well (still fused, but a separate fuse is better).
The reason for this is that your battery is the place of lowest impedance, so it will keep (wired) motor noise from reaching the logics supply.
If motor and logics share some of the wiring, the motor will modulate the logics supply (but to a lesser degree with a proper filter).

Put 100nF ceramic caps sirectly at the motor terminals in a delta as shown here (filter shown as well).

Your 7805 should have 22F on the output (C5) and it wouldn't damage to make C4 220nF to 330nF.

Do the above and you'll have a nice and quiet supply for your logics :)
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: motor filter does not reduce the noise
« Reply #4 on: December 17, 2012, 09:25:24 PM »
Hi,

The filter you're showing also doesn't put a coil on the ground wire, so perhaps there can be some leakage there.
Leakage there??
Since when was Kirchhoff's second law terminated? ::)


Finally, a 7805 is a very old linear regulator. You can find other regulators with much better noise immunity, such as an LM350 or a LF50ABV.
LM350 is a very old regulator as well.
By which parameter do you get to that conclusion? :(

(Hint:All 3 of them have close to equal "noise immunity", although the LF50 is slightly worse than the other two).


You also want a significantly bigger capacitor in front of the regulator -- say, 100 uF electrolytic.
Not unless there's half a meter or more of wire between battery and regulator (which there shouldn't in the first place.


Another 10 uF after the regulator would also be good.
22F would be aces.
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline spook1Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: motor filter does not reduce the noise
« Reply #5 on: December 18, 2012, 09:45:37 AM »
Hi Soeren,

Thanks for the suggestions.
We changed the capacitors, removed C1 and C2, C3 was chosen to be 47 uF.
This way I built a pi-filter. Still i got spikes, from 5 volts down.

The addidtion of a second coil in the ground leads solved this problem.

Now I have square-shaped filter, with two inductances in top and bottom line, and two capacitors at the sides.

I do not understand why the coil in the ground lead helps.
That is a problem, because we want our students to built a similar filter, therefgore we must understand how it works ourselves :-)

regards

Martin

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: motor filter does not reduce the noise
« Reply #6 on: December 18, 2012, 02:13:17 PM »
Since when was Kirchhoff's second law terminated? ::)


I was thinking of common mode interference, which may end up screwing with the ground of the logic side. This assumes that wire inductance and circuit capacitance allows such problems to propagate -- for example, if you don't use a star connection to the battery. This not being the most likely source of problems, I added "perhaps." Clear enough?


Quote
Finally, a 7805 is a very old linear regulator. You can find other regulators with much better noise immunity, such as an LM350 or a LF50ABV.

LM350 is a very old regulator as well.
By which parameter do you get to that conclusion? :(
(Hint:All 3 of them have close to equal "noise immunity", although the LF50 is slightly worse than the other two).


I remembered the 7805 as only having 60 dB rejection. I remembered LM350 having 86 dB, and the LF50 80 dB.
The 7805 (just looked it up in the data sheet) is specified with 56 dB minimum rejection and 72 dB typical: http://www.ti.com/lit/ds/symlink/lm340-n.pdf
LM350 has 66 minimum and 86 dB typical, with 10 uF output capacitor: http://www.ti.com/lit/ds/symlink/lm150.pdf
LF50ABV has 80 dB typical rejection: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000546.pdf

So, if you go with "typical," my recommendation still stands, but the difference is not as dramatic as I recalled.


Quote
You also want a significantly bigger capacitor in front of the regulator -- say, 100 uF electrolytic.

Not unless there's half a meter or more of wire between battery and regulator (which there shouldn't in the first place.


Sometimes, you have no choice in the distance between your logic and your power source.

Quote
Another 10 uF after the regulator would also be good.

22F would be aces.

[/quote]

More is often better! Also, the traditional advice of doubling up a ceramic with an electrolytic also makes sense, as the ceramic has much lower ESR and better high-frequency performance, and the electrolytic can provide bulk capacitance for lower frequencies (such as seen at the fundamental frequency of DC brushed motors.)

One place you have to be careful with not using too much capacitance is when inrush current matters. This turns out to be the case for motor terminal capacitance. Depending on the ratings of the motor controller, as little as 10 nF may cause a fast motor controller to detect overcurrent and go into shutdown (I had this happen with a Pololu controller for small motors.) Unconditionally putting 100 nF across the motor terminals might cause motor controller problems. My advice would be: Try it, and if it works, then keep it.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: motor filter does not reduce the noise
« Reply #7 on: December 21, 2012, 08:59:14 PM »
Hi,

We changed the capacitors, removed C1 and C2, C3 was chosen to be 47 uF.
This way I built a pi-filter. Still i got spikes, from 5 volts down.
Didn't you change the inductance to 1mH as well??

What do you mean by "spikes, from 5 volts down" and "up to 2V" in your previous post?

Any chance you could post a 'scope pic of the noise, showing amplitude and approximate frequency band?


The addidtion of a second coil in the ground leads solved this problem.
What value is this second coil?


I do not understand why the coil in the ground lead helps.
That is a problem, because we want our students to built a similar filter, therefgore we must understand how it works ourselves :-)
Yes, you should know how to calculate the filter and understand how it works, even though on a hobby basis, it's easier to just go with a whopping large coil and some caps to match :)

Without knowing what values you added and how it's placed physically, I can only guess, but perhaps you added a larger value coil and in any case, two serially connected coils equals a larger total coil.
Running an FFT analysis on the motor noise, if at all possible, to see where the power bands of the noise resides would be helpfull, as you could then explain exactly what frequency band(s) of a given motor you want to filter and their amplitudes. It would be a good exercise for the students as well, as they can then learn to determine how much filtering is needed, rather than the suck-it-and-see approach - and dB calculation fits in naturally :)

A 'scope pic, a photo of the physical setup and the values of all 4 components would be good.
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: motor filter does not reduce the noise
« Reply #8 on: December 21, 2012, 10:34:13 PM »
Hi,

I was thinking of common mode interference, which may end up screwing with the ground of the logic side. This assumes that wire inductance and circuit capacitance allows such problems to propagate -- for example, if you don't use a star connection to the battery. This not being the most likely source of problems, I added "perhaps." Clear enough?

Clear? Nope, the noise from a motor is differential mode.


I remembered the 7805 as only having 60 dB rejection. I remembered LM350 having 86 dB, and the LF50 80 dB.
The 7805 (just looked it up in the data sheet) is specified with 56 dB minimum rejection and 72 dB typical: http://www.ti.com/lit/ds/symlink/lm340-n.pdf
LM350 has 66 minimum and 86 dB typical, with 10 uF output capacitor: http://www.ti.com/lit/ds/symlink/lm150.pdf
LF50ABV has 80 dB typical rejection: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000546.pdf

So, if you go with "typical," my recommendation still stands, but the difference is not as dramatic as I recalled.

Well, I guess you judge them by the "ripple  rejection" alone and obviously only at 120Hz, which isn't all that interesting when dealing with motor noise look at the 10kHz for a much clearer picture.
And look at the parameters of the 7805 in a datasheet for the 7805, rather than in one for an LM340! The NI datasheet (may 2000) says 80dB ripple rejection typ. at 120Hz, if that's the only parameter you want to compare them on.
And understand that ripple rejecton isn't the only number you need to judge which regulator is the better.


Sometimes, you have no choice in the distance between your logic and your power source.

Not that many "hobby size" robots makes it mandatory with more than half a meter of wiring betwen logics and battery - actually none that I know of.


More is often better!

And knowing when it is worse takes experience ;)
Don't make the regulator an oscillator or bog it down with a huge capacitive load.
The right amount is always the best!


Also, the traditional advice of doubling up a ceramic with an electrolytic also makes sense, as the ceramic has much lower ESR and better high-frequency performance, and the electrolytic can provide bulk capacitance for lower frequencies (such as seen at the fundamental frequency of DC brushed motors.)

Well, we were debating the caps on a regulators in- and output terminals here, not the Pi filter, which wouldn't need a combo cap either.


One place you have to be careful with not using too much capacitance is when inrush current matters. This turns out to be the case for motor terminal capacitance. Depending on the ratings of the motor controller, as little as 10 nF may cause a fast motor controller to detect overcurrent and go into shutdown (I had this happen with a Pololu controller for small motors.) Unconditionally putting 100 nF across the motor terminals might cause motor controller problems. My advice would be: Try it, and if it works, then keep it.

If a motor controller flatlines over a 10nF (or even a 100nF) cap, I have only one thing to say about it: Extremely poor design. (In lack of a much stronger expression ;D)

The inrush current of a 10nF (or 100nF) cap is nothing to worry about in a well designed driver, as it's build to withstand such.
Perhaps your driver died of some other reason. How did you determine that it was a 10nF cap that ended its days?


I really wish you'd stick to not guessing or presenting misconceptions as facts when you post - there's enough of that on the net already - it's not that hard checking, if what you intend to write is fact and if all would just stick to writing what they really knew (verified), we wouldn't be having so much myth floating around dumbing down people who wish to learn - just look at how hard it is to debunk the myth of the so called "Memory Effect" of rechargeable cells - the person(s) responsible for that should be drawn and quartered and those that pass on the myth out of ignorance... ::)
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: motor filter does not reduce the noise
« Reply #9 on: December 22, 2012, 12:23:15 AM »
Quote
the noise from a motor is differential mode


Yet, the OP reported that adding an additional inductor on the GND line solved the problem. (Exactly why this is is yet TBD -- it's quite possible that other changes, not involving the GND line, would have had the same effect.)


Quote
If a motor controller flatlines over a 10nF (or even a 100nF) cap, I have only one thing to say about it: Extremely poor design.


Yet such things are made by popular chip manufacturers and sold on popular robotics web sites.


Quote
And look at the parameters of the 7805 in a datasheet for the 7805, rather than in one for an LM340!


That data sheet is a combined data sheet for a family of regulators, including the 7805. Well, the 7805 I used before I weaned myself off it -- a lot of companies seem to make equivalent" parts with that name that could be described as "equivalent-ish."

You can call the 78xx (and LM1117 and friends) pet peeves of mine. There is no reason to use them. For low-current applications, there are more modern devices which have *much* lower drop-out (0.3V instead of 2.0V) and for high-current applications, the LM350 does a lot more (if you heat sink it) and you should probably go with a switching DC DC converter anyway. My real goal in saying that the 7805 is old is to do my part to try to get it eliminated from all the beginner electronics designs out there. You may or may not agree with this goal.


Quote
I really wish you'd stick to not guessing or presenting misconceptions as facts when you post


I have seen you rely on memory and end up being off on this very board. It's a human mistake, and I admit I'm both a human and make mistakes. But I try to help people who post questions, with the experience I have. For electronics, that's hobbyistlevel. I appreciate whatever statements you contribute about the solutions, as in engineering, there rarely is only one workable solution.


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: motor filter does not reduce the noise
« Reply #10 on: December 25, 2012, 07:53:36 PM »
Yet, the OP reported that adding an additional inductor on the GND line solved the problem. (Exactly why this is is yet TBD -- it's quite possible that other changes, not involving the GND line, would have had the same effect.)

Adding inductance gives...Well, added inductance.
Doesn't change the fact that motor generated noise is differential - you do understand the difference between common mode and differential mode I hope.


Yet such things are made by popular chip manufacturers and sold on popular robotics web sites.

This is just revealing a great lack of knowledge (a good reason not to answer questions in that category).
People able to read and interpret the datasheet you linked to can see for themselves, that a 10nF cap is unable to kill this chip. I don't know why you insist that this is so, I can only inform you that it ain't.
Based on the "typical" numbers, a 10nF cap can result in a (very short) surge of slightly below 1.76A peak Based on the max. numbers, the peak value gets much lower of course.
Even if you shorted the output, it should survive fine, as it's internal current limiter will keep the max. current out of it at a max. between 1.6A and 3.5A.


You can call the 78xx (and LM1117 and friends) pet peeves of mine. There is no reason to use them. For low-current applications, there are more modern devices which have *much* lower drop-out (0.3V instead of 2.0V)

There's a lot of good reason to use them; proven design, low price and world wide availability.
You can't compare them to LDOs, they're very different beasts, with different forces and weaknesses and a low dropout is rather unimportant in some applications.
Why do you think they're still produced if LDOs were the universal solution?


and for high-current applications, the LM350 does a lot more (if you heat sink it) and you should probably go with a switching DC DC converter anyway. My real goal in saying that the 7805 is old is to do my part to try to get it eliminated from all the beginner electronics designs out there. You may or may not agree with this goal.

I have a suspicion that "your part" may drown amongst the lots of pro designs that still use the 78xx and its siblings.
And if you wanted to be true to that cause, then get rid of the old LM350 as well, it's a weakling when compared to eg. the Micrel 7.5A LDO (w. a current limit of 9.5A to 15A) regulators I use a lot.

For anything below 1.5A, I use the LM317/LM337, as it allows me to keep 2 regulator types for all positive/negative voltages, rather than the 78xx/79xx series - keeps the stock down.


Quote
I really wish you'd stick to not guessing or presenting misconceptions as facts when you post

I have seen you rely on memory and end up being off on this very board. It's a human mistake, and I admit I'm both a human and make mistakes.

It's very easy to postulate, without substantiating with a link to the relevant post!

And I'm not talking about a slip of memory, rather about your weird claims - like the 10nF that killed your motor driver.
I wonder how you came to that conclusion btw. so feel free to comment!

There's a world of difference between a memory slip and spreading misinformation.

All people will either mistype or "mis-remember" at times and the more letters you jot down, the more will appear, but given this is my post number 4'668 or so and you have, at time of writing, 73 posts, perhaps you should look at the post/error-rate.
The key to a low post/error-rate is to simply keep ones yap when the subject/question is outside ones (confirmed) knowledge and/or interest sphere.


But I try to help people who post questions, with the experience I have. For electronics, that's hobbyistlevel. I appreciate whatever statements you contribute about the solutions, as in engineering, there rarely is only one workable solution.

I'll give you no grief for helping others with correct knowledge. Guesses and misconceptions OTOH, annoys me extremely, as anyone writing and managing to sound like an authority on the subject, can do a lot of harm, that in some instances is irreversable.
Regards,
Sren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: motor filter does not reduce the noise
« Reply #11 on: December 26, 2012, 06:53:34 PM »
Yet such things are made by popular chip manufacturers and sold on popular robotics web sites.

This is just revealing a great lack of knowledge (a good reason not to answer questions in that category).
People able to read and interpret the datasheet you linked to can see for themselves, that a 10nF cap is unable to kill this chip. I don't know why you insist that this is so, I can only inform you that it ain't.
Based on the "typical" numbers, a 10nF cap can result in a (very short) surge of slightly below 1.76A peak

[/quote]

So, if you actually read my post, you'd say I didn't say "kill," I just said it *didn't work* because the overcurrent protection shuts down the chip before it can drive the motor. Then it comes back, overcurrents, chops, ... repeat. Not enough current goes to the motor to start moving. Simply removing my filtering cap from the motor solved this problem and made it work. I keep saying this, because I experienced it myself, I measured it myself, and the designer at Pololu confirmed that this is what's happening. Thus, I believe it to be true. Adding too much capacitance on a DC motor can cause certain motor drivers overcurrent protection to kick in, and makes the motor not go. I don't understand why you keep claiming that this is not so?

Quote
Why do you think they're still produced if LDOs were the universal solution?


Old habit? I hate it when I have a 5.8V supply, and it can't reliably drive a 5V part because someone put in a 2.0V drop-out when a 0.35V ULDO part would be better in pretty much all ways. The worst culprit here is likely the Arduino Uno. Another pet peeve is that "LDO" parts have 1.2V drop-out, where non-LDO parts have 2.0V -- the difference is not particularly big... but I'm fighting losing battle against a long tradition of naming there.

Quote
And if you wanted to be true to that cause, then get rid of the old LM350 as well, it's a weakling when compared to eg. the Micrel 7.5A LDO (w. a current limit of 9.5A to 15A) regulators I use a lot.


For 7.5A, I think I'd prefer a switching DC DC converter :-) (Assuming the ripple isn't a problem and/or can be filtered)

But I'm sure there are cases where a MIC29750 will be just the thing!

And I'm not talking about a slip of memory, rather about your weird claims - like the 10nF that killed your motor driver.
I wonder how you came to that conclusion btw. so feel free to comment!


I described it above. And, again, I wonder why you say that I say that the capacitor "killed" my driver?

I said the driver went into shutdown. You translated that to "flatline," which I took to be your word for the same phenomenon. That may have been a bad assumption on my part, but then, why would you mention "flatline" if it meant something else?

You can do the experiment yourself: Buy this controller, and a small motor. Put a capacitor of your choice across the terminals. Watch the controller not drive the motor. (And hear the characteristic squeal of the motor windings from getting too lean a PWM.) This happened with a 100 nF capacitor, and the recommendation from the vendor was that even a 10 nF capacitor wouldn't work because of the limit of the driver, as there's already 3.3 nF across the terminals on the controller board. Based on this sound experimental AND theoretical knowledge (which you verified yourself with numbers,) I suggested that blindly pasting a 100 nF capacitor across the terminals of a motor is not always a good thing to do, because it may make things like this stop working, untill you remove the capacitor again. "Stop working" is here defined as "motor not running," which is a definition I would think most people agree with.

And, the reason I had put that 100 nF on there was that, prior to this experience, I had never came across a case where that would have been a problem, so I thought I'd share this piece of surprising advice. The only one who calls it into question is you, who haven't actually run into it What's most surprising is that you even ran the numbers, came to the conclusion that it *could* reach the overcurrent threshold, and yet didn't believe me that it happens in reality.

Quote
There's a world of difference between a memory slip and spreading misinformation.


When I share something, it is because I believe it to be correct and helpful. I am happy to be corrected when I'm wrong. It seems that most of your attacks against me, personally (for reasons I don't understand) have to do with word choices. For example, I say "shutdown," you say "flatline," and you then say I said "kill."

Is it voodoo to think that parallel motor leads can pick up noise in a magnetic-rich environment? Perhaps. That's why I weren't pushing that theory hard, using words like "might." Yet the square filter somehow solved the problem. Better theories as to why, and methods for how to prove/disprove those theories, would be good contributions to this thread!

You also went after me personally because I have experience with a different contracting environment than you do: http://www.societyofrobots.com/robotforum/index.php?topic=16383.0

When someone shows me a better way, I love it, because that's how I learn. However, when someone personally attacks me because I'm wrong -- or, in this case, because your interpretation of my words disagree with your experience -- it seems... overly aggressive?
« Last Edit: December 26, 2012, 06:56:17 PM by jwatte »

 


Get Your Ad Here

data_list