Digital Capacitive Meter using Arduino and I2C LCD in proteus

Digital Capacitive Meter using Arduino and I2C LCD in proteus

In this article we will learn how to interface arduino with Digital Capacitive Meter & I2C LCD in proteus.
In the last post we will learn how to interface arduino with Joy stick and LEDs in proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.

Components which we use in this project are listed below:

  1. Arduino UNO
  2. I2C
  3. LCD display
  4. Capacitor (200 uf)
  5. Resistor (10k)
  6. Connecting wires

Diagram of this project is below:

Digital Capacitive Meter using Arduino and I2C LCD in proteus
Digital Capacitive Meter using Arduino and I2C LCD in proteus

Construction of Digital Capacitive Meter using Arduino and I2C LCD in proteus:

  • Connect the pin 8 of Arduino with the one side of R1
  • Connect the pin 9 of Arduino with the one side of R2
  • Connect the –ve side of Capacitor with the GND
  • Connect the +ve side of Capacitor with the pin A0 of Arduino through the other sides of R1 & R2
  • Connect A4 pin of arduino with the 15 pin of I2C
  • Connect A5 pin of arduino with the 14 pin of the I2C
  • Connect P0 pin of I2C with the RS point of LCD display
  • Connect P1 pin of I2C with the RW point of LCD display
  • Connect P2 pin of I2C with the E point of LCD display
  • Connect P3 pin of I2C with the D3 point of LCD display
  • Connect the P4 pin of I2C with the D4 point of LCD display
  • Connect the P5 pin of I2C with the D5 point of LCD display
  • Connect the P6 pin of I2C with the D6 point of LCD display
  • Connect the P7 pin of I2C with the D7 point of LCD display
  • Connect VSS point of LCD with the GND point of I2C
  • Connect the VDD point of LCD with the GND

Working of Digital Capacitive Meter using Arduino and I2C LCD in proteus:

A digital capacitive meter using Arduino and an I2C LCD can be built to measure the capacitance of a capacitor or any other capacitive sensor. Capacitance is a property of capacitors that determines their ability to store electrical charge. In this project, we’ll use Arduino and an I2C LCD to display the capacitance value of the connected capacitor.

Applications of Digital Capacitive Meter using Arduino and I2C LCD in proteus:

  1. Component Testing
  2. Quality Control
  3. Education
  4. Repair and Troubleshooting
  5. DIY Electronics Projects

Advantages of Digital Capacitive Meter using Arduino and I2C LCD in proteus:

  1. Cost-Effective
  2. Customization
  3. Easy-to-Read Display
  4. User-Friendly Interface
  5. Portability

Program code of this project is below:

///www.projectiot123.com

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x20, 16, 2);

 

int R1 = 8;// Define pin8 for Resistor-1

int R2 = 9;//Define pin8 for Resistor-2

int analogPin = A0;// Analog pin read potential at cap

unsigned long start_timer = 0;

unsigned long stop_timer = 0;

unsigned long duration = 0;

float voltage = 3;

float Capacitance = 0.0;

int solution (void);

void setup()

{

Serial.begin(9600);

lcd.init();

lcd.backlight();

 

lcd.begin(16, 2);

 

lcd.print(” Measurment”);

lcd.setCursor(0, 1);

lcd.print(“of capacitor “);

pinMode(R2, INPUT);

pinMode(R1, OUTPUT);

digitalWrite(R1, HIGH);

}

//1021 1022 1023

void loop()

{

while (solution() >= 1010 && solution() <= 1030)

{

lcd.clear();

lcd.setCursor(0, 1);

lcd.print(“place capacitor “);

delay(200);

lcd.setCursor(0, 1);

lcd.print(”                “);

delay(200);

}

delay(2000);

lcd.setCursor(0, 1);

lcd.print(”                “);

while (1)

{

lcd.clear();

pinMode(R1, INPUT);

pinMode(R2, OUTPUT);

digitalWrite(R2, LOW);

lcd.setCursor(0, 1);

lcd.print(“Discharging-“);//12

while (voltage > 2.0)

{

voltage = solution();

delay(100);

lcd.setCursor(12, 1);

Capacitance = voltage * (99.0 / 1023.0); // Calculate Capacitance

lcd.print((99 – Capacitance), 0);

lcd.setCursor(14, 1);

lcd.print(“%”);

}

 

lcd.setCursor(0, 1);

lcd.print(”                “);

delay(1000);

lcd.setCursor(0, 1);

lcd.print(“charging-“);//9

lcd.setCursor(13, 1);

lcd.print(“%”);

pinMode(R2, INPUT);

pinMode(R1, OUTPUT);

digitalWrite(R1, HIGH);

start_timer = micros();

 

while (solution() < 648)

{

lcd.setCursor(9, 1);

lcd.print(solution() * (100.0 / 1023.0), 1);

}

 

stop_timer = micros();

duration = stop_timer – start_timer;

Capacitance = duration / 10000;

lcd.clear();

// lcd.setCursor(0,1);

// lcd.print(”                “);

lcd.setCursor(0, 0);

lcd.print(“value = “);

lcd.print(Capacitance);

lcd.print(“uF”);

delay(3000);

while (1)

{

lcd.setCursor(0, 1);

lcd.print(”   Restart  “);

delay(200);

lcd.setCursor(0, 1);

lcd.print(”                “);

delay(200);

}

 

}

}

///www.projectiot123.com

int solution (void)

{

int value;

value = analogRead(analogPin);

return value;

}