-
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.
Ed
-
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
-
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.
Ioannis
-
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