Arduino Forum

Using Arduino => Sensors => Topic started by: BigBenz63 on Mar 06, 2014, 05:28 pm

Title: 230V => 5V smart Solution
Post by: BigBenz63 on Mar 06, 2014, 05:28 pm
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.
Title: Re: 230V => 5V smart Solution
Post by: bigred1212 on Mar 06, 2014, 10:38 pm
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/
Title: Re: 230V => 5V smart Solution
Post by: eehobbytoronto on Mar 06, 2014, 11:32 pm
This one can be used as an AC or DC isolating step down transformer:
http://www.ebay.ca/itm/HALL-EFFECT-DC-TRANSFORMER-STEP-DOWN-VOLTAGE-ISOLATING-ARDUINO-COMPATIBLE-/231069056757?pt=LH_DefaultDomain_2&hash=item35ccc9fef5
Title: Re: 230V => 5V smart Solution
Post by: Grumpy_Mike on Mar 06, 2014, 11:39 pm
Quote
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.
Title: Re: 230V => 5V smart Solution
Post by: bigred1212 on Mar 06, 2014, 11:51 pm
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.  
Title: Re: 230V => 5V smart Solution
Post by: Grumpy_Mike on Mar 06, 2014, 11:57 pm
Quote
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.
Title: Re: 230V => 5V smart Solution
Post by: bigred1212 on Mar 07, 2014, 12:03 am
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


Title: Re: 230V => 5V smart Solution
Post by: jremington on Mar 07, 2014, 12:22 am
Here is a useful discussion http://www.raspberrypi.org/forums/viewtopic.php?f=45&t=9617
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.
Title: Re: 230V => 5V smart Solution
Post by: bigred1212 on Mar 07, 2014, 12:25 am
Hmmm.  A 330v AC capacitior makes me nervous.

http://www.grainger.com/product/DAYTON-Start-Capacitor-2MEL3

And it's US$13.
Title: Re: 230V => 5V smart Solution
Post by: jremington on Mar 07, 2014, 05:51 am
Quote
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.



Title: Re: 230V => 5V smart Solution
Post by: Grumpy_Mike on Mar 07, 2014, 08:34 am

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.
Title: Re: 230V => 5V smart Solution
Post by: BigBenz63 on Mar 07, 2014, 12:30 pm
@ 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.

Title: Re: 230V => 5V smart Solution
Post by: michinyon on Mar 07, 2014, 01:18 pm
Quote

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 ?
Title: Re: 230V => 5V smart Solution
Post by: Grumpy_Mike on Mar 07, 2014, 01:23 pm
Quote
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.
Title: Re: 230V => 5V smart Solution
Post by: michinyon on Mar 07, 2014, 01:57 pm
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.
Title: Re: 230V => 5V smart Solution
Post by: michinyon on Mar 07, 2014, 02:10 pm
Quote
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 ?
Title: Re: 230V => 5V smart Solution
Post by: bigred1212 on Mar 07, 2014, 04:40 pm

What is the problem with that?


Mostly the problem is my lack of understanding. 

Title: Re: 230V => 5V smart Solution
Post by: jremington on Mar 07, 2014, 05:01 pm
Quote
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.
Title: Re: 230V => 5V smart Solution
Post by: michinyon on Mar 07, 2014, 05:44 pm
Quote
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.
Title: Re: 230V => 5V smart Solution
Post by: Grumpy_Mike on Mar 07, 2014, 09:20 pm

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