Shop OBEX P1 Docs P2 Docs Learn Events
analog DC motor control circuit advice. — Parallax Forums

analog DC motor control circuit advice.

BitsBits Posts: 414
edited 2012-06-29 09:34 in General Discussion
I wanted your opinion on this very basic analog (yes its not PWM) motor control circuit. The basics parts are a digital pot, transistor and a motor (stir+ & stir-). Vp is 5Volts and the motor will draw no more than ~ 100ma

The area I am conserned with is the flywheel diode. I am not sure if the cathode on D1 should be connected to Vp instead of Stir+.

Advice is welcomed.

Attachment not found.

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-06-29 08:35
    See attachment for standard solutions.

    For a motor, I think the diode should be across the transistor -Collector and Emitter.For a relay, it should be across the coil.

    There may be an argument for doing both if you are not reversing the motor's direction. H-bridges just cannot have a diode across them as it would burn up.


    For a long time, power darlingtons - like the TIP120, TIP125, TIP130, TIP135 -- were very popular. They work well, have internal flyback diodes, and are cheap. These are also a little easier to interface with the Propeller at 3.3volt output. They do run hot though.

    You can use a Power MOSfet, but may have to throw a 2n3904 in between to provide a higher voltage to get full on. It runs a lot cooler, but that higher voltage may require something higher than +5v. Life starts getting a bit complex when odd power supplies are required.

    The 100k resistor looks very odd to me with a diode between it and the transistor. That may not work.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-29 08:47
    D1 is fine the way you've got it. Its purpose is to give the voltage spike from the collapsing magnetic field of the motor a place to go that won't destroy anything. You've connected it directly across the motor windings which is perfect.
  • BitsBits Posts: 414
    edited 2012-06-29 08:54
    Loopy
    Nice part there. I have to agree with Mike on this one however.

    Mike
    Thanks, this is what I was thinking as well. My next question is if Vp voltage needs to vary. What do you think about this simple change to accommodate various (Vp) voltages to fit a range of motors.

    The idea here is to use D6 to adjust [Vp] if [Vrange] is a range of voltage say 5-15V. This way I can use one circuit to control a range of motors, all I need to do is change D6 and the Vp should reflect that.

    Attachment not found.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-29 08:58
    Hi Bits;

    Ok, a pot going from 0V to 5V with an emitter follower applying about 0V to 4.2V to the motor.
    The motor speed is roughly proportional to the applied voltage.

    Anyway, strictly speaking the freewheeling diode is not needed if the rate of change of the applied voltage is not to high.

    However, it is usually good to use the freewheeling diode just in case the current is turned off to fast.

    You have D1 connected correctly assuming the motor is connected to STIR+ & STIR-.

    Since you have the shunt resister in the circuit I would suggest connecting D1's anode to ground.
    This will allow a slightly quicker breaking action on the motor when stopping it.
    Remember, the power dissipated in the diode does the breaking, Vd1 * Imotor.
    With a bit more voltage, (Vd1 + Vr15) * Imotor.

    BTW, still interested in a Twin Cities or so Prop get together?
    (Your in the Rochester area as I recall.)

    Duane J
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-06-29 09:05
    It is almost impossible to not agree with Mike. These days, just about every power Darlington and MOSfet as an internal flyback diode.

    H-Bridges might take a more exotic back-to-back zener diode arrangement rated at a voltage higher than what is applied to the motor in normal use.
  • BitsBits Posts: 414
    edited 2012-06-29 09:12
    Duane,
    Thanks for the advice.
    No I cant make any get together's but it would be nice to meet some of you all. Perhaps next time or when my life is not so crazy.

    Loopy,
    So true. Hey I appreciate your input anyways.

    Still wanting some input on the new circuit on post #4?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-29 09:16
    Why have a Vp control circuit? Q1 is an emitter follower and the output voltage depends primarily on the input voltage from the pot.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-06-29 09:17
    For a motor, I think the diode should be across the transistor -Collector and Emitter.For a relay, it should be across the coil.

    No, no, no! The freewheeling diode is always across the load whether for a motor, relay, or an inductor.
    Sometimes a resister in series with the diode or a higher voltage zener diode is used to collapse the current faster.

    You may be confusing the body diode of MOSFETs for the freewheeling diode.
    Only the body diode in the MOSFET that is OFF is being used as the freewheeling diode.
    The one in the MOSFET that is ON is not conducting.

    Duane J
  • BitsBits Posts: 414
    edited 2012-06-29 09:23
    Mike Green wrote: »
    Why have a Vp control circuit? Q1 is an emitter follower and the output voltage depends primarily on the input voltage from the pot.

    Well there might be times when Vp in post #1 is 12V and the motor is rated at 5V. Some motors we intend on using are rated at 2.5V.
  • BitsBits Posts: 414
    edited 2012-06-29 09:34
    Eh, now that i think about it Mike you might be right.

    I think the circuit in post #1 can vary the voltage so I may be over doing it a bit in post #4
Sign In or Register to comment.