Introduction: Arduino Inductance/Capacitance/Resistance Meter

Picture of Arduino Inductance/Capacitance/Resistance Meter

Hello such friends, will show you how to create a measuring inductance, capacitance and resistance using Arduino most commonly the ATmega328P, all programming is thrown into Arduino and components commonly found in our laboratory and will also be very cheap to do so, this meter measures pF to nF and also measuring uH and mH, as well as use a 7805 regulator can be powered from 24V to 6V, I used a 9V battery

Step 1: Material

Picture of Material

This is the material to be used.

IC ATMEGA 328P (Arduino UNO / Duemilanove)



Regulatory L7805CV

LCD 16X2

Crystal 16MHz




2 x 22pF

Polyester 1uF


10K potentiometer

7 x 10K

2 x 220 Ohm

1 M

150 Ohm

330 Ohm




Terminal Block 2 pin

4 x MOLEX 100 spent 2 pin

4 pin MOLEX spent 100

4 x Borne

2 x switch

2 x push button chasis

Step 2: Code and Performance

Picture of Code and Performance

As three functions measuring bone capacitance, inductance and resistance, we must choose we want to do, to choose the function and use 2 bits can count 0-0,0-1,1-0,1-1.

So we use two switch to choose, making them function as a dip switch using them as pull down, to measure inductance is 0-0, 0-1 for capacitance, resistance to 1-0, that's how we choose to measure.

To measure inductance use the LM393 comparator to measure the capacitance the LM741, and to measure resistances easily use a 10k resistor and make a voltage divider.

Suppose we want to calculate R1. We know that R2 has a value of 10k, we know that Vin has a value of 5V (which we usually find in the Arduino environment) and that reading on an analog Vout pin of Arduino is 750.

1.- We know that the resolution of the ADC Arduino is 10 bits, which means that 1024 is possible divisions (2 raised to 10) for an input value between 0V and 5V. So if we put 5V on an analog pin, its value will be 1023 (1024 will not remember that starts counting at 0, not 1); if we put 0V on pin, its value will be 0 and if for example we 2.5V its value will be 511.

Therefore, if the value that gives the reading analog pin in its digital value is 750, we can calculate the Vout, the output voltage of the voltage divider.

>> 5V / 1024 divisions = 0,00488V / division

>> 0.00488 volts / division • 750 divisions = 3.66V

2.-We can already clear R1, that was the question:

>> Vout = (R2 / R1 + R2) • Vin

>> 3.66 V = (10k / R1 + 10k) • 5V

>> R1 + 10k = 10k • 5V / 3.66V

>> R1 = (10k • 5V / 3.66V) - 10k = 3.66KΩ

In general, we can calculate the value of R1 as:

>> R1 = (R2 • Vin / Vout) - R2

The same code is in Spanish documentation, so if you have any questions please say so:

#include LiquidCrystal lcd(13, 8, 7, 5, 4, 2);

#define R_1 A1
#define R_2 A2
#define IND_1 6
#define IND_2 12
#define fuente_pin 11
#define switch_pin 10
#define descarga_pin 9

#define PIN_1 A3
#define PIN_2 A4

//Variables leer pines
int pin_1;
int pin_2;

//Variables para inductometro
double pulso;
double frecuencia;
double capacitancia;
double inductancia;

float R = 1.0e6;
float C = 0;
float RC = 0;
long t_inicio = 0;
volatile long t_alto = 0;
long T = 0;
float VCC = 4.50;
float Vref = VCC / 2;
float V0 = 0;
float error_correccion = 40.;
int retardo_delay = 20;

//Variables resistometro
int vR_1 = 0;
int vR_2 = 0;
float Vin = 5;
float Vout = 0;
float Res_1 = 10000;
float Res_2 = 9000000;
float r_1 = 0;
float r_2 = 0;
float Resistor_1[8];
float Resistor_2[5];
float ResArreglo_1;
float ResArreglo_2;

void setup() {
lcd.begin(16, 2);

//Configuracion de pines
pinMode(PIN_1, INPUT);
pinMode(PIN_2, INPUT);
//Configuracion Inductometro
pinMode(IND_1, INPUT);
pinMode(IND_2, OUTPUT);
capacitancia = 0.000001021;
//Configuracion de Resistometro
pinMode(R_1, INPUT);
pinMode(R_2, INPUT);

//Configuracion Capacimetro
attachInterrupt(1, stop, RISING);
Vref = VCC / 2;
pinMode(fuente_pin, OUTPUT);
digitalWrite(fuente_pin, LOW);
pinMode(switch_pin, INPUT);
pinMode(descarga_pin, INPUT);

void loop() {

if (pin_1 == LOW && pin_2 == LOW) {
digitalWrite(IND_2, HIGH);
digitalWrite(IND_2, LOW);


pulso = pulseIn(IND_1, HIGH, 5000);
if (pulso > 0.1) {
frecuencia = 1.E6 / (2 * pulso);
inductancia = 1. / (capacitancia * frecuencia * frecuencia * 4.*3.1459 * 3.14159);
inductancia *= 1E6;

lcd.setCursor(2, 0);
if (inductancia >= 1000) {
lcd.setCursor(0, 1);
int valor = (inductancia / 1000) - 0.5;
lcd.setCursor(6, 1);
} else {
lcd.setCursor(0, 1);
int valor_2 = inductancia + 10;
lcd.setCursor(6, 1);
} else if (pulso < 0.1) {
lcd.setCursor(2, 0);
lcd.print("INSERTAR IND");
delay(300); } if (pin_1 == LOW && pin_2 == HIGH) {
for (int i = 0 ; i <= 7; i++) {
Resistor_1[i] = analogRead(R_1);
ResArreglo_1 = ResArreglo_1 + Resistor_1[i];
vR_1 = (ResArreglo_1 / 8.0);
Vout = (Vin * vR_1) / 1023;
r_1 = Res_1 * (1 / ((Vin / Vout) - 1));
lcd.setCursor(2, 0);
if (r_1 <= 999) {
lcd.setCursor(0, 1);
lcd.setCursor(9, 1);
} else if (r_1 >= 1000) {
r_1 = r_1 / 1000;
lcd.setCursor(0, 1);
lcd.setCursor(9, 1);
ResArreglo_1 = 0;
} if (pin_1 == HIGH && pin_2 == LOW) {
if (debounce(switch_pin) == LOW)
pinMode(descarga_pin, OUTPUT);
digitalWrite(descarga_pin, LOW);
pinMode(descarga_pin, INPUT);
digitalWrite(fuente_pin, HIGH);
t_inicio = micros(); } if (t_alto > 0 && t_inicio > 0 && (t_alto - t_inicio) > 0 )
T = (t_alto - t_inicio);
RC = -T / log((Vref - VCC) / (V0 - VCC));
//Vref = VCC/2
//V0 = 0V
C = RC / R; //Valor en uF

lcd.setCursor(0, 0);
lcd.setCursor(3, 0);
lcd.print(C * 1000, 1);
lcd.setCursor(13, 0);
lcd.setCursor(0, 1);
lcd.setCursor(3, 1);
lcd.print(C * 1000000 - error_correccion , 0);
lcd.setCursor(13, 1);
lcd.print("pF"); t_inicio = 0;
t_alto = 0; digitalWrite(fuente_pin, LOW);
}void leerpines() {
pin_1 = digitalRead(PIN_1);
pin_2 = digitalRead(PIN_2);
}void stop()
t_alto = micros();
}int debounce(int pin)
int estado;
int previo_estado;
previo_estado = digitalRead(pin);
for (int i = 0; i < retardo_delay; i++)
estado = digitalRead(pin);
if ( estado != previo_estado)
i = 0;
previo_estado = estado;
return estado;

Step 3: Circuit, Schematic and Pcb

Picture of Circuit, Schematic and Pcb

Here you can see how everything is connected in the schematic, I upload files made with EAGLE.

Hope you find it helpful, any questions or comments let him know, greetings.


lean04 (author)2015-07-21

very nice instructable, i´ll try to make it soon.

A few questions though: why do you assign 4.5V to VCC, for what i understood the voltage is 5V (is the "factor de correción" for that?).

Another is that you define R_2 with pin A2 but i don't see it connected in the schematic.., similar thing with A0 in the inductance part of the schematic.

I would thank if you could please explain how to operate this meter, i don't quite understand the function of the "pulsador" (hablo español, no me refiero a la traducción sino a para que se utiliza)

El LM393 puede ser reemplazado por el LM358?

Muy buen proyecto.


Lucman67 (author)lean042016-10-27


how you solved those questions?

finally, did you make the LC meter?

abubakarengr (author)Lucman672017-09-02

Pls send me circuit for lc meter pls to my email is

lean04 (author)Lucman672016-10-30

not yet, i didn't have time. I'll try to do it in the next few months

Hola amigo que bueno que hablas español, lo del voltaje si fue como corrección pero puedes cambiarlo a 5V, pero a mi parecer da mejor los valores el LM393 es un comparador de voltaje puedes usar otro pero de las mismas características, este sirve para medir la inductancia, haciendo los cálculos con la frecuencia, y lo de la resistencia como explique para medir la otra resistencia tenemos que hacer un divisor de voltaje, y el pulsador sirve para mostrar y calcular la capacitancia

hola, gracias por la respuesta. Si utilizo el LM311, hay que cambiar algún valor en el código?

Puedes probar, como solo se usa el comparador derecho del lm393, y el lm311 solo tiene uno, puedes probar y ver que resultados te arroja, y no hay que cambiar nada

Lucman67 made it! (author)2017-08-29


Thank you very much, Misael for this project, and RazvanD for advices!

The only problem: the real value of inductance it's with 27uH lower than on display!

Anyway, many thank'S again!

Misael for the project, and RazvanD for advices

I tell you that an inductor will not always be accurate, it depends on the tolerance

Of course, you're right!


WilyC1 (author)2017-08-02

amigo la programación me manda muchos errores me puedes ayudara resolverlo porfa

Que errores, pon captura de la error

jolealca (author)2017-07-18

Thanks Misael

for this great instructable the tester works perfectly

jolealca made it! (author)2017-06-09

Saludos Misael

Me da pena molestarte pero definitivamente no he podido resolver este problemita, me le medi a realizar tu maravilloso proyecto pero solo me lee resistencias,no me aparece capacitancia ni inductancia, he revisado punto por punto pero no encuentro nada POR FAVOR AYUDA URGENTE.

I'm sorry to bother you but i have not been able to solve this problem, i
decided to make your wonderful project but i only read resistance,don't appears
capacitance or inductance, i checked point by point, but I do not find anything

Te falta seleccionar para que puedas medir capacitores e inductores

MauriceN6 (author)2017-04-20


Where should the resistor socket be connected to please ? The code uses A1 and A2 but A1 is already used and A2 isn't mentioned in the schematics.

Connects to A1

Thanks :)

RazvanD made it! (author)2017-01-27

Hi, I just want to say thanks for this great instructable. I just finished building it. It is working very good.

In Arduino code #define IND_2 12 is not in concordance with the schematic diagram. I modified it to #define IND_2 14 and it is working great.

Thanks again.

QuốcC1 (author)RazvanD2017-02-03

Hi RazvanD !!! Can you tell me, how many H is the maximum that can be measured, and with a coil impedance about 3Kohm, can it measure ?
Thank you so much :)

It's great, but I'll say the code is correct, but in the diagram if I'm wrong and do not connect pin 12, the PCB you can see that if it's connected, in the diagram it's like A0 but it's actually pin 12

Hi, in my case I used optiloader as a bootloader and made my chip like Arduino Uno, where A0 is pin 14 (in software ) and actualy hardware pin 23 on the chip ( atmega 328P ).

manishag14 (author)2017-01-17

I am making LCR meter as college project and I am getting difficulty in interpreting connections. do you have proper circuit diagram of showing all connections. I'll be glad to know your reply which would help me alot.

What is the problem you have ?, everything is in the post, the files are at the end of this

manjunatharas (author)2016-11-03

How to download the full details of lcr meter

Everything is in the post at the end are the files

AshokB18 (author)2016-09-22


I dont have Eagle software and unable to open the schema/circuit of the LCR meter. Can you upload a pdf

gustavio101 (author)AshokB182016-12-04

Here's a picture found in this instructable as well..

gustavio101 (author)gustavio1012016-12-04

Same picture with higher resolution.

gustavio101 (author)AshokB182016-12-04

Here's a link to Eagle, it's free to download and use. The most limitation you will have is the board size. In the free version you will be limited to a certain PCB size (80x100 mm i think).

jtome (author)2016-09-28

Hola, vi que hablas español asi que te hablare en español, es posible medir mayores capacidades? o menores inductancias? gracias

Sonal More (author)2016-08-28

what is the use of crystal oscillator, diode 1N4004 in the lcr meter?

and also the use of 4-5 capacitors as well as resistors?

The use of crystal is to function arduino off the plate and the diode is for polarity reversal protection

Sonal More (author)2016-08-28

U have not mentioned about how to measure capacitance and inductance please guide us. We are really interested in your fantastic project

About This Instructable




Bio: Student of Computer Science, Faculty of Sciences, National Autonomous University of Mexico, I like mechatronics and robotics and programming course, my favorite food is pizza ... More »
More by Misael Saenz Flores:Arduino Inductance/Capacitance/Resistance MeterPic Programmer USB[Tutorial]Controlar Brazo Mecanico K-680 con el MSP430G2 y L293D
Add instructable to: