TTL Time delay relay

Discussion in 'General Electronics Chat' started by jongas, Jul 5, 2010.

  1. jongas

    Thread Starter New Member

    Jul 5, 2010
    4
    0
    Hi, I'm s machine vision developer with little knowledge of electronics.
    So I turn to anyone out there that may point me in the right direction.
    Here's my problem.

    I have a TTL output from my IO card providing trig to a laser. The laser is not allowed to be active longer than approx. 5ms. Now I want to make sure that if the IO output doesn't go low, a sort of watchdog will force it low after 5ms.
    A watchdog is not really what I want since I'd like to avoid a "keep alive" toggling signal. I've read something about the time delay relays but my lack of knowledge makes me uncertain if that's the way.

    What kind of electronics am I looking for?

    Basically a device that will forward my TTL for maximum 5ms. It should be a "one shot" approach so the next time my TTL goes from low to high the same procedure is followed. Hope it makes any sense.

    BR
    Jongas
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I guess your laser must run in cycles. Then it has been on for 5ms. How long has it to stay in off state
     
  3. Norfindel

    Active Member

    Mar 6, 2008
    235
    9
    You could use a mono-stable circuit, but as t06afre said, it would be better to also make sure the laser is turned off for a certain amount of time, which i bet it needs to cool-down, before another 5ms pulse arrives.
     
  4. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Ok what ever the TTL IO card may be (for ex.. it may be a MCU ) ,what you are trying to do is over protection i.e.. if the signal doesnt goes low after 5ms then an additional circuit will take care of the stuff.So now think! like this ,how about the additional circuit becomes faulty even you cant say that a delay type relay cant go faulty.Then also you can try delay type relays or RC circuit.

    Good Luck
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    If you don't need a cool-down time, then conceptually, all you need to do is trigger a 5mS monostable (oneshot) with the IO signal, then AND the oneshot output with the IO signal.
    This will shorten the output pulse by a time equal to the propagation delay of the onsehot rising edge. To correct this, you can add a delay, which is slightly longer than the oneshot propagation delay, in series with the line from the IO to the AND gate. This is accomplished by the two AND gates in series.
     
  6. Syniva

    New Member

    Jun 21, 2010
    25
    0
    You can use a 74LS123 for this. It has two timers. Each can be positive or negative edge triggered and each provides both positive and negative outputs. It's one of my favorite chips. I cringe every time someone recommends using a 555 instead of the awesome 74-123.

    Use one timer to measure the 5 ms that you want the laser to fire. Use the other timer to measure the minimum time between laser firings. Wire the "off" timer to be triggered by the I/O card and the "on" timer to be triggered by the beginning of the pulse from the "off" timer. In this way, even though the timers are retriggerable, the I/O card can only accidentally extend the "off" time, which won't hurt the laser. The "on" timer won't be retriggered until the "off" timer is allowed to expire.

    The 74LS123 is one of those chips that definitely needs a capacitor on its power pins to ensure proper operation, since it can pull a lot of current when it discharges the capacitors used for timing and it will do something funky if it pulls the voltage too low while doing so.
     
  7. jongas

    Thread Starter New Member

    Jul 5, 2010
    4
    0
    Hi and thanks all.
    Some clarifications. The laser does not need to cool down it is only aimed for security, kind of I will only accidentally beam your eyes for 5ms.

    The monostable seems like a possible solution. Ron thanks for that.

    I do have some additional Q
    What if I want to allow a new trig within the 5ms. Lets say that I trig and the trig goes low before the 5ms (that would be the normal case) and I receive a new trig before the 5ms.

    Once the 5ms elapsed will it require a new low to high transistion to restart? Anything else wouldn't make sense.
    Is there any delay in output(the one shot rising edge)? The laser activation is time critical so I'd really like to minimize any delay on my trig signal.
    Any suggestions on a monostable with short rise time or are we talking nS? ANy additional delay not byond 1us is fine.
    Ron, can you elaborate the double AND gates, I didn't really get that.

    BR
    Jonas
     
    Last edited: Jul 6, 2010
  8. Syniva

    New Member

    Jun 21, 2010
    25
    0
    If there's a risk of burning someone with the laser, you'll want something better than a timeout circuit to protect them, like enclosing the machine in a cabinet with a power disconnect switch on the door, so that it isn't possible to get to the laser without disconnecting the power.

    As far as response times go, supposedly the 74HCT123 will propagate a trigger pulse in less than 1 ns. ...and if you actually want to be able to retrigger it, then you only need to use one of the timers in the chip, since they are retriggerable. Every trigger will simply reset the timer so that it continues for 5 ms after the last trigger, and so you can run the laser continuously by sending another trigger pulse every few ms.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Not sure where you got this. The typical propagation time is 26nS.
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Yes.
    The 74HCT123 output typically appears 26nS after it is triggered. If you AND this with the trigger input in a 74HCT08, the first pulse in the 5mS oneshot window will have its leading edge delayed by (26nS+14nS) 40nS, and the trailing edge will be delayed by 14nS. Therefore, the pulse width is shortened by 26nS. If you prefer to preserve the pulse width, you can add two HCT08 sections in series, acting as delay elements. This causes the first trigger pulse to arrive at the AND gate at approximately the same time as the oneshot output (2*14nS ≈ 26nS). Thus, all pulses within the 5mS window will be delayed by 42nS, and pulse widths will be preserved. if you omit the delay elements, all pulses within the window except the first one will be delayed by 14nS.

    I have included the .ASC file in case anyone wants to simulate this with LTspice.
     
  11. Syniva

    New Member

    Jun 21, 2010
    25
    0
    You're right, I meant to say "1 us" since the datasheet indicated it could be as long as 500 ns in some cases. ...but, I see I wasn't looking at the correct part of the datasheet.

    ...and I missed that the pulse width from the microcontroller was to be preserved, and that the 5 ms was simply a maximum pulse width. I need to read more carefully.
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Don't feel like the lone ranger.:D
     
  13. jongas

    Thread Starter New Member

    Jul 5, 2010
    4
    0
    Once again thanks Ron and Syniva for guiding me.

    I'm quite comfortable with any delay below 1us. I'll get back if run into any other issues.

    The safety mechanism does not only rely on this, so Syniva, you can sleep well without worrying about getting burned by a laser. The area is restricted and if you are travelling within that area the laser should be the least of your concens, trust me :).
     
  14. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Permanent green afro?
     
  15. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    Smoken!...
     
Loading...