go_away

Author Topic: Filtering out electrical noise from motor...  (Read 4525 times)

0 Members and 1 Guest are viewing this topic.

Offline bulkheadTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Filtering out electrical noise from motor...
« on: December 04, 2007, 01:10:33 AM »
I have solarbotics motors and they generate a ton of electrical noise.  When they start running everything gets really buggy.  Right now I have 3 capacitors on each motor and a ground to the metal frame, but it doesn't seem to do very much.  Aside from optoisolating everything, are there other methods to reduce this noise?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #1 on: December 04, 2007, 01:26:48 AM »
How do you have the three capacitors connected to your motor and what value capacitors are you using?  If you're not doing so already, I'd recommend three .1uF caps connected such that there's one across both motor terminals and one from each motor terminal to the motor's metal frame.  In addition, you can decrease motor noise by making sure the motor wires are as short as possible and twisting them around each other in a helix.  You can further decrease noise by adding bigger capacitors across your MCU's power supply on both sides of your regulator.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Filtering out electrical noise from motor...
« Reply #2 on: December 04, 2007, 12:23:50 PM »
In addition to what Bens said, what does your electronics that is buggy look like (noise suppression wise)?

You also want a voltage regulator with a few .1uF ceramic caps both before and after it.

If this still doesn't work, I suspect you are having a brownout problem, meaning when motors run the voltage drops below what your electronics are meant for (even if for a split second). This means that your power supply isn't supplying enough current, and/or your starting voltage is a bit too low. You can try putting a big cap (3000uF+) across your battery terminals if you want.

And worst case, just use a separate power supply for the motors (with common ground!).

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #3 on: December 04, 2007, 02:54:35 PM »
In addition to what Bens said, what does your electronics that is buggy look like (noise suppression wise)?

You also want a voltage regulator with a few .1uF ceramic caps both before and after it.

If this still doesn't work, I suspect you are having a brownout problem, meaning when motors run the voltage drops below what your electronics are meant for (even if for a split second). This means that your power supply isn't supplying enough current, and/or your starting voltage is a bit too low. You can try putting a big cap (3000uF+) across your battery terminals if you want.

And worst case, just use a separate power supply for the motors (with common ground!).
OFF topic just something i've been wondering lately

what if the motors are rated at 12v and are being supplied 12v, and the curcitry is 5v. would you still make teh ground common? and would it affect it?
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Filtering out electrical noise from motor...
« Reply #4 on: December 04, 2007, 02:59:22 PM »
Quote
what if the motors are rated at 12v and are being supplied 12v, and the curcitry is 5v. would you still make teh ground common? and would it affect it?
motor drivers won't work without a common ground with the MCU . . . you need a reference 0V to do PWM.

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #5 on: December 04, 2007, 03:06:03 PM »
what if you're not doing pwm?
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #6 on: December 04, 2007, 03:10:03 PM »
If your MCU is controlling the motors, the motor driver needs to share a common ground with your MCU.  Let's say your MCU sends a 5V signal to the motor driver.  If the driver isn't connected to the MCU's ground, that 5V is meaningless (voltage is strictly a relative quantity, it means nothing in an absolute sense).  Any time you have two units communicating with eachother via voltages, they must share a common ground.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Filtering out electrical noise from motor...
« Reply #7 on: December 04, 2007, 03:12:24 PM »
You mean like use a jedi force or something?  :P

Serious though, to have 12V you also need 0V. To control a motor you need a voltage difference.

Ok lets say you don't have a common ground.

Your MCU has a voltage of 0V to 5V. And your motor driver has some other voltage lets say 5V to 17V (voltage difference is 12V, so as far as the motor driver cares, 5V is ground).

Now your MCU sends a 5V signal to the motor driver, but since the motor driver thinks 5V is ground, nothing happens. Now your MCU sends 0V to your motor driver, but your motor driver thinks its -5V and it fries.

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #8 on: December 04, 2007, 03:27:29 PM »
Now your MCU sends 0V to your motor driver, but your motor driver thinks its -5V and it fries.

I don't think that's how it would work, exactly...  If you had a situation where there was a voltage difference between the two systems that could fry one of them, then connecting the two grounds would be equivalent to creating a short circuit.  In order for one to fry, there would have to be something driving current from one system to the other.  Instead, when you have two separate systems, a single line from one appears to the other as a floating input.  This is why I can touch the positive termal of one battery and the negative terminal of another, separate battery, and nothing happens.  There is no voltage difference between the two disconnected batteries, only voltage difference between a battery's + terminal and its own - terminal.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Filtering out electrical noise from motor...
« Reply #9 on: December 04, 2007, 03:34:12 PM »
ehhh sorry I over exaggerated. With batteries as bens said, frying won't happen.

But there are times, depending on where the voltages are coming from, that you can create an unexpected short. If something is actively causing two voltages to float away and it isn't just random.

I've heard stories of people frying USB ports using power supplies with incorrect grounding . . .

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #10 on: December 04, 2007, 06:47:32 PM »
k. so all ground even diferent voltages are connected.

Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline bulkheadTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Filtering out electrical noise from motor...
« Reply #11 on: December 05, 2007, 04:16:36 AM »
Right now I have 1uF electrolytic capacitors on the voltage regulators.  I will try getting a much larger one.

I have tried twisting the motor wires and using both 1uF and .01uF.  Will .1uF be much better?  I've found that the .01uF is slightly better than the 1uF.  Also, I have 3 capacitors on each motor, but plugged in on the breadboard near the h-bridges.  Will it affect it that much if i solder them on to the motors directly?

The motors that I am using are by no means high drain.  They have a terminal resistance of about 9 ohms, so at 8.4V, its less than 1 amp of stall current.  I'm using rechargeable NiMH 2/3A batteries, which should be good for 15 amp continuous drain.

The kind of noise I am getting seems to interfere with sensor readings and PWM signals.  The motors kind of "glitch" when they run (it isn't smooth) and the one servo I have twitches a lot when the motors begin running.  It isn't browning out constantly because I have a 2 second delay on startup which I don't observe very often, but it does sometimes reset.  I am not sure if it's a brownout or if the reset line just got pulled low by the noise.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Filtering out electrical noise from motor...
« Reply #12 on: December 05, 2007, 06:01:12 AM »
Cut the noise at the source, not on your board! Mount the 0.1uF capacitors directly on the motors!
Install large (like 1000uF) before and after the regulator, but keep the 0.1uF capacitors in place. There is a reason the 0.1uF is used... An each IC (including Sharp sensors) needs one 0.1uF and one 10uF capacitor on it's power pins.
« Last Edit: December 05, 2007, 06:02:02 AM by Ro-Bot-X »
Check out the uBotino robot controller!

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Filtering out electrical noise from motor...
« Reply #13 on: December 05, 2007, 06:49:32 AM »
k. so all ground even diferent voltages are connected.



Yep   ;D
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Filtering out electrical noise from motor...
« Reply #14 on: December 05, 2007, 08:03:11 AM »
FYI

use an electrolytic capacitor for the large cap (polarized) . . . they are slow to supply/store electrons, but can store a lot of em . . .

use a ceramic capacitor for the smaller caps (non-polarized) . . . they can supply/store electrons at high frequencies, but can't store much . . .

when you use them together, you cover all situations

Quote
so at 8.4V, its less than 1 amp of stall current.  I'm using rechargeable NiMH 2/3A batteries, which should be good for 15 amp continuous drain
Just to make sure I understand you: You are using two motors that each drain ~1A (are you sure?) with an 8.4V battery capable of supplying 2/3A? or 15A? Is the battery fully charged?

Quote
The kind of noise I am getting seems to interfere with sensor readings and PWM signals . . . The motors kind of "glitch" when they run (it isn't smooth) and the one servo I have twitches a lot when the motors begin running . . .It isn't browning out constantly because I have a 2 second delay on startup which I don't observe very often, but it does sometimes reset.
This really sounds like a brownout problem. A brownout doesn't always cause a microcontroller to reset because they can run at much lower voltages, some perhaps as low as ~1.5V. However the drop in voltage can cause problems with the clock frequency (can affect servo PWM), can cause PWM amplitude voltage to drop below servo threshold, and cause ADC to not read the full ~5V.

If you have an oscilloscope, scope between ground and the voltage right after the 5V regulator. See what happens to the voltage when you run both motors full speed one direction, then suddenly reversed full speed the other direction.

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: Filtering out electrical noise from motor...
« Reply #15 on: December 05, 2007, 12:06:47 PM »
I have tried twisting the motor wires and using both 1uF and .01uF.  Will .1uF be much better?  I've found that the .01uF is slightly better than the 1uF.  Also, I have 3 capacitors on each motor, but plugged in on the breadboard near the h-bridges.  Will it affect it that much if i solder them on to the motors directly?

.1uF might very well be better than 1uF and .01uF depending on the frequency response you need to supress the noise, and as Ro-Bot-X says, put the caps on your motors (as close to the source of the problem as possible).

If you have access to an oscilloscope, use it to take a look at your regulated voltage so you can see what you're dealing with and whether the steps you are taking are making things better.  You might not even have to switch motor direction to see the problem since it might be arising from simple bouncing of the motor's brushes.

 


Get Your Ad Here