Introduction: Arduino Resistance Measurement

About: Engineer


hi,this is lion maker.

My YouTube Channel: Link

In this tutorial we will learn about how to measure unknown resistance by using Arduino uno. there is simple and fine method to to calculate the unknown resistor. I have been used two resistors, one of them is 1000(ohm) and second is unknown resistor. The second resistor is measured by using voltage divider rule.

Resistance: Resistance is a measure of the opposition to current flow in an electrical circuit. Resistance is measured in ohms, symbolized by the Greek letter omega (Ω). Ohms are named after Georg Simon Ohm (1784-1854), a German physicist who studied the relationship between voltage, current and resistance.

Voltage divider rule:The voltage divider rule is used to solve circuits to simplify the solution. Applying this rule can also solve simple circuits thoroughly The main concept of this voltage divider rule is “ The voltage is divided between two resistors which are connected in series in direct proportion to their resistance.

Step 1:

Components Required:

  1. Arduino-uno
  2. bread board
  3. resistances (1000, 220)
  4. connecting wire

Software Required:

  1. Arduino IDE
  2. Fritzing

Arduino Coding:

int analogPin= 0;
int raw= 0;

int Vin= 5;

float Vout= 0; // unknown voltage, we have to measure

float R1= 1000;

float R2= 0; // Unknown resistance, we have to measure

float buffer= 0;

void setup()




void loop()


raw= analogRead(analogPin);



buffer= raw * Vin;

Vout= (buffer)/1024.0;

buffer= (Vin/Vout) -1;

R2= R1 * buffer;

Serial.print("Vout: ");


Serial.print("R2: ");


delay(1000); // resistance value is measured per second

} }

Arduino Contest 2020

Participated in the
Arduino Contest 2020