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.

Switching a relay ON for 3 seconds after a delay of 5 seconds

Flyback

Well-Known Member
Hi,
For this circuit, when the signal goes from 0V to 5V, there should first be a delay of 5 seconds. Then Relay_A must be switched ON for just 3 seconds.
Then when the 5V later goes to 0V, there should again be a 5 second delay, and then Relay_B should be switched on for 3 seconds only.

Its achieved by the attached, though can you think of a lesser_component way?
(PDF schem and Ltspice sim attached)

No microcontroller is allowed...there would not be sufficient quantities required to warrant a microcontroller
 

Attachments

  • Delayed switching of relays.asc
    15.9 KB · Views: 15
  • Delayed switching of relays.pdf
    180.4 KB · Views: 15
Last edited:

eTech

Well-Known Member
Here is a version that uses two edge detectors(one CD4093B) and four 555 timers (or two 556 timers). See Below.

1637399204141.png
 

alec_t

Well-Known Member
Most Helpful Member
No microcontroller is allowed...there would not be sufficient quantities required to warrant a microcontroller
I would be surprised if the cost of a tiny 6-pin microcontroller weren't less than that of the handful of components any alternative solution would require?
 

Flyback

Well-Known Member
I would be surprised if the cost of a tiny 6-pin microcontroller weren't less than that of the handful of components any alternative solution would require?
Thanks, thats what i thought, but theres all the upkeep of the software etc to think about, i think so anyway.
Plus any software may have bugs, etc

But yes, my first response was to do it with a micro and recomend they buy in a preprogrammed micro. I think you can do that for cheap?

eTech:
Thankyou so much , that looks brilliant.!
 

alec_t

Well-Known Member
Most Helpful Member
What is supposed to happen if the signal goes to 5V but then drops back to 0V before the first 5s period expires, or during relay A's 3s period?
 

sagor1

Active Member
What is supposed to happen if the signal goes to 5V but then drops back to 0V before the first 5s period expires, or during relay A's 3s period?
And, what happens when the 5V signal goes high, low and then high again within that 5 seconds? Does it re-start the 5 second delay or just run with the first detected 5V?
A small micro with programming can address all those issues with simple logic, once you define all the "rules". You need to define what happens when there is an "exception", something that happens that is not expected.
 

Flyback

Well-Known Member
Thanks,
The 5V input goes high when car ignition is switched ON...low when OFF.
The relays, are changeover relays on each connection (go and return) to a motor. The relays are connected to pos of input 12v supply when not coil_powered.
Obviously which relay you switch on (contactor to neg of input supply) determines which way the motor spins.
When both relays are off, the motor terminals are thus both connected to pos (of input supply), so it wont spin.

If 5V goes high, then low before 5 secs is up, then no relay swithing should happen.

Relay should only switch in the said situation....and eg, if signal goes high for 20 seconds, then low at 20.001 seconds, for 1 sec, then back high again, then no relay switching should happen.
 

eTech

Well-Known Member
And, what happens when the 5V signal goes high, low and then high again within that 5 seconds? Does it re-start the 5 second delay or just run with the first detected 5V?
What is supposed to happen if the signal goes to 5V but then drops back to 0V before the first 5s period expires, or during relay A's 3s period?

If that's a concern, you can connect the output of timer #2 back to reset of timer #1.
The circuit reacts on the first pulse transitions.

1637427652566.png
 

alec_t

Well-Known Member
Most Helpful Member
If only you could guarantee that the signal would stay high (or low) for ~20 secs then you could get away with a much simpler circuit :-
DualRelayDriver.jpg

(That 20s is to allow the caps to charge/discharge fully.)
 

alec_t

Well-Known Member
Most Helpful Member
If a 3s period is in progress, what should happen if the signal changes state? Should the 3s period continue to completion, or should it terminate immediately?
 

Flyback

Well-Known Member
Thanks..pse let me explain...
I must admit, ill just be honest and say the circuit is for door mirrors.......fold them in when ignition off, and out when ignition back on again. (they keep getting knocked off otherwise)
I dont know the full spec.
They are currently manually operated with a switch.
Im not getting payed for this.

Its a powerfold motor, thats all i know...i cant find details on it.

I already suggested a micro and they threw it back.

But with analog its hard to handle all the exceptions......like someone putting ignition on/off for just 3 seconds etc.
They said they didnt want the mirrors to fold out/in only half way.

Circuit has to work with whats already in there........so thats a changeover relay at each 'side' of the motor.
The "bit of schem" i was shown doesnt show anything else but that.

Judging by the name of the car company, they must have solved this themselves by now, but its interesting anyway. (then again maybe not as its low volume) I was actually emailed the task a month back, but only just got to it.
 

alec_t

Well-Known Member
Most Helpful Member
I must admit, ill just be honest and say the circuit is for door mirrors....
Thought it might be. I'm glad it isn't for an electrically-operated brake (a much more safety-critical thing) :)
They said they didnt want the mirrors to fold out/in only half way.
That implies the 3s period must run to completion; also that excess friction, supply voltage drop etc does not slow the motor unduly.
You will presumably need limit switches or motor current monitoring to determine when the mirror is fully extended or retracted.
 

crutschow

Well-Known Member
Most Helpful Member

Nigel Goodwin

Super Moderator
Most Helpful Member
I already suggested a micro and they threw it back..

Well you didn't do the job - just telling them to 'use a micro is no use' - you need to provide a completed solution.

It's an obvious job for a micro, and just a small 8 pin one (the six pin ones seem a waste of time) is all that's needed - the actual programming is trivial for such a simple task, and there shouldn't be any maintaining ever required. It would be much simpler and cheaper than an analogue solution.
 

alec_t

Well-Known Member
Most Helpful Member
A Schottky diode across the caps would help with that.
Not in my simplified circuit. C1 is used as the timing cap for both 5s periods, so needs to charge fully before ignition switch-off, then discharge slowly to define the second 5s period.
 

Pommie

Well-Known Member
Most Helpful Member
I'm guessing that limit switches or some kind of clutch is implemented so if the switch/button is held too long it doesn't stall the motor or strip the gears. If so then the only requirement I can see is to: activate the "in" relay for 3 seconds after the ignition is off; activate the "out" relay for 3 seconds after the ignition is on. Any change in the ignition just stops any current action and starts the appropriate action. I can't see the need for the 5 second delay or did I miss something obvious?

Mike.
 

Flyback

Well-Known Member
yes you're right , i misinterpreted it, the 5 sec delay is just in case the driver turns ignition on/off within 5 seconds to read the mileage......the mirrors shouldnt then operate.
 

alec_t

Well-Known Member
Most Helpful Member
With those latest conditions I think the attached would be a simplified basis for the control logic (but need PFETs for driving the relays).
The 5 sec timer (R1,C1,U1a) only runs for the 'A' relay.
A couple of 4093 ICs are configured as two 3-sec timer monostables :-
DualRelayDriver2.jpg

The above waveforms are for the situation where the ignition stays on for at least 5 sec. If the ignition were switched off after only 3 sec the waveforms would be as below, with no drive for the 'A' (mirror extend) relay.
BriefIgnitionOn.jpg

In this situation the mirrors would already be fully retracted and it is assumed that a limit switch could be used to prevent actuation of relay 'B' if necessary.

Personally, I would prefer to eliminate timers and just extend/retract the mirrors in response to driver door unlocking/locking :).
 

Attachments

  • DualRelayDriver2.asc
    4.5 KB · Views: 10
Last edited:

Latest threads

EE World Online Articles

Loading
Top