Hold timer with fast reset.

Thread Starter

Dick123

Joined Dec 15, 2017
4
Hi all!

I need to build a 12v circuit that:
- When input is applied it passes it through for 4 seconds and then shuts it off.
- If the input turns off the output also turns off.
- It needs to be able to handle fast resets (~300ms).

The reset is where I get into trouble. I've tried a 555 monostable timer with a selftriggering capacitor at he input. But it can't handle the fast resets.
Do I have to program a pic for this simple task?

Thanks!

Best regards
Daniel
 

LesJones

Joined Jan 8, 2017
4,511
When you say "selftriggering capacitor at he input." I assume you mean that one end of the capacitor is connected to the negative rail and the other end to pins 2 and 7 with tyhe charging resistor up to the positive rail. (Pin 7 not connected to anything.) Try adding a diode in parallel with the timing resistor with the cathode end (The end with the band.) to the positive rail. Also add a resistor between the positive and negative rails (About 1/100 th of the value of the timing resistor) so that as soon as the power to the timer is removed the power rail voltage drops to zero quickly. This will discharge the timing capacitor quickly. There will be a slight difference in the 4 seconds between a short and long interruption of power as the capacitor wol onnly discharge to about 0.6 volts due to the forward volts drop of the diode. When posting quesions it is much better to post a schematic of your circuit.

Les.
 

LesJones

Joined Jan 8, 2017
4,511
How accurate do you require the 4 seconds and how much difference can you tolerate between the 4 second pulses that are spaced close together and those with a long time between them ? If you give some background information about the purpose of this timer it may help us come up with a solution. A schematic drawn on paper by hand will be good enough, Just scan it in or if you don't have a scanner just use a digital camera. Using a microcontroller with a crystal oscillator would be the easiest and most accurate way.

Les.
 

AnalogKid

Joined Aug 1, 2013
12,128
By "input is applied", do you mean turning on power to the circuit?
Does "passing it through" mean controlling the flow of power to some downstream circuit or device?

An alternative to a 555 circuit is something based on an oscillator/counter such as a CD4060. It doesn't have the super beefy output stage that a 555 does so it might need an external pass transistor. But - resets are instantaneous.

"Same output" - 4 seconds +/- 1 second? 4.000000 seconds +/- 0.000001 second?

ak
 

Thread Starter

Dick123

Joined Dec 15, 2017
4
Hi guys!

And Merry Christmas.
Sorry for my late response but the holidays got in between. Back to business.
I've used the basic scematic from http://www.electronics-tutorials.ws/waveforms/555_timer.html


And just put a 10uF resistor where the button is to get it to trigger when power is applied. But if I cycle the power for less then 0,5 sec the capacitor doesn't get a chance to discharge and the circuit doesn't restart. The circuit should be able to handle a power cycle thats approximately 0.1 sec.

@LesJones: This circuit will power one small LED and you shouldn't be able to notice any difference in the delay. So maybe 4 sec +/-0.1 sec.
@AnalogKid: Yes, input applied eq power on. I'm able to use another constant power source with the input signal as just an input.

Thank you for helping me out.
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
The problem with that circuit is that at switch on the capacitor has to charge from zero volts to 2/3 Vcc. When it is triggered from the reset pin (2) it only has to charge from 1/3 Vcc to 2/3 Vcc. This is because the dischage transistor is turned off as soon as it has discharged the capacitor to 1/3 Vcc. If you remove the connection to pin 7 and connect your trigger button directly (Via a resistor to limit the current to within the rating of the push button.) across the timming capacitor then the timing will start from zero volts. As we do not have any details of your application the fact that the timing will start from the time the trigger button is released may be a problem . You have still not given any details about how accurate the 4 seconds needs to be.

Les.
 

AnalogKid

Joined Aug 1, 2013
12,128
There are two ways to remove power to the circuit, and they affect the reset performance differently. If the circuit is turned off by removing power and letting the Vcc rail float, then automatic C1 and Cswitch dischargers can get complex. If power is removed by having the source voltage drop to 0 V but still present a relatively low output impedance, then diodes across R1 and R2 can discharge C1 and Cswitch down to around 0.7 V rapidly. For a 15 V circuit this is a low enough percentage that the circuit is effectively starting from zero again.

Something to try is an RC circuit at pin 4. This should turn on the discharge output pin 7 at power up. If the reset time constant is a lot shorter than the timing time constant, it will have only a small effect on the output period. The trick is to get the reset TC to be long enough to discharge C1, but short enough that it releases the reset input before the R2-trigger cap (across the switch) releases the trigger input.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,128
Here is the digital counter approach. Same number of small components, plus an output transistor.

After the power-on reset, Q10 is low for 4095 clock cycles, keeping Q1 turned on. On the 4096th clock it goes high, which turns off Q1 and locks up the clock oscillator through D1. This freezes the counter until another reset pulse. Because one clock cycle is less than 0.025% of the output period, the initial charge state of C1 doesn't matter.

The output pulse width is a combination of the clock frequency set by R1 and C1, and the output tap. The 4060 datasheet has the clock frequency equation. For simple math, R2 should be at least 10x R1, and 1 M or less. The output pulse is the first 1/2 of a complete cycle that is terminated by the positive feedback through D1.

R3-C2 form a 7 ms power-on reset (0.7 time constant).

When power is removed, R3 and R4 discharge C2 to 5% charge in 33 ms (3 time constants), and 1% charge in 55 ms (5 time constants).

EDIT: Updated schematic with a better connection for D1.

ak
PowerPulse-4sec-1.gif
 
Last edited:

Thread Starter

Dick123

Joined Dec 15, 2017
4
Hi guys!

I want to thank you all for helping me out. But I went with what I got at home.
So the PIC12F683 with a small pice of code is working great.
:)
 
Top