I wanted to make a circuit in which a push button is pressed once and then the system should wait for a small period of 10 seconds and then give an output pulse of a second. I am looking for a cheap alternative by using analog circuits rather than using a microcontroller.
You can do this with 555 timers as others have said (you could also do it with discrete transistors) the biggest problem being the capacitor values needed for relatively long time delays.
You can get around that problem by using constant current sources to feed the capacitors.
This is a general idea of how that would be done.
V2 represents the switch input, you would need to have the switch generate a negative going pulse. This answer gives an idea how to do that, but you would probably need to remove C1 to keep it from triggering on power up.
The two timers use 1 uF capacitors, these could be something like film or ceramic types. The capacitors are charged by current sources made up of transistors Q1 to Q3. R3 and R7 (along with R1 and R2 to some degree) set the charging currents for each timer.
The blue is the trigger pulse, the red the output occurring 10 seconds later for 1 second.
You would of course need to adapt it to your own needs, adding the switch circuit, an output driver, and possibly make the timing resistors adjustable.
Circuits with microprocessors or digital counters will give the most accurate results but you asked for an analog solution.
Assuming this is a one-off hobby project and your requirements are somewhat coarse, you can probably get the following simple circuit to do the trick.
An RC charged to 5V will discharge exponentially to zero. If we make that exponential discharge time long, over 10 seconds, then we can set up a threshold comparator to trigger as is passes the 10 to 11 second time window.
If we choose the low threshold to be say, 0.3V, then the rest of the values are easily calculated.
The LM339 is a cheap, dual part so this is a one chip solution. The output of each comparator goes high (open collector actually) only during the window where the discharge voltage passes between the two theshold voltages.
The discharge voltage is passing very slowly across the comparator thresholds so there’s a chance for a brief instability (oscillation) at the transitions, so not a good choice if you need a clean pulse. This is solvable with some hysteresis but at that point the complexity is getting ugly enough you may as well use 555s.
Another reason this is only suitable for a “one-off, hobby” situation is that the tolerance of large capacitors is not good. If the cap is off by 20% then your 10 seconds will come out to 8 seconds. But since this is a one-off project it’s just a simple matter of futzing with the Vlo and Vhi comparator thresholds to get any trip points you desire, within reason.
Solution with discrete components
Just for people, who don't want to see NE 555 in each circuit.
- D2 and V5 just simulate a long pressed button input
- When the input is active M1 and M2 immediately conduct, U_CAP will be 5 V
- R3 charges C1, U_CAP is falling for 10 s until current through M1 is falling
- M2 and M1 quickly turn off, U_CAP is below GND, the voltage across R4 is near zero
- The falling edge turns on M3 via C2, start of the output pulse
- R5 charges C2 and R2 discharges C1
- M3 turns off after C1 is charged, end of the output pulse
- After about 500 ms (C1 discharged) the circuit is ready for the next cycle
You’ll need two timers, one for the delay and one for the pulse.
Long delays (like 10s) are hard to generate reliably with an analog solution because of the large values needed for R and C. I suggest instead a ripple counter like the CD4020 to make the 10s, followed by a 555 or such to make the short (1s) one.
If this is for a product of any appreciable volume it could be worth the development overhead of using a programmable solution like a microcontroller or a Silego Greenpak. Both can do it for under 25 cents and take very little board space.
If this is for an industrial or safety-critical system, consider a Programable Logic Controller (PLC) or similar that has adequate safety approval for the target application.
You could do this with a single 74HC123 and two RC circuits, one for the delay (perhaps 2M/1uF) and one for the pulse (perhaps 2M/100nF). RC time constant are not optimal, that's ballpark. Film capacitors would be best due to the enormous voltage coefficient of ceramic capacitors and thus large change in effective capacitance between suppliers etc. so long-term costs in sourcing those specific parts (which are often discontinued). Even so, tolerance won't be great. Maybe +/- 10% with a bit of effort and 1% resistors/5% capacitors.
Use the datasheet connection of RC circuits with A triggered by the input pulse (falling edge starts the time as in your diagram) and the Q output of the first one-shot connected to A of the second one-shot. B inputs tied to Vcc.
A thornier problem is ensuring there is no pulse generated at power-up and that the delay/pulse are more-or-less similar just after power-up to after a long time. That might require two different timed pulses to reset the two one-shots, which requires you to choose between a couple RC circuits and diodes (cheap and more or less works) or something more robust and expensive.
A 6-pin or 8-pin microcontroller with an internal calibrated RC oscillator would likely be a superior solution in terms of simplicity, accuracy (1%-ish with no effort) and parts cost, but you have rejected that option so here we are.
How accurate to the delay and output pulse periods have to be? +/xx% - ? +/-xx milliseconds - ?
oes the 10 second delay start at the beginning of the input pulse, or at the end of the input pulse?
How "square" does the output pulse have to be? IOW can the trailing edge be a bit sloped like a fast exponential decay? If so, then we're down to one CDOS 555 plus an output transistor.
Besides one or two 555's, this can be done with one dual opamp, or one dual comparator, or -
A CD4060. This is a CMOS oscillator and 14-stage divider in one chip. This means the capacitor size for the 10 second delay can be about 8000 times smaller that one in a 555 circuit. Compared to a large value electrolytic cap, a small ceramic or metal film cap has tighter value tolerance, basically zero leakage current, and a much better temperature coefficient.
The basic idea is that the input pulse resets the counter, the oscillator starts running, and the divider output bits are decoded to form the 1 second output pulse, after which the circuit inhibits itself and waits for the next reset pulse.
Digital circuits love binary numbers. Things become less messy if the output pulse is either 0.625 s or 1.125 s.