AVR LC Meter With Frequency Measurement

Not rated 6,276

Circuit Image

An LC meter is being constructed due to the absence of a multimeter capable of measuring inductance. Although the available multimeters can measure capacitance, they lack accuracy for small capacitance values in the range of several picofarads (pF). While there are several articles detailing the construction of LC meters using PIC microcontrollers, instructions for building one with an ATmega microcontroller are limited. This article outlines the process of building an LC meter using an ATmega328P chip and Arduino libraries. A typical LC meter operates as a wide-range LC oscillator, where the addition of inductance or capacitance alters the oscillator's output frequency. By calculating the frequency change, it is possible to determine the inductance or capacitance based on the measurement. The schematic includes a comparator-based LC oscillator. Most designs utilize the LM311 comparator; however, any comparator that can oscillate up to 50 kHz is adequate for this application. An LM339 comparator was used in the oscillator circuit due to availability. The primary measurement is the oscillator's frequency, allowing for the construction of a frequency meter with minimal additional cost. A reed relay is integrated into the circuit to switch between LC mode and frequency mode. The second comparator in the schematic functions as a Schmitt trigger to condition the input waveform, enhancing the accuracy of the frequency measurement. In LC mode, the frequency output from the first comparator is fed through the Schmitt trigger.

The construction of an LC meter using the ATmega328P involves several key components and configurations. The heart of the circuit is the LC oscillator, which generates a frequency that varies based on the inductance or capacitance being measured. The oscillator is typically formed by a feedback loop that includes a resistor, capacitor, and inductor. The LM339 comparator, which is a quad comparator, is employed to create the oscillator. Its ability to operate at frequencies up to 50 kHz makes it suitable for the measurement range.

In the LC mode, the oscillator's output is fed into a Schmitt trigger, which provides a clean square wave signal for better frequency measurement. This configuration helps to eliminate noise and ensures that the frequency measurement is accurate. The use of a reed relay allows for seamless switching between measuring inductance and capacitance, enhancing the versatility of the device.

The output frequency is measured using a microcontroller, which can be programmed to calculate the corresponding inductance or capacitance based on the frequency detected. The microcontroller can also be interfaced with an LCD display to present the measurements in a user-friendly format. By utilizing Arduino libraries, the programming becomes more accessible, allowing for quick adjustments and enhancements to the functionality of the LC meter.

Overall, this design provides a cost-effective solution for measuring inductance and capacitance, particularly useful for hobbyists and professionals who require precise measurements in the lower ranges. The flexibility of the ATmega328P, combined with the simplicity of the circuit design, makes it an ideal choice for building a reliable LC meter.Building an LC meter for a while since I do not have a multimeter that is capable of measuring inductance and while the multimeters I have can measure capacitance, they are not able to give accurate readings for small capacitance in the range of several pF`s. There are quite a few good articles on how to build LC metersusing PIC MCUs (like the ones here: 1, 2, 3 ), but instructions on how to build one with an ATmega

MCU are few and far in between, although the basic principle is largely the same. So I decided to write this article on how to build an LC meter using an ATmega328p chip and Arduino libraries. A typical LC meter is nothing but a wide range LC oscillator. When measuring an inductor or capacitor, the added inductance or capacitance changes the oscillator`s output frequency.

And by calculating this frequency change, we can deduce the inductance or capacitance depending on the measurement. The following schematic shows the comparator based LC oscillator I used in the LC meter. The oscillator portion is quite standard. Most of the other designs I have seen use LM311 comparator. But for this type of application, any comparator capable of oscillating up to 50kHz should be more than sufficient.

I happen to have some spare LM339 ²s lying around so I used it in the oscillator circuit. Because what we are really meausring is the frequency of the oscillator, we can build a frequency meter using the same circuit at almost no additional cost. As you can see in the circuit above, a reed relay is used to switch the measurement from LC mode to frequency mode.

In the schematics above, the second comparator forms a Schmitt trigger to condition the input waveform so that the frequency measurement can be made more accurate. When in the LC mode, the frequency output from the first comparator is simply feed through the Schmitt trigger.

The output frequency is determined by 🔗 External reference