Help with a simple timer circuit - Page 1
Forum section: electronics / projects

author: jbhill
author_rank: Newbie
timestamp: March 18, 2013, 05:29:37 pm
content: Hello! This is my first post here so maybe a short intro... First I'm not an EE and I'm just barely scratching the surface of very basic electronics. I started watching Dave several months ago and I'm hooked, my kids have a little interest in this as well. I'm a mech engineer that should have learned much more about electronics years ago but I can't do anything about that now.Anyway as a very simple and basic project I would like to build an automatic air compressor drain valve. I know I can buy these almost anywhere but what fun is that? So I want to be able to turn on a 12vdc valve for around 4 seconds and then turn it off for 3600 seconds, give or take. I know any of you could probably set this up in a few minutes while having breakfast but I certainly can't. My first thought is to use a 555 timer but I'm sure there are better ways. I figured out how to do this with an Arduino but it seems like overkill for such a simple device. Can someone tell me if I'm headed down the right path with the 555?Thanks a bunch!Jason

author: Rufus
author_rank: Super Contributor
timestamp: March 18, 2013, 06:10:35 pm
content: Quote from: jbhill on March 18, 2013, 05:29:37 pmA 555 isn't going to do 1 hour period timing. The current required to charge the timing capacitor over an hour will be too small compared to other leakage currents.Something like a CMOS 4060 oscillator/counter could be used to generate a square wave with 1 hour period and couple an edge of that square wave to trigger a 555 to do the 4 second pulse.Or use a microprocessor (PIC probably) but it requires more and different kind of knowledge to implement that solution.

author: MikeK
author_rank: Super Contributor
timestamp: March 18, 2013, 09:18:19 pm
content: FYI: Harbor Freight sells a non-electric automatic compressor drain. It's based on pressure.

author: jbhill
author_rank: Newbie
timestamp: March 18, 2013, 11:01:40 pm
content: I have seen the pressure type systems, didn't know HF had them though. I really want to stay with an electric type mainly because I really want to build this circuit. I will look at the 4060 and see if I can make sense of it.Thanks for the input!

author: MacAttak
author_rank: Unknown
timestamp: March 21, 2013, 06:40:52 pm
content: While the Arduino is indeed overkill, you could always just use a much smaller microcontroller. Something like one of the ATtiny chips would likely work well. You could probably fit the code for this on one of the really small ones - an ATtiny45 for sure, but maybe even something as small as a 13A. These are easily obtained in 8-pin DIP (and cheap!). Plus, the code would be pretty similar to what you are already used to with your Arduino.This would make a very compact solution with minimal parts. Probably the only thing you might need in addition to the chip is a relay or transistor (depending on current needs), and perhaps a resistor or two and a filter cap on the Tiny. You probably would be fine with the internal oscillator on the microcontroller for your accuracy needs - so no need for external crystal and such.You should even be able to use the Arduino to program the tiny chip (see the Arduino As ISP sample code that comes with the Arduino software or look up various examples on Instructables.com or elsewhere).

author: jbhill
author_rank: Newbie
timestamp: March 21, 2013, 10:44:22 pm
content: Thanks for the excellent bit of information. I really like the flexibility of a microcontroller so I'll probably end up going that way, or maybe do both to get a little more education.Thanks again!

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: March 21, 2013, 11:08:38 pm
content: Allow me to interrupt you here please i have worked with 555 timer for a very long time but i am not sure for this.You can use a 1000uf electrolytic between 6 and gnd and use a large resistance about 10k ohm try this for calculate the resistancehttp://www.bowdenshobbycircuits.info/555.htm]http://www.bowdenshobbycircuits.info/555.htmHope it helped