Sei sulla pagina 1di 8

2016

Measuring AC voltages through


Arduino

Salaideva Thirumani
Tenet Technetronics

Tenet Technetronics 1
Application Notes

Contents
Introduction 2
Hardware employed..

Software employed

Explanation

Circuit diagram

Hardware setup..

Calculation ..

Arduino Program

Output...

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 2
Application Notes

Introduction:
In this application note we will look how to convert AC voltage to DC voltage how to
measure it in our Arduino. An AC voltage measurement is needed to calculate real
power, apparent power and power factor. This measurement can be made safely
(requiring no high voltage work) by using an AC to AC power adaptor.
Here we are using 12V -0-12 V transformer which converts 230 V AC to the 12V AC,So
whenever we are providing 230 V to the transformer we will get 12 V AC and the Vp
(voltage peak) would be 16.968V (i.e 12*1.414) and Vpp (voltage peak-peak) would
be 33.936 V.

Hardware used:

Arduino UNO Microcontroller board


12-0-12 transformer
1K,10K,470K resisitors
10uF capacitors
Bread board
Jumper wires.

Software used:

Arduino IDE

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 3
Application Notes

Explanation:
We have to follow some steps to convert the AC voltage into DC and to
measure it in an Arduino we have scale the voltage down since Arduinos will
able to measure the voltage between 0V-5V and also we have to keep in mind
that arduino will not measure the negative voltage, so after signal conversion
our negative peak should be greater than 0 .

We can scale down the voltage from transformer by using volatge divider circuit
and the offset (bias) can be added using a voltage source created by another
voltage divider connected across the Arduino's power supply.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 4
Application Notes

Circuit diagram:

Hardware setup:

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 5
Application Notes

Calculation:
Resistors R1 and R2 form a voltage divider that scales down the power adapter
AC voltage. Resistors R3 and R4 provide the voltage bias. Capacitor C1 to ACDC and also provides a low impedance path to ground for the AC signal.
R1=1K ; R2 = 10 K
Minimum voltage output for arduino = R1 / (R1 + R2) x Vp =1k / (10k + 1k) x 16.96
V = 1.54V
The voltage bias provided by R3 and R4 should be half of the Arduino supply
voltage. As such, R3 and R4 need to be of equal resistance. Higher resistance
lowers energy consumption.
So, whenever we applied input voltage 5V from arduino the we will get 2.5 V in
the midpoint of R3 and R4 resistor values Then resultant positive peak voltage
would be 4.04 V.
Positive peak voltage: 4.04 V
Negative peak voltage: 1.54 V

Now we can measure the AC voltage through our Arduino (Analog Read) using
signal conditioning circuits .

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 6
Application Notes

Arduino Program:
void setup()
{
Serial.begin(9600);
}
void loop()
{
int a = analogRead(A5);
Serial.println(a);
delayMicroseconds(1);
}

Output:
When we open Serial monitor, ADC values would be printed in ranges from 250750.

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Tenet Technetronics 7
Application Notes

CRO Output

Tenet Technetronics | Varsity


#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com

Potrebbero piacerti anche