Autoranging capacitance meter with LCD display

 Author:   Posted on:    4 comments

A capacitance meter is an useful test gear. And since my multimeter is too crappy to get a constant reading, I decided to make my own meter, especially for large capacitances. With an Arduino development board, a display and some resistors, the capacitance meter was almost built. It needed proper software to charge and discharge the capacitor, then measure time constant and compute capacitance. A capacitor's value can be determined by placing it either into an L-C oscillator and measuring frequency, either in R-C circuit and measuring time constant. While the first method requires some additional parts and it is difficult in terms of software, it is able to measure small capacitances and also inductors (by using a known value capacitor and calculating the inductor).

This project uses the second method, with RC circuit. If a voltage is applied to a series resistor - capacitor circuit, the latter tends to reach supply voltage at its pins (it charges). The charging needs a time dependant on series resistor and capacitor value. It should be noted that the capacitor draws current as it modifies the voltage across its pins. The following circuit performs both charging and discharging of capacitors. However, measurements are performed only during charging. The discharge function allows Arduino to make multiple measurements of the same capacitor without taking it out of this circuit.

Autoranging capacitance meter with LCD display

Capacitance meter wired on the breadboard

Alarm clock with DS1302 RTC

 Author:   Posted on:    No comments

DS1302 is a timekeeping chip with battery backup and general purpose RAM. It has been replaced by newer variants like DS1307 or DS3231 which have improved accuracy. The newer ones have I2C interface, but DS1302 does not. It communicates with the host using a serial protocol that resembles SPI. Since I had a module with this chip, I decided to build and test an alarm clock. I added an Arduino, the alphanumeric LCD, an active buzzer and some buttons.

There are some great advantages when using an RTC (real time clock) module in your project. You don't have to do timekeeping in your code (if you read my previous post, you can see it's not quite easy) and, very important, time keeping is performed from backup battery when your development board is not powered. This means you don't have to set date everytime you plug in the Arduino. The advantage is obvious for projects that depend on accurate time to operate correctly.

Arduino alarm clock with DS1302 RTC module

Drive the multiplexed 4 digit 7-segment display

 Author:   Posted on:    No comments

Seven segment displays are widely used in clocks, meters and other devices that need to display numerical information. The elements of the display, which are usually made from LEDs, are lit in different combinations to represent Arabic numerals. They have a limited ability to display some characters because there are only 7 elements that compose the shape of the displayed figure. Seven segment displays are very easy to find and are the cheapest display type.

In the previous post I talked about the electrical connections of such displays and how they should be interfaced to a microcontroller (MCU). A 7-segment display requires current limiting resistors on each segment and transistor drivers for each digit. This time I will identify the pins of an unmarked display device, I will wire it on the breadboard to an Arduino Nano compatible board and I’ll attempt to write the software to drive it.

Drive the multiplexed 4 digit 7-segment display

Proper wiring of a 4 digit 7-segment display

 Author:   Posted on:    No comments

Seven segment displays are widely used in clocks, meters and other devices that need to display numerical information. The elements of the display, which are usually made from LEDs, are lit in different combinations to represent Arabic numerals. They have a limited ability to display some characters because there are only 7 elements that compose the shape of the displayed figure.

Seven segment displays are very easy to find and are the cheapest display type. Nowadays, modules with such displays do exist, where a display of 4, 8 and even more digits are driven by an integrated circuit. This driver gets the digits to be displayed from a microcontroller (MCU) via a serial bus. This saves a lot of pins and makes programming easy since all modern MCUs have support for the common serial protocols. Examples of such ICs are MAX7219, TM1637 and TM1638. The latter two come with support for keypad, therefore you can build front panels with buttons and display using such ICs.

Proper wiring of a 4 digit 7-segment display