This is the 1st part of our LCR tutorial in which we are going to make an inductance meter. In the upcoming parts of this series, we will upload information and circuit diagrams of the capacitor and resistance meter.
Inductance meter:An inductance meter is used to measure the unknown inductor value. For more precision and accurate readings, we will use a microcontroller (Arduino) as the brain of the circuit.
Inductor meter idea:We usually need an inductor to make tank circuits while working with radio frequency, power circuits, and amplifiers. But we cannot measure the value of the inductor in our simple multimeter. So, either we can buy one or DIY (make). LCR meters are too expensive, that’s why we are making this inductor meter.
Components required:1) Arduino Uno
2) LM339 OP-AMP
3) 1N4007 diode
4) 150 ohm, 330ohm resistor
5) 16X2 LCD with I2C to reduce connections
6) 5V battery
7) 2x 100nF capacitors (non-polar)
8) Some jumper wires (if working with breadboard)
Circuit diagram:Circuit also has an OP-AMP; we are using LM339 due to its simplicity. Here, the Operation amplifier is used as a comparator, which measures the voltage at two instants and compares them. We will discuss the operational amplifier as a comparator at the end of this tutorial.
330ohm resistor is used as a pull-up resistor and connected to PIN 1 of the Lm339 to Arduino digital pin 11. 150ohm resistor is used after diode and further connected to digital pin 13 of the Arduino.
We are using here 104number (2pcs) capacitor 0.2uf (one of 100Nf). The value 2.E-7 can be changed if you are using a different value capacitor. In which value 2 represents the capacitance value (0.2uf).
We can change the op-amp to lm358, 741, or any other having the same configuration. But low noise operational amplifier is preferred more in this case.
DOWNLOAD CIRCUIT DIAGRAM AND GERBER CLICK HERE.
Code details:1) Initializing all the values and I/O Pins.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
double pulse, frequency, capacitance, inductance, inductance_mH;
void setup(){
lcd.init();
lcd.backlight();
Serial.begin(115200);
pinMode(11, INPUT); //Input from the comparator output
pinMode(13, OUTPUT);//output through a 150 ohm resistor to the LC circuit
Serial.println("HELLO SIR");
delay(1000);
Serial.println("Circuitkicker.com");
delay(2500);
2) Selecting the capacitance and measuring inductance with pulse function.
pulse = pulseIn(11, HIGH, 5000);//returns 0 if timeout
if(pulse > 0.1){ //if a timeout did not occur and it took a reading:
capacitance = 2.E-7; // <- insert value here
frequency = 1.E6/(2*pulse);
inductance = 1./(capacitance*frequency*frequency*4.*3.14159*3.14159);
inductance *= 1E6; //note that this is the same as saying inductance = inductance*1E6
inductance_mH = inductance/1000;
3) Conversion of values milli-henry and micro-henry (mH and uH).
inductance_mH = inductance/1000;
4) Printing the result through serial monitor.
//Serial print
Serial.print("High for uS:");
Serial.print( pulse );
Serial.print("\tfrequency Hz:");
Serial.print( frequency );
Serial.print("\tinductance uH:");
Serial.println( inductance );
delay(10);
5) Printing the result through 16X2 LCD.
//LCD print
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("uH Inductance mH");
lcd.setCursor(0, 1);
lcd.print(inductance);
lcd.setCursor(10, 1);
lcd.print(inductance_mH);
delay(10);
Arduino code://[code]
//Circuit and code is uploaded by Circuitkicker.com
//some important things:
// 1) If using Serial monitor to read the value of inductor then select 115200 boud.
// 2) Adjust the value by using fixed inductor by changing 2.E-7 line.
// 3) We will get acuurate readings because of many iteratations.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); //sometimes the address is not 0x3f. Change to 0x27 if it doesn't work.
//13 is the input to the circuit (connects to 150ohm resistor), 11 is the comparator/op-amp output.
double pulse, frequency, capacitance, inductance, inductance_mH;
void setup(){
lcd.init();
lcd.backlight();
Serial.begin(115200);
pinMode(11, INPUT); //Input from the comparator output
pinMode(13, OUTPUT);//output through a 150 ohm resistor to thr LC circuit
Serial.println("HELLO SIR");
delay(1000);
Serial.println("Circuitkicker.com");
delay(2500);
}
void loop(){
digitalWrite(13, HIGH);
delay(5);//give some time to charge inductor.
digitalWrite(13, LOW);
delayMicroseconds(100); //make sure resination is measured
pulse = pulseIn(11, HIGH, 5000);//returns 0 if timeout
if(pulse > 0.1){ //if a timeout did not occur and it took a reading:
capacitance = 2.E-7; // <- insert value here
frequency = 1.E6/(2*pulse);
inductance = 1./(capacitance*frequency*frequency*4.*3.14159*3.14159);
inductance *= 1E6; //note that this is the same as saying inductance = inductance*1E6
inductance_mH = inductance/1000;
//Serial print
Serial.print("High for uS:");
Serial.print( pulse );
Serial.print("\tfrequency Hz:");
Serial.print( frequency );
Serial.print("\tinductance uH:");
Serial.println( inductance );
delay(10);
//LCD print
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("uH Inductance mH");
lcd.setCursor(0, 1);
lcd.print(inductance);
lcd.setCursor(10, 1);
lcd.print(inductance_mH);
delay(10);
}
}
//[/code]
To Download I2C library:This library is essential to the circuit if we are connecting a 16X2 LCD. For this, we need an I2C module having an address (0x3f or 0x27). Most probably 0x27 address is used. Download the compatible drivers and files from here.
It helps to enter data serial wise so reduce the connections.
Range:This inductor meter is capable of measuring the small values like 1uH to significant values like 1Henery. Code is quite complex due to pulse rate function. But all type of Arduino is still able to handle this.
LM339 as a comparator:For more, subscribe to us on the YouTube channel and follow our Instagram page.
About JLCPCB:JLCPCB is the one of the most popular PCB makers. Price is just $2 for 2, 4 and 6 layer PCB. They just launched new purple solder mask, aluminum Pcb and 3d printing service in very low cost. Pcb quality is not compromised at any cost. Check them out right now from Here.https://jlcpcb.com/IAT
JLCPCB Is also providing new user coupons and sign-up rewards of up to $30. So, check them out from here. Register using this link to get Free PCB assembly service coupons. Get your 2layer to 6-layer PCB’s just in $2, stencil and PCB assembly service in just $7.
1) How to make Arduino Uno clone board. 2) Breadboard constant voltage power supply module.
Think you enjoy my work, stay tuned. Follow us on Instagram (sagar_saini_7294) and hackaday.
Comments