/Projects/LC meter with PIC16F628A - redux

I needed a good LC meter for my one of my next projects so I went and built the famous LC meter by Phil Rice. This LC meter design is pretty old but since it is a perfectly good device there was no need to design/build/debug one of my own. So, I just changed the original firmware a bit and added few electronic goodies to it to make it more compact.

UPDATE: Project is on HackedGadgets, ...and now also on Hack-a-Day!

Measuring a 1200uH (122) coil from Coilcraft

LC meter - SMD

Power Supply
I wanted to fit it in this project box that I had laying around for some time and I also wanted it to be battery powered. There was no way that I could fit 9V battery in this project box along side with all the electronics, so I figured I could add a tiny 3.6V Li-Ion battery that I also had... laying around.

Tiny Li-Ion battery

It is a 135mAh one from a broken Bluetooth headset. After having no luck in finding the appropriate 2x16 or 1x16 LCD that works at 3.6V I decided to incorporate a 5V voltage booster that will do the trick. For this purpose I selected TPS61222 power booster from Texas Instruments. This little (extremely little) device is very good and it requires just a coil and two capacitors to operate.

TPS61222 - the smallest IC in the center of the picture and MAX1811 on the right

Now, because there is a Li-Ion battery in the device I needed a way to charge it properly. This is done by MAX1811 Li-Ion charger IC from Maxim. Later on, by placing a small USB connector on board, all power supply & charging problems were solved.

USB connector for charging the Li-Ion battery

Charger (USB) connected - GREEN, Charging battery - RED

Firmware modifications
No critical firmware modifications were made. All calculations are performed as they were in the original firmware. Only a few small changes were made such as: PORTB pinout re-arranged for LCD display, second line of display constantly shows oscillator frequency, LC meter is automatically re-calibrated ("zeroed") when switching from L to C and the other way around.

Zeroing the meter
This meter has a strange "zeroing" function. After turning it on it is necessary to "zero" it by resetting the microcontroller. It seams that it is not the same when you turn the device off and back on for less than a second and resetting the PIC. Why this happens - it is still a question mark above my head. I noticed this phenomenon after building the device and obviously I didn't plan to put a "zero" button on the front panel. This was fixed by modifying the firmware in a way that re-calibration is executed after changing the measurement mode from L<->C and C<->L but with a small delay, of ~700ms after flipping the mode-switch. The re-calibration is actually a program reset - it starts from the beginning just as if it was reset by hardware. This "zeroes" the meter almost identically as it is "zeroed" by hardware microcontroller reset, so it is all good.

Measuring unknown inductance 1 (frequency hidden)

Measuring unknown inductance 2 (frequency hidden)

Measuring a 100nF capacitor (frequency hidden) - this was when it wasn't calibrated properly

Bottom PCB side

Schematics & firmware
Schematic diagram is identical to the original one, I only added MAX1811 and TPS61222. The SCH and PCB (Eagle Layout) can be downloaded below (the red download button). Modified firmware can also be downloaded from here if you wish to build this Li-Ion battery powered version (firmware is written in assembler).

Addition to original schematics: MAX1811 i TPS61222

Original LC meter sources
- http://sites.google.com/site/vk3bhr/home/index2-html
- http://www.marc.org.au/index.html
- http://ironbark.bendigo.latrobe.edu.au/~rice/lc/index2.html

Author (sent by): Trax

Download counter: 7,615

Rating: (2.97, votes 3819)


Date: 16-09-2011

Lokalna verzija ove stranice: LC metar sa PIC16F628A


Bookmark and Share Comments (27)

comment [17]

Gdje se može kupiti TPS61222? Unaprijed zahvaljujem!
IP: n/a

comment [16]

Relej je takozvani Reed relay iz PC modema. PIC moras isprogramirati sa programatorom, potrazi ovdje na sajtu shemu programatora koji se zove: blesavi pic programator.
IP: n/a

comment [15]

Kakav relej treba biti? I može mi netko reći kako da programiram PIC16F628A? Hvala!
IP: n/a

comment [14]

issue solved, wrong IC

comment [13]

I have just sent you e-mail...
IP: n/a

comment [12]

is it possible to send you by email?

comment [11]

Well there is no way that THAT should happen. You probably have a faulty MAX1811 IC or there is a short circuit on your PCB somewhere. You could post your schematics somewhere online if you like, so I can check it out.
IP: n/a

comment [10]

The only difference is that my 1811 is set to 500mA.

comment [9]

Yes that's why I'm asking. I'm using MAX1811 in exactly the same way as in your design, but I have one problem. When the device is turned ON and the USB cable is unplugged, LED2 is still ON and the battery is discharging. For example, when my device is plugged into PC with another USB device and the PC is OFF , the another device is powered by my device. thanx

comment [8]

The LED will be off then. It gets its power through USB port. The voltage can't go in reverse through MAX1811 if that's what you are wondering...
IP: n/a

Comment page: <123>

add comment


e-mail (will not be published)


How much is = also add letter "a" at the end of your result! Eg.: 7a

Please log-in!

You can log-in on forum link: Login page. After logging-in, return to this page and click refresh in your browser.

site friends

sponsored links