# How to Make Arduino Ohm Meter

An ohmmeter is an electrical instrument used to measure the resistance of a component or in a circuit. Resistance is a measure of the opposition to current flow in an electrical circuit. The unit of electrical resistance is ohms and its symbol is Ω.so today we are going to make an ohm meter using Arduino below are the steps to build it.

#### Step 1 :

First we need to connect 16×2 LCD to Arduino, pin number 1, 5, 7, 8, 9, 10, and 16 of the LCD goes to ground and its pin number 2 and 15 to 5V supply of Arduino and pin number 4, 6, 11, 12, 13, 14 of the LCD goes to pin d2, d3, d4, d5, d6, d7 of Arduino respectively. Now we need to connect a 2.2 k resistor to pin number three of the LCD and ground to control the contrast of the LCD display, we can also use 10K trim pot for variable contrast control. Now we need to connect a 1k resistor to pin A0 of Arduino and ground. To test an unknown resistor, we need to connect is to pin A0 of Arduino and 5V pin of Arduino.

#### Step 2:

Now connect the Arduino to you PC and upload the code to Arduino

##### Arduino code
``````

#include <LiquidCrystal.h>
LiquidCrystal lcd(2,3,4,5,6,7);
int analogPin = 0;
int raw = 0;
int Vin = 5;
float Vout = 0;
float R1 = 973; // value of 1k resistor
float R2 = 0;
float buffer = 0;

void setup(){
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("   Ohm Meter   ");
}

void loop(){
if(raw==0){lcd.setCursor(0, 1);

lcd.print("      Open      ");}
if(raw){
buffer = raw * Vin;
Vout = (buffer)/1024.0;
buffer = (Vin/Vout) - 1;
R2 = R1 * buffer;
lcd.setCursor(3, 1);
if(R2>999.99){
lcd.print(R2/1000);
lcd.print("K Ohm   ");
}else{
lcd.setCursor(3, 1);
lcd.print(R2);
lcd.print(" Ohm   ");
}
delay(1000);
}
}
``````
##### Circuit Diagram: ...
##### Gerber Files ...
##### Arduino Code   