@tutorial: Arduino multimeter - Resistence meter

We will build a multimeter step by step. We will see all the parts separately and finally we'll join everything together. First we will build a simple ohm meter using a very very simple configurantion for the arduino.

External Link: https://electronoobs.com/eng_arduino_tut10.php

by: ELECTRONOOBS on 2026-05-26

So we will use a basic voltage divider to calculate the resistence. As we know, a voltage divider is made of two resistences (R1 and R2) in series. The output voltage in the middle point is [R2/(R1+R2)]Vin. Using this formula and knowing the value of one of the two resistors and measuring the Vout it is very easy to calculate the resistence of the seacond resistor.

We know that the Vin will be 5 volts from the arduino.We also know that R2 is 1k ohms. We can measure Vout with one of the Arduino's analog inputs like for example pin A0. With all this 3 values we can now calculate the unknown value of the resistor R1. So like this we've made ourselves a resistance meter. But the problem is the precision. With R2=1k ohms we are able to measure resistance from 0 to 1k ohms with quite good precision. But to measure a higher resistence we have to change the value of R2. We will use R2=2k to measure resistors with values between 0 and 2k, R2=20k for values between 2K and 20k and R2=200k for vaues between 20k and 200k and finally R2=1M to measure valeus between 200k and 1M ohms. To change the scale for R2 we could use a rotary switch where each of the 4 pins represents a different value of resistance as we can see in the schematic below.

Ok so we want to measure the resistance of the unknown resistor. So we connect digital pin D2 to it and when coding we switch it to OUTPUT HIGH or INPUT in order to apply 5V or high impedance when needed. Using a roraty switch we could change scale. Remember to put some pulldowns to the rotary switch pins. We connect 5V to the middle pin of the rotary switch and 4 of the pins to digital pins D9, D10, D11 and D12. When D9 is high we will be in 0 to 2k ohm scale. So we set D2 to high to have 5 volts at the unknown resistor and set D5 as OUTPUT and LOW state. We have to set D3, D4, D6 as INPUTS in order to make the pins have high impedance so no current will flow thrw those other 3 resistors. When we change the scale all we need to do is change one of the others pins as OUTPUT with LOW state and set the others as INPUTS. Copy the code below and upload it to your Arduino. I've used Arduino UNO but you could use any type of Arduino. First, in order to use the LCD screen with i2c comunication, you have to install the i2c Lyquid Crystal library to your Arduino IDE.

Now, open the serial monitor or connect the LCD screen and put in the unknown value resistor.

Leave a comment

Please login in order to comment.

Comments

ADVERTISERS
ADVERTISERS
PCBWAY