PWM controlled current source

Discussion in 'General Electronics Chat' started by DedeHai, Jan 31, 2009.

  1. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    yet another problem with analog circuitry:

    I want to make a voltage-controllable current source "abusing" a buck controller. The basic Idea is using a simple controller, that takes an analog voltage as a control input(for example 0-5V). This voltage sets the desired output current.
    I was looking at some buck controllers that use a pwm signal to set the output voltage. They take a feedback voltage to control the output voltage of the buck converter. I was thinking of using a current sense resistor to convert the output current into a feedback-voltage. I have an inductive load (motor coil), so the pwm-voltage at the output (amplified with a mosfet) will give me a (low ripple) dc-current.
    Now the question: which controller could be used? I am looking for a simple, cheap one, but still not needing too many external components.
    The frequency of the pwm is still to be determined, i suppose 200-500kHz will do. any suggestions?

    Or: do you have a suggestion for a completely different approach? What I have is an analog control voltage and what I need is a proportional current through a motor coil. The current has to be the same for different motors connected to the output. I'm talking about 200mA at most.
     
  2. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    thanks for the input. I know that solution, but its not what I'm aiming at.
    As I said, I look for a "voltage-controllable current source", you're suggesting a constant current source.

    I just found a possible solution. Could it work with this controller:

    http://www.farnell.com/datasheets/63255.pdf

    The maximum output current is rated 250mA. Using it in single ended mode (not push-pull). feeding the input voltage (representing the desired output current) signal in the positive pin of the error amplifier (pin 1) and the current sense feedback at the negative input (pin 2) should result in a current-control loop right?
     
    Last edited: Jan 31, 2009
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You might consider looking at an L298 dual H-bridge driver. These are usually used for controlling stepper motors, but there is no reason you couldn't use them for controlling two individual DC motors. This will give you an easy way to make the motors reversible.

    You use a small value for Rsense, 1 Ohm or less.
    You could use a high-speed comparator and an adjustable voltage reference to switch the logic inputs to the L298. The amount of hysteresis in the comparator circuit vs the inductance of the motor(s) will determine the frequency. Not much point in operating it much above 25kHz, as it'll be beyond the range of hearing, and at higher frequencies the driver will spend porportionately more time in the linear region, generating heat.
     
  4. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    I think using a full H-bridge is a little bit over the top since I don't need to reverse the current. With the L298 I will still need a driver logic, wheres in my suggested solution i only need a fast FET.
    And yes, there is point in operating it above 25kHz. The higher the frequency, the lower the current-ripple, especially for motors with lower inductance . Again, I'm not sure about the tolerable ripple current, but I'm looking for as steady as I can get withou getting too fancy. The mass inertia of the driven system will make it tolerable for a little ripple I hope.

    Edit:
    Just fully understood your suggestion, wookie. I must say, it IS really simple if I use a power-opamp insted of the L298. So I just use an opamp with a maximum output current of let's say 1Amp, configure it as a Schmitt-Trigger so I can set the frequency with the hysteresis (or use no hysteresis). Connect the coil directly to the opamp's output and use the voltage over Rsense of 0.1Ohm (to keep it low temperature) as the triggers input. Ha, genious! Thanks a bunch!
     
    Last edited: Feb 1, 2009
  5. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    i made a drawing of my new suggestion, except that the input (reference) voltage is fixed here and will be variable in the final version.
    will this work? what happens if an opamp uses a positive AND a negative feedback? Any undesired effects to pay attention to?
     
  6. Skeebopstop

    Active Member

    Jan 9, 2009
    358
    3
    if moving a motor you will need a flyback diode, especially in your case or any back-emf will really screw with your shunt reading.

    i would run the simulation over some frequency ranges. I suspect stability may be an issue with your shunt voltage lagging the reference voltage quite a lot due to inductance in current control.
     
  7. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    A flyback diode is a good addition indeed.
    I tried to simulate it with LTspice, but nothing good comes from it. The opamp does not seem to act as a schmitt trigger at all, since I have the negative feedback.
    If operated in a non-pwm mode the losses are too high since I have 200mA flowing at 3V with an input voltage to the opamp of 13V. Thats 0.2A*10V = 2W of losses for 600mW of output power...
     
    Last edited: Feb 1, 2009
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Have a look at the attached.

    Your motor's windings are very likely going to have a LOT more inductance than 10uH; more like 50mH or perhaps higher.

    I've increased L1 (the motor) to 100uH, changed the sense resistor (R1) to 0.5 Ohms, and added D1 as a "flywheel" diode. When the MOSFET turns off, current continues to circulate through R1 and D1 back through the motor (L1).

    The LTSpice simulation is attached (.asc file)
    If you want to decrease hysteresis (thereby increasing switching frequency and reducing ripple) decrease R6.
    If you want to increase the current through L1, increase R5.
    [eta]
    The schematic is simplified; bypass capacitors are not shown, and the gate drive method will exceed the Vgs specification of the MOSFET being used, along with being rather slow to charge/discharge the gate.
     
    Last edited: Feb 1, 2009
  9. Skeebopstop

    Active Member

    Jan 9, 2009
    358
    3
    Nice circuit Wookie.

    I still think DadeHai's will work if he increases his gain, in effect bettering his slew rate and uses an op-amp with a high slew rate. DadeHai, try making R1 = 100R, R2 = 1k and R4 = 100k, or hell, maybe even 1 MegaOhm.

    If you chose one with a decent enough common mode rejection ratio you might even get away with open loop! (I'm a dreamer).
     
  10. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    Thanks guys. I now have a few different circuits to try. I'm definitely going to try your version, wookie. Thanks for the detailed description.
    But why are you using a p-fet? would't a n-fet work also?
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could use an N-ch MOSFET, but you would need a driver IC, as you would need to pull the gate to Vcc+Vgs. Since your motors require such little current (200mA) I wasn't concerned about the slight loss of efficiency. I selected the MOSFET primarily due to the low gate charge. It's maximum allowable Vgs is +/-8v, so a Zener diode of 5.1v to 6.2v or so would be needed to clamp it to Vcc.

    Back to the simulation I did; I don't know at what voltage your motors will need 200mA - is that 3v?
    If so, then L1 should be given a series resistance value of 15 Ohms. This will increase the frequency of the PWM quite significantly.
     
    Last edited: Feb 4, 2009
  12. qisaiman

    New Member

    Feb 11, 2009
    8
    0
    hi ,:),can you make more comment on the voltage control current source, and my question is here(http://forum.allaboutcircuits.com/showthread.php?t=19492)
     
  13. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    I finally got around to build the current source I suggested using the TL494 controller.
    I use it in parallel output, connect both collector pins to Vcc and both emitter pins to my motor coil. With a current sense resistor I make a feedback to the controller.
    First it was running in a discontinuous mode, because the inductance of the motor was too low. I then increased the frequency to about 250kHz. works perfectly now, the current ripple is below 5%. To get it even lower I am thinking about connecting a coil to the output-pins, increasing the total inductance. Like that the load wouldn't even have to be inductive at all!
    that way it could also be used as a LED current source. If the inductance would be reduced, so it runs in discontinued mode, it might even be possible to build an adjustable, pulsed LED current source. One might even add an over-voltage protection, using the second feedback (opamp) input.
     
    Last edited: Mar 8, 2009
  14. DedeHai

    Thread Starter Active Member

    Jan 22, 2009
    39
    0
    here is the scematic
     
Loading...