very accurate lc meter based on pic16f84a ic

16
Very Accurate LC Meter based on PIC16F84A IC. LC Meter Part's List: 2x 1K 2x 6.8K 1x 47K 3x 100K 1x 10K POT 2x 10pF 1x 100pF 2x 1nF 2x 10uF 1x 78LM05 1x 16x1 LCD Display 1x PIC16F84A IC 1x LM311 IC 1x 4MHz Crystal 1x 82uH LC Meter's Technical Specifications: Voltage Supply: 7.5 - 15V Accuracy: 1% Zero Out Switch Automatic Ranging LC Meter's Inductance Measurement Ranges: - 10nH - 1000nH - 1uH - 1000uH

Upload: bank

Post on 18-Nov-2014

1.309 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Very Accurate LC Meter Based on PIC16F84A IC

Very Accurate LC Meter based on PIC16F84A IC.

  LC Meter Part's List:2x 1K2x 6.8K 1x 47K 3x 100K1x 10K POT

2x 10pF1x 100pF2x 1nF2x 10uF1x 78LM05

1x 16x1 LCD Display 1x PIC16F84A IC1x LM311 IC1x 4MHz Crystal1x 82uH Inductor1x 3V Reed

  LC Meter's Technical Specifications:Voltage Supply: 7.5 - 15VAccuracy: 1% Zero Out SwitchAutomatic Ranging

LC Meter's Inductance Measurement Ranges:

- 10nH - 1000nH- 1uH - 1000uH- 1mH - 100mH

LC Meter's Capacitance Measurement Ranges:     

Page 2: Very Accurate LC Meter Based on PIC16F84A IC

Relay - 0.1pF - 1000pF- 1nF - 900nF

About LC Meter

This is one of the most accurate and simplest LC inductance / capacitance Meters that one can find, yet one that you can easily build yourself. This LC Meter allows to measure incredibly small inductances starting from 10nH to 1000nH, 1uH to 1000uH, 1mH to 100mH and capacitance from 0.1pF up to 900nF. LC Meter's circuit uses an auto ranging system so that way you do not need to spend time selecting ranges manually. Another neat function is the "Zero Out" switch that will reset the initial inductance / capacitance, making sure that the final readings of the LC Meter are as accurate as possible.

Page 3: Very Accurate LC Meter Based on PIC16F84A IC

LC Meter Kit with Green Backlight LCD Display

How does LC Meter Work?

To be able to determine the value of an unknown inductor / capacitor we can use the frequency formula given below.

Note that there are three variables that we can work with; f, L and C (f

Page 4: Very Accurate LC Meter Based on PIC16F84A IC

represents a frequency, L inductance and C capacitance). If we know the values of the two variables we may calculate the value of the third variable.

Lets say we want to determine the value of an unknown inductor with X inductance. We plug X inductance into the formula and we also use value of a known capacitor. Using this data we can calculate the frequency. Once we know the frequency we can use the power of the algebra and rewrite the above formula to solve for L (inductance). This time we will use the calculated frequency and a value of a known capacitor to calculate the inductance.

Isn't this amazing? We just calculated the value of unknown inductor, and we may use the same technique to solve for the unknown capacitance and even frequency.

Applying the Theory to LC Meter's Hardware

Now let's use the above theory and apply it to electronics. The LC Meter uses a popular LM311 IC that that functions as a frequency generator and this is exactly what we need. If we want to calculate the value of an unknown inductor we use a known Ccal 1000pF capacitor and the value of an unknown inductor. LM311 will generate a frequency that we can measure with a frequency meter. Once we have this information we can use the frequency formula to calculate the inductance.

The same thing can be done for calculating the value of a unknown capacitor. This time we don't know the value a capacitor so instead we use the value of a known inductor to calculate the frequency. Once we have that information we apply the formula to determine the capacitance.

Page 5: Very Accurate LC Meter Based on PIC16F84A IC

All this sounds great, however if we want to determine the value of a lot of inductors / capacitors then this may become a very time consuming process. Sure, we can write a computer program to do all these calculations, but what if we don't have an access to a computer or a frequency meter?

That's were PIC16F84A microchip comes handy. PIC16F84A is like a small computer that can execute HEX programs that are written using an assembly language. PIC16F84A is a very flexible microchip because it has PINs which can be configured as inputs and outputs. Besides that, PIC16F84A IC requires very minimal number of external components like 4MHz crystal / resonator and few resistors depending on what project we are building. Before we can use PIC16F84A microchip we have to program it with a HEX code which has to be sent from the computer.

In the next step we use the frequency generated by LM311 IC and pass it on to PIC16F84A's PIN 17. We designate this PIN as an input, as well as all other PINs that are directly connected to switches and jumpers. User can use these inputs to tell the microchip to execute specified set of instructions or perform calculations.

Once the microchip will calculate the unknown inductance or capacitance it will use PINs that are designated as outputs and pass the results on to the 16 character LCD display.

LC Meter's Switches & Jumpers

SW1 - Zero out the readings.SW2 - Capacitance / Inductance switch.J3 - turns on the backlight on LCD displays that have LED backlight.

Page 6: Very Accurate LC Meter Based on PIC16F84A IC

J1 - used by 16x2 two line character LCD displays.J2 - displays the initial frequency of the LM311 oscillator which should be around 550KHz.

Character LCD Display Connections

Most of the character LCD displays have 14 or 16 PINs. The displays that do have a backlight have 16 PINs and displays that do not have a backlight have 14 PINs. The PINs that are highlighted in green in the table below are the ones that PIC16F84A uses to pass the output information represented in bits (0/1).

PIN Symbol Function States

1 VSS GND2 VDD VCC +5V +3 VO Contrast Adjustment +/-4 RS Register Select H/L5 R/W Read / Write H/L6 E Enable Signal H/L7 DB0 Data Bit 0 H/L8 DB1 Data Bit 1 H/L9 DB2 Data Bit 2 H/L

10 DB3 Data Bit 3 H/L11 DB4 Data Bit 4 H/L12 DB5 Data Bit 5 H/L13 DB6 Data Bit 6 H/L14 DB7 Data Bit 7 H/L15 LED Backlight VCC +5V +16 LED Backlight GND

Page 7: Very Accurate LC Meter Based on PIC16F84A IC

CAUTION: The controller chip that is visible on the back of the LCD display can be damaged with the static energy. Make sure to ground yourself every time you hold it, and handle it by the edges and not the PINs.

16x1& 16x2 LCD modules with backlight (front)

both LCDs can be used interchangeably

LCD modules (back) 16x1 LCD with pcb standoffs and header pins

Page 8: Very Accurate LC Meter Based on PIC16F84A IC

LC Meter's Enclosure (4"x2.5"x1")

LC Meter's Construction

Page 9: Very Accurate LC Meter Based on PIC16F84A IC
Page 10: Very Accurate LC Meter Based on PIC16F84A IC

Measuring 2 pF Capacitor

Page 11: Very Accurate LC Meter Based on PIC16F84A IC

Measuring Inductance

 

40nH - small piece of magnet wire

80nH - 4 turns of magnet wire

90nH coil used in FM transmitter 280nH - 10 turns of magnet wire

Page 12: Very Accurate LC Meter Based on PIC16F84A IC

500nH wire through choke 1uH VK choke

small RF toroid, 5 turns medium toroid

Page 13: Very Accurate LC Meter Based on PIC16F84A IC

365uH 100uH choke

1uH inductor 100uH inductor

2.2mH inductor 18mH inductor

Final Recommendations

  1nF Ccal is used as a calibration capacitor so make sure that you use a good quality mylar capacitor. Keep the cables between LM311 and the terminals as short as possible to keep the stray capacitance to minimum and ensure the highest accuracy. Also, you have to use a "5V reed relay" because the current passed from PIC16F84A is very small. Reed relays

Page 14: Very Accurate LC Meter Based on PIC16F84A IC

require very minimal amount of current to be switched. I also suggest that you use a 7805 IC to protect the LC Meter, in case you accidentally apply a higher voltage. PIC16F84A will be damaged if you apply voltage higher than 5.5V.

Where to get LC Meter parts or kit

 If you are building the above LC Meter and have trouble finding some of the components, we are distributing the following components and a kit in our Electronic Store.