A Surprisingly Accurate Digital LC Meter?

Discussion in 'The Projects Forum' started by AchMED, Jul 3, 2009.

  1. AchMED

    Thread Starter Active Member

    Aug 5, 2008
    Has anyone built this LC meter? The meter uses the PIC16F628.


    I want to change the relay out with a FET. I read through the code and to me it looks like an N-FET low side should do the trick. Here is a code snip that makes me think I could use an N-FET.

    Code ( (Unknown Language)):
    2. #define relay   PORTB,7                    ; Switches Ccal
    4.   bcf       relay                ; Remove Ccal
    6.   and another putting Ccal in the circuit.
    8.   bsf       relay                ; Add standard capacitor
    To me this looks like setting portb, 7 high turns the relay on, and clearing it turns it off.

    But when I read the FAQ there is this.


    "Can I replace the relay with a 2N7000 FET?"

    "This should be possible (with a "slight" change to the program to invert the control signal and a "slight" loss of accuracy).

    I did try a NPN transistor in an early version of the prototype, but wasn't happy with the stability. This was probably due mainly to my "rat's nest" construction. My excuse for using a relay is pure laziness - having got it working, I wasn't going to mess with it."

    Hence my confusion.

    This may refer to older design where he uses a PNP to control the relay?