Power consumption of AC monitoring with optocoupler

Hi, I have stumbled upon this playground article: http://playground.arduino.cc/Main/ACPhaseControl

There, the AC phase is monitored with a H11AA1 optocoupler. The 2 15k resistors seem to make sense, with 240V RMS, they bring the current to around 10mA, as required by the IC. The only problem is: 10mA at 240V gives more than 2W power dissipation. Even if my resistors could take that (which should be commented on in an Arduino Playground article IMHO!) I really don't need a device that blows out more than 2W of power for the monitoring alone. Am I overlooking anything? Are there more efficient ways to monitor AC phase?

An alternative is a transformer. If there's a regular transformer in you power supply you can use the AC output from the transformer. If you have to add a small transformer, it's bulky and it adds to the cost.

You don't need two 15 resistors. One 30K resistor will do.

A capacitor might work in place of the resistor, but a capacitor will introduce a phase shift and you'd have to compensate for the timing difference.

There, the AC phase is monitored with a H11AA1 optocoupler. The 2 15k resistors seem to make sense, with 240V RMS, they bring the current to around 10mA, as required by the IC. The only problem is: 10mA at 240V gives more than 2W power dissipation.

Look again. That article is written for 120vac /60 Hz (USA)

The AC signal (in the US anyway) is 60 Hz. What this means is that the AC signal crosses zero, reaches peak positive voltage, crosses zero, reaches peak negative voltage and returns to zero 60 times each second. The period (length of time this takes) is 1/60 or 0.01667 seconds (16.67 milliseconds). A half cycle (the time between two zero-crossings) occurs in 8.33 milliseconds. This is t3 in the figure above.

The H11AA1 forward voltage is 1.2V @ 10 mA

With a 15k resistor in series with the LINE and another in series with the Neutral, the total series resistance is 30 k ohms. The peak voltage is SQRT(2) * Vrms = 1.414* 120 V = 169.68 (170 V)

R CL =(Vpeak-Vf)/If = (170V-1.2 V)/0.010 A = 168.8/0.01=16880 ohms

If you calculate for Vrms it comes to 120vac/0.010 A = 12000 ohms.

PRCL = I2 * RCL = (0.010 A)2*(15000+15000) =
3 W

I really don’t need a device that blows out more than 2W of power for the monitoring alone. Am I overlooking anything? Are there more efficient ways to monitor AC phase?

It is what it is…

You might be able to use an op amp. The input current is in the order of nA. I don’t see what the issue is with “blowing out 3W”. Is the electricity expensive where you are ?

DVDdoug: You don't need two 15 resistors. One 30K resistor will do.

I see TWO reasons why you need TWO resistors.

1) Safety. You don't know on which pin of the opto the phase will be if the user connects the device to the mains with a power lead (not all countries have polarised power plugs).

2) Common resistors have problems with the 330+ peak voltage of the mains.

I have replaced many failed 'single' resistors in TV SMPS startup circuits.

If the article is written for 120AC, change the resistor values. Leo..

The Arduino clock runs at 16 MHz, which is 16,000,000 cycles per second: one clock cycle takes 0.0625 microseconds. A single half cycle of the 60 Hz AC signal contains 133,333 clock cycles. This is important because we will be determining the time intervals by clock counts in the Arduino code, not by seconds.

AFAIK, they don't have 60 Hz in Europe or the Uk. (Japan has both, thanks to the occupation in 1945)

I totally agree with Wara and as a third reason may add that also the power rating might be an issue. A common rating for resistors is 2W.

I don't see what the issue is with "blowing out 3W". Is the electricity expensive where you are ?

We pay 25€ct/kWh. If I adopt this for home automatisation, I will easily have 5-10 of these hanging around in different rooms. That is 60€ per year, just for the sensing, plus everything else.
With that kind of energy, I could power a full-blown E3-Xeon server when at idle (when built well, even with the 5). That is ridiculous.

I mean, I see that the problem seems to generally occur when optocouplers are involved because of the 10mA current, but there has to be another possibility. I have premade “universal dimmers” that take <<1W.

And yes, we have 50Hz.

An op amp comparator (Vref to op amp GND) with 1 Mohm resistors would toggle from high to low depending on positive or negative transistion of ac phase. Op amp input current is nAs.
I don’t know how that would affect the phase control since the opto output is supposed to change state only at the zero crossing. The op amp circuit would probably need to be a “window detector (” to “mimic” the opto output ) that combines a positive level detector circuit with a negative voltage level circuit. The negative level circuit would need a split +/- power supply. I have no experience (per se) with phase control. (meaning I’ve built prototype boards for engineers but they did the design work).
It could probably be done but you would need a scope to determine the exact behavior of the opto you want to “mimic”. The op amps draw very little current (probably < 5 mA/amplifier). Maybe you could ask Crossroads for a quote to design and make all the boards.

Thanks, but in that case I would probably rather go for a mass produced one and access it e.g. via z-wave. I am just building a few things based on the ESP8266, found the dimmer circuit and first though "Neat" but then started to have a closer look.

Wawa: 1) Safety. You don't know on which pin of the opto the phase will be if the user connects the device to the mains with a power lead (not all countries have polarised power plugs).

2) Common resistors have problems with the 330+ peak voltage of the mains.

I do see a problem with safety but that's a combination of point 2 en 3...

3) Single resistor can't easily handle the power dissipation.

But I don't see any problem with the resistor being in the neutral... It's just a series connection.

And yes, it's a 120V/60Hz design. So 2x 15k makes 120V / 30k = 4mA giving you 120V^2 / 30k = 0,48W. So 2x 1/4 Watt resistor will do (kind of) fine (but the margin is a bit to small for my taste..).

An opamp circuit is nice but then you're whole circuit is at mains voltage. Main reason for the opto is to isolate it from mains. If isolation from mains isn't a problem then you could just drop the opamp and just connect the micro to mains with a couple of Mohm resistance (use multiple for point 2, resistor voltage rating). But check the code to see if it expects 50/60Hz or 100/120Hz as a trigger signal.

ElCaron:
Hi, I have stumbled upon this playground article:
http://playground.arduino.cc/Main/ACPhaseControl

There, the AC phase is monitored with a H11AA1 optocoupler. The 2 15k resistors seem to make sense, with 240V RMS, they bring the current to around 10mA, as required by the IC. The only problem is: 10mA at 240V gives more than 2W power dissipation.
Even if my resistors could take that (which should be commented on in an Arduino Playground article IMHO!) I really don’t need a device that blows out more than 2W of power for the monitoring alone. Am I overlooking anything? Are there more efficient ways to monitor AC phase?

Could replace the H11AA1 with a more sensitive photodarlington type optocoupler. The IL766B-2 can work with only ±500µA IF.
Digi-key

Could try this with two 150K resistors for ±1mA for 0.3W power dissipation.

Did you find an alternative for sensing AC??

HCPL-3700
https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/HCPL3700V/HCPL3700V-ND/1057446
Adjust resistor values for the AC voltage you are using. Output is open collector, use an input pin with internal pullup enabled.
AC_loss.jpg

How is that better than the optocoupler discussed above? AFAIR, The topic was that with 230V losses at the resistors are quite significant.

Is 4mA too much loss? Seems pretty negligible to me. Use larger value resistors. @rohit_mehta didn't say anything about power losses, or what AC levels were intended to be monitored.

Also the part is designed to work with higher voltages: "5V to 240V AC/DC voltage sensing"

I had a rough night, but 4mA at 240V is still a Watt, isn't it? I find that quite a lot just for the zero crossing detection.

CrossRoads:
Is 4mA too much loss? Seems pretty negligible to me. Use larger value resistors.

Well, dissipating 2W continuously costs ca 4€ a year. Resistors may be cheap, but those small print 0.35VA transformers cost €2,50 (at Conrad). Also voltage regulators like a TO92 version of the LM7805 are cheap, less than 0.25€

I stumbled on this thread because I need to detect if a swimming pool pump (1.2kW) is powered or not. I plan to use the circuit as shown in the image. Basically it’s a simple 5V power supply that will yield 5V if the pump is powered. Comments are welcome.

Why bother with a voltage regulator? Regulators are designed to power things, if you're just conditioning a signal they're overkill.

A 6V transformer half-wave rectified (only needs one diode instead of 4) will provide about 8V output. Divide it by 2 with a voltage divider and you've got your power signal.

Jiggy-Ninja: Why bother with a voltage regulator? Regulators are designed to power things, if you're just conditioning a signal they're overkill.

A 6V transformer half-wave rectified (only needs one diode instead of 4) will provide about 8V output. Divide it by 2 with a voltage divider and you've got your power signal.

Because this is an electrically noisy environment. A big pump, no idea what happens on the AC power line when it gets switched on/off by it's relay. I don't want to kill my Arduino because of some power spike.

And yes, I know about zener diodes, but these voltage regulators cost 25 cents, and are reliable. What is overkill..

I would just wire a relay in parallel with the pump.