Fixed Voltage Reference


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Hello Charles,

    Would you have a code sample to help me for a quick start please?

    I'm trying to make a voltmeter for batteries up to 2,5 Volts with a 0,01V precision but I never made a circuit using a voltage reference.

    Thanks in advance for any info
    Roger

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    There really is not magic.

    Connect your voltage reference (I use an LM4120-4096) to AN3. Make certain that you connect the GND of the reference to the PIC GND pins.
    Also, you will need to connect a .2uF capacitor from the reference output to GND. That is stated on the datasheet of the part.

    If the voltage you want to measure is less than 4.096V, then just put a 2K resistor from the analog input pin to your battery.

    Note that if your battery is connected, and the PIC does not have power, you will need to use a FET switch between the two, otherwise the battery will discharge through the un-powered PIC.

    At any rate, I always use a 2K resistor in series with all PIC pins for protection.

    Set up the chip's A/D according to the datasheet. It isn't any more complicated than that.
    Charles Linquist

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Re: Fixed Voltage Reference

    Quote Originally Posted by Charles Linquis View Post
    It isn't any more complicated than that.
    Thanks Charles.

    I just miss the understanding of the measurement process or principle.

    Is it (my thinking):
    - I have a precise voltage reference, let's say 4,096Volts
    - I sample it 10 bits (= 1023 samples)
    - Each sample is 4,096V / 1023 = 0,004V
    - I read the ADC I will measure on i.e. a battery, and convert it to the voltage I want to know.

    Is it "it"?
    Roger

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts