Go Down

Topic: 230V AC -> 5V DC (Read 2913 times) previous topic - next topic

WPD64

Dec 10, 2015, 11:38 pm Last Edit: Dec 10, 2015, 11:53 pm by WPD64
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

mauried

Simplest way is to buy a small 5V plugpak.
Will be cheaper than any alternative which is safe.

Paul__B

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) (readily available on eBay).


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.

septillion

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 :)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Watcher

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

WPD64

#5
Dec 11, 2015, 07:35 pm Last Edit: Dec 11, 2015, 07:40 pm by WPD64
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

 

zoomkat

Quote
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
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

WPD64

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
Yes - maybe that's actually the easiest and cheapest way to go - Thanks

raschemmel

From Reply#1

Quote
Simplest way is to buy a small 5V plugpak.
Will be cheaper than any alternative which is safe.

WPD64


Paul__B

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 was recently posted on another thread.

Go Up