# IC for monostable 30min

Discussion in 'General Electronics Chat' started by reca0, Feb 19, 2015.

1. ### reca0 Thread Starter New Member

Feb 19, 2015
4
0
Hello everyone.

I have a PIR sensor that outputs 5V (for let's say 10 seconds) when someone is passing in front of it.
I would like to close a relay for 30 minutes (+/- 3 mins, accuracy is not important) everytime I get a 5V pulse from the PIR and to start the timer again if I get another pulse during these 30min.

So I need a monostable retriggable oscillator (i think) to drive a transistor that drives the relay.
Since the delay is so long i can't use the 555. I have a 4060 but i've seen that is not possible to obtain what I want (at least with minimum effort).
I bought a 4538 (CMOS Logic Dual Retriggerable Precision Monostable Multivibrator) that is what I need but I don't think it's good enough for that duration ( T=R*C , Cmax = 10uF ).

Which IC should I use? Thanks in advance

2. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,070
30min (1800s) is problematic due to capacitor leakage and the input leakage (50nA) into the 4538's pin 2 or pin 14.

1800 = RC.

solving for R with C=10uF: R=1800/(10*1^-6) = 180megΩ.

The max. current that 180megΩ can source is only 5/180megΩ ~= 27nA, which is much too small compared to the leakage current.

A timing resistor of 1megΩ gives a capacitor value of 1800/10*1^6 = 180uF. You will have a hard time finding a 180uF capacitor with a leakage much less than the 5uA the 1megΩ can source.

Use the 4060...

Last edited: Feb 19, 2015
3. ### crutschow Expert

Mar 14, 2008
16,208
4,331
I suggest a 4060 circuit also.
Here's an example.

Jun 22, 2012
6,414
1,016
5. ### reca0 Thread Starter New Member

Feb 19, 2015
4
0
I've seen the schematic, I just can't figure out how it works:

Suppose the 4060 output pin "range" is HIGH, then through the diode D1 this stops the oscillator , so the output stays HIGH (monostable). Is this right?
Then it discharges through R8 and the capacitor C2 (or to the ground?) and so the oscillator starts again since the output of the pin is now LOW ?

And how can i trigger the oscillator with the PIR output, by connecting it to the reset pin maybe? Sorry but I couldn't find these infos well explained on the datasheet.

6. ### reca0 Thread Starter New Member

Feb 19, 2015
4
0
I forgot something:
the output pin starts LOW, but I want immediatly when 4060 starts oscillating an HIGH exit to activate the relay.
How can I do?

7. ### ian field AAC Fanatic!

Oct 27, 2012
5,462
971
Some impressive claims were made for the programmable unijunction (PUT) timer, but you'd need some support circuitry - probably a bistable; the trigger pulse sets the bistable and starts capacitor charging - when the PUT reaches its breakover voltage, the pulse it generates also re-sets the bistable.

The PUT is basically just a 2N5061 with the gate at the wrong end - you can turn the circuit upside down and use a small signal SCR to do a very similar job.

Failing those options - you can make a PUT by cross coupling a complementary pair of small signal transistors.

8. ### crutschow Expert

Mar 14, 2008
16,208
4,331
You can use a PNP (2N2907, 2N3906 etc.) instead of an NPN to drive the relay (emitter to V+, collector to relay, with other relay coil terminal and diode anode to ground).
That will activate the relay when the 4060 output is low.

Also remove R8, R9, R11, D3, D4, and C2 since you don't want the circuit to automatically reset.
If you don't need the reset switch you can also remove the switch and R10.

If you operate the 4060 from 5V you can feed the 5V pulse from your PIR sensor directly to the RESET pin 12 to start the one-shot operation.

Note that upon the application of power you will get some arbitrary one-shot time interval depending upon how the 4060 outputs randomly come up when power is applied.
After that it will time normally.

Last edited: Feb 19, 2015
9. ### ian field AAC Fanatic!

Oct 27, 2012
5,462
971
The 4060 has a MR pin - you can use a simple C/R network across the rails to delay that pin until Vcc/Vdd is all the way up.

You need a diode in parallel with the charging resistor to dump the charge in the capacitor when you power down the rails, a voltage on an input when the supply goes down can cause CMOS to latch up - blows the chip if you power up again before the capacitor charge has leaked away.

10. ### crutschow Expert

Mar 14, 2008
16,208
4,331
I see no reason for an automatic reset since the circuit needs to be timed out before normal operation can begin.
The static state of the circuit is timed-out with the PIR output resetting the 4060 to start the one-shot time.

11. ### reca0 Thread Starter New Member

Feb 19, 2015
4
0
Well I came up with 2 schematics but still not a solution.

In schematic 1 I really miss a part because as the output pin (let's say pin 15) goes HIGH it stays HIGH indefinitely, but I want that after 30 min it goes LOW so that the relay turns off. Moreover in this way after reset the output starts low.

In schematic 2 I use a pnp transistor to drive the relay ( I think I did not connect it properly)
When I have 5V pulse from PIR to reset the output pin starts LOW and the relay is energized because of the pnp driver.
I choose R1 and C so that after T=30 the output goes HIGH, the relay shuts off and the output stays HIGH (because of the diode) until a new reset pulse is received.
Can it work this way?

edit: sorry for the schematics but I did them in a hurry

File size:
7.1 KB
Views:
30
File size:
18.3 KB
Views:
36
12. ### AnalogKid AAC Fanatic!

Aug 1, 2013
5,583
1,582
The 4060 doesn't have the right control pins for a one-time-only digital monostable that you describe needing. The schematic you posted works fine *after* a mandatory 30 minute on cycle at power-up. If you want something that powers up in the off state, try this.

You need to add a single flip flop between the 4060 and the relay driver. The output from the sensor resets the 4060 and sets the FF, and the Q output of the FF drives the relay, so whenever the sensor it tripped the 4060 resets to zero and starts counting up again. The 4060 clock speed and the selected output combine such that the output goes high after 30 minutes. Anytime someone walks past the sensor the 4060 starts over at zero, but the relay doesn't chirp because the output of the FF remains steady. After 30 minutes the 4060 selected output goes high and clears the FF and turns off the relay driving whatever you are driving. Then the circuit sits there. The 4060 still is counting and might cycle all the way around and reset the FF again, but resetting a FF that already is in the reset state doesn't change the output. The FF won't change state until the sensor sets it again.

The FF can be a set-reset type formed from two NAND gates, with a the other two gates inverting the signals from the 4060 and the sensor.

ak

13. ### crutschow Expert

Mar 14, 2008
16,208
4,331
I believe the #2 circuit the op posted will work fine for his purposes.
I don't see that he needs it to work at power-up since I think it will be powered all the time.
After the initial time-out at power-up the circuit will work as he wants.