Pages: [1] 2   Go Down
Author Topic: Detecting if AC appliance is powered  (Read 2196 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brasil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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



« Last Edit: April 29, 2013, 07:48:17 am by mmoscz » Logged

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


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brasil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 1
Posts: 225
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brasil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Read this
http://en.wikipedia.org/wiki/Reactance_(electronics)#Capacitive_reactance
Logged

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


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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 ?
Logged

Brasil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

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


Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1] 2   Go Up
Jump to: