Latching 5V Circuit For Motor Control

Discussion in 'The Projects Forum' started by Dinel, Mar 11, 2016.

  1. Dinel

    Thread Starter New Member

    Mar 2, 2016
    9
    0
    I am unsure how to latch a motor into the forward position using a N/O push button, and unlatch while also latching into reverse using the temporary output of an object sensor (I'm using OPB715-716-717-718). I would then like to unlatch the motor from reverse and have it be off using another object sensor (of the same kind). I attached a picture of the H-Bridge design I used to make my circuit, if that helps with anything.
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    Flow chart diagram, where?
     
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,365
    Did you want to use electronic or relay logic?
    Is your sensor in the active low or active high position when sensed?
    Max.
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    T1, T4 in parallel a 3.3K~4.7K resistor with Vbe2, Vbe4 to avoid when T1 or T4 tun off and it's Vb1 and Vb4 become a floating status.
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,101
    Depending on the motor type and load, going instantly from forward to reverse could damage the motor and/or load. The forward unlatching operation ideally should initiate a braking period before reverse is applied.
     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,967
    744
    To make a latch you need a flipflop using a cd4013, or 555 timer, or nand gates.
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Which of the four sensor models are you using?
    For 5V control signal inputs, both R5 and R6 should be 1K. Scale R2 and R4 for your desired T1 and T4 base currents at whatever the motor power rail is.

    Is this correct:

    Motor is at rest
    Push button and release
    Motor moves forward
    Motor triggers object sensor #1
    Signal from object sensor #1 changes motor to reverse
    Motor runs reverse
    Motor triggers object sensor #2
    Motor is at rest

    Is that correct?

    In other words, press a button, the motor runs out to a limit, reverses, runs back to the starting point, and stops.

    Yes / No ?

    If yes, then functionally you need two flipflops, one for on/off and one for forward/reverse. Not difficult, looks like two CMOS chips and your motor driver circuit. Are you familiar with CMOS parts like a CD4013 and CD4093? The circuit can be done with two 4093's. However, replacing one 4093 with a 4013 increases the circuit's immunity to false trigger signals out of the sensors.

    ak
     
  8. Colin55

    Member

    Aug 27, 2015
    191
    19
    For all this complexity, you need a microcontroller.
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    No, you don't.

    Note - for this version the object sensors should have totem-pole outputs that go high when an object is detected.

    ak
    MotorReverseSensor-2-c.gif
     
    Last edited: Mar 11, 2016
    ronv and Dodgydave like this.
  10. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,967
    744
    You tell em AK :cool:
     
  11. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    This is an equal-component version, with one part type for both the flipflops and the gating. For this version, the object detectors should have totem-pole outputs that go *low* when an object is detected.

    Note that neither schematic has power decoupling, power-on reset, or input transient protection, things that can vary with the installation.

    ak
    MotorReverseSensor-3-c.gif
     
    Last edited: Mar 11, 2016
  12. Colin55

    Member

    Aug 27, 2015
    191
    19
    Where is the delay between forward and reverse?
     
  13. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Same place it is in all of the TS posts. Resistor-capacitor-diode deadband timers can be inserted between the output gate pairs.

    ak
     
  14. Colin55

    Member

    Aug 27, 2015
    191
    19
    "Same place it is in all of the TS posts. Resistor-capacitor-diode deadband timers can be inserted between the output gate pairs."

    By the time you muck about with all this hardware, you would be better off with a microcontroller.
     
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Every time you (and several others around here) say something like that, I wonder what you are talking about. I could wire up this circuit on perf board in under two hours. You probably are about that speed, but even if you're not we're talking 1/2 day. While post #1 has clear evidence that the TS can design and wire up discrete circuits, there is zero information to support the assumption that he can program anything, let alone a microcontroller. It is much safer to assume it would take him 2 days just to read up on the popular parts and select one for the project. Then he has to learn C++, then buy a development kit or device programmer, then figure out the I/O pin control registers (always a thrill ride), and then write and debug the code. And then, ***wire up the circuit on a perf board anyway***. My guess, even with PIC Basic (and assuming he knows BASIC) it would take a few weeks. Are you seriously suggesting that wiring up two NAND gate packages is less total effort?

    I have nothing against PICs (or whatever). I have them in personal projects around the house and military systems sprinkled around the globe. But they (like the 555) are a specialized tool for a subset of problems. Sure a PIC can do this job, but that doesn't make it the right tool for this job.

    Google Maslow and hammer.

    ak
     
    Last edited: Mar 12, 2016
    absf likes this.
  16. Dinel

    Thread Starter New Member

    Mar 2, 2016
    9
    0
    I am not familiar with those parts, but I'll look into it, thanks for your help
     
  17. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,365
    Still don't know the details of the motor maybe it may be able to instant reverse without harm, depending on the load, if so probably could be done with three relays!
    Microcontroller going even more over the top!
    Max.
     
  18. Dinel

    Thread Starter New Member

    Mar 2, 2016
    9
    0
    This is great, thank you very much.
     
  19. Dinel

    Thread Starter New Member

    Mar 2, 2016
    9
    0
    My stupidity is gonna shine quite a bit here, but I just want to confirm that those two flip flops are JKs, and those gates at the end are NANDs?
     
  20. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
Loading...