Author Topic: Optoisolator concerns  (Read 6146 times)

0 Members and 1 Guest are viewing this topic.

Offline wheezardthTopic starter

  • Newbie
  • Posts: 2
Optoisolator concerns
« on: November 11, 2012, 05:46:07 pm »
Hello Folks!

I'm trying to make an 230V Mains AC detection module for a circuit I'm building.

I'm using this:


But instead of the LED, I'm driving an optoisolator.

Do you think that this http://www.vishay.com/docs/83540/cny64.pdf, the CNY64 from VISHAY, would be fitting?

I have not designed for AC yet, so all comments are welcome!
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Optoisolator concerns
« Reply #1 on: November 11, 2012, 06:14:43 pm »
Place a 1M 0.5W resistor across the capacitor to discharge it, and you can safely make it a 0.22uF 250VAC class X or class X1 component, a lower current through the opto will still work. If you do not want to use a leaded resistor use 4 220k 0408 SMD resistor in series to replace it, you have to use at least 4 to get the voltage across each resistor low enough.

Make the 220r resistor 1k or so, it will reduce the surge current through the LED a little with spikes. Make sure it is a 1W resistor. Add a 275V MOV across the input as well for spike clipping, along with a 1A mains rated fuse.

Other than that it is a simple circuit, it does need attention to clearance distance between mains side and the output side, and for the bridge diodes you can use almost any diode, from a 1n4148 to a 1n4007, it only is handling 20ma and under 5V in most cases. You can also add a zener diode of anything from 10-30V in parallel with the LED to provide a current path if the opto goes open circuit. If you add it in series it makes the zero crossing pulses a little wider so that the output side can more reliably trigger from them. There will be a phase shift from the capacitor, so do not use this to drive any phase switch other than a zero cross switching one.
« Last Edit: November 11, 2012, 08:02:37 pm by SeanB »
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5135
  • Country: nl
Re: Optoisolator concerns
« Reply #2 on: November 11, 2012, 07:59:48 pm »
Why the bridge? The led is capable of doing the rectifying by itself I'd think, or do you want a 100Hz pulse?
Keyboard error: Press F1 to continue.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Optoisolator concerns
« Reply #3 on: November 11, 2012, 08:04:23 pm »
Bridge or a anti-parallel diode. With the bridge it is easier to filter to give a mains present signal, and it will go no signal faster than the 50Hz one.
 

Offline Gall

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: ru
Re: Optoisolator concerns
« Reply #4 on: November 11, 2012, 08:17:30 pm »
There are optocouplers with AC input (two LEDs inside). Take a look at i.e. Vishay H11AA1 (or many others).

When working with mains voltage, two things are very important. First, the fuse of proper rating. It should always be used. The wall outlet is capable of kilowatts of power in case of short-circuit. Second, every capacitor should discharge quickly after disconecting power. Usually this is done by connecting resistors in parallel with capacitors. Even if the capacitor is too small to hold any dangerous charge, it is still very annoying to get a light electric shock from a disconnected plug every time you touch it.
The difficult we do today; the impossible takes a little longer.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19553
  • Country: gb
  • 0999
Re: Optoisolator concerns
« Reply #5 on: November 12, 2012, 11:37:24 am »
Another simpler option is to AC couple using Y1 capacitors but it's more prone to EMI isses.
 

Offline wheezardthTopic starter

  • Newbie
  • Posts: 2
Re: Optoisolator concerns
« Reply #6 on: November 13, 2012, 02:02:43 pm »
Wow! Guys, thanks for the overwhelming amount of great feedback!

So, this is something like that, am I right?




My understanding ends with the situation with the zeners - what is the reason of providing a current path if the opto blows?
What would be stressed if the zener is not there in an OC situation?


Thanks a ton, you are enormously helpful!
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Optoisolator concerns
« Reply #7 on: November 13, 2012, 05:22:07 pm »
CP1 should be connected to pin 4, pin 3 should be grounded. Lose R4, and make R3 4k7. CP1 should be around 100n.
 

Offline ColinB

  • Contributor
  • Posts: 26
Re: Optoisolator concerns
« Reply #8 on: November 14, 2012, 05:40:22 pm »
Another simpler option is to AC couple using Y1 capacitors but it's more prone to EMI isses.

That's interesting, so you don't need optoisolation for safety in this case because you have capacitive isolation from mains?

Can you explain why it is more prone to EMI issues?  Are there ways to mitigate the EMI?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19553
  • Country: gb
  • 0999
Re: Optoisolator concerns
« Reply #9 on: November 14, 2012, 09:02:11 pm »
That's interesting, so you don't need optoisolation for safety in this case because you have capacitive isolation from mains?
Yes, the capacitors are such a low value that the leakage current is too low to shock or injure someone but the capacitors need to be Y1 rated which means they're especially deigned to be connected to the mains and exposed metallic parts.

Quote
Can you explain why it is more prone to EMI issues?  Are there ways to mitigate the EMI?
When the mains is disconnected, EMI generated by another source can be picked up and pass through the capacitors. This could be minimised by connecting a 100nF capacitor across the mains input but it won't eliminate the problem completely.
 

Offline ciccio

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: it
  • Designing analog audio since 1977
    • Oberon Electrophysics
Re: Optoisolator concerns
« Reply #10 on: November 15, 2012, 06:41:42 pm »
The symbol of the bridge rectifier is wrong. The positive output pin (your number 2) should be the junction of two cathodes, the negative output pin (your number 3) should be the junction of two anodes.
The numbering is correct if referred to a single-in-line packaged bridge.
Best regards
Strenua Nos Exercet Inertia
I'm old enough, I don't repeat mistakes.
I always invent new ones
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: us
Re: Optoisolator concerns
« Reply #11 on: November 16, 2012, 12:57:42 am »
The schematic shown has the resistor after the MOV, the problem with this is the MOV can short and should the fuse not blow or be the wrong rating  the current is infinite.  Move the resistor to be directly connected to the mains before other components except for a fuse.

One of the safest practices for circuit design that isn't emphasized much anymore is to limit the current being supplied to a circuit to only the amount the circuit needs. You see a lot of circuits now being powered from 5A supplies when the circuit only needs 100ma and relying on hope that nothing shorts and that a 5A fuse on the main supply will stop all the damage.
 


 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19553
  • Country: gb
  • 0999
Re: Optoisolator concerns
« Reply #12 on: November 16, 2012, 12:07:26 pm »
I'd also recommend putting the resistor on the phase (the same side as the fuse), assuming the mains connector is polarised of course.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf