Hello, Guys Welcome To Micro Electronics, In This Post You Will Learn That How To Make Voltage Detector Using Arduino ? We Will Provide The Circuit Diagram And Source Code. With The Help Of This Project You Will Able To Detect Voltage Using Voltage Sensor, After Completing The Project It Will Work Like Galvanometer, Will Help In Detecting The Presence Of Voltage. Subscribe To Our Blog So That You Don't Miss Any Update From Us.
Voltage Detector Using Arduino-
1-GND-GND
2-A0- S
Source Code-
//Microelectronics
//Voltage Sensor Reading Demo
int offset =40;// set the correction offset value
void setup()
{
Serial.begin(9600);
}
void loop()
{
int volt = analogRead(A0);// read the input
double voltage = map(volt,0,1023, 0, 2500) - offset;// map 0-1023 to 0-2500 and add correction offset
voltage /=100;// divide by 100 to get the decimal values
Serial.print("Voltage Reading: ");
Serial.print(voltage);//print the voltge
Serial.println("V");
delay(1000);
}
Comments