DANTHEELECTRICMAN
Electrical
- May 24, 2013
- 14
HELLO:I have a bit of a math curiosity. I need to understand how the formula works. This is from a flow sensor,going to an ADC,on a 5 volt ref.. Here it is...
(240 - 238) = 2 (* 2) = 4 (\ 5) = .8 (+ 30) = 30.8 original formula...
(240 - 238) = 2 (\ 2.5) = .8 (+ 30) = 30.8 my reduced formula...
240 = ADC_count from sensor
238 = ADC_count at 0 flow
\2.5 or * 2 \ 5 = ???? mystery number
+ 30 = lowest value displayed on screen (50 is the highest)
30.8 = flow rate
OK so ADC value is from 238 to 288,translates to 30 to 50 on screen...
The formula works,but how???
What is the \2.5???
Is there an easier way to work this without the 3 constants (-238 offset),(\2.5 mystery number),(+30 lowest reading on screen)???
If any one has a good explanation and/or a better way to rewrite this formula that's great....THANK YOU FOR ANY HELP.....
(240 - 238) = 2 (* 2) = 4 (\ 5) = .8 (+ 30) = 30.8 original formula...
(240 - 238) = 2 (\ 2.5) = .8 (+ 30) = 30.8 my reduced formula...
240 = ADC_count from sensor
238 = ADC_count at 0 flow
\2.5 or * 2 \ 5 = ???? mystery number
+ 30 = lowest value displayed on screen (50 is the highest)
30.8 = flow rate
OK so ADC value is from 238 to 288,translates to 30 to 50 on screen...
The formula works,but how???
What is the \2.5???
Is there an easier way to work this without the 3 constants (-238 offset),(\2.5 mystery number),(+30 lowest reading on screen)???
If any one has a good explanation and/or a better way to rewrite this formula that's great....THANK YOU FOR ANY HELP.....