Guidance on troubleshooting motor noise

Discussion in 'General Electronics Chat' started by Tyler54, Aug 26, 2012.

  1. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Hi all, I’m new to this forum and was wondering if I could run a problem I have been having by you.

    I have a 120V 2a water pump connected to a relay which is controlled by a Microcontroller. I grabbed some free software and I have tried to draw the circuit best I could:
    [​IMG]
    So I have an Arduino that is using a Shift register to turn on and off an optocoupler which in turn controls a relay to switch on and off an ac pump. The relay and Optoisolator are powered by a separate 5V wall wart and not connected in any way to the Arduino. The Arduino is running on battery power to help with troubleshooting. The components are physical separated in the middle.
    So the issue is the motor is causing a bunch of noise on the shift register lines and causing a reset intermittently even with all the layers of separation and isolation. I probed all the lines (5V, GND, shift register data lines) from the Arduino and they all contain a 5-7 volt spike when the motor is switched on:
    [​IMG]
    *This is the data line on the shift register.

    Now if I place a AC line filter in line with the pump all these spikes disappear:
    [​IMG]
    Line Filter Circuit:
    [​IMG]

    I have 8 pumps I have to run in this configuration, each individually controllable, and I don’t really want to buy 7 more Line Filters. Nor does it seem right that I can’t seem to filter out the noise. Is this pretty common that relays and optocouplers can’t prevent certain noise from jumping them?

    **Just for kicks I added a second Optoisolator in front of the shift register and it still had the same problem.
     
  2. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    You are not showing the motor wiring correctly. The Relay contacts are simply across the motor:confused:... and the 120VAC supply is not shown.

    What kind of AC motor is it? Noise like that usually comes from brushes.

    Try a 0.1uf 400V extended foil type capacitor across the motor terminals. If it is motor noise, it is best to kill it at the source as it can radiate through the air to cause trouble in near by circuits... even if they are floating on battery power.

    Regards,
    Ifixit
     
  3. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Thanks ifixit, my mistake, I forgot to add in the 120VAC supply. It's directly attached with the relay acting as a switch.

    It is a Water Pump. Here is the details from the webpage:
    http://www.dannermfg.com/Store/Products/Danner/PID-02728.aspx

    I was wondering if a simple capacitor would work, or something I have been reading about online called a RC snubber. With that though I seem to need the exact details of the frequency of the noise, and I'm not quite sure how to figure that out.

    I had no idea that the noise could jump like that, I just figured a optoisolator protected me.
     
  4. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    Since your micro is totally isolated by battery and opto-coupler, then the interference must be though the air via magnetic, or electro-magnetic waves (EM).
    • Layout and position of circuits can make things worst.
    • Shielding may be required.
    • Twisting power lead pairs together may help.
    • Move the motor further away from the micro. This may not work well as EM can be conducted along wiring and then radiated.
    0.1uf impedance is 26,000 Ω at 60Hz. If I'm reading your scope pic correctly, the noise is well into the Megahertz. 0.1uf at 50mhz is 0.03Ω. IE a dead short.

    The best way to trouble shoot this is by trail-&-error based on knowledge.

    Get a portable AM/FM radio and hold it near the pump. It can be tuned from 0.5Mhz to 108mhz. You will likely hear the noise everywhere.

    Good Luck,
    Ifixit
     
  5. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Thanks you so much for this information. It's actually quite fascinating EM can do that, totally makes sense though as that's exactly what seems to be happening. Am I correct to assume the EM frequency stays the same as it moves across boundaries, so if I'm reading 25Mhz on the Arduino 5V rail it originated as 25MHz from the AC pump? I'm trying to figure out how to spec the capacitors without measuring Mains Lines. I like the radio idea I will give that a try.

    I'm still learning to use my oscilloscope, pesky job keeps cutting into my hobby time :). I noticed a setting under measurement called frequency and as I went over the spikes it jumped anywhere from 5 to 100 Mhz. Most were under 50 though.
    The Line Filter I was using has 3 parallel capacitors speced at .22uf across the terminals and 3300pf from the terminals to ground. That seemed to filter out all the noise on the pump so I'm thinking that confirms most of the noise is under 50Mhz? I will buy a bunch of high voltage capacitors and see if I can start reducing the noise.

    Thanks again.
     
    Last edited: Aug 27, 2012
  6. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    Connect a 3" piece of wire on the end of your scope probe. Just hold it near the noise source and set the scope vertical gain for max as required.

    Hold the probe near the micro and see if the EM is there as well. The frequency does not change as it radiates. You should be able to pickup the micro's clock frequency as well.

    You will find EM everywhere, but keep things in perspective, it is only the noise that is radiating with too strong a signal that will cause problems in other circuits.


    Another ideas:
    • connect a .1uf decoupling capactor between the cathode of D1 to ground of the second board. Also connect a .1uf decoupling capactor between the anode of D1 to ground of the second board. Your control signal should not be effected by the cap as it is very slow
    • The shift reg reset pin (MR) should be pullup high and not floating. This way it is much less suseptable the EM.
    • Pin 13 (OE) should be grounded.
    Google: emc compliance

    Have Fun,
    Ifixit
     
  7. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    I bought a bunch of capacitors today:
    0.1uf 650V
    0.22uf 650V
    0.47uf 650V
    3300pf 650V

    I was thinking of applying them like below, .22uf across hot and neutral, 3300pf across hot and ground and 3300pf across neutral and ground. I just wanted to check in though for confirmation before I proceed.

    [​IMG]
     
  8. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    It looks okay to me, but may be more than is required. A test will tell.

    Good Luck,
    Ifixit
     
  9. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    You're the best, it worked! Thanks for all the suggestions and help.

    With just the .22uf across the terminals it removed most of the noise, the odd time (1/20) I got a bit of a blip. When I added the 3300pf to ground everything pretty much disappeared. I did get a 2-10 MHz spike once but it was less then a 1 volt swing so I'm thinking that won't harm anything. I'm guessing the reason there are tiny random spikes sometimes has to do with where in the AC cycle the pump was turned off?

    I'm going to read a bit more to understand what the difference between the .1 and .22uf would be too.

    Thanks again!
     
  10. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Before I proceed replicating this for the 7 other pumps do I need to worry about having 8 .22uf in parallel?

    [​IMG]
    *The pumps are separated by their power cords but everything in the schematic is contained in a power bar enclosure. Note I also labelled the hot and Neutral backward in the diagram.
     
  11. crutschow

    Expert

    Mar 14, 2008
    13,028
    3,237
    If you use zero-crossing solid-state relays to power the motors you will significantly reduce the switching noise.
     
  12. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    The filter network will be most effective if placed near the source of the noise, ie the motor. If there is a long run of cable between filter and motor then this may spoil the effect of the filter... or not. It is hard to be sure without knowing the exact nature of the noise and your layout of equipement. How about some pictures? We all like to see pictures here... saves reading a thousand words:).

    The .22u caps are not in parallel unless more than one relay is closed. Each relay will only see one cap as a load.

    If it works to only have the caps at the power bar and not at the motor, then perhapes only one filter is needed on the AC input to the power bar. However, you may then need small caps on the relay driver lines.

    Good Luck,
    Ifixit
     
  13. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    The PowerBar:
    [​IMG]

    The Relay Board:
    [​IMG]

    All my testing so far has been done with the actual pump on its 5 foot cord. So I should be ok as the .22uf and two 3300pf seem to smooth it out nicely. I could splice up the cable a bit closer to the pump but I have to stay at least 2 feet away as they are underwater. :eek:

    I tried putting the caps on the AC input of the powerbar but it had very little impact on the noise, I'm not sure if it was due to the distance or the fact the relay board is so close to the pumps \ relays.

    That makes sense, I think most of the time not more than 1 or 2 pumps would be running. With capacitors in this configuration is the increased load the only concern I need to be aware of?

    Thanks
    Tyler
     
  14. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    In hindsight I should have gone with ZC SSR instead, I just didn't realize how much EM these pumps could produce. The next project I will know better. :)
     
  15. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    Nice pics, thanks for posting them.

    A 0.22uf cap has a 12,000Ω impedance at 60Hz, so if 8 were in parallel with all pumps on then that would be 12K/8 = 1500Ω. 120VAC/1500 = 80 milliamps, or 9.6 Watts of reactive power. This is only 1.3% more than the 744 Watts used by the pumps.

    If the "in line" filters work where they are then leave them there.

    Bringing the Ardino power and the shift register signal into the same box as the noisy power from the pumps was not a good idea. However, whats done is done. Keeping the noise out of the box is one way to go forward.

    Alternately, you could filter the noise from the ardino signals and power. Small 50V 0.1u, or smaller, ceramic caps would likely do, mounted at the connector inside the box, or "in line" just outside the box. Keep the Ardino as far from everything else as possible so it doesn't pick up noise directly. Re-read post #6.

    Regards,
    Ifixit
     
  16. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Lesson learned :)

    I initially had the shift register in the BOX as well, next to the yellow RJ45 connector at the top right of the powerbar picture. The point was so I could use a single Cat5 cable to control all 8 relays - I had nine wires total (8 input wires and the 5V from arduino). I'm hoping to put it back in there but I will have to see if I can keep the noise off it. I will start with your decoupling suggestions.

    The relay board has optocouplers on it which makes the inputs Active Low. When I'm placing decoupling capacitors does that mean for each of the 8 input pins I place a .1uf across it and the Arduino 5V rail?

    Both MR and OE on the shift Register are as described.
     
  17. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Just for fun, here is a pic of what I'm building. This is my first test before I came across the noise issues in the powerbars. Try to ignore the temporary getto cardboard box powerbar holder ;)
    [​IMG]
    The pumps are all in those white containers and bucket as well as 12 float swiches and 3 IR level switches and a slew of other stuff :)
     
  18. ifixit

    Distinguished Member

    Nov 20, 2008
    639
    108
    I seem to recall using a shoebox once for a project:D.

    If the +5V to the relay coils is a buss that goes to all relay then 1 or 2 0.1u caps may be enough for it.

    However, if you want to put the SR in the box also then my decoupling suggestion is not likely required if the pump cable in-line filters work well enough.

    If it didn't work well, try to shield the "shift registers old home" area with copper foil, or aluminum including the RJ45 connector to the outside. You can just decouple the opto-coupler drive lines, 7 signals plus 5V rail, at the shield boundary. This way any noise left in the box can be stopped here before getting to the SR.


    Nit-picking safety issues...
    Is there a ground wire in the in-coming power for the pumps?
    Is it connected to the box near where it comes in?
    Do the receptacle grounds also connect back to this same point?

    Regards,
    Ifixit
     
  19. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    Not at all, I appreciate the words of wisdom. It kinda looks like I'm standing in a bathtub full of water playing with mains lines :) Yes, to all three of the questions though, and I also have all this plugged into GFCI's.

    I will try putting the SR back in and see what kind of results I get.

    Thanks,
    Tyler
     
  20. Tyler54

    Thread Starter New Member

    Aug 26, 2012
    15
    0
    So I pulled everything apart and am slowly putting it back together.

    I started reading some more about the RC snubbers. Shouldn't I be including a resistor between the poles in this setup to dissipate the extra power? It would be easy to add now that everything is apart.
    [​IMG]
     
Loading...