--> Project I - 7. Digital Voltmeter Using LCD Display, Max 50 V (Arduino Uno Based) | basic arduino tutorial

Monday, August 7, 2017

Project I - 7. Digital Voltmeter Using LCD Display, Max 50 V (Arduino Uno Based)

| Monday, August 7, 2017
Digital Voltmeter Using LCD Display, Max 50 V




Almost the same as the previous application, it is "Digital voltmeter maximum 5Volt dc". The difference for this time, this is can read the DC Voltage value up to 50 Volt. In order to read the voltage up to 50 Volt,  it takes an additional circuit called  voltage divider. The output from voltage divider will connect on the Arduino A0 (Analog 0) pin. So the Arduino will be convert that data to the actual input voltage and than it will be shown on the LCD.

Hardware Requirement

  • LCD 2X16 Module
  • Push Button
  • Arduino UNO
  • Power supply +5Volt
  • DC Source 50 V

Block diagram




Schematic


Arduino - LCD Wiring


Arduino - Button - V Input Wiring


Source Code/Sketch

#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int hold,koma;
void setup(){
pinMode(8,INPUT);
digitalWrite(8,HIGH);
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("DigitalVoltmeter");
lcd.setCursor(0,1);
lcd.print(" Vin mak 50Volt");
delay(3000);
lcd.clear();
}
void loop(){
int vin=(analogRead(A0));
float voltage = vin * (5.0 / 1023.0);
voltage=voltage/0.091;
lcd.setCursor(0,0);
lcd.print("Vin:");
lcd.print(voltage);
lcd.print("V ");
if (digitalRead(8)==0){
hold=1;
lcd.setCursor(0,1);
lcd.print("hold on");
delay(1000);
do{
if (digitalRead(8)==0){
lcd.setCursor(0,1);
lcd.print(" ");
delay(1000);
hold=0;
}
}
while(hold);
}
delay(500);
}

How it Works
1. Connect the Arduino with Peripherals needed
2. Plug in the Power Source on the device
3. Compile and upload the script program above to your arduino
4. For variation voltage input, you can use a potentiometer
5. First look on lcd


6. Value result will be displayed on the lcd


 7. If you press and hol the HOLD button, you'll see on the lcd it says hold on, and the data value will
    be stuck

8. Press once again the HOLD button to go back to normal.




Video for Project I - 7. Digital Voltmeter Using LCD Display, Max 50 V (Arduino Uno Based)





Download the required file.

Related Posts

No comments:

Post a Comment