leorickings
Junior Member level 1
- Joined
- Oct 18, 2013
- Messages
- 17
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 197
You can get relays with 230V coils, the contact rating is unimportant because the load you are switching is so tiny. The best solution is an opto-coupler though, they are smaller, cheaper and more reliable. Use something like a 6N139, feed it from a bridge rectifier (4 x 1N4148 will do) and feed each AC arm of the bridge through 47K resistors from the 230V AC. The opto output with a pull-up resistor will pulse at twice line frequency, if you need it to be a steady logic level output, add a capacitor across it to even out the pulses.
Brian.
If interfacing a diode bridge to AC - be sure to pick diodes with voltage ratings approx 2X the AC voltage that will be applied to them.
It would seem that you didn't properly size your resistors if they burst into flames. Understand what "working voltage" and "maximum voltage" are for a resistor, and be sure to keep your resistors chosen to avoid violating those parameters. Also, Power through the resistor will be V*V/R, so if you had 2K resistors with 230V across them -> 26.45W of peak power -- so if your resistors weren't 15W or more each, yes, they will get hot and burn up. Be CAREFUL! CHOOSE HIGHER RESISTANCE AND POWER RATING so that your current is within specs for the optocoupler and that you are no more than 70% of rated power for the resistors chosen as a starting point (even then, they will get quite warm).
Before going any further - do you fully understand the safety issues of using a capacitive voltage dropper?
Although they are cheaper and smaller than transformers, they give no isolation from the incoming power whatsoever. If there is ANY chance that you or anyone else can touch any components or wiring, including switches or the shaft of any variable component, DO NOT USE THIS METHOD. The only time it is aceptable to use a capacitive dropper is when the entire circuit is enclosed and water-tight, even then, special capacitors are used and the circuit has to be fused.
Please explain in more detail exactly what you are trying to achieve. Are you powering the whole circuit from the dropper circuit or only using it to sense whether AC is present or not? If you are only using it to sense AC, what are you using to power the remainder of the circuit?
The SFH620A isn't the best choice in AC sensor applications, it does need quite a high LED current. Something like a 6N139 and external bridge rectifier will operate down to about 0.5mA. I use then for sensing 230V AC with 2 x 47K resistors in series and 4 x 1N4148 as a bridge rectifier. The resistors are only 0.25W rated and run cold.
Brian.
It's Hz not KHz - you are thinking 1,000 times too fast :-D
Opto isolators are very reliable and have very long life expectancy, even when run at high speed. I have been using 6N139 and similar devices at 6MHz in one application for more than 10 years without any problems.
Yes, the output will pulse at twice the line frequency, you could put a 1N4148 across the opto LED input to clamp the voltage and then it would produce a pulse per half cycle. the reason I use a bridge is for the small extra cost of three diodes, it halves the time constant needed at the output to turn it into a 'clean' logic level when a capacitor is connected across it's output. The RC time constant of the pull-up resistor and shunt capacitor make it easy to produce a logic level output instead of pulses.
Brian.
That's right.
How the software reacts to pulses is all that matters. If you need a steady logic level, it's easier and safer to add the capacitor after the opto-coupler rather than before it. With the SFH620 you have no option but to do it that way because the input (LED) side is AC anyway. The idea is that from the processors point of view, it's input pin sees a pull-up resistor to VDD and a capacitor down to ground. The capacitor charges up and the PIC sees a logic '1' on it's pin. When the opto conducts, it provides a path for the capacitor to discharge and the voltage across it drops making the PIC see a logic '0'. By making the time constant of the pull-up resistor/capacitor relatively long compared to the AC period, the presence of power is converted to a steady logic level.
This is an extract of a circuit I used recently. The 230V input is on the left and the output went to a 16F88 processor.
Brian.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?