manodeep
Published © CC BY

DIY Ohmmeter using Arduino

Measurement of unknown resistance using Arduino.

BeginnerFull instructions provided398
DIY Ohmmeter using Arduino

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Resistor 1k ohm
Resistor 1k ohm
×2
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Resistance measurement using Arduino

Code

Resistance measurement using Arduino

Arduino
int analogPin= 0; //Analog Pin A0
int raw= 0;
int Vin= 5; //input voltage 5 volts
float Vout= 0;
float R1= 1000; //mention R1(Known Resistance,in my case 1000 Ohm)
float R2= 0;
float buffer= 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  raw= analogRead(analogPin);
  if(raw) 
  { 
    buffer= raw * Vin;
    Vout= (buffer)/1024.0;
    buffer= (Vin/Vout) -1;
    R2= R1 * buffer;
    Serial.print("Output voltage: ");
    Serial.print(Vout);
    Serial.println(" Volts");
    Serial.print("Resistor value: ");
    Serial.print(R2);
    Serial.println(" Ohm");
    delay(1000);
  }
}

Credits

manodeep

manodeep

0 projects • 4 followers

Comments