# Time delay on with 2 second pulse output diagram

#### RodneyB

Joined Apr 28, 2012
697
Hi

I am looking for a circuit diagram to build a timer.

The circuit must have a time delay on of 30 Seconds and then an output pulse of 2 seconds on.

Once triggered the input pulse must be removed before it can be re triggered.

Any help will be greatly appreciated.

#### AlbertHall

Joined Jun 4, 2014
12,157
What do you want to happen if, after triggering the input pulse is removed, then another input trigger occurs during either the 30 second delay or during the 2 second 'on' time?

#### RodneyB

Joined Apr 28, 2012
697
What do you want to happen if, after triggering the input pulse is removed, then another input trigger occurs during either the 30 second delay or during the 2 second 'on' time?
After the trigger input pulse has been removed and it is in its timing cycle then it must stop.

So if the timer is triggered and remains high, start timing after 30 seconds pules output high for 2 seconds. once two seconds have timed out then until re triggered it stays off.

If triggered and the timing cycle has started and the trigger is removed then cancel timer

#### R!f@@

Joined Apr 2, 2009
9,827
555 or a micro ?

#### dannyf

Joined Sep 13, 2015
2,197
A MCU would be ideal here.

#### AlbertHall

Joined Jun 4, 2014
12,157
I am looking for a circuit diagram to build a timer.
Do you have any experience with microcontrollers? Do you have a programmer?
What input voltage represents a trigger, and what voltage represents the trigger removed?
What output voltage/current do you need?

#### AnalogKid

Joined Aug 1, 2013
10,126
To recap:
1. The input trigger signal is a level, not an edge.
2. If the input trigger signal stays high for the entire 30 seconds, the timer then makes a 2-second output pulse.
3. If the trigger signal goes low before the 30 seconds is up, the process terminates and the 2-second output pulse never happens.
4. If the trigger signal then goes high again, the 30 second period starts over.
Is this correct?

Question:
Once the 2-second output pulse starts, it goes for the entire 2 seconds even if the trigger signal goes low part way through it.
- or -
Once the 2-second output pulse starts, if the trigger signal goes low part way through it, the output pulse immediately ends.

Overall, sounds like one CD4060 and one CD4093. Or just one CD40106 if tight accuracy is not required.
What is the power supply voltage?
What does the 2-second output pulse drive?
Is the trigger signal active-high or active-low?
AND - how accurate do the 30 second and 2 second time periods have to be?
ak

Last edited:

#### RodneyB

Joined Apr 28, 2012
697
Do you have any experience with microcontrollers? Do you have a programmer?
What input voltage represents a trigger, and what voltage represents the trigger removed?
What output voltage/current do you need?
A trigger will be 12 Volts.
Trigger removed will be 0 volts
I can switch a relay on the output or a transistor the output will then trigger the input of the controller

I have a pickit3 and very very little knowledge of how to use it

#### RodneyB

Joined Apr 28, 2012
697
To recap:
1. The input trigger signal is a level, not an edge.
2. If the input trigger signal stays high for the entire 30 seconds, the timer then makes a 2-second output pulse.
3. If the trigger signal goes low before the 30 seconds is up, the process terminates and the 2-second output pulse never happens.
4. If the trigger signal then goes high again, the 30 second period starts over.
Is this correct?

Question:
Once the 2-second output pulse starts, it goes for the entire 2 seconds even if the trigger signal goes low part way through it.
- or -
Once the 2-second output pulse starts, if the trigger signal goes low part way through it, the output pulse immediately ends.

Overall, sounds like one CD4060 and one CD4093. Or just one CD40106 if tight accuracy is not required.
What is the power supply voltage?
What does the 2-second output pulse drive?
Is the trigger signal active-high or active-low?
AND - how accurate do the 30 second and 2 second time periods have to be?
ak
1.Yes a level for the trigger 12 Volt
2.The trigger will stay high the whole 30 Seconds
3. If the trigger is terminated the 2 second will not pulse.
4. If the trigger signal goes high again again the timing cycle starts again.
5. If the trigger signal goes low during the 2 second pulse the 2 second cycle stops immediately.
6. The two second pulse is the signal that drives a small stepper motor. It requires a negative pulse and as long as its negative it runs the motor.
7. The timing cycles don't have to be very accurate. Its not a critical function.

Many thanks

#### AnalogKid

Joined Aug 1, 2013
10,126
First pass at the basic timing circuit. Missing are power supply filtering, decoupling, and transient protection, input transient protection, output current boost, etc.

Q14 goes high after 30 seconds. At this point, Q10 is low, and the output pulse starts. When Q10 goes high, the output goes high and the oscillator is inhibited through D1. The circuit sits there until the input goes low (to reset it) and high (to enable it). Any input activity anytime during the 32 second overall period instantly resets everything.

The delay time and output pulse width are always 16:1. You can decrease R1 to 33K and put a 5 K pot in series with it to tweak the timing. For example, an output pulse of exactly 2.0 seconds means a delay of 32 seconds, and a delay of exactly 30 seconds means an output pulse width of 1.875 seconds.

ak

#### Attachments

• 10.1 KB Views: 3
Last edited:

#### RodneyB

Joined Apr 28, 2012
697
First pass at the basic timing circuit. Missing are power supply filtering, decoupling, and transient protection, input transient protection, output current boost, etc.

Q14 goes high after 30 seconds. At this point, Q10 is low, and the output pulse starts. When Q10 goes high, the output goes high and the oscillator is inhibited through D1. The circuit sits there until the input goes low (to reset it) and high (to enable it). Any input activity anytime during the 32 second overall period instantly resets everything.

The delay time and output pulse width are always 16:1. You can decrease R1 to 33K and put a 5 K pot in series with it to tweak the timing. For example, an output pulse of exactly 2.0 seconds means a delay of 32 seconds.

ak
View attachment 111180

Thank you very much. I will buy the components tomorrow and build it on my bread board.

Really appreciate this help.

#### dannyf

Joined Sep 13, 2015
2,197
With a little bit of programming (ladder logic or C), this can be done with a 8pdip MCU and no other parts.

#### AnalogKid

Joined Aug 1, 2013
10,126
I have a pickit3 and very very little knowledge of how to use it
dannyf - I think that translates to about 3 days of programming effort for every connection in the circuit.

ak

Last edited:

#### AnalogKid

Joined Aug 1, 2013
10,126
this can be done with a 8pdip MCU and no other parts.
Input voltage level translator
Output voltage level translator
Voltage regulator for the PIC

ak

#### RodneyB

Joined Apr 28, 2012
697
With a little bit of programming (ladder logic or C), this can be done with a 8pdip MCU and no other parts.
I would love to do it using a PIC

However i know absolutely nothing about programing a pic.

I have a pickit 3 but don't even know where to begin
I am looking for a basic practicle c pic course using a pickit3

#### dannyf

Joined Sep 13, 2015
2,197
However i know absolutely nothing about programing a pic
Sounds like a perfect excuse to get started on a MCU for this project.

There is a ladder logic program that supports a few avr and pic chips. It is fully graphic interface and if you are already familiar with relay programming, it is a great place to start. It compiles eight into binary for your pickit3 to burn into a chip.

You can also get it started in C. The best pic tutorial I have seen is done by an Aussie named gullium (I'm sure I mis spelled his name). But there are so many videos and blogs on this you can pick it up quickly.

For something this simple, you may be able to find someone coding it for you initially. If no one wants, I can give you a sketch to get you started.

#### AlbertHall

Joined Jun 4, 2014
12,157
There is a ladder logic program that supports a few avr and pic chips.
Thanks for that. I had not come across this program and it could be very useful for some programs (like the subject of this thread).

#### RodneyB

Joined Apr 28, 2012
697
Sounds like a perfect excuse to get started on a MCU for this project.

There is a ladder logic program that supports a few avr and pic chips. It is fully graphic interface and if you are already familiar with relay programming, it is a great place to start. It compiles eight into binary for your pickit3 to burn into a chip.

You can also get it started in C. The best pic tutorial I have seen is done by an Aussie named gullium (I'm sure I mis spelled his name). But there are so many videos and blogs on this you can pick it up quickly.

For something this simple, you may be able to find someone coding it for you initially. If no one wants, I can give you a sketch to get you started.
I would greatly appreciate this help. I will build it using both circuits. I have mplab and pickit3 already on my computer. What must i do now

#### RodneyB

Joined Apr 28, 2012
697
I have the following PIC

12F675
10F200
16F84a