Ads

Selasa, 05 Juni 2018

Read the voltage using Arduino


Read the voltage using Arduino - this time admin posted How to read voltage (volts) using Arduino.
In this tutorial, the basic is the use of analogue on Arduino. The recommendation from the input on the Arduino that I share can read from 0.01 vdc to 5 vdc (recommendation). If you want to use more than you can use prisoners (resistors) or can also be called divider dividers. then enter with an additional formula according to the resistor value. but this time the admin shared the 5 VDC max input.

Schematic:


Source Code [Raw

#define pinTeg A0
void setup() {
  Serial.begin(9600); 
}

void loop() {
  readTeg(); // MEMANGGIL PROGRAM
}

// PROGRAM MEMBACA TEGANGAN
void readTeg(){
  int ValueTeg = analogRead(pinTeg);
  float tegangan = ValueTeg * (5.0 / 1023.0);
  Serial.print("Tegangan : ");
  Serial.print(tegangan);
  Serial.println(" Volt");
  delay(100);
}

Or Download File Source Code

Note :
Here I use pin A0 on Arduino as input volt
Enough the tutorial "Reading voltage using Arduino" Thank you.

    Choose :
  • OR
  • To comment
Tidak ada komentar:
Write komentar