Need a latching circuit for DC motor

Discussion in 'The Projects Forum' started by Dimitris76, Sep 16, 2011.

  1. vrainom

    Active Member

    Sep 8, 2011
    126
    20
    The 1/10 current proportion is called "hard saturation" as opposed to "soft saturation" wich would be to drive the transistor with just the necessary current to drive the load.

    i.e: if a transistor has a gain of 100 you would only need a 100 ohms input resistor to drive a 1 ohm load, but in practice not every transistor would have an exact 100 gain, some will have more, some less, so with the 100 resistor some transistors would be under driven. So when we need them to act as switches, fully on or fully off, the best approach is to "hard saturate" them to make sure they operate as we expect.
     
    Last edited: Sep 24, 2011
  2. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    Great Info!

    It's important for me to understand why we do like we do. Thank you educating me. You guys are awesome!

    -----

    I built the circuit, double checked everything and connected the power.

    And it behaves like this:
    As soon as the momentary push button switch is closed (I short circuited with the tweezers instead) the motor starts spinning to extend the actuator arm. When the end point is reached though, the motor stops (due to the internal limit-switches in the linear actuator) but the circuit does not unlatch to retract the arm. I measure 12v across the relay's coil.
    The only way to retract is to cycle the power.

    Here is the board layout.
    https://picasaweb.google.com/106109...torCircuit20111016?authuser=0&feat=directlink

    I just replaced the R4 (33k) with two 10k resistors and a 20k trimpot and I have used a 2N3704 transistor (instead of the 2N4401 that SgtWookie suggested...

    What could be wrong here?

    -----

    Ok, I did some trouble shooting and measured the voltage at pins 3 and 6 (non-inverting input A and inverting input B - connected together) on LM393.

    -At rest state as soon as I connect power to the circuit board I measure 12.45v as expected.
    -When I push the button and as long as the motor runs I get 0.098v, which sounds pretty normal for a voltage drop across the 0.1 Ohm R1 resistor (approx. 1 amp without load).
    -Then the motor stops and I measure 0.016v!!!
    Now that does not sound right. With the motor off and no current flowing I would expect 0v drop across the 0.1 Ohm resistor.

    With the voltage across the 33 Ohm R3 resistor being 0.013v it's no wonder the window comparator's output does not go low.
    The voltage is still IN the window!

    When I measure voltage between a common ground and pins 3, 6 as well as on the IC side of R7 I get those 0.016 volts - on the other leg of R7 and R1 though the voltage is 0. I suspected the diode D2 might leak a little current through so I temporarily unsoldered it but that didn't help either...

    Any ideas?

    Dimitrios
     
    Last edited by a moderator: Oct 21, 2011
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Gee, that's strange.

    Are you certain that the Zener diodes are back-to-back like they are shown on the schematic? I cannot tell from the photographs.

    If you disconnect the actuator (on one end at least) from the circuit, and provide 12v across it, does it still draw 160mA when it is at the limit?

    If the actuator draws 160mA current even when sitting still against a limit, then replace R2 and R3 with 510 Ohm resistors.
     
  4. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    I am pretty sure the actuator is not drawing any current at it's end point because the voltage is zero between point A on the circuit board's output and Ground.

    So there is no measurable voltage drop across R1 or between ZD2 anode and ground. I measure 0.016 volts though between ground and R7's other side as well as on pin 3, 6 of LM393, D2 anode and D3 cathode...

    -----

    Could it be a slight leak of current through the LM393's 3, 6 pins and ground that keeps the voltage up?
    0.016v /1000 ohm =0.000016 Amp.
    Even 16 uA could mess things up...

    I am looking at the datasheet from National Semiconductor and it shows a 100k resistor instead of 1k at R7.

    Dimitrios
     
    Last edited by a moderator: Oct 21, 2011
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Hmm, it could be.

    Instead of 33 Ohms, try replacing R3 with one just somewhat larger; like 62 Ohms.

    I didn't plan on any leakage when I simulated it. I simply had to make some guesses what I thought would be good thresholds. I was close...
     
  6. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    Upping R3? Will do!

    Dimitrios

    EDIT: "Why not increase R7 instead?" Dumb question...
     
    Last edited: Oct 17, 2011
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    No, don't change R7. Normally, R7 should have virtually no voltage across it; it is there simply to limit the current in case the voltage exceeds the power rails, and protection diodes D2, D3 start conducting.
     
  8. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    The plot thickens!

    I replaced the 33 ohm R3 with a 98 ohm resistor and the circuit behaves the exact same way.

    What's more interesting though is that not only the voltage across R3 did increase and measures now 0.036v (it was 0.013 before) but the voltage at pins 3 and 6 that I wanted to surpass increased as well!
    It now measures 0.047v instead of 0.016v - which means that it somehow increased proportionally.

    I has to be something obvious going on here but I just can't figure it out...

    -----

    I followed up the voltage for about 15 mins.
    The voltage across R3 was all the time a steady 0.036v but I have noticed that the voltage at pins 3/6 gradually dropped from 0.047v to 0.035v.
    The circuit did not unlatch though...

    -----

    SgtWookie,

    any ideas what might be wrong here?

    -----

    I went over the hole circuit again and can't find any shorts/mistakes.

    Could a faulty LM393 behave this way? How do they usually fail?

    -----

    I temporarily shorted R7 and the voltage at LM393's pins 3/6 shows now 0 zero, as expected when the motor stops running.
    The relay didn't unlatch though...

    I suspect that LM393 can not sink to ground all that current that flows through the 3.3k resistor, so the NPN transistor never turns completely off in order to release the coil.

    I had another look at the RT424012 relay's datasheet
    https://www1.elfa.se/data1/wwwroot/assets/datasheets/tpRT2_data_e.pdf

    and saw that the coil activates at 8.4 volts but the voltage needs to drop to 1.2v inroder to release!

    So could this 3.3k pullup resistor be of too low value?

    StgWookie,
    any suggestions, please?

    Dimitrios
     
    Last edited by a moderator: Oct 21, 2011
  9. #12

    Expert

    Nov 30, 2010
    18,076
    9,691
    This is a Sears trash compactor. Maybe you can get some ideas from it because it starts a motor, stops at the end if you want it to, or not, reverses, and stops at the end of that stroke.
     
  10. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    #12,

    Thank you for your responce and the attached schematic!

    Unfortunately the trash compactor is using external end switches - something that I need to avoid at any cost.

    I am all ears for troubleshooting ideas.

    Dimitrios
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Gosh, I'm sorry Dimitrios - I missed your post.

    I'm going to have to look at this some more; it takes me a bit to re-familiarize myself with the circuit every time I look at it.
     
  12. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    No worries SgtWookie!

    My relay has a huge voltage hysterisis. It takes 8.4 volts to activate the coil and the voltage has to drop to 1.2v to release.

    Then I measured the voltage across the coil and found out that it was permanently around 4.2v, i.e. the Vce voltage across the transistor's legs was 8.2v both before and after the circuit activation. The coil voltage went up to 12.4v only momentarily while the push button was manually depressed.

    That led me to believe that the NPN transistor was faulty so I replaced the 2N3704 with a BC182L and the voltage across the coil goes up to 12.4volts and stays there after releasing the push button, but the LM393 wont go low when the motor stops, so I am back to square one.

    I would love to try another LM393 at this point but driving 100 miles tomorrow only for that without knowing if it's faulty in the first place does not feel good... LoL

    Dimitrios
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Try disconnecting the base of Q1 from the outputs of U2 and the 3.3k resistor R5.
    You should then be able to see the outputs of U2 go to Vcc when IN is either above HI or below LO, and under 0.5v when IN is between HI and LO.

    If the base of Q1 is connected to Vcc via a 3.3k resistor, the relay should energize.
    If the base of Q1 is <= 0.5v, the relay should de-energize.
     
  14. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    I understand your troubleshooting thinking but this statement of yours:

    "You should then be able to see the outputs of U2 go to Vcc when IN is either above HI or below LO, and under 0.5v when IN is between HI and LO."


    are you sure it is right?

    According to this document
    http://home.cogeco.ca/~rpaisley4/Comparators.html

    it's the opposite...

    Dimitrios
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Dimitrios,
    Rob Paisley's window comparator works just the same as the one in the schematic.

    Perhaps it's confusing you because Rob wrote that the LED will be off if the input voltage is within the window. That's because neither comparator will be sinking current, and the pull-up resistor will have the outputs at +V.
    [eta]
    Ah, I see - I worded it backwards. :rolleyes:

    I should have written:

    You should then be able to see the outputs of U2 go under 0.5v when IN is either above HI or below LO, and nearly to Vcc when IN is between HI and LO.
     
  16. Dimitris76

    Thread Starter Member

    Jul 17, 2011
    45
    1
    Dear SgtWookie,

    the original circuit you posted on #16 works now like a charm!

    My conclusion is that the first LM393 was simply faulty.

    Thank You Very Much for you help!

    Kind Regards,
    Dimitrios
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,809
    Ahaa, that would explain the odd problems you were having!

    I'm certainly glad that you replaced the LM393. It's pretty difficult trying to guess what's happening from across the big pond.

    I was about to suggest that you pull it out of the circuit and test it, but if it's working well now - no problem!
     
Loading...