Problem with PWM motor controller at >75% load

Discussion in 'The Projects Forum' started by JonD, Jun 2, 2010.

  1. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi All,
    I recently bought a simple PWM DC motor controller which is not behaving when connected to the motor it was intended to drive. The controller is rated as 12v 15A, and my motor is 12v and 14A.
    If I hook the controller up to a 12v light bulb it behaves flawlessly, going from 0 to 100% duty cycle perfectly on an oscilloscope.

    However, when I hook it up to the motor it works perfectly up to about 75% duty cycle, then starts to go wrong.

    Just before it starts to go wrong the waveform is perfect.

    | ------------|
    | |
    | |
    | |
    | |
    | |
    | |
    |---|

    but go a tiny bit further and it suddenly jumps to look like this

    | --------|
    | |
    | |
    | /
    | /
    | /
    | |
    |---|
    So, because the rising edge is now messy it makes the motor run slower than before, and it won't pick up speed
    Could this be to do with back EMF from the motor? i've had a peek inside and the design is basically 2x 80A FETs for the drive, so they should be fine, and 2x8A ultra-fast-recovery diodes to sink the flywheel current. I suspect the diodes are the problem.

    Can anyone give me any pointers as to what to look at or try next?

    Many thanks and best regards
    Jonathan
     
    Last edited: Jun 2, 2010
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hello Jonathan,
    Can you give us a part number and manufacturer for the PWM unit, or a link to what you bought? Did it come with a manual that has a schematic in it?

    From the ASCII waveforms you posted, it appears that the gate driver circuit for the MOSFETs is not adequate. We are going to need to find or create a schematic of what you have in order to figure out how to fix it.
     
  3. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi SgtWookie,
    It's one off ebay at this link:
    http://cgi.ebay.co.uk/12V-15A-DC-Mo...al_Components_Supplies_ET&hash=item2a06de7752

    I've looked inside and I can see that it has a pair of CEP80N75 in parallel to provide the low side drive, and a single ST RTPR10 2xdiode as the flywheel sink.
    There is a small DIP IC which has had it's ID scratched off, but the supporting circuitry looks pretty similar to the old 2QD circuit at 4qd.co.uk.

    I will try to figure out a schematic unless anyone is familiar with this device (I'm hopeful that it's a standard design).

    If the MOSFET drive isn't up to it would that not show up with the bulb test? Or does the current flowing through the channel cause the gate to present a different load to the driving circuitry?
    From memory the gate was driven by a small transistor, so I can try to extract the circuit of that part...

    Here is a screenshot of the actual scope trace, as my ASCII art doesn't really do it justice. I should add that it jumps directly from perfect square wave (75% duty) to this. The "noise" duration doesn't change at all.
    http://www.flickr.com/photos/50768981@N03/4662795063/

    Thanks for your help!
     
    Last edited: Jun 2, 2010
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ok, interesting. Someone else was looking at that same unit awhile back, I think to control a fuel pump.
    I don't suppose you'd care to supply a link to the schematic you are referring to?

    It's made in China. They may have used some sort of "standard" design, but their own variation of it.

    I don't know what your bulb load was. It would have to be quite a load, like three headlamps wired in parallel.

    If it's just one transistor, that would explain things.

    The gate drive is insufficient. Your MOSFETs are spending a lot of time getting past the "Miller charge"

    See the attached for a poorly designed PWM circuit. It would exhibit similar characteristics as yours under load.
    Note: the schematic shows an LM339 for the comparator, but it would more likely be an LM393 or LM2903. The problem with the circuit is the inadequate base current for the 9012/9013 transistors.
     
  5. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0

    Sorry, yes, it's here:
    http://www.4qdtec.com/pwm-01.html#soph

    When I say it's similar I mean in a very superficially "It's got a single IC, about the same number of bipolars plus the MOSFETs" kind of way.
    It's the same order of complexity as my one I would say, but then I don't understand the circuit (yet!)

    I'll try to work out the schematic, it's a simple design, I just have to dismantle it to be able to follow the PCB traces...
    Thanks!
    Jon
     
  6. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hmm, I'm feeling rather inadequate here... how can you work out that the base current is too small?
    I have to get hold of another copy of Art of Electronics... :)

    Best regards
    Jon
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    In the circuit I posted, they are using the transistors as saturated switches.

    The maximum voltage that will be on the emitter of TR1 is 11.3v.

    Assume TR3's Vbe(sat)=0.7 for the moment.

    Ib(TR3)= (Vsupply-Vbe)/Rb = (11.3-0.7)/12k = 10.6/12,000 = 883uA
    (the 12k is R11+R9)
    Ic(TR3) = Ib*10 = 8.83mA. That's mighty puny for such a large gate charge.

    Using a gain (beta, hFE) of 10 is pretty standard when considering transistor saturation. If you're betting on more gain than that, odds are very good that you will lose the bet.

    I didn't bother going through the rest of it. R7/R8/TR2 are similarly ill-conceived.
     
  8. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi all,
    I have created a very ropey schematic of just the drive part of the design. The rest that I've left off is pretty much just a few resistors and capacitors connected to the IC presumably to set it up for PWM.

    However, *everything* back from the motor connections until it reaches the unknown IC is on here:

    [​IMG]
    So, the driver for the 2 FETs is a pair of PNP and NPN BJTs (in push pull?)
    and interestingly there is a wire link where RE is silkscreened (R5 in the schematic), for the emitter resistor for the NPN. I'm trying to work out if that's significant.

    Also the emitter (hence both BJTs) are driven from a 5V 78L05 regulator rather than the 12V used by the FETs. Could that have any effect?

    Best regards
    Jon
     
    Last edited: Jun 3, 2010
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, you seem to have found the problem. That just won't work very well.

    Are you certain that you have Q1 and Q2 oriented correctly? Please double-check.

    The MOSFETs need to get to Vgs=10 to turn fully ON. They are not logic level MOSFETs.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Wait a minute - going back to your 'scope capture:
    [​IMG]

    It looks like your 'scope was set to 5v/div, so that would mean the gate was getting up to around 13v or so. Or am I not interpreting it correctly?

    If the gate IS getting up that high, your schematic representation is not correct.
     
  11. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi SgtWookie,
    Just to clarify. The schematic now up there is correct. There are a pair of emitter followers, *roughly* the same as the 4QD circuit.
    I did get Q2's collector and emitter the wrong way round originally, but it is right now.

    The scope trace is of the output to the motor, NOT the gates of the MOSFETs. I will try to get that trace tonight.

    I think the gate voltages can only get to 5v because that's the supply given to the BJT pair.

    I'm now SPICEing the circuit, just so I can understand its operation!
    I still don't understand why it works perfectly with a small 5W lamp instead of the motor...

    Cheers
    Jon
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Because the 5w lamp would only have about 416mA current instead of 15A current. Your motor has 36 times as much current flowing through it as the lamp does.

    Try it with a 180W lamp.
     
  13. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    I think I may have found the problem, and so hopefully a solution.
    I traced the signal back to the IC output and even to the 5V output terminal of the regulator, and even the 5V output has big drop-outs on it.
    Looks like when the duty cycle gets too high too much current is required and is starving the 5v supply, so upsetting the oscillator.

    Mind you, it did start to work properly while I was poking around, so it might be a dodgy connection which starts to cause problems at high current draw.

    Odd though that it has such a defined failure cut-off point. It doesn't start to misbehave and get worse, it jumps from perfect operation to very disrupted operation.

    Best regards
    Jon
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It might help to use an inductor on the input side of the 78L05 regulator to keep the current flow more constant, and to isolate the 5v supply from the electrical noise of the motor.
     
  15. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi,
    I made a full schematic and managed to work out that the un-named IC is an LM339, which seems fairly common for simple PWM circuits.
    Once I knew what the pins all were I was able to work out the cause of the problem.

    First, here's the schematic for illustration. NOTE the regulator is acutally an 78L05

    What I found is that there is an 11kHz sawtooth oscillator built from the LM339 which actually works fine. It's fed into the last stage of the IC along with the reference voltage from the variable resistor to form the PWM square wave. This voltage (on pin 7) is where the problem is.

    There is a 5v supply that comes through R18 (a 1% resistor, so seems to be a very precise voltage divider) and through diode D5. What's happening is that the voltage spikes (dropouts) when the motor is under load is causing this reference voltage to not register as the full amount, so the resulting square wave is effectively clamped to about 75% duty cycle.

    If I put the 10x scope probe on the R18 side of D5 I see a reasonable but slightly noisy 5v supply, but nothing changes. When I touch the 10x to the R17 side of D5 suddenly I can get to 100% throttle. It looks like just this extra bit of capacitance is enough to smooth the noise peaks enough. Maybe the voltage drop of the diode is making it more susceptable to dropouts.

    Now, here's my question. I was going to put a decent size electrolytic on the R17 side of D5, but in fact there is already a 100uF one there. Should I replace it with a bigger value? I had a designer colleague who once told me that just sticking a larger cap on to smooth a signal wasn't always the right thing to do, you have to pick something appropriate.

    Any guidance very much appreciated.
    Jon


    [​IMG]
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    What is the value of R2? That will change the output voltage from the 5v regulator at a rate of about 1v per 200 Ohms.

    Why don't you fill in the rest of the component values and upload the .asc file as an attachment, using the "Go Advanced" and "Manage Attachments" buttons?
     
  17. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    In that scope picture, is the voltage shown as relative to Gnd or to the +12V power supply? The title "Scope trace of the motor terminals" is somewhat ambiguous--I want to know whether the "on" phase is when the waveform is high or low. My guess is that low is "off", because the waveform appears to dip below zero there, as it should if the freewheeling diodes are conducting.
     
  18. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    Hi,
    R2 is 2k, which given what you have pointed out seems a little high. What do you think? Should I replace it by a smaller value?

    I've also attached the .asc file with the updated values plus a few naming corrections. I'd be interested to see what people make of it...

    Best regards
    Jon

    EDIT: To answer the other question, I can't remember whether I measured the trace to GND or the negative motor terminal. I'll check to see if it looks different between the two.
     
    Last edited: Jun 6, 2010
  19. JonD

    Thread Starter New Member

    Jun 2, 2010
    13
    0
    A colleague of mine who used to design power supplies for a living has suggested using some ceramic caps dotted around, but particularly on pin 7 as these have a better frequency response than the existing electrolytics. In truth the spikes are very very narrow, and as I said touching the 10x scope probe to this causes it to run fine, so I will try that.

    Jon
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    JonD,
    I have a number of things going on here at the moment, but I haven't forgotten about you.

    I have models of the 339 and will simulate the 7805 using an LM317 and a couple extra resistors.

    Do you have a value for C2, right there at the 339 pins 4&6?

    You used a variable current source that R14 connects to; I'm sure you meant to use a pot, but there isn't one supplied with LTSpice. I have a pot model, I just need to know what the value of the pot is. It's probably marked on it somewhere.

    Also, Cx, C6 (below the 339) don't have any values.

    Just FYI, LTSpice won't "like" RE being 0 Ohms. I'll use 1m Ohm instead (one milliOhm) in the simulation.
     
Loading...