In this post, we are going to make digital voltmeter using arduino uno. It's a DC voltmeter and it's range is 0 to 50 volt. As we know, arduino is an open source hardware prototyping platform used worldwide by the hobbyists, educators and students across the globe.
This is a handy voltmeter.
Stuff required:
Once the connection is made, upload the source code.
/* Source code */
const int volt=A0;
float val=0.0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
lcd.print("VOLTMETER");
}
void loop() {
val=analogRead(volt);
val=val*4.887; // convert digital count into millivolt
val=val/1000; // convert millivolt into volts
val=val*10.0;
lcd.setCursor(0, 1);
lcd.print(val);
}
Hope you guys have enjoyed the post.
Thanks for reading the post.
This is a handy voltmeter.
Stuff required:
- Arduino uno
- 16*2 lcd
- 10k pot
- voltage source
Objective of the project: To make a digital voltmeter, which can measure voltage from 0 to 50 volt DC and thereafter it can display on 16*2 LCD.
Connections:
Make the connections as given in the figure below:
Arduino based voltmeter |
/* Source code */
const int volt=A0;
float val=0.0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
lcd.print("VOLTMETER");
}
void loop() {
val=analogRead(volt);
val=val*4.887; // convert digital count into millivolt
val=val/1000; // convert millivolt into volts
val=val*10.0;
lcd.setCursor(0, 1);
lcd.print(val);
}
/* End of source code */
Check out the video:
Thanks for reading the post.
No comments:
Post a Comment