Pot reading jumping like crazy!!!


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    32

    Default Pot reading jumping like crazy!!!

    Hi again, I am now having issues with reading a pot using the pot command. I have gotten my LCD to display a scaled reading of a linear pot's displacement, but the reading is jumping around randomly. I am using a 5V regulator and polypropylene capacitors. I can't figure out what is making the reading jump around so much, because if I simply read the resistance of the pot with a mulimeter it is rock solid. What am I doing wrong/not doing? Thanks.

  2. #2
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    No one has had this issue? Or is this a dumb question?

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


    Did you find this post helpful? Yes | No

    Default

    Is this on the F84?

    If so, What's your Pot and capacitor value?
    Steve

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

  4. #4
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Is this on the F84?

    If so, What's your Pot and capacitor value?
    Yes, its with a F84A, with 10k resistor and a 0.1uF cap.

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


    Did you find this post helpful? Yes | No

    Default

    On wich pin? Hope it's not RA.4

    Did you tried a higher capacitor valu.. let's say 1K

    Is the MCLR pin tied to VCC with pull-up? if so wich value?
    Steve

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

  6. #6
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    On wich pin? Hope it's not RA.4

    Did you tried a higher capacitor valu.. let's say 1K

    Is the MCLR pin tied to VCC with pull-up? if so wich value?
    a 1K is tied to Vcc.

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by champion
    Yes, its with a F84A, with 10k resistor and a 0.1uF cap.

    There is another way.

    Use 1K POT with 100nF.

    This way, you will get a large movement of the POT giving you softer reading max. "30" instead of 255.

    You can then multiply this "30" by say 4 and have "120" as your POT reading value, still with soft reading movement. (multiply by 8 and get 240 could be another).


    How is that now?


    -----------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Oh, crap... didn't realised you where using the POT command.....Sorry.

    Disregard:
    Have you tried buffering the signal from the POT with an OPAMP? It may be that the source impedance of the POT is too high for the ADC to work properly. Try two 1k (no higher then 1k for now) resistors in series from +5V to GND, connect the middle point to your analog in pin. Does it still jump around? If not you should now have a reading of ~128 for 8bit and ~512 for 10bits. If not my guess is that you either have the left/right justify bit set up wrong or using the wrong Vref. But it's really hard to tell without even knowing what chip you are using and/or your register setup....

    /Henrik Olsson.
    Last edited by HenrikOlsson; - 15th November 2006 at 21:18. Reason: For not reading the original post correct.

Similar Threads

  1. Using the Pot command.
    By timseven in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th August 2009, 20:23
  2. reading the value of a pot
    By studysession in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st February 2009, 09:45
  3. A/D, Pot, Input, A,B So lost now....
    By Helmutt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th March 2008, 22:23
  4. Replies: 4
    Last Post: - 24th January 2007, 22:20
  5. pot controlled pwm -- help
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th January 2006, 12:29

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