Skip to content

Simplified Version of 555 Timer for Capacitance Meter. Built in Parallel to Resistance Meter.

Notifications You must be signed in to change notification settings

Dipto9999/Capacitance_and_Resistance_Meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capacitance and Resistance Meter

Contents

Overview

We implemented a simplified version of the 555 Timer to measure capacitance on an EFM8LB81 (8051 family) microcontroller, followed by an improved version on the STM32 (ARM Cortex M0 family) microcontroller. We also built a resistance meter in parallel to the main circuit.


We have attached here the circuit of interest for V1 of this meter using the EFM8 microcontroller.

Firmware

The firmware was developed in the C programming language. We are using a Makefile to compile main.c and flash the program onto the respective microcontroller.

Capacitance Meter

We are using the 555 Timer circuit in its astable mode to generate a square wave. We measure the number of clock cycles for an entire wavelength and use this to calculate the period of the generated signal.


We use the formula with the designed $R_A = R_B = 1.5\text{ k}\Omega$ resistances to calculate the capacitance seen by the meter.

$$ f = \frac{1}{T} = \frac{1.44}{(R_A + 2R_B)C} $$

Resistance Meter

We are using a voltage divider comprised of a known $R_{REF} = 98.62\text{ k} \Omega$ and an unknown resistance. We measure the input pin voltage with an ADC to determine the current and resistance.

$$ R = \frac{V_{Pin}}{I},\text{ where }I = \frac{V_{SS} - V_{Pin}}{R_{REF}} $$

Versions

V1 was built using the EFM8LB81 microcontroller, whereas V2 of this meter was built using the STM32 microcontroller. In this improved version, we have the ability to switch between capacitances with hardware pushbuttons.

The firmware source code was adapted for the ARM Cortex M0 family. The timers, ADC, LCD initialization and functions were modified for this in main.c.

Tkinter App

We developed a Python application with a Tkinter user interface to display the incoming data stream of the 555 Timer frequency (Note that $f = \frac{1}{T}$.)


This app also has an embedded calculator with the actual capacitance and resistances used in the Capacitance Meter. We used this to display the expected values and validate it with the incoming data. Test data was saved to .csv files in the Logbook directory.

Demonstration

We have uploaded our Final Demo on Youtube and have embedded a low resolution compressed version below.

Capacitance_Resistance_Meter_Demo.mp4

Credit

This was completed as part of the ELEC 291 - Design Studio project course in the The University of British Columbia Electrical and Computer Engineering undergraduate program. We received tremendous support and guidance from Dr. Jesus Calvino-Fraga.

Policy

We have read and understood the plagiarism policies at https://ece.ubc.ca/graduate/policies-and-procedures/student-responsibilitiesdeclaration/ and we understand that no excuse for plagiarism will be accepted.

About

Simplified Version of 555 Timer for Capacitance Meter. Built in Parallel to Resistance Meter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published