Hello Everybody
I have very limited skills in electronics and would appreciate some support for this little problem.
How do I turn 230V AC into a +5V DC voltage to trigger a digital-in on my arduino.
It will take a capacitor to flatten the AC and a voltage divider - that much I know.
But I have no clue what capacitances and resistances should be.
In the end I would like to trigger on the fuel pump of my central heating system and record up-time of the burner.
Thanks so much
Sebastian
Simplest way is to buy a small 5V plugpak.
Will be cheaper than any alternative which is safe.
OK guys, he didn't want a power supply, he wants an indication to an input on the Arduino.
When you get the question correct, the answer is an AC optocoupler (PC814 (http://pdf1.alldatasheet.com/datasheet-pdf/view/43364/SHARP/PC814/+33_75UO.vRPbSGwBz+/datasheet.pdf)) (readily available on eBay).
(http://i.ebayimg.com/images/g/jYQAAOSwAHZUNchI/s-l1600.jpg) (http://www.ebay.com/itm/5PCS-PC814-EL814-SHARP-PHOTO-COUPLER-DIP-4-NEW-GOOD-QUALITY-D9-/291572602691)
This (its LEDs) needs to be connected in series with an AC rated capacitor and resistor and the photo-transistor between ground and the Arduino input using INPUT_PULLUP. The code will detect the pulsating logic level - it can be either de-bounced, or used to synchronise with the AC peaks.
If deemed too risky to construct, "reverse" SSR modules are readily available to perform this function.
Yeay, a opto is indeed the way I would use if I really had to use 230V AC as an input. But as the topic starter is not that skilled (otherwise a power supply was easy for him) I would say a simple wall wart or just a USB charger is way saver. And to stop it from feeding the Arduino when that's powered off, just use a 100k or so resistor in line (aka, in series) with that charger. It's a simple plug and go solution :)
All solutions that involve direct access to mains voltage should only be adopted by qualified and experienced users. In that respect, may be a simple plugpack is safer..
Thanks for your suggestions so far!
To be more clear:
I need to detect the ON-state of a 230V driven pump. And the OFF-state. Typical ON/OFF times are 10 minutes. I do not care for nor do I want to even sense the 50Hz.
I'm regularly working on our electrical system and I'm familiar with the hazards of 230V.
Plus I have a physics background so I should know theoretically;-)
The optocouplers appear to be the most elegant solution. If they can be driven by 230V - perfect!
What exactly are those reverse SSR modules? Do they down-convert 230V AC to a low voltage (AC or DC)?
Cheers
Sebastian
In the end I would like to trigger on the fuel pump of my central heating system and record up-time of the burner.
A 220 usb wall charger could supply a 5v output when 220vac is present and 0v output when 220vac is not present.
http://www.ebay.com/sch/i.html?_odkw=usb+wall+charger+230&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xusb+wall+charger+220.TRS1&_nkw=usb+wall+charger+220&_sacat=0 (http://www.ebay.com/sch/i.html?_odkw=usb+wall+charger+230&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xusb+wall+charger+220.TRS1&_nkw=usb+wall+charger+220&_sacat=0)
A 220 usb wall charger could supply a 5v output when 220vac is present and 0v output when 220vac is not present.
http://www.ebay.com/sch/i.html?_odkw=usb+wall+charger+230&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xusb+wall+charger+220.TRS1&_nkw=usb+wall+charger+220&_sacat=0 (http://www.ebay.com/sch/i.html?_odkw=usb+wall+charger+230&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xusb+wall+charger+220.TRS1&_nkw=usb+wall+charger+220&_sacat=0)
Yes - maybe that's actually the easiest and cheapest way to go - Thanks
From Reply#1Simplest way is to buy a small 5V plugpak.
Will be cheaper than any alternative which is safe.
From Reply#1
OK - I get it :-)
Thanks to all!
Hmmm. Seems my replay was not #2 when I wrote it, else I would not have refereed to "guys". Apparently some were retracted.
Anyway, I stand by my answer as the neatest way to do it - for an experienced engineer.
If you are fussy about working with mains, then yes, a plug pack is the way to go.
Of course, it must be a reputable brand, as the "cheapies" from China have a bad reputation. I acquire what appear to be genuine ones (that came with the phone) at Garage Sales, never for more than $1.
And - this (https://www.sparkfun.com/news/1986) was recently posted on another thread.