Author Topic: Delay Circuit  (Read 7229 times)

0 Members and 1 Guest are viewing this topic.

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Delay Circuit
« on: September 16, 2013, 12:36:57 pm »
Hi all

For 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 college  ::) Anyhow, 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 = 1  |O
The 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 person  :scared:

Any ideas?

Thanks.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #1 on: September 16, 2013, 12:51:15 pm »
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?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: Delay Circuit
« Reply #2 on: September 16, 2013, 01:02:21 pm »
time for a cheap 8pin mcu
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Re: Delay Circuit
« Reply #3 on: September 16, 2013, 01:56:02 pm »
Ah, that was quick   :D

Hmm, 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 this :P

My mind has already started wandering towards PICs, but the learning curve won't allow for an immediate solution :P But that would open up so many more possibilities.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #4 on: September 16, 2013, 02:55:51 pm »
Ah, that was quick   :D

Hmm, I'm sitting with a potentiometer set to 170 K (more or less) and a 1000uF cap, gives me the time I need.

Yes, 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 need now, 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. :-//
No longer active here - try the IRC channel if you just can't be without me :)
 

Online sleemanj

  • Super Contributor
  • ***
  • Posts: 3020
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Delay Circuit
« Reply #5 on: September 16, 2013, 03:53:50 pm »
Thinking aloud, how about if you think about it like a soft latching switch

Treat the ignition key like a momentary switch
When 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 on

Once 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 period
The soft switch should also provide the 555's power, so once the 555 de-energizes the switch, everything is disconnected again

Dave did a blog on latching soft switch, and a few people have posted/improved...
http://www.google.co.nz/search?q=EEVblog+Latching+Switch
 
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline dodad_guy

  • Contributor
  • Posts: 18
Re: Delay Circuit
« Reply #6 on: September 16, 2013, 11:48:33 pm »
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.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #7 on: September 16, 2013, 11:54:20 pm »
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.

It'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 and why it 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, +/- 30s could be 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... |O
« Last Edit: September 16, 2013, 11:57:35 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dodad_guy

  • Contributor
  • Posts: 18
Re: Delay Circuit
« Reply #8 on: September 16, 2013, 11:57:52 pm »
Whoops... sorry' the delay off is incomplete.  Try this one.  DELAY OFF TIMER
 

Offline dodad_guy

  • Contributor
  • Posts: 18
Re: Delay Circuit
« Reply #9 on: September 17, 2013, 12:05:48 am »
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.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #10 on: September 17, 2013, 12:13:55 am »
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 this :P

Neither 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...

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.

I 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.
« Last Edit: September 17, 2013, 12:16:25 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11790
  • Country: us
Re: Delay Circuit
« Reply #11 on: September 17, 2013, 01:02:20 am »
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.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #12 on: September 17, 2013, 02:19:50 am »
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
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Re: Delay Circuit
« Reply #13 on: September 17, 2013, 07:52:43 am »
Thanks guys for all the replies ... the hamster is starting to pick up some speed now :P

Timing 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  :-+
 

Offline 6502nop

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
  • $EA
Re: Delay Circuit
« Reply #14 on: September 17, 2013, 07:54:17 am »
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.

Quote
c4757p
(And you really ought not to use relays for logic.... 1945 called, it wants its efficiency levels back...)

He'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 find at least a dozen or two relays scattered about. They're not going away anytime soon.

nop
 

Offline dodad_guy

  • Contributor
  • Posts: 18
Re: Delay Circuit
« Reply #15 on: September 17, 2013, 10:47:01 am »
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.
 

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Re: Delay Circuit
« Reply #16 on: September 17, 2013, 02:33:01 pm »
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 complexity :D How 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?m

I 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  :-+
 

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Re: Delay Circuit
« Reply #17 on: September 17, 2013, 02:36:49 pm »
Thought I'd share a pic of the outcome ... and no it's not ugly, it's got prototype character ;D

https://www.dropbox.com/s/t4hy844x6ejydu3/2013-09-17%2015.59.43.jpg
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Delay Circuit
« Reply #18 on: September 17, 2013, 06:06:22 pm »
Why not replace S1 with a transistor and suitable base resistor? It'd save a lot of space, be more reliable and cheaper too.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Delay Circuit
« Reply #19 on: September 17, 2013, 06:32:09 pm »
6502, I was under the impression that he suggested using a relay to invert a signal at one point :-//
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline rulesTopic starter

  • Newbie
  • Posts: 7
Re: Delay Circuit
« Reply #20 on: September 17, 2013, 06:37:46 pm »
hero, that's for version 0.2  ;)
 

Offline 6502nop

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
  • $EA
Re: Delay Circuit
« Reply #21 on: September 18, 2013, 09:28:32 am »
Quote
c4757p
6502, I was under the impression that he suggested using a relay to invert a signal at one point :-//

Actually, 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...

Quote
rules
6502nop, thanks, I love the simplicity of the design.
How would you get a few minutes out of it though? I have only managed a few seconds so far.

It'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*
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf