Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Timer - 5 min on, 2 sec off

Status
Not open for further replies.
Hello everyone,

I spend the last 48 hours doing a lot of research on the 555 timer and other ICs that could resolve my issue, but due to my lack of knowledge I spent hours in front of several sites reading a ton, and ended up without a solution! The circuit might seem easy for most of you, but it isn't just available online, where it will function the way I need it. I know how to design PCBs, read schematics, and I understand the principles of electronics, but then again, I'm not experienced to that extend where I can come up with a circuit on my own. So if you can help, please do. I thank you all in advance.

The problem: I have a device (circuit with micro-controller, wifi module, etc) that is powered through a voltage regulator (12VDC or 24VDC on main power supply), and the device will run on 5VDC and draw max 3A (normally 2.5A). From time to time, this device needs a power reset (after running for 5 minutes: turn off, then a second or two later: turn back on).

The solution: A loop timer that will count to around 5 minutes, and then reset the power of the device. But with one condition, that I can reset the countdown on the timer, by sending a signal, preventing the device power from restarting.

On the prep board I was able to create a 555 timer astable circuit, and I was able to reset the timer using a signal as desired. The problem is that it worked on seconds, not minutes, I then learned this chip is not ideal for that length of time (5 minutes) so I gave up on that design. Also, I'm not sure if I was on the right path, but I was planning to use a mosfet to control the on/off state of the device. I know most of you are experienced enough to bring a solution, but I wanted to find a solution that does not involve using relays and/or a PIC where programming is involved.

Your help is VERY appreciated. If you can draw a schematic for me, I can take it from there. Again many thanks in advance. Mike
 
Have you considered using the watchdog timer in the micro-controller to do this ? It will probably only involve a few extra lines of code.

Les.
 
5 minutes is a little long for a 555 time, but I think it will work if you use a low-power LMC555 CMOS timer along with a ceramic capacitor, both of which minimize leakage that would affect the timing.
Below is the LTspice simulation of the circuit:
The timing capacitor C1 is a ceramic type such as this.

Note that the output pulse interval (green trace) is extended by 300s when the reset input (yellow trace) momentarily goes high and resets the timing capacitor voltage (red trace)..

The 555 output is driving a P-MOSFET to switch the load voltage.

You may have to tinker with the value of R1 to get the desired interval time.

1548926967173.png
 
Have you considered using the watchdog timer in the micro-controller to do this ? It will probably only involve a few extra lines of code.

Les.
The OP did just exactly describe a watchdog timer (external IC or internal to the MCU) but five minutes is pretty long (usually it's a couple of seconds tops) for a watchdog and probably not supported. Normally you would program this behavior into the MCU on the device.

Buy an 8-pin PICAXE starter pack (so you can plug the chip into you PC to upload code and remove it from the socket and reuse it later). It's set up for beginners to require minimal equipment, expense and knowledge. You can even use flowcharts if you want. No coding required.

**broken link removed**
 
Last edited:
5 minutes is a little long for a 555 time, but I think it will work if you use a low-power LMC555 CMOS timer along with a ceramic capacitor, both of which minimize leakage that would affect the timing.
Below is the LTspice simulation of the circuit:
The timing capacitor C1 is a ceramic type such as this.

Note that the output pulse interval (green trace) is extended by 300s when the reset input (yellow trace) momentarily goes high and resets the timing capacitor voltage (red trace)..

The 555 output is driving a P-MOSFET to switch the load voltage.

You may have to tinker with the value of R1 to get the desired interval time.

View attachment 116396

That's awesome, exactly what I needed. I will order some DigiKey parts today and I will try this circuit soon. I'll keep you posted! One last question, will this timer loop? Which means after the power reset, the timer will start its timer function all over again, correct? How can I thank you? I really appreciate it. This circuit is exactly what I need to build.

As for going into the microcontroller and changing lines of code, I've never gone that far, so I feel uncomfortable getting involved on the programming part. But I would like to thank all of you for the other replies. Mike
 
will this timer loop? Which means after the power reset, the timer will start its timer function all over again, correct?
Correct.
I didn't show more than one cycle, but the timer is an astable multivibator and will continute to cycle indefinitely.
How can I thank you?
Click the "Like" button in post #3. :cool:
 
5 minutes is a little long for a 555 time, but I think it will work if you use a low-power LMC555 CMOS timer along with a ceramic capacitor, both of which minimize leakage that would affect the timing.
Below is the LTspice simulation of the circuit:
The timing capacitor C1 is a ceramic type such as this.

Note that the output pulse interval (green trace) is extended by 300s when the reset input (yellow trace) momentarily goes high and resets the timing capacitor voltage (red trace)..

The 555 output is driving a P-MOSFET to switch the load voltage.

You may have to tinker with the value of R1 to get the desired interval time.

View attachment 116396

Just to clarify, the 9 meg Ohms (R1) in reference to your drawing, can it be a surface mount resistor, like this one?

https://www.digikey.com/product-detail/en/RC0402JR-079M1L/YAG3322CT-ND/5282188/?itemSeq=283412688

Thanks again. Mike
 
That's really tiny, even for a custom PCB board. If you're building this thing on an SMD protoboard then you want at least 0603 for a 0.050" grid. 1206 if you have a 0.100" SMD grid.

Got it, thanks for that quick reply. I followed your advise and ordered the 0603 resistor. I also ordered a thru hole resistor just in case something goes wrong. I usually build prototypes on SMD components, I use solder paste, flux and hot air techniques to achieve the assembly for my projects. Thanks.
 
I have a question: If I use a Raspberry PI (microcontroller) to send a low (GND) signal to reset the timer (instead of a 5V signal), can I eliminate Q2 R4 and R5 all together? I modified the schematic to demonstrate what I mean. It's not a big deal, but I thought this could end up using less components...!
image1.png
 
I have a question: If I use a Raspberry PI (microcontroller) to send a low (GND) signal to reset the timer (instead of a 5V signal), can I eliminate Q2 R4 and R5 all together? I modified the schematic to demonstrate what I mean. It's not a big deal, but I thought this could end up using less components...!View attachment 116409
Think bigger. Using a Raspberry Pi could eliminate the 555 timer itself. It would be little different from what I suggested when I suggested using a PICAXE.

Program the raspberry Pi to drive OUT to be high for 2 seconds every 5 minutes. You would only need M1, Q1, R6, and R7.
 
Last edited:
I understand, but I'm trying to use this circuit separate from the micro controller itself. The only interaction between this circuit and the micro controller would be to reset the timer countdown. So the question was, considering I can have the micro controller output low or high to reset the timer, which is the best design.

I know I can eliminate every component using a micro controller, and logically this would be the best choice. But for this project, the micro controller may or may not be present, so I rather use a simple circuit, like the one in reference. I have most components in hand for this circuit so it's a situation where it's just better for my case. But I appreciate the suggestion!
 
If I use a Raspberry PI (microcontroller) to send a low (GND) signal to reset the timer (instead of a 5V signal), can I eliminate Q2 R4 and R5 all together?
No.
The reset point has to be a very high (open-circuit) impedance when not being reset, which is provided by the collector of the transistor.
You show a 10k impedance, which will cause the 555 to stop working.
 
Last edited:
It could work if you can set the output of the Pi into a high impedance state when the reset signal is not present, and if it can tolerate 5V.
 
Last edited:
You can use two mono-stable multivibrators mmv. One triggers the other in a flip flop fashion. One is RC'd for 5 min and the other is 2 sec. You can discharge the 5 min charging circuit to continue (reset to zero) the circuit. A555 might have trouble with the duty cycle. There are many MMV Ic's.
 
Timer - 5 min on, 2 sec off
This question come up so often.
I should program a 8 pin PIC computer. "universal timer"
one/two pins with pots to set time(s).
one/two pins with resistors. 10k=hours, 1k=minutes, 100 ohms = seconds.
One or two outputs. Maybe a input.
This is so easy in software.
Maybe a 16 pin computer with pins that set mode.
 
Follow Up:
I have received my Digikey order and I assembled the circuit, it works as expected. The only difference is R1 was originally 9mega ohms, I had to use 14mega ohms instead, to adjust the on-time. The C1 capacitor used is the exact one recommended.

ON-TIME: 5:10s (average / +-10s)
OFF-TIME: 0:02s

I added an LED with resistor between 555-OUT and V+, so when the mosfet is off, I have an indicator.

The circuit works perfectly. Thanks again for all who helped and suggested a solution!
 
A555 might have trouble with the duty cycle.
Why?
I see no problem with that in the circuit I posted.
The ON time is determined by R1 and the OFF time by R2.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top