Measuring voltage


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2006
    Posts
    32

    Default Measuring voltage

    This may seem like an elementry question for most of you, but I am new and I have not been able to find a definitive answer by using the search function. I am simply looking for a way to measure voltage 0V - 5V using a PIC16F84A and display it on an LCD. I can display things on the LCD, but when I try and display an input voltage on one of the pins I get either a high(1) or a low(0), not a specific voltage. Is there a way to do this with just the PIC??? Thanks in advance.

  2. #2
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Without A/D you can try POT or RCTIME commands, but your better off going with a pic with A/D functionality. Probably cheaper than your PIC16F84A! Another option is an external A/D chip.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  3. #3
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rhino
    Without A/D you can try POT or RCTIME commands, but your better off going with a pic with A/D functionality. Probably cheaper than your PIC16F84A! Another option is an external A/D chip.
    I have been using the pot command, but it is very erratic. BTW, I'm only using the 16F84A because I had it laying around from my mechatronics class in college. Thanks for all the help.

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


    Did you find this post helpful? Yes | No

    Default

    i have those laying on my Pin Board

    It's also a good Staple replacement!
    Steve

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

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    champion, what are the values you are using for the pot as well as the capacitor when using the POT circuit?

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    I am using a 10k pot with a 0.1uF cap. Its a poly capacitor too. And a 5V regulator.

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    champion, The values you are using look good and as long as you are not tying one end of the pot then you should be good to go. Does the pot you are using have any dead spots? I would check it with an ohmeter and verify it doesn't.

    Dave Purola,
    N8NTA

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


    Did you find this post helpful? Yes | No

    Default

    You may have to scale your POT command... for 10K and 100nF try...

    POT Potpin,95,MyVar

    The above is usually good for the same junk Y5 type 100nF Capacitors I sprinkle around for decoupling.

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking POT ... to the Waste box

    Hi, Champion

    DO NOT use POT for quite precise measurements ... doesn't worth ANYTHING.

    ( Just good to make a 2 Wires 16 Keys Keypad ... or 16 positions switch !!! )

    The first bearable approach for measuring is to use RCTime, but you WON'T measure 0 - 5v

    Only 1.5v - 5v ... due to the Pic Inputs.

    With cap tied to Vcc and R tied to ground, you should have ~ T = 1.2*R*C ... !!!

    Think to let enough time for the capacitor to be fully charged before measuring ...

    If really precise measure ... think to ADC 831 ... or easier, 16F684,688,819 or ...16F88


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Measuring voltage
    By The Master in forum Off Topic
    Replies: 1
    Last Post: - 15th July 2008, 14:36
  2. Measuring voltage from a current transformer
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 5th May 2008, 21:19
  3. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  4. Measuring Battery voltage
    By BobP in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2006, 23:07
  5. measuring input voltage
    By thon in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th August 2004, 16:03

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