Monday, June 18, 2012

Simple LC meter

Here is another piece of laboratory equipment - LC meter. This type of meter, especially L meter is hard to find in cheap commercial multimeters. Schematic of this one came from this web page: https://sites.google.com/site/vk3bhr/home/index2-html. It uses PIC microcontroller 16F628A, and because I recently acquired a PIC programmer, I decided to test it with this project.



Following the above link you will find the original schematic, PCB, source and HEX files for programing the microcontroller and detailed description.
Here is my adaptation of the schematic:


I removed the 7805 regulator, because I decided to use a 5V adapter from Sony mobile phone.
In the schematic, trimmer-potentiometer is 5k, but actually I put 10k, after consulting with the datasheet of the LCD module I bought.
All three 10uF capacitors are tantalum and C7 - 100uF actually is 1000uF.
Two 1000pF capacitors are styroflex 1% and inductor is 82uH.

Total consumption (with back light) of the device is 30mA.
R11 limits the back light current and must be calculated according to the actual LCD module used.

I used the original PCB as a starting point and modified it to suit better to my components.
Here is the result:








The last two pictures shows LC meter in action. In the first of them, there is 1nF/1% capacitor and in the second - 22uH/10% inductor. The device is very sensitive - when I put the test leads there is 3-5 pF reading on display, but it is eliminated with the calibrating button.

If anyone want to try this project, here are the PDF files for downloading: LCmeter2.rar
Use them on your own responsibility.


Update: 24 June 2012

One of my colleagues in a Bulgarian audio forum ask me to build him a copy of the LC meter, but this time with 9V battery power supply.
I made a new PCB with little rearrangement of the old one and adding a 78L05 voltage regulator. I also added an automatic sleep mode, schematic of which I found here: http://www.marc.org.au/marc_proj_switch.html


The goal here was to make power consumption as low as possible. With increasing the value of R11 to 1.2kOhm which control the back light current, total current of the device was decreased to 11-12mA. Without back light at all the power consumption will be decreased even further, but the visibility suffers greatly.

After some tests, the value of the C10, which defines the ON time, was chosen to be 680nF. The ON time in this case is 10-11 min.
The MOSFET Q2 may be replaced with BS170, but bear in mind that the leads are in reverse order.

ON-OFF switch is momentary non lock type.






As usual you may download the files for the project from here: LCmeter with PS.rar
Use them on your own responsibility.


Update: April 4, 2015

Recently I took apart this LC meter and as I saw how ugly was the PCB, I decided to make a new (I hope better) PCB for this old project. The PCB is designed to be used with standard 80mm LCD 16x2 display with back light. The intensity of the back light can be adjusted with changing the value of R11 in the schematic.
On the board there is two wirepads for connecting input terminals via wires, but you can also solder standard 8 pin female header and use the module without enclosure.

I have not build the last version myself so there is possibility for mistakes - check it thoroughly.
Here you can download archive with new PCB: LC meter with PS
As many people had asked me for the HEX file, I included it in the archive.

UPDATE: 29.01.2019 
I have tried WIMA capacitors model FKP-2 100V 1% in the other LC Meter project - LCM3 and they worked great. That's why I made modification of the PCB, so now there can be fitted different packages for C1 and C2. Also I included Gerber files for easy ordering of PCBs from Chinese manufacturers.
PCB with Gerber files: LC meter with PS

59 comments:

  1. Много е интересна идеята ти във втората версия на уреда с автоматичния sleep режим. Браво.

    ReplyDelete
    Replies
    1. За съжаление в другия уред - "Advanced LC meter" същата схема не работеше добре - включваше се при натискане, но при второ натискане не искаше да се изключва. Нямам идея защо. Затова там сложих най-обикновен ключ.

      Delete
  2. do you know the method and the formula of pic comparator LC oscillator to replicate the program code but in c,?thanks

    ReplyDelete
    Replies
    1. No, I don't. I just followed schematic and used the code from the link above.

      Delete
  3. Hello! Can you please provide the Code for to program the Microcontroller, or the HEX file

    ReplyDelete
    Replies
    1. I know that my English is not perfect, but if you read carefully the third sentence of this article maybe you will find the answer of your question.

      Delete
  4. Здравей.Имам проблемс намирането на реленцето.Може ли малко информация(модел и от куде си го закупил).Благодаря предварително.

    ReplyDelete
    Replies
    1. Релето е купено от Комет: http://store.comet.bg/bg/Catalogue/Product/25714/
      В момента, го нямат, но предполагам, че може да се поръча.

      Delete
    2. 4 output switches are connected so you like?

      Delete
  5. what is value of resistor R11? And what mean that 33R* (this is written under R11)
    thanks

    ReplyDelete
    Replies
    1. "R11 limits the back light current and must be calculated according to the actual LCD module used". That's why it is marked with asterisk - different displays may have different current requirements and hence R11 must be calculated for the particular model you chose.
      For example in the second schematic R11 is 1.2k because I wanted to minimize current consumption of the back light.
      If the display you will use is without back light then R11 may be omitted entirely.

      Delete
  6. How do you open the hex-http://www.marc.org.au/marc_proj_switch.html and the left side find LC meter and there is a hex and get it.

    ReplyDelete
    Replies
    1. After downloading the hex file, you must put it in the PIC chip with PIC programer.

      Delete
  7. i tried this project but the lcd only write "orang" and some blocks i use cap 102 2kv and rf coil 82uH is this problem from comparator connection or the program i only copy paste the hex code from the web to note file and formate it as .hex if u can upload ur hex one ...thanxs very much

    ReplyDelete
    Replies
    1. Here: https://dl.dropboxusercontent.com/u/68795389/lc2_hex.rar

      Delete
    2. thanxs very much 4 quick respond and i found some faults on my circuit (i use 10uf electrolytic not tantalum) if there is any other comments on the type of components plz tell me and thank u again keep going :)

      Delete
  8. the lcd is showing variable num as "0.4" then "L= caliblty" and the second row is only blocks do u know what is the problem?

    ReplyDelete
  9. Check all components and all connections. When switching on the devise the switch L/C must be in position C. Calibrating the meter when in position 'L' is done with the two terminals shorted with piece of wire.

    The L/C meter uses only first row of the LCD, so ignore the second row. Maybe the LCD must be adjusted little more with trimmer TR1 to hide the blocks.

    ReplyDelete
    Replies
    1. here is an image of the lcd output smthing strange http://www.mediafire.com/?dl2anktx8dd5675

      Delete
  10. i found the problem it was in my programmer soft ware thanxs very much and it work's fine ..... it write out of range when i use it as l meter then after i put the coil it gives a reading right ??

    ReplyDelete
    Replies
    1. Yes, it writes 'out of range' when there is nothing connected.

      Delete
  11. Very good , this is my version with more functions: http://electronicafb.blogspot.mx/2014/02/mega-herramienta-con-pic18f2550-y-con.html

    ReplyDelete
  12. Hi. i am new in electronics. i want to build this. but i didnt find L1 (82uH) and i dond understand what is exactly K1?
    can you please help me explaining K1?
    and can i use 100uH instead 82uH?
    Thanks

    ReplyDelete
    Replies
    1. K1 is a reed relay. On the schematic "K1 REED" is the coil of the relay and "K1" is the contact of the relay. There is used reed relay because the microcontroller cannot provide higher current for energizing standard relay.

      Yes, you can use 100uH instead of the 82uH without a problem.

      Delete
    2. Hi. thanks for the quick reply.
      Do i need to change anything in the code as i am going to use 100uH inductor?
      Also, can i have a bill of materiel please?
      I googled reed relay and found various type. which one to use?
      Thanks again. :)

      Delete
  13. Can I use 1000pf Polypropylene Film Capacitor thank you

    ReplyDelete
    Replies
    1. Yes, styroflex is brand name of polypropylene, so it will work fine.

      Delete
  14. C10 ON time 680nf can i put a 620nf or 800nf thank you

    ReplyDelete
  15. Hi for C5 and C6 33pf is that a special value or can i use another value like 22pf or 18pf or 10pf 0r 12 pf sorry for the question and thank you in advance and for all your help is very appreciated god bless you and your fam.

    ReplyDelete
    Replies
    1. I suppose you can. I have seen 20p or 22p used in other schematics with PIC16F628, so I think it will be OK.

      Delete
  16. HI can you tell me how to wire a SPDT instead of a dpdt switch sorry for the question is ok if u dont want to answer I will understand because i know is kind of a dumb one but Im new at this and i really like your projects tank you very much

    ReplyDelete
    Replies
    1. It obviously won't work with SPDT switch. Eventually you can replace DPDT switch with two SPDT switches and turn them simultaneously but this will be not very convenient.

      Delete
  17. I have a question I made 2 of this one is perfect but the other one only work on c capacitor but when y switch to L it just say over range no matter what i do it just says that do u have any idea why is that i check all component and re-solder everything but it keep doing the same thing

    ReplyDelete
    Replies
    1. It's normal If there is not connected any inductance at the input terminals. If the device displays this message with inductance connected, then I guess the switch is to blame. Check with multimeter is there conductance between input terminals and corresponding elements on the board. Check if the switch itself is properly soldered.

      Delete
  18. 4 output switches are connected so you like?

    ReplyDelete
  19. sir, kindly tell me the function of the R6,R7,R8,R9.

    ReplyDelete
  20. sir i build your project. when i powered on the device on c mode it is showing a c value continuously varying with a negative sign. and it is showing wrong C and L value. i connect c7=1000uf. and L1= 68uH. is it ok?

    ReplyDelete
  21. i used 10uf electrolytic and 1000pf ceramic capacitor, will it work?

    ReplyDelete
  22. sir i am using L1 is 68 uf. will it work?

    ReplyDelete
    Replies
    1. Hi, I will answer all your questions here.
      1. SV1 is a 2x4 pinheads which can be used for calibrating the LC meter. How it work is explained here: https://sites.google.com/site/vk3bhr/home/index2-html
      The resistors R6-R9 are used to prevent direct shortening to the ground when calibrating the LC meter.

      2. Try to reset the LC meter with the RESET button (in the schematic it is marked as "Calibrating button").
      Also, this LC meter cannot measure electrolytic capacitors - it's range is up to 700nF - 800nF.

      3. It will work, but it will be far from accurate. Two 1000pF (1nF) capacitors must be of good quality and low tolerance as the accuracy of the LC meter depend on them. The 10uF can be electrolytic but "LowESR" type.

      4. I don't know. In the original article it is mentioned that the 100uH can be replaced with 82uH to increase resolution, but 68uH is too small.
      Go and read the original article in the link above - there is a much more detailed explanation of the schematic and the calibrating process.

      Delete
    2. sir thank you for your answer, and help. Now I am building your advanced lcr meter.please tell me the specification of relay and power switch.again thank you for your help.

      Delete
  23. sir in your advanced lcr project what is the function of JP2 ICSP , and X1, X2. and how to use those,how to make calibration of these meter. please help me.

    ReplyDelete
  24. Hi. i am new in electronics. i want to build this. but I build the source cord in MPLAB IDE software but its display these error

    Clean: Deleting intermediary and output files.
    Clean: Done.
    Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F628 "b.asm" /l"b.lst" /e"b.err"
    Message[301] I:\CHANNA\B.ASM 163 : MESSAGE: (Processor = 16F628)
    Error[113] I:\CHANNA\B.ASM 1105 : Symbol not previously defined (FPS24)
    Error[113] I:\CHANNA\B.ASM 1108 : Symbol not previously defined (FPD24)
    Error[113] I:\CHANNA\B.ASM 1111 : Symbol not previously defined (FPM24)
    Error[113] I:\CHANNA\B.ASM 1195 : Symbol not previously defined (INT2424)
    Error[113] I:\CHANNA\B.ASM 1279 : Symbol not previously defined (FLO2424)
    Error[105] I:\CHANNA\B.ASM 1352 : Cannot open file (Include File "FP.TXT" not found)
    Halting build on first failure as requested.
    BUILD FAILED: Wed Feb 18 04:44:25 2015

    Can you please help me sir

    ReplyDelete
    Replies
    1. If you read instructions from VK3BHR (original author), you would know what to do...
      You are missing the FP appnote routines. Download Microchip appnote and copy specified routines.

      Delete
  25. I have same problem as mr. Channa Dewapriya. Anyone found solution? thank you.

    ReplyDelete
    Replies
    1. Hi, I am not the author of the code, nor the schematic and I have no experience with Assembler language, so I can not help you with this. In my project I used a ready HEX file.
      My part is only the designing a new PCB, because I did not like the original PCB.

      Delete
  26. Hey,
    I have an issue with the LC meter.
    The device itself works and the Capacitance meter works perfectly, but when I try to measure the inductance of a coil, I seem to be getting values multiplied by 100. The expected value of the coil is 4uH but the meter shows 400uH. Any idea how I could solve this problem?

    ReplyDelete
  27. i made this with success.thanks.

    ReplyDelete
  28. What pic programmer u are using?
    I use jdm programmer not workkkk

    ReplyDelete
  29. What pic programmer u are using?
    I use jdm programmer not workkkk

    ReplyDelete
    Replies
    1. Hi,
      I own one of these http://www.ebay.com/sch/i.html?_odkw=pic+programmer&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xpic+programmer+k150.TRS0&_nkw=pic+programmer+k150&_sacat=0
      It worked kinda OK, but lately I use my own programmer: http://diyfan.blogspot.bg/2013/06/original-pickit-2.html
      And finally from a month I own also a PICkit 3 purchased from ebay.

      Delete
  30. Dear sir.i cant download any file it saying 404 not found,please give another link for hex and curcuit diagram

    ReplyDelete
  31. Hi,

    if you don't want to give EAGLE files, can you maybe export only GERBER files ?
    Because then I can order prototype PCB more easy, no need messing with Fe3Cl and drilling :)

    ReplyDelete
  32. Ицо, препоръчвам замяна на 78L05 с LM2931AZ5.0. Замяната става директно, но 2931 има около 0.5 mA собствена консумация, което при използване на сравнително скъпа батерия никак не е малко!

    ReplyDelete
    Replies
    1. Да, LM2931AZ е по-добрия вариант, но на времето като правих този проект (преди 7-8 години) не знаех за този регулатор. За съжаление разположението на изводите е различно и не става директна замяна. Разбира се, ако леко се поизкривят краката ще може да се запои, ама ще е грозно :)

      Delete
  33. Hi all,
    Greetings. I am from India. I made this LC meter from VK3BHR, but the inductance measurement is in correct. 100uH inductor gives 52uH result. Capacitor measurement is almost OK. What could be the problem in circuit ?
    I need some help from you guys’ as many of you already made it correctly. I have used the PCB on VK3BHR site.

    ReplyDelete
    Replies
    1. There are instructions for the calibrating the LC meter in the VK3BHR site. Did you read and try them?

      Delete