Go Down

Topic: Detecting if AC appliance is powered (Read 2419 times) previous topic - next topic

martin_bg

I am trying to determine is an AC water pump is running or not with an Arduino. The pump is plugged in to an outlet. I could use a 220V relay that closes a circuit attached to and digital input, but that's too mechanical.

I googled a bit and came upon these two schematics using optocouplers, please comment if there are any "catches"


I'd place the R1 before D1 on that one.


The trouble with these is that they will be blinking at 50Hz and the Arduino may get wrong reading at zero crossing. I could use some advice on how to address that with capacitors, values and so on; I am really weak at electronics.

Grumpy_Mike

If you are weak on electronics, steer clear of mains it could kill you.

A capacitor on the output of those diodes will do, value 1uF but it needs a peak voltage rating in excess of 350V.

It is much better to deal with the blinking in software, that is only consider something is off when it reads off for two or three reads with a 1 millisecond delay between reads.

mmoscz

#2
Mar 21, 2012, 01:13 pm Last Edit: Apr 29, 2013, 02:48 pm by mmoscz Reason: 1
I using this solution



1. Work fine with PS2501 and PS2505
2. PS250X can work with 80V AC
3. R1 don´t warm soo much, not need big dissipation
4. C1 is a poliester capacitor
5. Work fine with ~110V and ~220-~230V
6. With only one C1 I can energize 2 ps250X



4x Duemilanove (clone)
Uno torrado (clone)
Amiga 1200 40MB
Windows XP

Grumpy_Mike

Quote
3. R1 don´t warm soo much, not need big dissipation

Yes but I think you need a bigger resistor than that, that is more power than just 0.125W.
Also note the voltage rating on C1.

I used a similar circuit on a set top box and the 0.25W resistor caught on fire when C1 failed.

mmoscz


Quote
3. R1 don´t warm soo much, not need big dissipation

Yes but I think you need a bigger resistor than that, that is more power than just 0.125W.
Also note the voltage rating on C1.

I used a similar circuit on a set top box and the 0.25W resistor caught on fire when C1 failed.


I rear the temp of R1 with a optical termometer, and only warm 3 graus over ambient temp.
C1 fail, all circuit is protect by PS250X, but can use a bigger resistor, but in this case, only one R1 with 5W we will not have a fire.
Sorry, what voltage rating about are you talking?
4x Duemilanove (clone)
Uno torrado (clone)
Amiga 1200 40MB
Windows XP

Grumpy_Mike

Agreed 5W resistor will not cause a fire but a smaller one will. This was tested in the safety lab where I worked.
It was running on 240V.

martin_bg

Thank you for your answers, I think the case can be closed.

Professor Chaos

In the schematic with the capacitor in series with the optocoupler's LED, what is the function of the capacitor?  I know you can limit AC current with a series capacitor, but why is the resistor alone not enough?

retrolefty


In the schematic with the capacitor in series with the optocoupler's LED, what is the function of the capacitor?  I know you can limit AC current with a series capacitor, but why is the resistor alone not enough?


A series capacitor will have a specific impedance at the AC frequency so it will act like an additional resistor to the AC current, thus allowing a smaller R1 resistor ohmage and wattage to be used. However such a cap should be rated for direct connection to AC power lines and are not inexpensive caps.


Techone

@Grumpy_Mike

Quote
I used a similar circuit on a set top box and the 0.25W resistor caught on fire when C1 failed.
This was tested in the safety lab where I worked


Just a question here... Why C1 failed ?  Is it the die-electric become a conductor ?  A cap is just two metal plate seperated by a die-electric-isolation... And the cap is rated WAY OVER Main Voltage peak... <-- I assumed...  So how the ... a cap fail ? Bad Die-Electric Isolator ? Manufacturer lie on the rated voltage ?

mmoscz

Maybe can´t use CAP less that 150% or 200% over voltage to safe work, I don´t try with CAP less that 440V with ~230V,
My first test I used one cap 230V, but with ~110V.

4x Duemilanove (clone)
Uno torrado (clone)
Amiga 1200 40MB
Windows XP

winner10920

Remember the peak voltage of ac is 1.41 times the rms, the peak voltage can cause the sielectric to breakdown even tho you dont think of it
so 120rms is 169 p2p(peak to peak) and 240rms is 339p2p
So for 240 you need a cap rated for probably 400 to be safe

florinc


Jack Christensen


Isn't a current sensor, like this one
http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-100a-max-p-547.html?cPath=144_154
a much safer and reliable option for this purpose?


I was going to ask, the circuits being discussed only detect if the appliance is powered if the appliance is switched by some external switch, and the same switched power is fed to the detector circuit.  Some sump pumps are one example of this, but I'm not thinking of any others off the top.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up