(see update at the end)
This is a continuation of my previous question about a relay: Question
What I want is a notification LED for both power and if a switch is on, which controls the relay.
Below is the circuit I have in mind:
Below are my calculations and reasons.
- S1: Adapter 9V DC
- D1: Voltage reducer, 1N4148, Vfw = 0.7 V
- D2: Power indicator, Blue 3mm, Vfw 2.8-3.2 V. 5 mA is enough for a LED indicator.
- R1: Resistor for power voltage indicator LED. V = I*R. R = V / I = (9 – 0.7 – 2.8) / 0.005 = 1,100 R -> 1,000 R … A will be V / R = (9 – 0.7 – 2.8) / 1000 = 5.5 mA. For minimum: A will be V / R = (9 – 0.7 – 3.2) / 1000 = 5,1 mA.
- Relay_vcc will be 9 – 0.7 – 2.8 = 5.5 V, which is in spec (5 V , 120% is 6 V). The minimum value is 9 – 0.7 – 3.2 = 5.1 V
- D3: Switch indicator LED. Should be around 5 mA. Green 3mm, VFw = 1.8-2.2 V
- R3: Resistor for switch indicator LED. V = I * R. R = V / I = (9 – 0.7 – 1.8) / 0.005 = 6.5 / 0.005 = 1300 R -> 1200 R, resulting in I = V / R = 6.5 / 1200 = 5.4 mA. In case of Vfw = 2.2 : V / R = (9 – 0.7 – 2.2) / 1200 = 5.1 mA
I'm wondering mostly if I miss something, and if my values are 'ok'. I hope this is not a too broad question, the reason I ask is since in my previous question I forgot to add the extra diode, so supplying around 6-7 V to the VCC (since I missed the 1N4148 diode).
I found out:
- CH1 does not need has requirement regarding current, in examples from Arduino there is not a resistor between a GPIO and CH1 (or IN).
- VCC probably uses the nominal current for the coil, which is about 75 mA.
However, my main question is:
Since VCC of the relay needs 75 mA, and D2 will burn when 75 mA is applied, but also D2 is used as voltage limiter, what should I do?
I read in other threads that a resistor divider is not good for relays, and the only other way I can think of is adding 5 or 6 1N4148 diodes, reducing the voltage to 9 - (5 * 0.7) = 5.5 V.
(Btw, the best solution is to use a 9 V relay module, or use 5 V input. Since I don't have the first one, I am going to use a 5V cable and cut it or check for some bracket).