how to get an analog potentiometer to settle down?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    or just round the output .
    George

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    Quote Originally Posted by towlerg View Post
    or just round the output .
    How do I do that? Is there a command line that will round up or down?

  3. #3
    Join Date
    Feb 2013
    Posts
    1,132


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    Yes, there is such command, but I don't remember it's name, check the manual, it was something like I=I<<I or whatever.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    If you DEFINE ADC_BITS 8 it will grab the 8 high bits of the 10bit result from the ADC, you'll leave the noise in the lower two bits but at one point or another you're still going to be on the edge where the 3rd bit is flipping back and forth and you're back at square one.

    You can always take multiple samples and average them to smooth things out a bit.

    /Henrik.

  5. #5
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    Try adding a bit of capacitance from the wiper of the pot to ground - say 100nF.
    This should minimise some of the variations you are experiencing.

    Cheers
    Barry
    VK2XBP

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


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    KeithV, You could always low pass filter the A/D reading if you are not requiring the responce speed. If you require the speed then just read the A/D faster. Something like this:

    FILTG CON 32 'FILTER CONSTANT (255 = NO FILTER, 1 = MAXIMUM FILTER)

    VOUT VAR WORD 'FILTER HISTORY

    LOWPASS: '------------------- LOW PASS FILTER --------------------------
    VOUT = VOUT - (VOUT */ FILTG) + A_D_READING
    FILTERED_VOLTAGE = VOUT */ FILTG 'FINAL FILTERED OUTPUT COMPUTED
    RETURN

    I use something similar to it all the time....
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: how to get an analog potentiometer to settle down?

    How do you have the 2.4955V in memory? Is that a word? Because that wouldn’t give you much range past 6 Volts.

    You can keep the resolution and take the mean of the last n readings if you can calculate it, which you probably can.
    The larger n is, the less responsive your potentiometer is, at least “apparently”,
    but the smaller the fluctuation you see, the easier it is to pad out.

    If you’re going to blow out a variable used to calculate the mean, you can add and divide small groups of variables
    to arrive at a new smaller group of variables, and work down to one number that way.

    Heart rate monitors at least used to do this because the interface to the body, and radio between the chest sensor and device was so clumsy.

Similar Threads

  1. Potentiometer reading
    By tacbanon in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th January 2012, 01:19
  2. Servo speed, from potentiometer
    By CipiCips in forum mel PIC BASIC
    Replies: 2
    Last Post: - 20th May 2011, 08:26
  3. Using sound/audio as a potentiometer?
    By mekohler in forum Schematics
    Replies: 5
    Last Post: - 24th October 2007, 20:53
  4. Switch / Potentiometer
    By bearpawz in forum Off Topic
    Replies: 12
    Last Post: - 19th January 2007, 21:45
  5. Potentiometer with indexing.
    By muddy0409 in forum General
    Replies: 2
    Last Post: - 1st January 2006, 19:41

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