Author Topic: A simple circuit to trigger relay for 30 seconds  (Read 650 times)

0 Members and 1 Guest are viewing this topic.

Offline sairfan1

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
A simple circuit to trigger relay for 30 seconds
« on: September 14, 2018, 05:57:02 am »
I have been deveoped some small projects using mcu, but this time i want a low cost wihtout mcu solution with this thought it will help me to learn electronics.  as I'm not good in totally electronics based solution so need help.

I have a 12v 0.6A relay to lock a door, when i press a button it will activate the relay for 30 seconds and then it will release the relay again.  I would like to have pot to increase or decrease little bit of time.

I have a little idea that i would need some transistors to turn relay on probabally BD series, some diaod and may be capacitor to hold relay for some time, some other approach could be using 555 timer.

Please advise whatever apprache you think is bettter.

thanking you,
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 14856
  • Country: za
Re: A simple circuit to trigger relay for 30 seconds
« Reply #1 on: September 14, 2018, 06:06:45 am »
30s is fine, just you will be using an electrolytic capacitor for timing, and thus it will be less than accurate. Otherwise a CMOS NAND gate as oscillator and a ripple counter, with the other 2 NAND gates making a RS flip flop, will do this well.
 
The following users thanked this post: sairfan1

Online drussell

  • Frequent Contributor
  • **
  • Posts: 808
  • Country: ca
  • Hardcore Geek
Re: A simple circuit to trigger relay for 30 seconds
« Reply #2 on: September 14, 2018, 06:23:30 am »
This is one of the classic use cases for a 555 timer.

That would be my suggestion for the most straightforward solution.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 935
  • Country: ar
Re: A simple circuit to trigger relay for 30 seconds
« Reply #3 on: September 14, 2018, 08:13:37 am »
I'd porbably use an 8 pin uC... Sorry.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline sairfan1

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
Re: A simple circuit to trigger relay for 30 seconds
« Reply #4 on: September 14, 2018, 08:23:37 am »
why your praference would be uC, to save time? i believe using capacitor charge will be lowest cast but not sure how reliable it would be.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 935
  • Country: ar
Re: A simple circuit to trigger relay for 30 seconds
« Reply #5 on: September 14, 2018, 12:17:40 pm »
uC, potentiomenter to set the time, one resistor, 2n3904, relay, switch. That's the parts count, add a PS of your convinience, whatever between 3.3V and 5V will do no problem, likely wider range. And you have the HW solved for good. Then you can tweak the design in code after the PCB is settled, the HW is settled and you still have flexibility if you messed in something. 30s is fine for a 555, but if you now need a 5H timer? Grab the uC project and change one parameter in the code or start from ground up because the 555 isn't practicall anymore?

Don't get me wrong, I like analog design much more than digital, but there are times it doesn't make sense, a switch with a timer, something a DIP 8 uC with minimal external parts can do perfectly and much more flexible than the alternative seems better to me. Having a simple PCB with that hardware seems very useful to have in the drawer, it can solve many many problems using slightly different codes. If you leave space in the PCB for an optocoupler to add safe external control even more, and it will cost about the same than the 555 if not less.

Some may have troubles programming the uC in which case the 555 could make sense but doesn't seem to be your case.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline sairfan1

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
Re: A simple circuit to trigger relay for 30 seconds
« Reply #6 on: September 15, 2018, 12:51:04 am »
@JS i agree with you, i can keep things simple by using uC, but as i said i have been worked a lot with uC based project, just wanted to do it without uC so that i get better understanding to pure electronics based solutions.
 

Offline Hero999

  • Super Contributor
  • ***
  • Posts: 10855
  • Country: gb
Re: A simple circuit to trigger relay for 30 seconds
« Reply #7 on: September 15, 2018, 01:23:31 am »
I'd use a MOSFET to switch the load, rather than a BJT.

You want old school? How about a plain monostable multivibrator but made with a BJT and a MOSFET?


To change the delay, vary R1. With it set to 2M, the delay will be 31s. To make it adjustable replace it with a 1M5 resistor, in series with a 1M potentiometer or a 1M8 resistor and a 470k pot. if just a bit of trimming is required.
« Last Edit: September 15, 2018, 01:29:31 am by Hero999 »
 
The following users thanked this post: sairfan1

Offline Jwillis

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: ca
Re: A simple circuit to trigger relay for 30 seconds
« Reply #8 on: September 15, 2018, 05:07:50 am »
I haven't tested this yet but I think it should work.You'll have to experiment with the transistor and base resistor.I made a guess on that. The solenoid can be omitted and the transistor can used as the switch instead.Should be a couple hundred milliamps at pin 3 available.You can also  use a Mosfet like a BUZ 11 instead if you like,just omit the base resistor.If there are mistakes made I'm sure someone will point them out.
 
The following users thanked this post: sairfan1

Offline KMoffett

  • Contributor
  • Posts: 36
  • Country: us
Re: A simple circuit to trigger relay for 30 seconds
« Reply #9 on: September 15, 2018, 05:38:23 am »
I've used simple MOSFET/relay monostables.

Ken

 
The following users thanked this post: sairfan1

Offline sairfan1

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
Re: A simple circuit to trigger relay for 30 seconds
« Reply #10 on: September 15, 2018, 07:43:02 am »
thanks a lot, that would be great help for a lay man

@Hero999 I was trying to understand circuit, what is transitor Q1 doing
thanks
« Last Edit: September 15, 2018, 07:47:40 am by sairfan1 »
 

Offline Hero999

  • Super Contributor
  • ***
  • Posts: 10855
  • Country: gb
Re: A simple circuit to trigger relay for 30 seconds
« Reply #11 on: September 15, 2018, 08:18:26 am »
I haven't tested this yet but I think it should work.You'll have to experiment with the transistor and base resistor.I made a guess on that. The solenoid can be omitted and the transistor can used as the switch instead.Should be a couple hundred milliamps at pin 3 available.You can also  use a Mosfet like a BUZ 11 instead if you like,just omit the base resistor.If there are mistakes made I'm sure someone will point them out.
That will work, but it's an astable circuit, which will switch the relay/load on and off periodically. I'm not sure if that's what the original poster wants, which I believe is a monostable or one shot, i.e. push a button, the relay turns on for a certain length of time, then off again.

If can easily be modified for monostable operation.

EDIT 1: I've just realised something: 4700μF is far too larger capacitor for the 555 timer. The energy stored in it can easily blow up the discharge pin, when the transistor turns on! Reduce the capacitor value to 470μF and increase the timing resistor value to compensate!

EDIT 2: The 4700μF capacitor is only an issue in my monostable circuit. It's no problem in your astable circuit, as it discharges via a resistor.



I've used simple MOSFET/relay monostables.

Ken
Yes, that will work, just beware that it might shorten the life of the relay contacts a little, as they will not snap so sharply on, as the MOSFET will turn on very slowly, but it shouldn't be a problem if it's driving a solenoid directly. The time delay will also be heavily dependant on both the supply voltage and the MOSFET'd threshold, although that's a non-issue if the supply is tightly regulated and a potentiometer is used for the timing resistor.

Also note, as drawn the MOSFET will turn on, when power is initially applied. If this is undesired, the capacitor could be moved in parallel with R1.

You also might ask, why build the more complex circuit I posted, over the simpler one you posted? The advantages are: the delay is more predictable, less dependant on the supply voltage and completely independent of the MOSFET threshold voltage and the MOSFET turns on/off much faster. The delay also starts the moment the button is pressed, rather than released and has no bearing on hold long the button is held for, which might not be an advantage, just different. On the other hand it uses far more components, so could be considered to be overkill.
« Last Edit: September 15, 2018, 10:50:40 pm by Hero999 »
 

Online drussell

  • Frequent Contributor
  • **
  • Posts: 808
  • Country: ca
  • Hardcore Geek
Re: A simple circuit to trigger relay for 30 seconds
« Reply #12 on: September 15, 2018, 09:00:39 am »
EDIT: I've just realised something: 4700μF is far too larger capacitor for the 555 timer. The energy stored in it can easily blow up the discharge pin, when the transistor turns on!

If the discharge current would be too high on a very-long duration set-up with a large capacitor, couldn't you put a low-value resistor between the capacitor and the discharge pin?

I suppose I should look up the internal diagram of the 555 and re-acquaint myself with the circuitry, perhaps that won't work.  :)
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 1745
  • Country: us
Re: A simple circuit to trigger relay for 30 seconds
« Reply #13 on: September 15, 2018, 09:43:15 am »


reasonable timing cap and resistor values can be chosen for 30 seconds on-time
trimpot can be used for timing resistor to provide adjustability
IRF3205 works fine without heatsink for reasonable loads, probably would not need relay at all in OP's application
The easiest person to fool is yourself. -- Richard Feynman
 

Online tpowell1830

  • Frequent Contributor
  • **
  • Posts: 582
  • Country: us
Re: A simple circuit to trigger relay for 30 seconds
« Reply #14 on: September 15, 2018, 12:29:44 pm »
I have been deveoped some small projects using mcu, but this time i want a low cost wihtout mcu solution with this thought it will help me to learn electronics.  as I'm not good in totally electronics based solution so need help.

I have a 12v 0.6A relay to lock a door, when i press a button it will activate the relay for 30 seconds and then it will release the relay again.  I would like to have pot to increase or decrease little bit of time.

I have a little idea that i would need some transistors to turn relay on probabally BD series, some diaod and may be capacitor to hold relay for some time, some other approach could be using 555 timer.

Please advise whatever apprache you think is bettter.

thanking you,

How about a time delay relay?

https://www.grainger.com/product/5WML9?cm_mmc=PPC:+Google+PLA&s_kwcid=AL!2966!3!166591437759!!!g!81032003277!&ef_id=WndOVQAAAeEQiKRE:20180915023141:s&gclid=CjwKCAjwuO3cBRAyEiwAzOxKsudbn6D80FcSmPijKLBuVOM6wKUg4OA_i7uHnkohev6O68Y2zop9MhoCq7YQAvD_BwE
« Last Edit: September 15, 2018, 12:33:05 pm by tpowell1830 »
PEACE===>T
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 4139
  • Country: au
Re: A simple circuit to trigger relay for 30 seconds
« Reply #15 on: September 15, 2018, 01:21:53 pm »
A big, fat electrolytic capacitor in parallel with the relay coil may do this job, although 30 seconds could be a bit long to achieve with readily available electrolytics.
Of course, this also has a very short operate delay as well, which probably wouldn't be much of
a problem in your application.

This was a widely used method of obtaining a delay back in the day.
It is always a good idea to look at the K.I.S.S method before getting too deep into complex alternatives.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 3833
  • Country: us
  • KE7GKP
Re: A simple circuit to trigger relay for 30 seconds
« Reply #16 on: September 15, 2018, 03:48:17 pm »
Consider:     CD4541B

You may find this video helpful:

 

Offline imo

  • Frequent Contributor
  • **
  • Posts: 467
  • Country: 00
Re: A simple circuit to trigger relay for 30 seconds
« Reply #17 on: September 15, 2018, 07:59:33 pm »
As a child I built the above 555 timer (set to around 5 secs) switching on a melody door-bell, with an interesting option - the whole stuff did not draw any current when idle.

The 555 was not started by the "trigger Push Button" (in the above schematics) but a it was powered ON by a Push Button wired in parallel to the relay contacts (normally off).

When the PB was pushed down momentarily, it shorted the relay contacts (normally off) and the 555 got powered, 555 switched the relay on, the relay's contacts shorted the PB, it started to count (555 wired as a monostable with T=5secs) and after 5 secs the 555 switched the relay off. That removed the power off the 555 and the whole system went idle and did not draw any current.
« Last Edit: September 15, 2018, 08:12:03 pm by imo »
 

Online drussell

  • Frequent Contributor
  • **
  • Posts: 808
  • Country: ca
  • Hardcore Geek
Re: A simple circuit to trigger relay for 30 seconds
« Reply #18 on: September 15, 2018, 10:37:41 pm »
When the PB was pushed down momentarily, it shorted the relay contacts (normally off) and the 555 got powered, 555 switched the relay on, the relay's contacts shorted the PB, it started to count (555 wired as a monostable with T=5secs) and after 5 secs the 555 switched the relay off. That removed the power off the 555 and the whole system went idle and did not draw any current.

That is a perfectly cromulent way of doing a circuit for that particular application.  :)
 

Offline Hero999

  • Super Contributor
  • ***
  • Posts: 10855
  • Country: gb
Re: A simple circuit to trigger relay for 30 seconds
« Reply #19 on: September 15, 2018, 10:50:52 pm »
EDIT: I've just realised something: 4700μF is far too larger capacitor for the 555 timer. The energy stored in it can easily blow up the discharge pin, when the transistor turns on!

If the discharge current would be too high on a very-long duration set-up with a large capacitor, couldn't you put a low-value resistor between the capacitor and the discharge pin?

I suppose I should look up the internal diagram of the 555 and re-acquaint myself with the circuitry, perhaps that won't work.  :)
It's only a problem for the monostable circuit. In the astable circuit, the capacitor is discharged via a resistor anyway. Post edited.

Yes, a series resistor will help to reduce the power dissipation in the 555, but it's easier just to use a smaller capacitor and larger timing resistor.
 

Offline sairfan1

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
Re: A simple circuit to trigger relay for 30 seconds
« Reply #20 on: September 16, 2018, 01:14:44 am »
@Hero999 I want to know what is the roll of Q1 transistor in your circuit, thanks.
 

Offline Hero999

  • Super Contributor
  • ***
  • Posts: 10855
  • Country: gb
Re: A simple circuit to trigger relay for 30 seconds
« Reply #21 on: September 16, 2018, 07:08:35 am »
@Hero999 I want to know what is the roll of Q1 transistor in your circuit, thanks.
Positive feedback.

When power is first applied, C1 charges via the load, R5, D1 and Q1's base. R1 now keeps Q1 on, which holds M1's gate near 0V, via R3. The circuit will remain in this stable state until S1 is activated.

When S1 is closed, it connects M1's gate to +V, turning it on. C1's positive plate is connected to 0V, via M1's drain, which now sits at 0V. C1's negative plate now sits at the power supply voltage, minus two voltage drops, below the negative rail, which will be around -11V, with a 12V supply. Q1 will be off because no current will be flowing through its base. With Q1 off, M1's gate will be held at +12V, via R2 and R3. The circuit will remain in this state, until Q1's base starts conducting. C1 will charge via R1. When the voltage on C1 reaches two diode drops above 0V, about 1V, Q1's base will start to conduct, which will turn it on. As Q1 turns on, it will connect M1's gate to 0V, thus turning it off. When M1 turns off, Q1 will start to turn on even more, this turning M1 off more, hence positive feedback. When M1 is off, C1 will charge via D1 and R5 again, returning the circuit back to the initial state.

Because the current through Q1's base and D1 is so low, one diode drop can be considered to be 0.5V, rather than the usual 0.6V, hence why two diode drops is said to be 1V.

If the power supply voltage is below 6V or so, D1 is not needed, as it protects Q1's base from negative voltages. The tiny leakage current through D1 will do no harm to Q1's base.

If the load current is under 50mA or so, then R5 is not needed, as it protects Q1's base from the current spike when C1 charges, via the load.

The circuit is fairly insensitive to supply voltage changes, because the threshold when the cycle ends is two diode drops which is small compared to the supply voltage. The single MOSFET circuit is much more sensitive because the MOSFET threshold, is much higher. The latching action of this circuit means the MOSFET turns on and off relatively quickly, compared to charging/discharging a huge capacitor via a large resistor, connected to the gate.

The Wikipedia article describes a similar circuit, quite well. If you have any questions or want more schematics or drawings, just ask.
https://en.wikipedia.org/wiki/Monostable
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf