# 230V AC / 460V DC Optocoupler using Led and Voltage Divider

I am building a primitive optocoupler to sense if a bulb has blown/if current is flowing. It receives either 230VAC or 230VDC (rectified..) as supply.

I have calculated and built a voltage divider as pictured, but I am getting no LED action on 230AC tests, would dearly love any tips on how to get it working, but still keep it "primitive" simple as a design consideration :D So what's wrong with this picture?!

Details: The bulb measures 77 Ohm across the filament, and acts as a resistor (R2) in my calculations (and as the switch..).

R1 (two resistors in parralell) is 3 Ohm as measured-. I calculate 11V@230V AC and 17V@460DC, as the voltage across the LED (but measure nothing..)

I plan to buy a 5W, 1.7 Ohm to get a more manageable 5V / 10V combo, and choose the LED resistor accordingly.

I will put a rectifying diode in series with the led I think.. Is there any advantage crossing two LEDS to get a steady light on AC, or should I just smooth the 60hz signal with cap on the LDR side?

• What wattage is the light bulb? Measuring resistance of a cold filament will not indicate actual resistance when the bulb is lit. Jul 23 '13 at 11:28
• Did you measure the filament cold? If so it will be the wrong value (too low). Resistance increases with temperature. Compare your value with the power rating (using R=V^2/P) for the bulb you are using. A 60W filament bulb comes out at 882 ohms for 230V AC, 77 ohms corresponds to a 687W bulb. Jul 23 '13 at 11:31
• @JImDearden that sounds like an answer. Jul 23 '13 at 11:33
• Why "230Vac or 460Vdc" - what does that mean? The equivalent DC voltage (to produce the same power in the same load) as 230Vac is in fact 230Vdc. Jul 23 '13 at 11:36
• Andy, there is a bridge Rectifier option beforehand, inclueded or bypassed in the circuit by a relay dynamically (its for an interactive artwork, so it needn't make sense :D ) I calculated the rectified DC supply at 460V Jul 23 '13 at 11:57

Basically, this won't really work - or work well. An alternative is presented at the end of this answer.

Before that, the calculations, and an explanation of why it won't work.

From Wikipedia:

The cold resistance of tungsten-filament lamps is about 1/15 the hot-filament resistance when the lamp is operating.

• Assuming the resistance of the filament was measured when the bulb was not lit, this gives a rough estimate of 77 x 15 = 1155 Ohms.
• This implies a ~45 Watt bulb, let's go with 50 Watts for convenience. This back-calculates to a hot filament current of around I = P / V = 217 mA = ~220 mA.
• To obtain ~5 Volts at 220 mA, R = V / I = 22.727 Ohms = ~ 22 Ohms, the nearest standard resistor value.
• Power dissipated by this resistor: P = V x I = 1.1 Watts, so let's go with a 5 Watt resistor to be safe.
• LED choice: Let's say red LED, 1.8 Volt forward voltage, 20 mA nominal current. Such an LED will light up quite well at 6 mA (230 Volt situation) and will also stay within current limits at 12 mA (460 Volts situation).
• Therefore a suitable LED current limiting resistor is 560 Ohms

Using two LEDs wired in anti-parallel would be recommended, because LEDs typically have low reverse voltage ratings (often as low as 5 Volts). With two LEDs facing opposite ways, the maximum reverse voltage appearing across the non-conducting LED will be the forward voltage of the conducting one, at any point in the AC cycle. It'll work fine in DC as well, so all is good.

Now, the problems:

What happens when the bulb is just switched on, and the filament is cold?

• Resistance = 77 Ohms, therefore current = ~ 3 Amperes! That's before adding the bleed resistor of 22 Ohms
• Current with 22 Ohms added in series: 2.323 Amperes. Power across resistor: 119 Watts!
• Result: Fireworks.

What happens when the bulb is supplied with 460 Volts?

• Assuming it is a 230 Volts rated bulb: The filament burns out.
• If it is a 460 Volts rated bulb: Not much goes wrong other than the sense resistor blowing up anyway.

Solutions:

1. Use the light bulb to illuminate the LDR directly.
2. Use a high wattage bulb in series with the 50 Watt bulb, for the voltage divider arrangement.
3. Use an alternative, such as a current sensing transformer, then use that CT's output in place of the LDR for sensing. A CT can be made by winding several turns of thin enamel wire around the wire supplying current to the light-bulb.
4. For AC and DC current sensing, use a prebuilt module such as this one (\$4.35 from eBay including international shipping) that incorporates a nice "lil black IC", the Allegro ACS712, and will provide safe, nicely isolated current sensing:
• okay, that was comprehensive! In reply: -It is part of the concept to stress the filament with short 460V bursts (artwork.. sorry engineers) -I cannot use the ldr on the bulb due to aesthetic considerations, again, sorry engineers, it hurts me too :( - My original concept was using a CT, but it doesn't induct during DC leading to false readings. Considered Hall effect sensors with toroidal cores, but lil black ICs are against my design rules at this stage (sorry again) Jul 23 '13 at 12:26
• SO... Perhaps I could "Prime" the circuit (bypass the opto, and artificially light the LDR while it heats?), its literally supposed to be turned on once, ever. OR If i put a tiny 40W 240AC appliance bulb in series, will it limit the larger bulb. Can I put it in Parralell, but before the lamp, does that make sense? Like the pictured Voltage Divider but with a wire instead of R1 resistor and a globe instead of the led? ps what is this 22Ohm bleed resistor all about? Jul 23 '13 at 12:30
• @OliverKellow No, using a 40 W in series with another (presumably) 40 W bulb will drop the power and illumination of both bulbs down to pretty-much-nothing. You might try with a 1000 Watt bulb in series as the voltage divider - but see my edit about the prebuilt module, that might solve it all. Jul 23 '13 at 12:34

If you're going to make your own optocoupler with a discrete LED and LDR, then you might as well have the LDR sense the light from the lightbulb directly. This doesn't require you to break into the circuit at all.

• That was my proposed solution #1, but OP says that they cannot do that due to aesthetic considerations. :-) Jul 23 '13 at 12:50