A question about ADC (using Pic16f876)


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    8

    Question A question about ADC (using Pic16f876)

    Many thanks for this beautiful site!This my first writing here.

    I have the following problem:
    I want to measure the voltage of a battery(it starts from 24 volt and mustn't go below 3 volt because it will be destroyed!) with portA from pic16f876.

    Can i connect porta.1 of thw pic directly with battery (24 volt) and make adc or will i have a problem.I know that pic can function between 0-5 volt.But to make it more specific my question is if i connect pic with 24volt will the adc show the maximum value (connect 24 volt will show 5 volt) or will
    i show pic in flame?Will i need an external ic between pic and battery? Which one?

    Thanks in advance

  2. #2
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Lightbulb Try a Zener

    Hi mimmmis,

    Welcome to the forum.

    If I read your question correctly, you want the PIC16F876’s A/D input to read a 24 V battery. You are not concerned with the battery’s high end voltage. You want to monitor the low end voltage. Say from 0 to 5 Volts. To make sure it does not drop below three Volts.

    Looking at the PIC data sheet:

    PIC16F87X Data Sheet
    15.0 ELECTRICAL CHARACTERISTICS
    Absolute Maximum Ratings
    Voltage on any pin with respect to VSS -0.3 V to (VDD + 0.3 V)
    (except VDD, MCLR. and RA4)
    Voltage on VDD with respect to Vss -0.3 to +7.5 V
    Voltage on RA4 with respect to Vss 0 to +8.5 V

    That Voltage [ 24 volts or more ] may be just a little too high for the PIC to handle directly.

    You could make a simple voltage divider but the “low end” voltage resolution would suffer.

    As long as the A/D is just measuring slow changing battery voltage, you could use a low voltage Zener Diode to protect the input.

    Note: any voltage above the Zener voltage would be clamped and not show up as an increase on the PIC A/D pin.
    Attached Images Attached Images  
    Ohm it's not just a good idea... it's the LAW !

  3. #3
    Join Date
    Mar 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    really thanks!!

Similar Threads

  1. PIC16F690 ADC question
    By matador29b in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd October 2009, 23:03
  2. Newbie HPWM / ADC question
    By Johan in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th June 2007, 12:52
  3. ADC question
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 8th June 2007, 09:52
  4. strange adc question
    By maus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th November 2006, 10:57
  5. ADC question
    By schu4647 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th May 2006, 14:15

Members who have read this thread : 1

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