Help with the math

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Los Angeles, California

    Question Help with the math

    Hi All!
    My brain seems to be in a thick fog these days, maybe it's the onset of oldtimes disease? Okay so I have a model that is 1:100 scale. The speed pressure sensor reads a maximum pressure of 2 psi. According to the Online conversion forum water speed = psi. This would tell me that the maximum speed for the sensor would be 200 mph. The output of the A/D gives 65472 as the reading for 2 psi. The sensor has a start point of 5824 for zero. How can I convert all this to a meaningful number to show the scale speed? Thanks to all.


  2. #2
    Join Date
    May 2013

    Default Re: Help with the math

    assuming your sensor is fairly linear
    count = 65472-5824 =59648
    divide that by 200mph =298.24 counts per mph

    so mph = (adc_count-5824)/298

  3. #3
    Join Date
    Nov 2003

    Default Re: Help with the math

    And since no one can guarantee that adc_count would not go below 5824, I would add this:

    if adc_count<5824 then ad_count=5824 just before.


  4. #4
    Join Date
    Jul 2014
    NingBo China

    Default Re: Help with the math

    5824 is Zero drift? if so,my calculation :

    actual flow(mph)/200(mph)=sensor display-5824/65472-5824
    actual flow (mph)=200(sensor display-5824)/59648
    Last edited by Bartchou; - 5th September 2014 at 07:17.

Similar Threads

  1. Help with A/D math!
    By dbodenheimer in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 19th March 2011, 00:51
  2. Math help please...
    By Ioannis in forum General
    Replies: 2
    Last Post: - 20th June 2008, 10:18
  3. Math Help Please
    By markcadcam in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 21st May 2008, 19:00
  4. PBPL math takes more cycles...Always?
    By skimask in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2008, 10:22
  5. Math help please!!!
    By jbirnsch in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th August 2007, 14:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts