Reading curnt consumption with 16F877A


Results 1 to 8 of 8

Threaded View

  1. #1

    Default Reading curnt consumption with 16F877A

    I'm wanting to measure curent consumption of my pulse motor thats being ran from my 16F877A.
    At the moment I'm using one analogue line for pulse timing and one to measure input voltage and display on an LCD...

    What i'm after is a way of measuring curent consumption.
    Normally, i'd measure the voltage across a resister and use V=IR...
    But, a PIC using internal VREF (as mine is) cant measure the diference between two independant points...

    as I see it, theirs two ways I could do it...
    1)
    Use the external VREF on the drain side of the resister and one analogue line on the source side and re-program for external VREF on the fly...

    2)
    Use two analogue lines (VIA voltage deviders) and subtract one from the other to get the voltage diference...

    However, need to be aware that the source voltage is anywhere from 12 to 16 volts DC (hence the voltage deviders)
    The smallest value resister I've got is 5ohms...

    Can the external VREF handle such voltage?

    If so, which is the faster / better way?

    Is their a third way?

    Any idea what the overhead is in terms of instructions associated with each option?

    Thanks

    :edit
    Curent consumption should be only upto 200mA
    so, V=IR
    V=0.2 X 5
    So, diference should be 1 volt or less

    :edit2
    Just found the a bit in the datasheet, Comparator voltage can not go above VDD, so that whould mean using a voltage devider on the VREF input too
    Last edited by comwarrior; - 2nd October 2009 at 16:41.

Similar Threads

  1. Fuel consumption display
    By veijavi in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 27th December 2011, 06:05
  2. Using CCP1 and CCP2 to measure instant fuel consumption
    By srspinho in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 20th September 2008, 15:50
  3. Gasoline consumption Math
    By srspinho in forum General
    Replies: 5
    Last Post: - 12th November 2007, 10:21
  4. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  5. 16F877A stack problems
    By rocketman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st October 2004, 16:54

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