LC Meter based on PIC 16F628A

Summary of LC Meter based on PIC 16F628A


This article describes a highly accurate LC meter built using the PIC 16F628A microcontroller. The project replaces common reed relays with an NPN transistor (BC547) and utilizes the PIC's internal comparator for oscillation, eliminating the need for external op-amps like the LM311. The device functions as a frequency meter with 1Hz precision, calculating inductance or capacitance via four fundamental equations. A significant engineering challenge involved implementing floating-point mathematics within the microcontroller's limited 2KB code memory to ensure single-try success for hobbyists.

Parts used in the LC Meter based on PIC 16F628A:

  • PIC 16F628A Microcontroller
  • NPN Transistor BC547
  • Reed Relay RL1
  • LC Tank Oscillator
  • Timer1 External Clock Source
  • PIC Internal Comparator

DESCRIPTION: Well this is a Very Accurate LC Meter based on PIC 16F628A .Having inspired from surprisingly accurate LC Meter. This is my attempt to build an accurate L/C meter. This design is little different from other designs found on the internet. The goal of my hard work is to people get success in a single try. Cz Most of the design doesn’t work LC Meter based on PIC 16F628Aas described in the documentation or lack of information’s.  The most challenging part of the project was to program the entire floating point math in 2k code memory of 16F628A.

Basically LC meter is a kind of frequency meter, there is an LC Tank oscillator that oscillates with measured L or C and result is being calculated. The precision of frequency is up to 1Hz. For more details of measuring frequency with timers, see my article frequency counter..

Theory of operation: Look at the schematic carefully; I didn’t use any reed relay, which is the burden for most of hobbyist, because of unavailability in local market. In my country (Bangladesh) it is also not available.  So first I decided to use a Mosfet instead of Reed Relay. But I found better result in normal NPN transistor like BC547. If you don’t trust transistors, you can add Reed Relay yourself. I have used Pic’s internal comparator for oscillator and fed it to Timer1 External clock source to calculate frequency. So it eliminates the external Lm311 Op amp .The relay RL1 used for selecting L and C mode. The meter works on four basic equations.

 

For more detail: LC Meter based on PIC 16F628A

Quick Solutions to Questions related to LC Meter based on PIC 16F628A:

  • What is the primary goal of this specific LC meter design?
    The goal is to help people achieve success in a single try by providing accurate documentation that works as described.
  • How does the author handle the lack of reed relays in local markets?
    The author replaced the reed relay with a normal NPN transistor like BC547, which provided better results.
  • Can users add a reed relay if they do not trust transistors?
    Yes, the article states that you can add a Reed Relay yourself if you do not trust the transistor method.
  • What component eliminates the need for an external Lm311 Op amp?
    The PICs internal comparator is used for the oscillator, which eliminates the requirement for an external Lm311 Op amp.
  • How is the frequency calculated in this project?
    The oscillator signal is fed to the Timer1 External clock source to calculate the frequency.
  • What was the most challenging part of programming this project?
    The most challenging part was programming the entire floating point math within the 2k code memory of the 16F628A.
  • Does this circuit use a reed relay for selecting modes?
    No, the relay RL1 is used for selecting L and C mode, but the main switching logic uses a transistor instead of a reed relay.
  • What is the precision of the frequency measurement in this meter?
    The precision of the frequency measurement is up to 1Hz.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter