PWM Driven Motor Noise

Discussion in 'General Electronics Chat' started by John5788, Jun 23, 2009.

  1. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    I have a motor controller designed using a microcontroller to control the speed with a PWM signal. the schematic looks something like this

    [​IMG]

    I am trying to power a 30A, 12V motor and am getting a lot of noise on my 12V line which is causing my MCU's logic to crash and fail.

    I've read up on using a diode like FR302 to direct the backfeed from the motor and a small capacitor, but this isn't helping very much.

    I am sure the cause of the logic failing is the motor generating too much voltage, I see spikes and dips all over the place on the 12V line with a scope. I've added a zener diode in the circuit to prevent the large spikes, which has worked, but now the dips still exist.

    I know that this design kind of works because I can control a small 1A motor without any issues.

    any ideas on how to fix this?
     
  2. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    I would do two things, put a choke in your power line to 7805, after your 100uf cap and add another 100uf cap to comm, between the choke and regulator.

    Secondly, I'd isolate your PWM from your switch elements.
     
  3. AdrianN

    Active Member

    Apr 27, 2009
    97
    1
    Besides the advice from GetDeviceInfo I would also connect ceramic caps in parallel with the 100uF caps, to cut down the high frequency spikes.

    Also, make sure you have a star connection to power supply. One pair of wires (traces) connect the power components to power supply. Another pair of wires connect the low power devices directly to power supply. Each 100uF and ceramic pair are connected directly to their respective devices.

    Hope this helps.
     
  4. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    do you recommend something like this:

    http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMvgExXaNlWje7nWfcmUIpAQ2X62p3RG8Ss=

    i'm not very familiar with chokes, never used one before. Do I just connect this in series on the path to the LM7805?
     
  5. Skeebopstop

    Active Member

    Jan 9, 2009
    358
    3
    snubber cap on the 12V bus as well to help get rid of transients. Transient Voltage Suppressor as well.

    I hope you have a buffer driving the gates of those FETs? Paralleling them like that doubles the input capacitance.

    Depending on the layout, and the fact you have no gate resistors inline with the FETs, switching them too fast with no resistance can lead to ringing on the gate and whacky transients on the power line.

    Your 100uF probably is high ESR capacitor type. That is why Snubber cap is better to help get rid of fast transients from regenerative energy. You probably should consider a regeneration resistor circuit to burn away over voltage scenarios if you are switching 30A on and off!

    Just imagine with the line inductances and all combined, V = L * dI/dt. Your dt is probably in the order of 300-500nS right now. dI = 30A. Your L may be up to 30-500nH depending on layout and cabling. This could be giving up to 30V of transient, pushing your DC Bus up to 42V.
     
  6. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    thanks for the input guys,

    I went and made a quick choke (just took an unused loop of wire from radioshack), and added it in series to my 12V for the voltage regulator and here are the results from the scope for the 5V power source of my MCU:

    without choke on 12V:
    [​IMG]

    with choke on 12V:
    [​IMG]

    that alone was enough to make my MCU run just fine, but I still don't like how the 5V line is shaky, I'd like to eliminate that completely.

    @skeebopstop:

    I do have a totem pole driver I made of a few transistors to charge the gate capacitance of the mosfets, I just drew up a quick schematic of how things are setup right now.

    I am switching the MOSFETs at 150Hz
     
    Last edited: Jun 29, 2009
  7. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Your scope plots are on a 50 ns time period which indicates > 1 MHz noise. You should definitly be able to filter out this noise in any critical areas of your circuit. Use parallel filter capacitors on the power (10 uF tantalum, 1 uf ceramic between power and gnd pins) right next to each and all ICs, including the micro. If there is still too much noise, use a small coil in series with the power line. Make sure the LC combination provides a cutoff frequency well below the noise frequency. Take your measurements right at the IC power pins. If possible, do a differential measurement between power and ground using two scope channels and the A minus B setting. (or a differential probe if you have one)

    Also, note that there are more modern voltage regulators that have feedback bandwidth beyond the old 7805s. However, I doubt very much that you need to worry about that. High frequencies are elimated very easily with small coils and capacitors.

    Another consideration is to make sure that your digital circuit ground is not in the direct path of the high current flow for the motor. This will generate a voltage gradiant across your ground and reduce noise margins.

    If your micro or circuit has A/D converters, you may need to take more precautions to reduce noise.
     
  8. Skeebopstop

    Active Member

    Jan 9, 2009
    358
    3
    Is it just a brushless DC motor or something where you turn it on and off? Are you PWMing the FETs for speed control?
     
  9. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    ok i went through a lot of different revisions on my board because I found a bunch of other problems, but I am back to here again.

    maybe I should have started a new thread, but it probably would have been frowned upon so i didnt.

    ======================

    the problem is, my PIC18 is being reset over and over because of the noise generated from my motor.

    i went and took some new shots of what I was seeing on the scope.

    I am seeing this on a large time scale.
    [​IMG]

    and when I zoom in, I see this.
    [​IMG]

    My new circuit now has a power and a ground choke, but I haven't done anything with any additional capacitors other than ones recommended for an LM7805 and PIC18.

    Would it be sufficient to filter this out with some sort of LC circuit or filter?
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Post your new circuit.
     
  11. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    place a muRata BNX012-01 in front of the 7805, and use 1kpF ceramics (X7R) bypass caps next to each IC's power pin. because my circuit is in automotive environment i use 1kpF ceramic with a 10kpF poly cap on every IC's power pin, and as close as physically possible. i also place 1000pF ceramic with a 200uF electrolytic on my 7805 output pin. also, things will look different once this stuff gets down onto a pcb, so pcb design is also important, etc. welcome to the world of noise.

    muRata is a champion when it comes to filtering. you may find some other muRata product that is smaller and cheaper than the BNX012 to do your filtering.

    you are skipping around between interfacing and power supply. tackle one problem at a time. get the right drive setup for the power fet's, then tackle the power supply "noise" problem.
     
    Last edited: Jul 15, 2009
  12. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    dc kid, thanks for the information

    I did fix the problem with the driving power fets in my other topic, I tried both the darlington setup and the logic level mosfet setup, both worked just fine and gave a really clean PWM to the gates.

    and now the next step is filtering that noise.

    I am looking at the BNX012-01 and i've never used something like that before. how do I wire the device up to my circuit? there are 3 terminals: PSG, CB, and CG. where I do I connect these? just as a guess, PSG goes to ground, CB is the 12V in, and CG is the output to LM7805?
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
  14. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    B is power source (your +12v)
    PSG is power source ground (your 12v ground)
    CB is circuit power (+V to the 7805)
    CG is circuit ground (common ground for IC's and 7805)

    power source ground to circuit common ground is seperated by a small inductor inside the BNX.

    the BNX012-01 has 6 pins, but if you open the datasheet 3 of those pins are CG and need to be on the same pcb trace, etc.

    you can grab a datasheet here http://www.mouser.com/Search/ProductDetail.aspx?qs=Y8uR6C8ehFDdukm4rYkHag==

    but as i mentioned earlier, this BNX filter is probably way to hefty for what you need. muRata makes lots of filters in much smaller packages.
     
  15. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    hmm for some reason none of the datasheets and pages on murata's website work for me.

    thanks for the tip. so if my LM7805 is powered off the motor's 12V, and all devices are sharing the same ground, I could just tie all the common nets together.

    I'll probably just order a couple of the BNX012-01 filters, and maybe a few of the smaller filters in the results here:

    http://www.mouser.com/Search/Refine.aspx?N=2105407+4294759241+4294741289
     
  16. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    no. the BNX will "seperate" your +12v and motor ground from all of your IC stuff. so tying all the grounds together will defeat the BNX, etc.

    so in basic terms, all supply current (in and out) that flows through your IC's (mcu, 7805, etc etc) will pass through the BNX.
     
  17. John5788

    Thread Starter Active Member

    Apr 2, 2009
    54
    0
    ah got it, thanks.

    I am looking at the equivalent circuit of the BNX and what you said just made more sense.
     
  18. Skeebopstop

    Active Member

    Jan 9, 2009
    358
    3
    Looks to me like the 100uF is your reservoir cap for the motor BUS. Make sure it is low ESR and placed near the switching BUS.

    Use another 10uF in conjunction with 100nF ceramic near the 7805.

    Filter is good idea as other mentioned to separate the 12V from the 5V rails.

    Layout inductances are critical in PWM applications. Keep all switching traces as far away from 7805/micro as possible and as close to connector as possible.

    Snubber cap on the switching BUS.

    TVS on the switching BUS.

    TVS on the 7805 output.
     
Loading...