Delay Circuit - Page 1
Forum section: electronics / beginners

author: rules
author_rank: Newbie
timestamp: September 16, 2013, 12:36:57 pm
content: Hi allFor the heck of it, I offered to design/make a little "trigger board" for a product we are busy "playing" with at work. I thought it would be easy to remember all the goodies I had learnt (although I'm starting to think I might have been a little over enthusiastic in my memory keeping) 15 years ago in collegeAnyhow, on to the interesting bits ...We have a device (it's a mobile/industrial pc) with gets power from a 12V battery, but it needs and "ignition" input to switch on. The idea is to have some sort of a "delay board" that will detect when the "ignition" gets cut and then after a set time (3 minutes in this case) will cut the main feed to the device, in order to preserve battery shelf life. So I thought, easy, slap a little 555 circuit together and hey presto. Rules = 0, project = 1The 555 does exactly what it's supposed to, unfortunately this does mean though that it triggers as soon as it sees the "ignition" signal and thus starts counting too early (should start counting as soon as the signal disappears).I have tried all kinds of relay configurations etc. and I just can't get it to work other than having a manual push to be pressed before cutting the "ignition", which we all know, is waay to complicated for the everyday personAny ideas?Thanks.

author: c4757p
author_rank: Super Contributor
timestamp: September 16, 2013, 12:51:15 pm
content: Just use a transistor to invert the signal.3 minutes is a long time for a 555, though. With 16k resistors that would be a 10000uF capacitor! You can't make the resistors too large because the 555 inputs will draw some bias current.The ICM7555 is designed for higher impedances; you could use 100uF with 1.6Meg. Still, you may find the delay somewhat unpredictable, as the components suitable for such a long delay are not going to be highly temperature-stable. You may also find it difficult to source 100uF capacitors with low enough leakage to hold their charge for that long. With a delay this long, it's more common to use a counter (implemented in hardware or software) to count the time according to a faster clock.Can't this functionality be implemented in software on the PC?

author: Psi
author_rank: Super Contributor
timestamp: September 16, 2013, 01:02:21 pm
content: time for a cheap 8pin mcu

author: rules
author_rank: Newbie
timestamp: September 16, 2013, 01:56:02 pm
content: Ah, that was quickHmm, I'm sitting with a potentiometer set to 170 K (more or less) and a 1000uF cap, gives me the time I need.If I'm following your suggestion correctly, I have tried inverting the signal, using a relay, but I then end up inverting the whole process ie. If I wait for the signal to drop, my main relay is then still open, so I can't switch the unit on. Wait, let me draw a quick diagram ...So basically what I would like it to do is, switch on (as in close relay 2) once the key switch is switched on and once the key switch is switched off, relay 2 should should remain closed for 3 minutes and then release. Man, it seems so simple when you read it like thisMy mind has already started wandering towards PICs, but the learning curve won't allow for an immediate solutionBut that would open up so many more possibilities.

author: c4757p
author_rank: Super Contributor
timestamp: September 16, 2013, 02:55:51 pm
content: Quote from: rules on September 16, 2013, 01:56:02 pmYes, but with about 35uA average through that pot, you are going to be subject to leakages and bias currents (the 555 will take some current at the threshold pin, and the capacitor will leak as well). The problem is that these currents aren't constant - they will drift with time and temperature. You might have the time you neednow, but in a week it might not be right anymore.Then again, it could be. That's the problem - using a 555 this slowly is a bit unpredictable. If you use all the right parts and design carefully, it could work, but you need to be careful.Sorry, I'd try to work out your timing logic but I don't have time right now. Hopefully someone else can help you with that. (And you really ought not to use relays for logic.... 1945 called, it wants its efficiency levels back...)Don't drive a relay directly from the 555 like that. At least, put a diode backwards across the relay (pointing up to the 12V supply) to absorb back EMF when the coil shuts off, or else your 555 won't last long. And make sure the relay's coil current is within the maximum output current (TI's NE555 allows 200mA, so you should be fine with that.)I still don't understand why the PC can't shut itself down in software.

author: sleemanj
author_rank: Super Contributor
timestamp: September 16, 2013, 03:53:50 pm
content: Thinking aloud, how about if you think about it like a soft latching switchTreat the ignition key like a momentary switchWhen it goes high, you use this to latch a soft switch circuit where you have Relay 2 drawn (between battery to PC)It doesn't matter when it goes low, the soft switch is still onOnce you have that sorted then you can use your 555 triggered from the ignition going low to force the soft switch off after your desired periodThe soft switch should also provide the 555's power, so once the 555 de-energizes the switch, everything is disconnected againDave did a blog on latching soft switch, and a few people have posted/improved...http://www.google.co.nz/search?q=EEVblog+Latching+Switch

author: dodad_guy
author_rank: Contributor
timestamp: September 16, 2013, 11:48:33 pm
content: Delay On Timers are available commercially. Below is the basic 555 timer circuit which will work. Ignore the naysayers. You are not after an ultraprecise timer. + or - 0.5 minute won't hurt your application.I will also include the inverted circuit for a delay-off-timer.

author: c4757p
author_rank: Super Contributor
timestamp: September 16, 2013, 11:54:20 pm
content: Quote from: dodad_guy on September 16, 2013, 11:48:33 pmIt's pretty rude to tell people to ignore somebody who's taken the time to respond to their question and try to help them. I never said it won't work. I explained that it won't be precise andwhyit won't be precise, and allowed him to make that call by himself. You and I don't know what kind of precision he wants, because he never specified. If you'd like to explain what I said that was wrong, you are welcome.For all you know, +/- 30scouldbe a problem. You tell the people writing software for that PC that they have three minutes, they'll assume they have 180000 ms before the power is cut...

author: dodad_guy
author_rank: Contributor
timestamp: September 16, 2013, 11:57:52 pm
content: Whoops... sorry' the delay off is incomplete. Try this one. DELAY OFF TIMER

author: dodad_guy
author_rank: Contributor
timestamp: September 17, 2013, 12:05:48 am
content: Sorry you took it as rude. I did not want to discourage him from trying something which will work for his stated purpose... a battery saver.

author: c4757p
author_rank: Super Contributor
timestamp: September 17, 2013, 12:13:55 am
content: Quote from: rules on September 16, 2013, 01:56:02 pmNeither of your circuits does this. How's this? The output goes high as soon as the input goes high, and stays high until one monostable delay after the input goes low.Obviously the delay will have to be adjusted.Apologies for the messy schematic. I've about had all I can take of LTspice's schematic editor for a few months now...Quote from: dodad_guy on September 17, 2013, 12:05:48 amI didn't discourage him from trying something. I just pointed out something about it which he may not realize in a quick breadboard test, so it doesn't come back to bite him in the ass later.

author: IanB
author_rank: Super Contributor
timestamp: September 17, 2013, 01:02:20 am
content: Do you actually need an extra transistor for a delay off circuit with a 555? All my instincts are telling me the 555 has enough pins to be configured for that without one, but I guess I'll have to try and come up with such a circuit to convince myself it can't be done. I do imagine an output buffer transistor is needed for a heavy load though.

author: c4757p
author_rank: Super Contributor
timestamp: September 17, 2013, 02:19:50 am
content: Perhaps the transistor could be eliminated. I'm not going to lose any sleep over it, though, it's just a cheapo '3904. I'd rather the extra transistor than the extra design time, in a simple timing circuit

author: rules
author_rank: Newbie
timestamp: September 17, 2013, 07:52:43 am
content: Thanks guys for all the replies ... the hamster is starting to pick up some speed nowTiming is not that critical, the pc will shut down after ignition goes low, but as dodad so rightly called it, it's for battery saving purposes.c4757p, I have tried the design you posted but my simulator is not having any joy with it. I'm using an android app on my tablet as I have yet to find a nice pc based version with some useful library of components. I'm going to give LTspice a shot as soon as I get some time though.sleemanj, I will definitely have a look at this idea, seems like a move in the right direction.Here is the 555 design I have been playing with ...Thanks again

author: 6502nop
author_rank: Regular Contributor
timestamp: September 17, 2013, 07:54:17 am
content: If precision isn't a factor, and you have a few passives collecting dust, and you have some time and a breadboard, then how about a one transistor solution?The following is what Toyota would call an "Interior Light Delay Relay", and the whole shebang was mounted inside the actual relay housing. It would allow for a delay to keep the inside dome lights on as you enter/exit the car (about 30 seconds). Easily adaptable for longer periods. If relay on current is low enough (below 300mA or so), then a jellybean 3904 or 2222 can be used for Qx.QuoteHe's (?) not switching logic - he's switching the whole device on/off. For most mobile devices, this means a relay. Pop the hood or look under the dash of any modern car, and you'll findat leasta dozen or two relays scattered about. They're not going away anytime soon.nop

author: dodad_guy
author_rank: Contributor
timestamp: September 17, 2013, 10:47:01 am
content: The 555 circuit shown above is a Delay-On-Timer (which is not what was requested... sorry, my mistake). It resets when the input goes low. Pin #7 of a 555 timer is a pull-down transistor. Is logically connected to the output, so it cannot be slaved to the input. The delay-on timer is inverted from the conventional timer circuit and requires a pull-up transistor. The two resistors cost more than the transistor. The transistor could be replaced with the relay shown in his original circuit. I often use a MOSFET to buffer the output.Here is the DELAY-OFF-TIMER, which is inverted from the above circuit. It is the one he needs. It resets when the input goes high.

author: rules
author_rank: Newbie
timestamp: September 17, 2013, 02:33:01 pm
content: 6502nop, thanks, I love the simplicity of the design. I'm a very firm believer of keeping things simple, although I often over indulge in complexityHow would you get a few minutes out of it though? I have only managed a few seconds so far.dodad, thanks, just what I needed, just had to tweak one or two things on my circuit and we are A for away. My ignition can be on for as long as it wants to, it only starts timing once the trigger drops.https://www.dropbox.com/s/lzeyslqo0e8e1jj/555%20delay%20timer.jpeg?mI suspect it might be a while before I fully understand what I have done, but hey, one step at a time hey. I will be playing with these designs and "improve" where I can and obviously share my findings. I don't believe everyone should have to re-invent the wheel, right?Thanks again

author: rules
author_rank: Newbie
timestamp: September 17, 2013, 02:36:49 pm
content: Thought I'd share a pic of the outcome ... and no it's not ugly, it's got prototype characterhttps://www.dropbox.com/s/t4hy844x6ejydu3/2013-09-17%2015.59.43.jpg

author: Zero999
author_rank: Super Contributor
timestamp: September 17, 2013, 06:06:22 pm
content: Why not replace S1 with a transistor and suitable base resistor? It'd save a lot of space, be more reliable and cheaper too.

author: c4757p
author_rank: Super Contributor
timestamp: September 17, 2013, 06:32:09 pm
content: 6502, I was under the impression that he suggested using a relay to invert a signal at one point

author: rules
author_rank: Newbie
timestamp: September 17, 2013, 06:37:46 pm
content: hero, that's for version 0.2

author: 6502nop
author_rank: Regular Contributor
timestamp: September 18, 2013, 09:28:32 am
content: QuoteActually, what he said was he was going to try to invert the switching action (instead of delay-on, make it delay-off). So, we're both right: relays are here to stay, and don't use 'em for logic switches...QuoteIt's not my design (kinda) - it's what you find if you rip open some 80's vintage Toyota/NipponDenso relays.Attached you'll find some actual values I used in my testing. For 3 minutes, C1=4700uF and R1=910K should about do it. You can adjust either (or both) C1/R1 up/down to get it just right. Using 1000uF/1M got me about 45-50 seconds.The real beauty of this circuit is that you may find a relay with enough room to mount everything inside the case, like the original. Or, maybe, build it into a standard relay mounting base and it'll work with any easily-changed relay. Hmmm...nop*sneaking off to the USPTO*