ac voltage measurement using arduino

Hi guys,
I have transformed 240V (rms) to 12V(rms) using a step-down transformer, next I rectified the ac voltage using a bridge converter and finally I used a voltage divider to step it down to 4.56V (DC) for my arduino.
Now I as I vary my autotransformer I want my arduino to display the values in the serial monitor.eg. say I vary the autotransformer to say 200V my arduino should approximately read 200V and display it in the serial monitor.Here’s my code which I had tried after I read a similiar post in the forum.

volt.txt (193 Bytes)

finally I used a voltage divider to step it down to 4.56V (DC) for my arduino.

You're not powering your Arduino from a voltage divider are you?
Just feeding the voltage to an analogue input?

If your maximum voltage out is only 4.56V, you'll never read 1023 on your analogRead, unless this is also your reference voltage.
If your reference is the standard 5V, you'll only see a maximum of around 930.

No I am not powering my arduino from my voltage divider.
say for 240V(rms) I get 4.56V(DC), now the arduino should read the 4.56V and rescale it to approx 240V and display in the serial monitor

Since you're posting here I guess you have a problem, but you haven't said what it is.

aryan007:
Hi guys,
I have transformed 240V (rms) to 12V(rms) using a step-down transformer, next I rectified the ac voltage using a bridge converter and finally I used a voltage divider to step it down to 4.56V (DC) for my arduino.
Now I as I vary my autotransformer I want my arduino to display the values in the serial monitor.eg. say I vary the autotransformer to say 200V my arduino should approximately read 200V and display it in the serial monitor.Here's my code which I had tried after I read a similiar post in the forum.

Your code might not give you stable reading. one way to measure AC(rms) is by measure peak voltage. your circuit is fine, just reference

change your code, read peak voltage then convert to rms. It would not give ppm accuracy and precision, but for average app should be fine.

do not forget compensation the rectified bridge voltage drop (said 2*0.7 V or what ever, base on the type diode you use)

PeterH:
Since you're posting here I guess you have a problem, but you haven't said what it is.

I want my arduino to display approximately the ac voltage when I am varying my autotransformer. I thought the mapping function could do that but I am not sure

aryan007:

PeterH:
Since you're posting here I guess you have a problem, but you haven't said what it is.

I want my arduino to display approximately the ac voltage when I am varying my autotransformer. I thought the mapping function could do that but I am not sure

How does the arduino output value compare to a multimeter reading?

zoomkat:
How does the arduino output value compare to a multimeter reading?

the multimeter reads 4.56V at the voltage divider for 240V AC