Shop OBEX P1 Docs P2 Docs Learn Events
Need help with Back EMF Protection for dual-direction DC motors. — Parallax Forums

Need help with Back EMF Protection for dual-direction DC motors.

Beginner4Beginner4 Posts: 8
edited 2015-01-11 12:38 in Robotics
Hello everyone,


At the moment, I am working on a simple robotics project, powered by my Basic Stamp Homework Board.

The layout is basically this:
http://letsmakerobots.com/start , but I am using my Stamp as the microcontroller. I have pretty much everything set up and ready to go, but am stuck on one small problem--back EMF protection.

It is a new concept to me, but I was able to easily understand back EMF protection for a single direction motor by reading this:

http://www.instructables.com/id/Using-the-Sparkfun-Motor-Driver-1A-Dual-TB6612FNG-/step6/Sidetrack-Back-EMF-Protection/

and this:

http://www.progeny.co.uk/Back-EMF-Suppression.aspx.

However, back EMF protection for dual direction motors (http://www.instructables.com/id/Using-the-Sparkfun-Motor-Driver-1A-Dual-TB6612FNG-/step7/Add-Back-EMF-Protection/has alluded me so far. I looked at this:

http://www.instructables.com/file/FYEO8QZH21CGJYJ

and wasn't able to understand how this could allow the current coming from the motor to loop back to the motor. This:

http://www.learn-c.com/l298sideacircuit.gif

basically shows the same thing. To be honest, even this simpler diagram doesn't show me how this rectifier diode setup will provide back EMF protection.

I know, I know. I could just mimic these pictures/diagrams and everything will turn out fine. However, I need to understand this because:

1. I am using a bit of a different setup, using two different power sources (one for basic stamp and motor driver, one for motors). This knowledge will help me to get the right setup.
2. I will never be able to apply this to other things if I don't understand the underlying facts of how it works.
3. Curiosity.

Thanks in advance for your help,
Beginner4

Comments

  • DomanikDomanik Posts: 233
    edited 2015-01-03 17:59
    Referencing you schematic. Imagine you apply +5V to Out1-
    the current flow builds up a magnetic field around the wire -
    Next switch Out1 to 0V and the magnetic field collapses thereby inducing a current flow in the opposite direction (negative) in the wire.
    This current goes through the diode to ground, since it tries to go to -5V. Luckily it gets clamped at the forward voltage drop of the diode.
    Now reverse the polarity on the motor. The same scenario plays out on Out2.
    Does this answer your question?
  • Beginner4Beginner4 Posts: 8
    edited 2015-01-03 18:13
    Domanik, thanks for the reply.

    That does make sense to me now, thank you.

    However , I'm left with two more questions after that.

    First, in the schematic, why won't V+ flow directly to ground, creating a short circuit? I think there is something fundamental I may be missing here.

    Secondly, what is the purpose of the Ground to the left of the motor?

    Thanks,
    Beginner4
  • DomanikDomanik Posts: 233
    edited 2015-01-03 18:20
    Okay. How much current flows through a reverse biased diode? Like when the motor is driven?
    The ground is there to give a path for collapsing magnetic field current to get back to the PS.
    Good luck with your projects ;).
  • Beginner4Beginner4 Posts: 8
    edited 2015-01-03 19:00
    To be honest, this is not making much sense to me ATM.
    It seems that everyone says EMF 'kicks back', causing current to flow in the opposite direction. But then, I look at a picture like this:
    http://www.progeny.co.uk/wp-content/uploads/2014/01/image003.png
    Which seem to show the current travelling in the same clockwise direction as it did before 'back EMF' kicked in.

    Addiotionally, looking at picture like this:
    http://www.instructables.com/file/FYOQEOFH2G5ZV1U
    Seems to testify to the fact that EMF current continues to travel in the same direction as when it was powered by the battery. This is because, to my understanding, the diode provides protection by allowing the current to make a circuit back into the motor when 'back EMF' occurs.

    I appreciate the help, Domanik, but something is just not clicking for me.

    Thank you,
    Beginner4
  • SapphireSapphire Posts: 496
    edited 2015-01-03 19:20
    That's because EMF is a voltage, not a current. The current will continue to try and flow in the direction it was going before it was shut off. When it can't, a large voltage (back EMF) develops. The diodes keeps the current flowing, in the same direction, and through the motor, until the residual energy dissipates.
  • Beginner4Beginner4 Posts: 8
    edited 2015-01-03 19:25
    Domanik wrote: »
    Referencing you schematic. Imagine you apply +5V to Out1-
    the current flow builds up a magnetic field around the wire -
    Next switch Out1 to 0V and the magnetic field collapses thereby inducing a current flow in the opposite direction (negative) in the wire.
    This current goes through the diode to ground, since it tries to go to -5V. Luckily it gets clamped at the forward voltage drop of the diode.
    Now reverse the polarity on the motor. The same scenario plays out on Out2.
    Does this answer your question?

    Ok. After continued reading and thinking about it, I now understand this. Thank you VERY MUCH.

    Basically, in this setup:

    http://www.instructables.com/id/Using-the-Sparkfun-Motor-Driver-1A-Dual-TB6612FNG-/step6/Sidetrack-Back-EMF-Protection/

    The current is directed back into the motor. Whereas, with dual direction motors, the current is directed to ground instead.


    Just another question that I still don't understand. Up at the VERY TOP of the circuit, it appears to me that Motor V+ is attached directly to ground... why wouldn't it just flow straight to ground? Is it because there is a stronger attraction to -5V?

    Thanks so much,
    Beginner4
  • DomanikDomanik Posts: 233
    edited 2015-01-03 19:59
    Beginner4 wrote: »
    Just another question that I still don't understand. Up at the VERY TOP of the circuit, it appears to me that Motor V+ is attached directly to ground... why wouldn't it just flow straight to ground? Is it because there is a stronger attraction to -5V?
    V+ is not connected to ground except through 2 capacitors, which are AC only. There is no -5V applied to the motor: Only +5V and 0V.
    Let's say when the motor goes CW you have +5V on Out1 and 0V on Out2. When it goes CCW you have 0V on Out1 and +5V on Out2. (I'm assuming your motor is 5V for simplicity).
  • Beginner4Beginner4 Posts: 8
    edited 2015-01-04 09:18
    Domanik wrote: »
    V+ is not connected to ground except through 2 capacitors, which are AC only. There is no -5V applied to the motor: Only +5V and 0V.
    Let's say when the motor goes CW you have +5V on Out1 and 0V on Out2. When it goes CCW you have 0V on Out1 and +5V on Out2. (I'm assuming your motor is 5V for simplicity).

    OK, thanks.

    That explains that, but disproves what I thought I understood earlier. Sorry, I'm just having a really hard time understanding what's going on.

    So, to break it down, when the motor is being driven CW, Out 1 is connected to +5V and Out 2 is connected to ground (and vice versa for CCW). This causes current to flow through the motor.

    After power from Out 1 is cut, the dangerous effects of back EMF kick in. The diodes are positioned in a way so that they protect the fragile components of the circuit against this back EMF.

    Now my question is, how do the diodes do this? (I know we have gone over this, but it just didn't click for me). If someone could give me a picture of the shematic with the pathway of current through the diodes during back EMF, I think that would help me understand this.
  • DomanikDomanik Posts: 233
    edited 2015-01-04 12:43
    Beginner4 wrote: »
    OK, thanks.

    That explains that, but disproves what I thought I understood earlier. Sorry, I'm just having a really hard time understanding what's going on.

    So, to break it down, when the motor is being driven CW, Out 1 is connected to +5V and Out 2 is connected to ground (and vice versa for CCW). This causes current to flow through the motor.

    After power from Out 1 is cut, the dangerous effects of back EMF kick in. The diodes are positioned in a way so that they protect the fragile components of the circuit against this back EMF.

    Now my question is, how do the diodes do this? (I know we have gone over this, but it just didn't click for me). If someone could give me a picture of the shematic with the pathway of current through the diodes during back EMF, I think that would help me understand this.
    Attached are a couple of diagrams for a MC33926 motor driver showing the on/off/reverse and the current flows. My previous explanations were somewhat off the mark but these might help. Hopefully someone more knowledgeable will chime in.

    MC33926-1.jpg
    MC33926-2.jpg
    765 x 433 - 27K
    764 x 451 - 31K
  • Beginner4Beginner4 Posts: 8
    edited 2015-01-04 18:56
    Thanks again for you help, Domanik.

    To my knowledge, those diagrams show how current flow while the motor is being powered. What I need to know is the path of current of back EMF through the diodes.

    Basically, if someone could just simply draw on the schematic, drawing out the path followed by current flow during back EMF. Just show me how the current is directed through the circuit so as to save the more fragile components.


    Thanks everyone so much for helping me out. I know I am not grasping the concept 100%, so thanks for all your help,
    Beginner4
  • DomanikDomanik Posts: 233
    edited 2015-01-05 12:02
    I had another idea. Forget about the motor for now. If you look at either node between the 2 diodes connected from VPwr to GND the nodes act as clamps. The node between the diodes cannot go any higher than VPwr +0.6V or lower than GND -0.6V, thereby protecting the driver output. The output can be damaged if the IC voltage is 5V and more voltage is applied.

    When the motor free wheels it acts as a little generator (it has its own permanent magnets) and the Back EMF adds to the drive voltage showing up on the outputs. If this voltage goes over 0.6V it is clamped to GND or VPwr. I tried to simulate this in the attached schematic but my V1 voltage source does not make a great model of an EMF pulse. An EMF should be +V, 0 and -V instead of only 2 levels.

    Schematic: Schm1.pdf

    Simulation: Schm2.pdf

    Good Luck.
  • DomanikDomanik Posts: 233
    edited 2015-01-05 12:14
    Beginner4 wrote: »
    To my knowledge, those diagrams show how current flow while the motor is being powered. What I need to know is the path of current of back EMF through the diodes.
    On the second diagram the controller turns on 2 high side MOSFETs to dissipate the Back EMF. On the forth diagram the driver IC turns on both low side MOSFETs.
  • davejamesdavejames Posts: 4,047
    edited 2015-01-05 16:45
    Beginner4,

    Take a look at this site:
    http://www.electronics-tutorials.ws/inductor/inductor.html

    About half way down the page you'll find a short discussion about "Current and Voltage in an Inductor". There's a diagram that helps explain "back EMF".

    Yes, there is some math involved - but it's not too bad.
  • Mark_TMark_T Posts: 1,981
    edited 2015-01-11 12:38
    Note these diodes are only to protect the driver from switching glitches, they cannot protect against back-EMF from
    motor over-run (when the motor turns faster than its normal top speed), which will drive a larger voltage into the supply
    that its designed for. This is why you have to be careful about pushing wheeled robots - push them too fast and you can
    damage things.
Sign In or Register to comment.