×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Optocoupler Help?!?!?

Optocoupler Help?!?!?

Optocoupler Help?!?!?

(OP)
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.

RE: Optocoupler Help?!?!?

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.

RE: Optocoupler Help?!?!?

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.

RE: Optocoupler Help?!?!?

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).

RE: Optocoupler Help?!?!?

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

RE: Optocoupler Help?!?!?

(OP)
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?

RE: Optocoupler Help?!?!?

"...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.

RE: Optocoupler Help?!?!?

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!

RE: Optocoupler Help?!?!?

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources