|
|
Arduino Nano R3 |
x 1 | |
|
|
LCD 128x64 dots with ST7565 driver chip |
x 1 |
|
arduino IDEArduino
|
|
|
Soldering Iron Kit |
How to make simplest possible autorange Capacitance meter
The capacity measurement option is usually only available in more expensive multimeters, so it is desirable to make such an instrument ourselves, especially if it is very simple to make and inexpensive.
Exactly these conditions are fulfilled in the instrument described below. The measured value is displayed on a large readable display, and its measuring range is from 1 pF to 99 µF which are actually the most frequently used values.
The fact that only two components are needed to make this capacitance meter is almost unbelievable, namely an Microcontroller board and an LCD display.

I specifically in this case use an Arduino Nano microcontroller board, and LCD Dispaly 128x64 dots with ST7565 driver chip.

This project is sponsored by PCBWay. They has all the services you need to create your project at the best price, whether is a scool project, or complex professional project. On PCBWay you can share your experiences, or get inspiration for your next project. They also provide completed Surface mount SMT PCB assemblY service at a best price, and ISO9001 quality control. Visit pcbway.com for more services.

The measurement is performed in such a way that the measured capacitor is charged with current from the PULLUP resistor from the microprocessor input, and the required charging time is measured. The capacitor whose value we need to measure is connected to one analog and one digital pin of the microcontroller, and if it is a polarized capacitor, the positive pole is connected to the first defined pin in the code. The simplicity of this device is due to the excellent "capacitor" Arduino library that is made specifically, for this purpose and you can download it directly from the author's GitHub page.

Now let's see how this useful instrument works in real conditions. For this purpose I will use capacitors of different types and with different values. At first, the display shows a capacitance of about 1 pF which is actually the capacitance between the wires and the connectors, which is minimal and does not affect measurements

As you can see from the presentation, the accuracy and speed of measurement are satisfactory. As you can see from the presentation, the accuracy and speed of measurement are satisfactory.
And finally a short conclusion. This is the simplest possible stand-alone capacitance meter that you can make using only two electronic components. Even simpler, if you use the device on your desktop, you only need the microcontroller, and you can read the results on the serial monitor from the Arduino IDE application on the PC. Of course, it is advisable to embed the device in a suitable box with plugins, so that you can make measurements more easily.

#include <U8g2lib.h>
#include <Capacitor.h>
U8G2_ST7565_ERC12864_1_4W_SW_SPI u8g2 ( U8G2_R0, /* scl=*/ 13 , /* si=*/ 11 , /* cs=*/ 10 , /* rs=*/ 9 , /* rse=*/ 8 ) ;
Capacitor cap1(7,A2);
int X1,C; //resistance value
byte f_ic, xp;
char R1_str[3];
char R_str[4];
float tau1;
unsigned long T1, T2, tau;
void setup() {
Serial.begin(9600);
u8g2.begin();
u8g2.setContrast(35);
}
void loop() {
// Serial.println(cap1.Measure()); // Measure the capacitance (in pF), print to Serial Monitor
// delay(1000); // Wait for 1 second, then repeat
Pomiar_C();
}
void Pomiar_C(){
Cyfry();
char C_str[4];
sprintf(C_str,"%d", X1);
u8g2.firstPage();
do {
u8g2.drawFrame(0,0,128,64);
u8g2.drawRFrame(2,2,124,60,3);
u8g2.setFont(u8g2_font_10x20_tr);
u8g2.drawStr(20, 18, "Capacity:");
if (f_ic > 6) {
u8g2.setFont(u8g2_font_fub25_t_symbol);
u8g2.drawGlyph(80,52,956); //symbol u
}
u8g2.setFont(u8g2_font_fub25_tr);
u8g2.drawStr(xp, 52, C_str);
if (f_ic < 7) {u8g2.drawStr(76, 52, "n");}
if (f_ic < 4) {u8g2.drawStr(76, 52, "p");}
u8g2.drawStr(100, 52, "F");
if (f_ic == 1 or f_ic == 4 or f_ic == 7) {
u8g2.drawStr(28, 52, ".");
u8g2.drawStr(40, 52, R1_str);
}
} while ( u8g2.nextPage() );
delay(500);
}
void Cyfry(){
// if (P1 == LOW) {tau1 = tau/2.329;}
// if (P2 == LOW) {tau1 = tau/350;}
// if (P3 == LOW) {tau1 = cap1.Measure();}
tau1 = cap1.Measure();
//obliczenie ilości cyfr wartości
if (tau1 >= 1 && tau1 <10) {
X1 = tau1;
int X2 = 10 * (tau1 - X1);
sprintf(R1_str,"%d", X2);
f_ic = 1;
xp = 10;
}
if (tau1 >= 10 && tau1 <100) {
X1 = tau1;
f_ic = 2;
xp = 32;
}
if (tau1 >= 100 && tau1 <1000) {
X1 = tau1;
f_ic = 3;
xp = 10;
}
if (tau1/1000 >= 1 && tau1/1000 <10) {
X1 = int(tau1/1000);
f_ic = 4;
xp = 10;
int X2 = 10 * (tau1/1000 - X1);
sprintf(R1_str,"%d", X2);
}
if (tau1/10000 >= 1 && tau1/10000 <10) {
X1 = int(tau1/1000);
f_ic = 5;
xp = 32;
}
if (tau1/100000 >= 1 && tau1/100000 <10) {
X1 = int(tau1/1000);
f_ic = 6;
xp = 10;
}
if (tau1/1000000 >= 1 && tau1/1000000 <10) {
X1 = int(tau1/1000000);
f_ic = 7;
xp = 10;
int X2 = 10 * (tau1/1000000 - X1);
sprintf(R1_str,"%d", X2);
}
if (tau1/10000000 >= 1 && tau1/10000000 <10) {
X1 = int(tau1/1000000);
f_ic = 8;
xp = 30;
}
}
How to make simplest possible autorange Capacitance meter
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
-
Arduino 3D Printed self Balancing Cube
Self-balancing devices are electronic devices that use sensors and motors to keep themselves balanc...
-
DIY ESP32 Universal Timer with Touchscreen & Rotary Encoder
In several of my previous videos, I presented different projects based on the CrowPanel 2.1-inch HM...
-
Build a Real 5-Band Parametric EQ with ESP32 + WM8960 - Stereo DSP Audio Processor
Audio equalizer (EQ) is an electronic device that allows control over the strength of different fre...
-
Bass Reflex vs Sealed vs Horn – Same 2 inch Speaker Test
In one of the previous videos I presented the making of a miniature Horn type speaker box with a 2 ...
-
Building a Mini Fostex Horn Speaker with a 2-Inch Full-Range Driver
A back-loaded horn speaker is a loudspeaker design that channels the rear sound wave of a driver th...
-
ESP32 Moon Lamp That Shows the Real Moon Phase on Crowpanel Round Dispaly
Recently on the Hackaday portal I came across a very interesting project called Moon Display by aut...
-
40-Year-Old DIY Power Amplifiers – Do They Still Work - 500W MOSFET & Transistor Amps
This time I want to describe my two DIY super powerful audio amplifiers that I made about 40 years ...
-
Wi-Fi HaLow Explained! Long-Range Camera Test up to 300m (ESP32 + ThinkNode G4 from ELECROW)
I recently needed to install a security camera at a relatively large distance from my home, more pre...
-
Simple Object Recognition with the UNIHIKER K10 – No TensorFlow, No Internet, No Cloud AI
Object recognition has become one of the most popular applications of artificial intelligence and em...
-
DIY PCL82 Tube Amplifier, Single-Ended Amp with Amazing Sound
The idea for this project came from a local electronics magazine called EMITER, issue 12/13 from 20...
-
Simple MCP2036 SDR Radio - The Most Unusual Software Defined Radio
SDR (Software Defined Radio) is a radio communication system where many of the key electronic compo...
-
Elecrow All-in-One Arduino Starter Kit Review - 20 Projects & 16 Modules
This time I will describe a simple and practical way to enter the world of microcontrollers, specif...
-
ESP32-C3 Color Detector with TCS34725, Real-Time RGB Detection & Web Interface
Color detection is a fundamental task in many embedded systems – from industrial sorting machines t...
-
DIY ESP32 Telegram Flood Protection System - Smart Home Automation
Recently I had an unpleasant experience in my home, specifically my ground floor was flooded as a r...
-
Real-Time Air Traffic Radar using ESP32 + ADS-B Data
ADS-B, which stands for Automatic Dependent Surveillance-Broadcast, is the modern standard for trac...
-
DIY Green Laser Night Sky Object Finder - Find Stars & Galaxies Instantly with great accuracy
As an amateur astronomer, especially at the beginning, the most difficult part of observing the nig...
-
DIY Avionics Simulator with ESP32 - Artificial Horizon, Compass & Altimeter
The inspiration for this project comes from classical aircraft cockpit instruments used for navigat...
-
DIY Miniature X-Ray Machine using a TV Vacuum Tube DY86
An X-ray machine (or radiograph) is a quick, painless medical test that produces images of the struc...
-
Émetteur Récepteur Optique Expérimental (communication UART ATtiny + fibre optique)
142 0 1 -
SmallOLED - Live PC Stats, Animated Clocks & Audio Visualizer
991 0 3 -
"Talking Multimeter": Arduino-Based Speech Add-on for Multimeters with SCPI Protocol
569 0 1 -
Programmable Mist Maker - XIAO / QT PY Extension
3041 2 3 -
RadioHAT - Raspberry Pi radio development platform
2585 0 4 -
QWIIC-VL53L4CD Time-of-Flight Distance Sensor Module
2810 0 2 -
-







