Averaging AtoD samples


Results 1 to 40 of 40

Threaded View

  1. #20
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    I too played with Darrel's averaging & was very impressed, but for this specific need (throwing away a sprurious reading that arrives in every 10 or 12 samples), I think perhaps Melanie's number sorting is more appropriate.

    Wrt Melanie's number sorting - I dabbled with a 'rolling window' (which just takes the next sample into an array & then sorts along with the previously stored samples already in the array) or a 'fill an empty array' type (which starts with an empty array....and waits untilt he array is filled before sorting, then empties & repeats). It might have been my cack approach, but I didn't see a whole lot of difference (results wise) between the two methods.

    plcguy ...thanks for the extra explanation, but that 140 'spurious' count - though much slimmed down - would still cause chaos in the frequency detect circuit I'm intending this to go in.

    I also mulled a "deduce which sample value appeared the most' in a group of samples ....which would be a handy utility to have, but at this stage of my programming life (early!), it's beyond me!
    Last edited by HankMcSpank; - 15th October 2010 at 15:28.

Similar Threads

  1. Darrel's latest 16 bit averaging routine?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th October 2009, 01:57
  2. ADC Averaging
    By Sach_1979 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st September 2009, 06:53
  3. Atod Digital Filter
    By GeoJoe in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd April 2008, 17:04
  4. Microchip free samples in UK?
    By zoki008 in forum Off Topic
    Replies: 1
    Last Post: - 21st March 2006, 16:06
  5. Averaging & 16 maths
    By paul.mcallister in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd May 2005, 18:17

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