0

How do we measure 100 Volts Arduino LCD Proje

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
int analogInput = 0;
float vout = 0.0;
float vin = 0.0;
float R1 = 100000.0; // 100K ohm direnç
float R2 = 10000.0; // 10K ohm direnç
int value = 0;
void setup(){
   pinMode(analogInput, INPUT);
   lcd.begin(16, 2);
   lcd.print("DC VOLTMETRE-PROJEHOCAM");
}
void loop(){
   // read the value at analog input
   value = analogRead(analogInput);
   vout = (value * 5.0) / 1024.0; 
   vin = vout / (R2/(R1+R2)); 
   if (vin<0.09) {
   vin=0.0;
} 
lcd.setCursor(0, 1);
lcd.print("VOLTAJ V= ");
lcd.print(vin);
delay(500);
}
1

The project that you show as your reference : link in your question, shows this picture :

enter image description here

Change R1 to 200 K ohms. The Arduino will receive 4.76 volts when the input is 100 volts.

You will also need to change your program line for float R1 = 100000.0;

CAUTION : Beware of high voltage. Also, the Arduino is not isolated from the 100 volts.

| improve this answer | |
  • It's probably a good idea not to deal with HV if a voltage divider needs to be asked about. – Avamander Feb 2 '16 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.