H Bridge questions for model RR

Discussion in 'General Electronics Chat' started by Mike33, Feb 2, 2014.

  1. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Hi Guys,

    I have a transistor issue, and need a GURU to lend a hand, if possible.

    Ok, the father in law does model train stuff. He wants to run his track switch machines off of reed switches - one for each direction. They're SPST. They are tripped by a magnet on the bottom of a car. This is irrelevant to the problem, so here is the pertinent info:

    Data: the SPST reed switch will be closed for just a moment, taking the H bridge HIGH and delivering power to the load in 1 direction - represented in the schematic by taking the base of Q2 H with V2, at B...A is not actually grounded, it floats.....the switch machine takes a couple of seconds to complete its run, however. The H Bridge is PERFECT for this kind of application, BUT I need a way to make it stay on for 2-3 seconds AFTER the reed switch is closed/opened momentarily. As drawn it will only be on as long as the reed is closed. A flip-flop would have worked, but loses its state when powered off, and remains powered all the time, so that's a no-go...

    I KNOW there is a way to do this with an R-C circuit...I am ashamed to say I cannot figure it out, though!! :( Since there's no 'lasting ground' to work from when the switch opens again, I'm dumbfounded.

    Thanks for any suggestions! It's an interesting project, but frustrating.


    [​IMG]
     
  2. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Alternatively, does anyone know how I could wire this up with a couple of 555's? That would give me the output H for the time duration I need, BUT
    The trouble I'm having is that the polarity must reverse...

    To keep it simple -

    If anyone has info on how I could reverse the polarity to a motor for a set time (several seconds) with a momentary flick of a SPST, I'd love to hear it! Even if the H bridge is a bad idea, and maybe something with a 555 is more acceptable....
     
    Last edited: Feb 2, 2014
  3. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    You seemed to have changed your requirements somewhat. :confused: Please explain exactly what you you want to happen in what sequence as determined by what trigger(s).
     
  4. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,785
    945
    Modify the reed switch activation method. Instead of the magnet being on the train. Place it on moveable pivot that stays in contact with the reed switch as long as any part of the train is passing the point where you mount it. This should provide a much longer on time
     
  5. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    That has merit, Kermit, thanks! I also thought that maybe he could move from a 'button magnet' to a bar magnet that is physically LONGER, keeping the switch closed for that much longer (admittedly, 3 seconds worth of magnet is probably as long as the train). Tesla-like mechanical solutions in the 21st century, ha ha. A copper 'brush' might work, too...a bar that is pushed down by the train, making contact.

    Really, tho, here is the crux of the problem:

    How to keep a transistor(s) on for a longer duration than the momentary pulse from a SPST used to turn the base(s) on? Specifically, the input pulse to an H bridge. If I could solve that, this would be a piece of cake. Because, even if I were to use a 555 to gain longer output H time, I still have the problem of reversing polarity.

    I literally need to turn on a motor with one polarity, then a bit later, turn it on again but with the polarity reversed. Using one SPST to do each thing.

    In the end, I may need one 555 for EACH direction of the train, to turn on the H bridge for the required time. Did I mention, there are about 12 of these switch machines?? 2 555's per, then. Ugh. :confused: Unless there is a simple R-C way to make the pulse longer.
     
  6. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,785
    945
    Limit switches. When activated they stop motor and apply voltage to the opposite limit switch, which does the same in its turn. Single throw triple or quad throw should do it. The motor can then run exactly as long as needed and the timing won't drift. The current reed switch would activate the motor and the limit switch would latch until operated by end of motor movement. v
     
  7. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Do you have a practical example, Kermit? I'm not really 'seeing it', y'know?

    I could probably get this done with two 555's and a few diodes, just hoping to not have to put together so many boards to do this simple thing. Arrgh!
     
  8. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,785
    945
    I am short on time now. People are arriving at work and I must now start being "busy". Boss likes busy employees ya know! I'll try to draw up the idea later today. If I can remember. My allztimers is still just sometimers right now, but even then I forget stuff more than I used too
     
  9. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Tell me about it, ha ha. Thanks! The father in law is getting set on using 2 separate SPST reeds to do this. It MAY work, or might be somewhat of a crap show, honestly. I'd have spent the $$ to get DPDT reeds, at the least, just for simplicity.

    Tough to tell these older guys that you need to do it right ;o) I'm 42 - can't wait til I'm 75 like him so I can annoy the younger crowd!
     
  10. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    Below is the bridge modified to generate a delay for either input. I changed the top transistors to PNP's to reduce the size of the delay cap required and so that the top transistors are fully saturated instead of being emitter-followers which can't fully saturate in that circuit. The SW's simulate the reed relays.

    The current has a slow turn-off due to the simple delay circuit used but I assume that won't be a problem. If you need faster turn-off then the circuit will need some additional parts.

    Edit: I just realized that the high current pulse due to the capacitor when the reed relay closes, could damage the relay. To prevent that add a small resistor (about 100 ohms) in series with the power to the relays.

    Bridge delay.gif
     
    Last edited: Feb 3, 2014
  11. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Hey, thank you, Crutschow! That was pretty creative :D

    I really would like to learn more about 'the little tricks' we can do with transistors; I guess in time, I will. I spent almost ALL my time learning electronics on audio equipment. Now I'm going back to broaden my horizons.

    I have to learn to equate LPF with "delay" at these lower (non)frequencies! ;)

    I think this will work out nicely. Good deal.
     
  12. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    A simple RC circuit is commonly used for many purposes. In the frequency domain it can be a simple high-pass or low-pass filter. In the time-domain it can be a time-delay / integrator, or a differentiator depending upon the configuraton.

    Edit Note: To improve the turn-off time add a 20k ohm resistor or so between each of the NPN bases and ground.
     
    Last edited: Feb 3, 2014
  13. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Thanks again....interesting circuit, and exactly what I wanted to do. I think he'll need this even with the reeds he's purchased...a fast pulse isn't going to move the switch machine all the way on its own. I told him to put a 470u NP cap across the terminals, and that may do it - but if not, this is the way to go :eek:)

    >> Why does adding the 20k at the bases improve turn-off time? I have heard an R there improves the NPN's "stability" - is this related?
     
  14. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    If he puts caps across the terminals he will want to add a 100 ohms or so resistor in series with the cap to avoid damaging the reeds from the otherwise large capacitor charging current.

    The base-emitter resistor shunts away a small amount of current which reduces the time for the transistor to turn off at the tail end of the exponential voltage fall from the cap. It also can shunt away any leakage current from the base which would otherwise tend to keep the transistor slightly turned on.
     
    Last edited: Feb 4, 2014
  15. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Ok, thanks, that explains the 'stability' thing I've heard about but never knew. There's always a REASON for these phenomena - it's nice to hear the WHY of it!

    I'll tell him to put a 100R on each cap, that makes good sense!
     
  16. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    I trust by "on" you mean "in series". ;)
     
  17. Mike33

    Thread Starter AAC Fanatic!

    Feb 4, 2005
    349
    25
    Yup. I specified 'in series' to him. He probably won't do it, being a 75 year old stubborn guy. First thing he'll think is that "now it will slow down the motor", as he doesn't understand what a cap really does, how it looks to a power supply when discharged...has a cap across the switch motor so it will make its full arc with a brief hit of the switch. Works well, but yes, exposes the cap as a near short. This is why I've been working on that H bridge...

    You haven't lived until you've had a nice big cap pop 10" from your face! :eek: It's a learning moment, ha ha!
     
  18. theinkdon

    New Member

    Feb 18, 2014
    2
    0
    Crutschow, thank you so much for posting this diagram. It did what I needed to do also (close and open a pit bay entry flipper for a 1:32 scale slot car track).

    Question for anyone who might have an explanation for a new-to-me phenomenon:
    I'm driving one of these car door lock actuators:
    [​IMG]
    Which on the inside looks like this:
    [​IMG]
    Probably functionally similar to this:
    [​IMG]
    So just a small 12V DC motor.
    I'm using TIP120 &TIP125 Darlingtons and 100uF caps instead of the 150s specified (to shorten the output pulses). It works perfectly; actuate a momentary switch and it goes out, hit the other switch and it pulls in.

    What's odd is after the pulse times out (I was watching it with some LEDs), a kind of high-pitched whine or squeak comes from the actuator, lasting maybe a half-second. Pretty definitely an electronic, not mechanical sound, though I didn't open it up to confirm. A lot like camera flashes used to sound (maybe still do) when charging up, but much shorter. I then remembered flyback diodes so I put a 1N4001 across each collector-emitter, but I still got the same sound. Then I read that the TIP120/125 have built-in flyback diodes so that's probably not necessary anyway.

    It doesn't seem to be hurting anything, but I'm wondering about the long-term effects, and basically just curious about what's going on.

    Anyone have any ideas?
     
  19. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    The high pitched whine may be something oscillating. Its not desirable but, if the circuit seems to work okay, then it's probably not a serious problem.

    Do you have a decoupling capacitor connected directly across the bridge power to ground (100uF or more)?
     
  20. theinkdon

    New Member

    Feb 18, 2014
    2
    0
    I don't, but I'll try that when I get home tonight. Thanks again.
     
Loading...