Relay and Capacitor circuit - blinking LED

  • Thread starter fog37
  • Start date
  • #1
937
47

Main Question or Discussion Point

Hello Forum,

I am having issue understanding what is going on with the circuit below which is supposed to blink an LED by alternatively pulling the switch up and down which results in opening and closing the circuit the LED is part of (lower circuit portion).
1579224347492.png


This is what I am confused about: at time ##t=0##, there is a large initial current ##I(t_0)## passing through ##R2## resistor. At the top junction (positive terminal of the capacitor), the current ##I## splits and a portion of it goes to charge the capacitor ##C1## while the remaining current goes straight through the relay electromagnet which gets activated and pulls the switch upward turning the LED on.

But, simultaneously, this suddenly stops the current flow in the top part of the circuit where ##R2## and ##C2## are. That quick change in current through the electromagnet should causes an induced back voltage across the electromagnet, correct?

So is the purpose of the capacitor to prevent a spike due to that back emf? Or will the capacitor voltage, which will be less than ##9V## when the switch

pulled to the up position, keep the electromagnet energized for a little longer keeping the switch in the upper position and keeping the LED ON for a bit longer? Will the voltage across the capacitor be sufficiently large to activate the electromagnet?

Does the switch return to its lower position turning the LED off when the capacitor voltage has decreased enough and is too low to activate the electromagnet? I am little confused about the sequence of events...

thanks
 

Attachments

Last edited by a moderator:

Answers and Replies

  • #2
937
47
Apparently, the electromagnet should not be activated until the capacitor has charged enough so that its voltage is large enough to activate the electromagnet.

But wouldn't there be a significant electric current passing through the electromagnet and activating it even before any significant voltage is developed across the capacitor?

I think so since the electromagnet is essentially a coil which is a low resistance path? Or will most of the current passing through ##R1## go to the capacitor initially? Why?
 
  • #3
256bits
Gold Member
3,001
1,028
This is what I am confused about: at time t=0t=0t=0, there is a large initial current I(t0)I(t0)I(t_0) passing through R2R2R2 resistor. At the top junction (positive terminal of the capacitor), the current III splits and a portion of it goes to charge the capacitor C1C1C1 while the remaining current goes straight through the relay electromagnet which gets activated and pulls the switch upward turning the LED on.
You can calculate the initial current from V=IR.
The capacitor acts as a short circuit, and the electromagnet acts as a large impedance.
Also, Vc = VL since they are in parallel, and that is true at all times.
Knowing that, do you want to reconsider if the LED is turned on so quickly.
 
  • #4
Baluncore
Science Advisor
2019 Award
7,313
2,391
The relay coil has a fixed resistance, Rr ≈ 200 ohm. The capacitor voltage, Vc across the relay, sets the relay current, Ir = Vc/Rr.

The current Ir, needed to pull in the relay armature is significantly greater than the current needed to hold the relay armature in.

C1 charges through R2 until the relay pulls in, then C1 discharges through the relay until the relay drops out, and the cycle repeats.

There is no inductive voltage spike on the relay coil and capacitor as it switches because the capacitor is able to provide the relay current previously delivered through R2.

The value of Rr and R2 forms a voltage divider that sets the maximum voltage that can appear across C1 and the relay coil.
 
  • #5
937
47
So, I agree that:

a) the relay and the capacitor are in parallel and always share the same voltage
b) At time ##t=0##, I see how the capacitor acts like a short circuit and the current brings charge to its plate while no current goes through the inductor, which has a large impedance due it the back emf..
c) The capacitor's plate get charged and a voltage develops which activates the inductor/electromagnet that pulls the switch up.

In summary, the LED does not turn on immediately but only after the capacitor's voltage is sufficiently large.

I tried to build the above circuit but I hear no clicking of the relay and the resistor R2 in the upper part gets hotter and hotter....Strange. I have checked the NO and NC ports of the relay, etc.
 
  • #6
937
47
Relays are rated with voltage 5V, 6V, or 9V. Does it matter it what voltage the relay has in the circuit above?
 
  • #7
1,760
57
Perhaps R2 is dropping enough voltage to prevent the relay from activating. What is the purpose of R2? How much current does the relay draw?
 
  • #8
Baluncore
Science Advisor
2019 Award
7,313
2,391
I tried to build the above circuit but I hear no clicking of the relay and the resistor R2 in the upper part gets hotter and hotter....Strange. I have checked the NO and NC ports of the relay, etc.
1. Are you certain you have correctly identified the relay terminals?
2. Does the relay switch when momentarily connected directly to the battery?
3. Can you measure the resistance of the relay?
4. What is the make, model and part number of the relay?
 
  • #9
937
47
I think the purpose of R2 is to slow down the charging and discharging of the capacitor C1. The product ##R2 C_{2}## is the time constant. The larger ##R2## the slower the LED blinking...Could ##R2=100## be to large?
I think I managed, at one point, with a smaller resistor, to get the relay clicking and LED blinking but it was blinking too fast....

b) When I connect 9V directly to the top pins, I hear the internal switch click.
c) This is the relay I am using: https://docs.particle.io/assets/datasheets/makerkit/spdt-relay.pdf

It is 5DCV relay which I guess means it needs 5V to be activated, correct?

1579284098253.png


I built the lower part of the circuit that includes the LED and that works as planned, i.e. ##R1## is connected to the NO pin and the LED is off (when the relay is not energized). If I connect ##R1## to NC, the LED turns on. I feel ok about that part of the circuit.

The pins on the circuit have a different layout than the pins of the actual relay. When the relay is on the breadboard with the two coil pins on top, the COM pin on the left, the NC pin above the NC pin both on the right.
1579284185115.png
 
  • #10
Baluncore
Science Advisor
2019 Award
7,313
2,391
It is 5DCV relay which I guess means it needs 5V to be activated, correct?
From the data sheet, it appears to be a 12 V relay.

Coil Rated Voltage; 12VDC
Coil Rated Current; 37.5mA
Coil Resistance; 320Ω±10%(at 20℃)

Pick-up Voltage 9VDC(75%Max.of nominal voltage)
Drop-out Voltage 0.6V ( 5%Min. of nominal voltage )

This shows your relay is rated at 12 V, which is too high for a 9 V supply.
You need a 5 V or 6 V relay, or a higher voltage supply.
 
  • #11
937
47
mmm...ok. Thank you. Does that mean that 12 V are need to pull the internal switch up and down?
The relay still clicks when I test it by applying 9V directly to the top pins though...

What is the "pick-up" voltage and how is it different from the coil rated voltage?
What about the drop-out voltage? No voltage at all makes the switch go back to NC position....

Thank you so much
 
  • #12
849
384
It is 5DCV relay which I guess means it needs 5V to be activated, correct?
Why do you think this is true??? The spec is very clear and the relay is almost certainly labelled. Just wondering.....
 
  • #13
Baluncore
Science Advisor
2019 Award
7,313
2,391
Pick-up Voltage 9VDC(75%Max.of nominal voltage)
Drop-out Voltage 0.6V ( 5%Min. of nominal voltage )
These specs show the 12 V relay will pick up at 9V, then drop out at 0.6 V.

When you include the resistor you increase the resistance so it needs more voltage.
9 V * ( 320 Ω + 100 Ω) / 320 Ω = 11.8 V; So I would expect a minimum of 12 V would be needed to turn on the relay through R2 = 100 ohm. It would be marginal so maybe use 15 V.

You might do better by finding a lower voltage relay than by increasing the voltage.
 
  • #14
937
47
Got it!!! Thank you
 
  • #15
937
47
This thread leads me to better understand the following circuit. When the switch is closed at ##t=0##, there is a large back emf across the inductor. I think that back emf is ##10V##. This back emf is such that the current through the inductor is zero at ##t=0##. So the capacitor current is large and starts charging the capacitor. In fact, ideally, the capacitor gets fully charged instantaneously to ##10V##.

What happens as time goes by but not at steady state?

I know that the final situaiton is that all the current passes through the inductor. The steady state voltage across the inductor will be zero (since it has zero resistance). The steady state voltage across the capacitor is also zero (since it is in parallel with the inductor).

What happened to the capacitor's charge and voltage? Did the capacitor discharge through the inductor after ##t=0##? Were there two currents, one from the 10V battery and one from the capacitor, joining at the junction and passing through the inductor?
1579310926712.png
 
  • #16
Baluncore
Science Advisor
2019 Award
7,313
2,391
Were there two currents, one from the 10V battery and one from the capacitor, joining at the junction and passing through the inductor?
The circuit would ring at a frequency determined by L and C, dampened by 50R, settling to a steady state = 200 mA.
RLC1.jpg

RLCout.jpg
 
Last edited:
  • #18
937
47
The circuit would ring at a frequency determined by L and C, dampened by 50R, settling to a steady state = 200 mA.
View attachment 255760
View attachment 255761
Cool! what software is that? You are assuming a time-varying sinusoidal source.

However, my circuit has a DC source, a battery, and a steady state the inductor behaves like a short circuit and the capacitor like an open circuit. What I am wondering is the phase in between, before steady state. I think the capacitor gets' charged but then discharges ending up with zero charge and zero voltage across it....
 
  • #19
gneill
Mentor
20,781
2,759
Cool! what software is that? You are assuming a time-varying sinusoidal source.

However, my circuit has a DC source, a battery, and a steady state the inductor behaves like a short circuit and the capacitor like an open circuit. What I am wondering is the phase in between, before steady state. I think the capacitor gets' charged but then discharges ending up with zero charge and zero voltage across it....
The software involved appears to be a Spice circuit simulation application. Perhaps LTspice, (which is free to download and run, by the way).

The source in the simulation is as depicted: a 10 V DC pulse which turns on at time zero.

In your circuit, the inductor only looks like a short circuit after an appreciable amount of time. The capacitor looks like an open circuit after an appreciable amount of time. What is of interest is what happens during that "appreciable amount of time". That is what the simulation is depicting.

The circuit will settle into a steady state after that "appreciable amount of time", and indeed the inductor will appear to be a short circuit, and the capacitor an open circuit. But what happens in between time = 0 and time = steady state may be of interest.
 
  • #20
Baluncore
Science Advisor
2019 Award
7,313
2,391
Cool! what software is that? You are assuming a time-varying sinusoidal source.
Software is free; LTspice. https://en.wikipedia.org/wiki/LTspice See; External_links.
Signal is a 10 V fixed step. Current through L and C are plotted, with voltage across LC.
 
  • #21
937
47
Baluncore, in the graph you generated using LTspice, the current across the inductor starts large, fluctuates and goes to 200 mA at steady state. That makes sense. The current is always positive, i.e. in the same direction across the inductor, from top to bottom (relative to my circuit figure).

The current going to the capacitor starts large and positive but then changes sign, going negative then positive, until it goes to zero (capacitor fully discharged). The capacitor's current is negative during the capacitor's discharge phase, between 0.1 seconds and 0.35 seconds, after the capacitor's plates reach the voltage of 3.5V...
 
  • #22
Joshy
Gold Member
164
68
I agree with balun's response.

If I were to think of any story, then I look at the current and voltage formulas for L and C (by the way I get super confused about terms like back emf sorry). I turn on the voltage source... a step. Just from the voltage change I know that current will begin to flow through that capacitor.

$$ i_C(t) = C { {dV(t)} \over {dt} } $$

Well, now that current is divided between the capacitor and the inductor (KCL), then I know the voltage across the inductor (and capacitor) is going to change.

$$ V_L(t) = L { {di(t)} \over {dt} } $$

It seems like they're doing a little back and forth. I'd suggest if there were no R, then it would just be doing this forever, but something about that feels wrong- if there were no R and just a voltage source across the inductor alone I could see some problems or contradictions with the formulas. I think R is commonly known to cause some type of damping or attenuation.

How about we do a more thorough analysis looking at the node between R and the reactive components?

$$ H_{X}(s) = {{sL} \over {S^2LCR} + sL + R} $$

If you put in a step u(t) (its Laplce transform is 1/s) then the remainder is

$$ Y_{X}(s) = {{L} \over {S^2LCR} + sL + R} $$

We're not too many steps away from massaging this equation into something we can find on the tables (multiply top and bottom by a constant to make the coefficient in front of s2 just 1, complete the square on the bottom and call some constants ω and α). The one I've got my eyes on is the exponentially decaying sine wave.
 
Last edited:
  • #23
Baluncore
Science Advisor
2019 Award
7,313
2,391
It is clearer if you always say and think “current flows through”, or “voltage appears across”.
Baluncore, in the graph you generated using LTspice, the current across the inductor starts large, fluctuates and goes to 200 mA at steady state. That makes sense.
The current is always positive, i.e. in the same direction across the inductor, from top to bottom (relative to my circuit figure).
The current through the inductor is initially zero.
At time = zero, the step voltage appears across the resistor.
The voltage across the parallel LC circuit starts to rise as the capacitor charges.
Therefore the current through the inductor increases faster.
But the current through the inductor overshoots the steady state 200 mA expected.
So the voltage across the parallel LC must go negative to reduce the current through the inductor.
That cyclic process continues as it all settles down to a steady state an time = infinity.
 
  • #24
gneill
Mentor
20,781
2,759
That cyclic process continues as it all settles down to a steady state an time = infinity.
Or after 5 time constants if you're an engineer :smile:
 
  • #25
Baluncore
Science Advisor
2019 Award
7,313
2,391
Or after 5 time constants if you're an engineer
No. It goes on for ever.
 

Related Threads for: Relay and Capacitor circuit - blinking LED

  • Last Post
Replies
6
Views
2K
Replies
5
Views
1K
Replies
10
Views
4K
  • Last Post
Replies
5
Views
4K
  • Last Post
Replies
3
Views
5K
  • Last Post
Replies
19
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
14
Views
3K
Top