230V => 5V smart Solution

Hi there,
does any one have an smart idea how to pick up a 230 AC signal and convert it into a 5Volt DC Signal. ....Without using a relais
I do need pick up a on /off 230AC signal like a pump being switched on and off. Is the an easy and smart way to convert this in a 0/5Volt Signal the can be processed by an Adruino analog or digital I/O?
Any help is highly appreciated .... I was thinking on a opto IC or similar but could not find any.
Thanks for your response.

You want a current sensor.

You don't say what kinf of amperage we are talking about.

Something like this appropriately sized:
http://www.seeedstudio.com/depot/Noninvasive-AC-Current-Sensor-100A-max-p-547.html

Edit:
This might be helpful as well.
http://www.homautomation.org/2013/09/17/current-monitoring-with-non-invasive-sensor-and-arduino/

This one can be used as an AC or DC isolating step down transformer:

You want a current sensor.

It sounds to me more like he wants to detect when some AC device is switched on.
The best way to do that is with an opto isolator. Have a resistor and diode feed the LED in the opto and connect the output between the arduino input and ground and enable the internal pull up resistor.

Well in that case, one could use something like:
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_320653_-1

but I would have zero idea (and zero confidence in) how to hook that baby to 230AC.

but I would zero idea (and zero confidence in) how to hook that baby to 230AC.

Like the circuit below but note that I would use 15K rather than the value shown here.
Also if you want it to be a constant indicator then put a 0.1uF capacitor across the LED.

See, I'm confused because the specs on the 4N33 say:

Input Type DC
Number of Channels per Chip 1
Maximum Input Current 80mA
Maximum Reverse Voltage 5V

Output Type DC
Maximum Forward Voltage 1.5V

Here is a useful discussion how to sense 220v input -solved- I hope - Raspberry Pi Forums
The simplest circuit is attached. It will give a pulsating 50/60 Hz signal. The capacitor should be rated at 330 VAC continuous operation, minimum.

1 Like

Hmmm. A 330v AC capacitior makes me nervous.

And it's US$13.

Hmmm. A 330v AC capacitior makes me nervous.
http://www.grainger.com/product/DAYTON-Start-Capacitor-2MEL3
And it's US$13.

That motor starting capacitor is about 650 times larger than the 100 nF capacitor specified in the design I posted, and is correspondingly more expensive. The 220 VAC line is very dangerous and should be interfaced only with components designed for the purpose, with human safety in mind.

Capacitors like the one in the design are often used as noise filters, connected directly across the AC line, and can be salvaged from the power supply section from almost any piece of reasonably modern, but junked equipment.

bigred1212:
See, I'm confused because the specs on the 4N33 say:

Input Type DC
Number of Channels per Chip 1
Maximum Input Current 80mA
Maximum Reverse Voltage 5V

Output Type DC
Maximum Forward Voltage 1.5V

What is the problem with that?
The diode makes the input DC and stops any reverse voltage. The resistor limits the current.
Yes you can use a capacitor in place of a resistor, it is just that capacitors at this voltage are far more expensive than a resistor.

@ Grumpy-Mike
yes that suggest solution sounds feasable.
@ jremington
yours is also looking good.
I thought that these setups might be availbale of the shelf.
Opto Coublers are quite common but I've never used them before.
I only need to pick up a digital 230AC voltage signal (on / off) and convert it to (on / off 5 Volt, HIGH / LOW Signal)
I've been looking and found a 230V AC mini relais based solution for about € 10.
I thought that others would have the same issue when dealing with home automation issues.

What is the problem with that?
The diode makes the input DC and stops any reverse voltage.

So, when the bottom connection of the AC is positive and the top connection of the AC is negative ( which happens half the time ), then how is there not a large reverse potential across the input side of the optocoupler ?

then how is there not a large reverse potential across the input side of the optocoupler ?

Because of that series diode, it is not conducting and so there is no circuit.

The other thing with this approach, is that you are connecting to both lines of the A/C.

With a current sensor, you only need access to one of the lines of the A/C. With some situations, that can be more convenient.

Because of that series diode, it is not conducting and so there is no circuit.

So the LED is also a diode, and it is also blocking current flow when the A/C circuit is positive at the lower connection, and you would have the full reverse A/C voltage being blocked by the two diodes, in that path ( the diode, and the led ), which are in series and pointing in the same direction.

I am still very unclear how you are sure that the reverse voltage on the LED will be less than the alleged 5V breakdown limit.

Duriing the times when -230 volts is present on the A/C terminal of that circuit, how can you be sure that 225 V of it will be present across the terminals of the external diode, and only 5V or less across the terminals of the LED ?

Grumpy_Mike:
What is the problem with that?

Mostly the problem is my lack of understanding.

Duriing the times when -230 volts is present on the A/C terminal of that circuit, how can you be sure that 225 V of it will be present across the terminals of the external diode, and only 5V or less across the terminals of the LED ?

That is a good question, and the answer is that you can't. The actual reverse current flow in the LED during the "wrong" half cycle is most likely insufficient to destroy it, but the design with the antiparallel diode is much preferred and is in common use.

Furthermore, if a resistor, rather than a capacitor, is used to limit the diode forward current, it will generate a lot of heat (a couple of watts for 220 V @ 10 mA) and has to be sized accordingly. I've been using several versions of the circuit I posted for many years to monitor 220VAC pump operation, with no failures.

Mostly the problem is my lack of understanding.

Nothing wrong with making sure you understand, particularly when mains electricity is involved.

To make sure that the led in the optocoupler doesn't blow up, it would appear that the diagram of reply #8, with the reverse bypass diode, would be preferable to the arrangement of reply #5.

michinyon:

Because of that series diode, it is not conducting and so there is no circuit.

So the LED is also a diode, and it is also blocking current flow when the A/C circuit is positive at the lower connection, and you would have the full reverse A/C voltage being blocked by the two diodes, in that path ( the diode, and the led ), which are in series and pointing in the same direction.

I am still very unclear how you are sure that the reverse voltage on the LED will be less than the alleged 5V breakdown limit.

Duriing the times when -230 volts is present on the A/C terminal of that circuit, how can you be sure that 225 V of it will be present across the terminals of the external diode, and only 5V or less across the terminals of the LED ?