0
\$\begingroup\$

I need to create a circuit that sends out a signal only if the input it on for longer than a specified time. Lets say 20 seconds for this example. So if the input to the circuit was pulled high for 10 seconds no output would be sent, but if the input was pulled high for 21 seconds an output would be sent and it would be held until reboot or a reset button is pressed. I looked into 555 timer circuits, but I couldn't figure out how to achieve this without building a lot of discrete logic. I am also not allowed to use a microcontroller for this, but could potentially use an FPGA or PLC.

\$\endgroup\$
  • \$\begingroup\$ If the signal is sent into the circuit for less than 20 seconds then there is no output/no change in output. If the signal is sent into the circuit for more than 20 seconds then there is an output/change in output. \$\endgroup\$ – Adrian Haber Jul 22 at 15:49
  • \$\begingroup\$ My apologies, I misread what you said. I am curious about your thinking with the 555 timer. What if you set it up to be monostable? \$\endgroup\$ – KingDuken Jul 22 at 15:51
  • \$\begingroup\$ If it was monostable woun't it go off no matter what if the trigger conditions were met? \$\endgroup\$ – Adrian Haber Jul 22 at 15:52
  • \$\begingroup\$ From what I'm understanding in your question, you want something that blocks an input until 20 seconds. What if you have a comparative logic device that only outputs something when your 20 seconds is up? I don't know what this "input" of yours is since you haven't talked about, whether it's serial data coming through or you're preventing a user from inputting anything, but logic gates are made for a reason. \$\endgroup\$ – KingDuken Jul 22 at 15:57
  • 1
    \$\begingroup\$ Why aren't you "allowed" to use a microcontroller? Is this a homework problem or some other kind of school assignment? \$\endgroup\$ – Elliot Alderson Jul 22 at 16:18
1
\$\begingroup\$

You can use the NE555 as RS-flip-flop, so, without using the discharge function / "timing" function. The timing can be build without using the 555.

Noting that RESET can override TRIG, which can override THRES. you could make the following circuit.

enter image description here

R3 and R6 have been implemented as buttons, but can easily be adapted to the type of input signal you want. Their resistor value is R={if(time< T1 ,1G,if(time> T2 ,1G,1))}, so it's 1 Ω between time T1 and T2 and 1 GΩ elsewhere.

When the BUTTON signal is low, M3 stops conducting and therefore C2 isn't longer shorted to ground and starts being charged. When the charge time equals about 20 seconds, M1 will start conducting and will short TRIG of the 555 to ground. That causes the output of the 555 to be set.
OUT is tied to mosfet M2 that keeps the TRIG signal low(1).
As soon as the BUTTON signal is released, M3 shorts C2 again, and another 20 seconds are needed to turn on M1.

When RST of the 555 is pulled low, the 555 resets.

I'm not sure what the initial state of the 555 is, therefore I added pull-up resistor R2. C3 is not required.

(1) If M2 fails taking over fast enough, you could add a small capacitor between TRIG and GND. Because TRIG is pulled low by the capacitor at start up, you'll also need to add a capacitor between RST and ground with a bigger RC time.

EDIT
Triggering M1 at its treshold voltage isn't very accurate. You can increase accuracy in timing by replacing M1 by e.g. an open-drain comparator (with voltage reference like the TLV3011/2)

\$\endgroup\$
  • \$\begingroup\$ Thank you for your response. When you say not accurate how inaccurate would this be? Are we talking like 2% or 20%? \$\endgroup\$ – Adrian Haber Jul 23 at 14:57
  • \$\begingroup\$ Check for the minimum and maximum value for \$V_{GS(th)} \$ and you can calculate it. \$\endgroup\$ – Huisman Jul 23 at 16:24
  • \$\begingroup\$ Thanks I will do that. \$\endgroup\$ – Adrian Haber Jul 23 at 17:13
1
\$\begingroup\$

You can do this with a 555 timer but you really only need the comparater functionality. Adjust R1 and C1 to get the time delay you're looking for. This circuit assumed your signal can sink at least 5mA (if it's less, you can increase R2 but that will delay the "reset" when your signal goes low).

schematic

simulate this circuit – Schematic created using CircuitLab

I used a square wave generator to simulate your high/low signal. 20 seconds after the input (blue) goes high, the output will go high and stay there until your input goes low again. Delayed Output

\$\endgroup\$
  • \$\begingroup\$ Nice circuit. But it is missing the part: "but if the input was pulled high for 21 seconds an output would be sent and it would be held until reboot or a reset button is pressed". A piece of latching circuitery should be added for that. \$\endgroup\$ – Huisman Jul 23 at 16:56
  • \$\begingroup\$ I interpreted the "reset" as when the input signal went low again. But if that's not the case, then yes I agree, we'll see what OP thinks. \$\endgroup\$ – Kent Altobelli Jul 23 at 17:07
  • \$\begingroup\$ Huisman is correct in what I am trying to say. Reset is a separate input to the circuit. \$\endgroup\$ – Adrian Haber Jul 23 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.