Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Optocoupler Help?!?!?

Status
Not open for further replies.

scoobyrollz

Electrical
Dec 9, 2004
11
I have to interface 120V or 240V ac into a parallel port. The voltage varies mattering on what country the product will be installed. My question is, if I have an optocoupler with reverse diodes to activate for ac, what size resistor do I use for current limiting the input? I know I can use ohms law for calculating the resistance based on current, but what wattage do I need so I do not burn up the IC? I calculate about 12W, which seems a little excessive.
 
Replies continue below

Recommended for you

Hi, first you have to work out the current you need through the diode, it will depent on the required transitor current and the coupler's tranfer ratio. Then you decide on the voltage point that you want the coupler to switch at. Ohms law gets you rest. 12W is in the right ball park for a 240v input but you should be able to get it down to around 4W with the right coupler.
 
10 ma should be more than enough for and optocoupler. That would be about 3W in a resistor. I would consider using a capacitor for the voltage drop with a small resistance in series like 1,000 ohms. Use a X2 rated capacitor that is designed for line operation.
 
DON'T use a resistor to drop all that voltage! I agree with OperaHouse regarding using an X2 rated capacitor. The advantage to using the cap is you dissipate virtually no real power. The disadvantage to the cap is the inrush current. Are you simply sensing the presence of line, or are you trying to differentiate between 120VAC and 240VAC? Depending on what you are doing, you can make a pretty simple and elegant design using the cap as a constant current source (ZCap >> ZOptocoupler).
 
Can't you run it through a 20:1 step-down transformer first? Then, when you drop the remaining voltage, you won't lose as much power.

Additionally, this would isolate your measurement circuitry from the actual AC main.

TTFN
 
I am using an optocoupler for isolation. I plugged some numbers in wrong, therefore I came up with a larger wattage than needed. I'm ending up using a 5W, 15k resistor.

Operahouse and/or sdmays can you explain this capacitor idea in more detail?
 
"...interface 120V or 240V ac into a parallel port."

If you're trying to detect if the power is on or off, then just plug the PC into the same outlet. If it's on, it's on.

More seriously, one very common method for making an LED work directly from AC is by means of a series capacitor.

If it is a one-off project, then use a simple AC adapter to run the LED.

 
scooby,

The capacitor has an impedance - reactance actually - to AC which is 1/(2Pi.freq.C) where C is the capacitance in Farads. The reactance limits the current in much the same way as a resistor, except that the voltage and current have a 90 degree relative phase angle. With a 90 phase there is no power dissipated in the capacitor, but current is still limited.

When you first apply voltage to a discharged capacitor, a very high current flows for a very brief period. use of the resistor in series with the cap as described above keeps the inrush current within reasonable limits to avoid damaging the circuit supplied through the cap.

If you are choosing a capacitor for direct connection to the AC line, you must use a Class X2 or Class Y capacitor. The Class Y type is usually reserved for live (or neutral) to earth applications, so in this case the X2 type is better suited.



----------------------------------

If we learn from our mistakes,
I'm getting a great education!
 
Buy,if you can find or even make one from a small neon
lamp and a photo transistor. ( Mount the R,lamp and
photo transistor in a shrink tube. It is a five minute
work....)


<nbucska@pcperipherals DOT com> subj: eng-tips
read FAQ240-1032
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor