JK Flip Flop to drive dual NPN from q an ~q states to control negative ground relays

Discussion in 'The Projects Forum' started by majer3rd, Jan 5, 2016.

  1. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    actuator controller.JPG

    Hello,

    I am trying to build a circuit to control a DC mechanical actuator. The intended result is to press a single button and it would retract. upon release of the button it would relax. Then when the same button is pressed, it would then extend and relax again upon release; so forth. I have built a circuit that will extend the actuator upon press and retract actuator on next press, but it does not relax upon release. I can really use some help here. Here is a model of the circuit I currently created.

    Thanks,

    Majer3rd
     
    Last edited: Jan 5, 2016
  2. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    ??? One side of the relays are tied to +12 V and the transistors drive to +12 V?
     
  3. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    Yes, the are t
     
  4. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    Ahh.. that is a mistake in my drawing the relays are tied to ground and drive 12v to activate them.

    Here is an updated diagram. actuator controller.JPG
     
  5. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    I don't see how you are clocking the latch. Clock line is held low and pulled low by the switch ???
    What stops the motor in the retracted position?
     
  6. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    Okay, that fixes the relay problem.
    Clocking I still don't understand.
     
    majer3rd likes this.
  7. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    Does this do anything different?
     
  8. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    clocking is controlled by the momentary push button. I think the confusion is a another diagram mistake. ~q is just moped to pin5 not 3

    I don't want to use a toggle switch.

    I'm wondering if there is a way to have the positive output of the jk (q or ~q) drop to ground after a second or two.
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    What do you mean by "relax"? Does the mechanical actuator have two desired positions, or three (with "relax" in the middle between extended and retracted)?

    ak
     
  10. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    The actuator has two terminals, lets call them terminal a and terminal b. When you ground terminal a and apply 12v to terminal b, it extends. When you apply 12v to terminal a and ground terminal b, it retracts. What I mean by relaxed, both terminals are grounded. Think of it like an actuator on a power door lock on your car. You don't want it driving the actuator once the lock has reach the desired position. In my application, I want to use a single momentary push button rather than a rocker switch.
     
  11. crutschow

    Expert

    Mar 14, 2008
    13,035
    3,241
    What is the purpose of zener diodes D1 and D2? :confused:
    Are you trying to limit the voltage to the relay to 5V?
    If so, that is not how you do it since there is nothing to limit the current through the zeners from the transisors.
     
  12. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    The diodes are to protect the npn from reverse emf
     
  13. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    The 4013 is, like, sooooo 1970's. Here is a version from the 1870's.

    ak
    MotorReverseSwitch2-1-c.gif
     
  14. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    The relay version never retracts. No power to it.
     
  15. hp1729

    Well-Known Member

    Nov 23, 2015
    1,961
    219
    What stops it when it is fully extended or retracted?
     
  16. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    Both extending and retracting, power is applied to the motor as long as the button is pressed, per post #1.

    ak
     
  17. majer3rd

    Thread Starter New Member

    Dec 10, 2015
    8
    0
    Right, the relay diagram will never retract. Plus I want both legs to the motor or actuator to go to ground when the push button is released which mine does not currently. The only thing I can think to do is using two 555 timers and have them generate a timed pulse to the npn base on a rising signal from Q or ~Q
     
  18. crutschow

    Expert

    Mar 14, 2008
    13,035
    3,241
    Here is your circuit modified to do what I think you want.
    It alternately pulses the two relay coils (shown on my schematic as two separate relay coils) in response to the push-button.
    I replaced the BJTs with N-MOSFETs and an RC circuit at the gate input to generate the desired pulse with reasonable RC values.
    The pulse time is a little less than 2s as you requested. This pulse time is controlled by the RC time-constant of the resistor and capacitor at the MOSFET gate, and also by the threshold voltage of the particular MOSFET used.

    The PB switch has a debounce circuit before the clock input to prevent multiple clock pulses from the PB contact bounces.

    Note that the pin numbers and the power and ground connections to the 4013 are not shown.
    Also all unused inputs to the FF in the package should be connected to ground to avoid possible flacky operation of the device.

    PB Latching Relay.PNG
     
    Last edited: Jan 6, 2016
  19. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    Look at the relay diagram again. In the rest state (SW1 open), both sides of the motor are grounded. Note that K1 is an impulse relay, and there is no standard schematic symbol for this critter. Each time it is actuated, it changes state and latches there even when power is removed. When the button is pressed again, K1 changes to the other state and latches there. Each time SW1 is pressed, K1 changes state and energizes one of the two motor relays, whichever one was not energized on the previous button press.

    As noted, K1 acts as a toggle flipfllop. with the added feature that it does not require any power to retain its last state. Alternately, each motor relay is activated as long as SW1 is pressed, then returns its side of the motor to GND when SW1 is released.

    ak
     
  20. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,544
    1,251
    None of the schematics in post #7 and above do what is described in post #1 because the 4013 is not configured as a toggle flipflop. Wally's is correct in this regard, but the motor run time is fixed rather than controlled by the input signal. Here is a version with a solid-state flipflop and manual relay timing. The two spare gates are used to clean up slow R-C debounce time with hysteresis and eliminate a minor timing issue.

    Note - this is a concept schematic that uses parts in my design library. There is no need for 1% resistors, you can use electrolytic capacitors, the output transistors might need to be bigger depending on the relay coil current, and do not mix 5 V-only logic with 12 V logic.

    ak
    MotorReverseSwitch2-2-c.gif
     
    Last edited: Jan 6, 2016
Loading...