Pages: [1]   Go Down
Author Topic: How to Sense Voltage ( AC Main Line ) using arduino ?  (Read 2415 times)
0 Members and 1 Guest are viewing this topic.
Colombo
Offline Offline
Newbie
*
Karma: 1
Posts: 36
Bachelor in EEE Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Friends,

I need some help for voltage sensing with arduino .

My requirement ;

1. Measure AC voltage ( 230V 50Hz domestic supply ) using arduino analog pins

My idea ;

1. Use a transformer of 230V to 12V ( to step down for safety ) and send it through a simple bridge ( to rectify ) and get the vOut.
( may be i will get around 10.5V DC i think, due to voltage drop at bridge )

2. Then use a voltage divider circuit ( using resistors, and may be a cap for smoothing ), divide and get suitable voltage for arduino analog pin.
( i think arduino can handle upto 5V, so 10.5V to 5V divider circuit is good i think )

3. Next get the voltage input of 5V to the arduino analog pin, and make a coding in the IC to do some math with some constant value, and show the mains voltage proportional to the input voltage given to arduino pin.
( if mains voltage is 230VAC / then transformer LV side 12VAC/ after rectifying i get 10.5VDC / after divider circuit i get 5VDC / and it's given to arduino IC input pin )

My Problem ;

1. Is this possible ? is this dangerous for my self and arduino IC ? or anyother thing ?

2. How to make the correct divider circuit for this ? ( please draw me a sample )

3. If i use a divider for 10.5V to 5V, and give that 5V to arduino input pin ; what happens if the mains voltage goes over 230V, then probably the input for arduino pin may exceed 5V, so it will burn out ? what is the solution for this ?

* I have a 230V to 12V transformer this moment. So please help me to make this work without buying another tr.

Please help .

Many Thanks.

« Last Edit: April 17, 2013, 12:15:11 pm by Dileesha » Logged

Dileesha Amarasena

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

1) yes that is ok. The voltage you get will depend on the transformer and the load you put on it.
2) come on it is two resistors.
3) if the mains voltage goes up then so will your voltage. You must keep it below 5V so arrange things so that with normal mains voltage you only have 4V to give yourself some head room.

The only dangerous wiring is the primary to mains wires. Make sure they are well insulated.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2566
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is an AC interface to arduino using transformer:
http://coolarduino.wordpress.com/2013/01/04/power-quality-meter/
Logged

Colombo
Offline Offline
Newbie
*
Karma: 1
Posts: 36
Bachelor in EEE Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ Grumpy
@ Magician

Thanks so much for both .

So I can use a simple voltage divider with 200kOhm resistor and 100kOhm resistor ( one side grounded ) i think . And across 100kOhm resistor I get about 3.5v if the transformer output LV side gives 12V AC ( and i assume i get about 10.5VDC after rectifying )  .

So 10.5V x ( 1/3 ) = 3.5VDC

Quote
So I can write the code to display 230VAC if the detected voltage is 3.5V at arduino analog input pins . Im I right sirs ?

Do I need to include any diodes to prevent damages to arduino ? or just only two resistors enough ?


And what if i use a smoothing capacitor inbetween the ground pin and the other side of the grounded resistor ( 100kOhm ) ?

And the other thing is lets say i arrange this voltage divider, and then i get the 3.5V to the analog input pin of the arduino . So I feel then the resistance of the circuit becomes parallel to the 100kOhm resistor I used . So the resistance becomes even smaller . So would  this be a problem ? or is it negligible ?



Thanks,
Dileesha.
Logged

Dileesha Amarasena

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

Quote
and i assume i get about 10.5VDC after rectifying )  .
No you will probbly get about 16V. Remember that is 12V RMS, rectified and smoothed with no or just a light load will give you the peak value not the RMS value.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, theres things called hall effect sensors you may want to look into, but i dont know if they would be appropriate for what you are trying to accomplish.
Logged

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

also, theres things called hall effect sensors you may want to look into, but i dont know if they would be appropriate for what you are trying to accomplish.

No it wouldn't. Hall effect sensors designed for power measurement are used to sense and measure current, they won't let you sense or measure voltage. The hall effect sensor itself is a magnetic sensor.

Lefty
« Last Edit: April 20, 2013, 07:41:57 pm by retrolefty » Logged

Pages: [1]   Go Up
Jump to: