Need Help in Measurement of Voltage


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    4

    Default Need Help in Measurement of Voltage

    Dear All.
    I am new in the PIC project and currently working with a project that requires to measure battery voltagr from 10 to 18 volts.As i have read nearly all the post in this forum i have notice that the only way to read voltages into a PIC is to limit the voltage between 0 to 5 volts.

    Many have recomended to use resistors but is there any way to get muct better reading as resistors will change when it is subjected to heat.

    Basically i want to read the voltages of a car battery and also the fuel indicator and change all of this to a digital read out.One way i found out via the internet is to use OBD (Onboard dignostic) codes where we could use the PIC16F84 to conver the manufactures code to display the values comming out of the car ECU (Electronic Control Unit) on all injectors car before 1996.

    Has anyone done such a project before that can give me a helping hand on a better way to read voltages using at least an op-amp or an isocoupler.Or has anyone built a OBD system before?

    Thank you

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    the OBD is a good idea, just do a serach on this forum with OBD-II, as i remind, some thread provide some already mad OBD-II ics.

    That's true, you have to limit your voltage to 5 volt as PIC work on 5 volt too, once it's done some maths to convert into a readable value.

    If you want to read voltage from battery with a range of 10-18Volts, you can use simple voltage divider resistor or using an op-amp with a gain of 5/18. One or another will give the same result. Wich can be the most accurate... i can't say as i never compare both but i guess that KISS engineering with the 2 cents resistors and, for sure, a capacitor to filter the noise (coming from car alternator and many much more source) going to the PIC adc pin will be the most efficient one. Don't worry too much about the temperature stuff, the PIC result will also differe by using one method or another. It's still to give an idea, if you're out of 0.1 or 0.2 volt it would'nt harm anybody. In fact it will always be more accurate than those analog in your car cluster ;o]

    If you plan to do some OBD-II stuff, please choose something else than PIC16F84, there's a lot more efficient and cheap than this one.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    >>Many have recomended to use resistors but is there any way to get muct better reading as resistors will change when it is subjected to heat.

    What do you think will happen to your Power Supply +5v line when you subject it to heat?

    Resistors come in all shapes and sizes down to 0.01% tollerance (or better). If you really want to go mad, try TANTALUM RESISTORS... that's assuming you can afford the price tag of several Dollars EACH (yes a whole heap of those green crinkly drinking vouchers PER Resistor!!).

  4. #4
    Join Date
    Jun 2005
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Measuring Voltages and OPAMP circuits

    Hi Steave and Melanie.

    Thanyou foe the feedback.Just let you know that i will be starting of the project next week and i have just purchase the MEL LAB "X1" board.
    Just wondering if you guys have any schematic drawings of the opamp where we can scale down the voltages from 10 - 18 volts dc to 0 to 5 volts dc.

    i have printed out all the foulars anf also the comments given in this forum and i remember clearly reading and artical by Melanie and also Steave.

    If you could help me get the schematic diagram or even an url that will show how to scale down the voltages this will be much help.

    Currently i have manage to read temperatues from the "X1" for and this will help me get the project running as i will be using it to measure cabin and outside temperature of the car.

    As for the obd codes there isn't any site that will show the conversion of the obd codes so this will be a problem as i am very new in the PIC system and also programming.

    Thanks for the advice and hope to hear from you on the schematic diagrams.

    thank you & God Bless

  5. #5
    eddyh's Avatar
    eddyh Guest


    Did you find this post helpful? Yes | No

    Default 16f84

    HELLO TO ALL, HOW I CAN WITH THE 16F84 TO NAME THE PORT OF 0 TO 12, AND I KNOW portb.0 to portb.8 and porta.0 to porta.4 EDDY.

  6. #6
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    apache,

    for a start I would recommend to use a 10 turn precision trimmer (10k) as a voltage divider.
    (they are about 50 cent)

    You don't have to worry about the temperature range.
    The overall resistance of the trimmer may change with with the temperature, but this value does not really matter, the only thing that does matter is the ratio (R1:R2)
    and that does not change.

    Code:
    +10-18 V -----------
                        |
                        -
                      \| | 
                       |\|
                       | |\______ to PIC ADC
                        -
                        |
      Ground -----------
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. can't solve this voltage measurement problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 8th November 2009, 20:10
  2. high voltage high frequency H-Bridge
    By George in forum Off Topic
    Replies: 6
    Last Post: - 27th April 2009, 11:50
  3. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  5. Low Voltage Detection
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th January 2005, 18:29

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