Using excel and a scatter plot and stumbled into a way for it to show the formula for the slope. y=.0008x - .2054 The formula is pretty darn close to what I'm actually plotting. good enough for government work anyway.
My problem is my math skills are terrible and I forgot my highschool algebra.... currently the X access in my chart is the reading I want to display in my application. Y access is the VDC I get from my voltmeter. I need to solve for X when I have Y.
But that doesnt end my issue. I know with an ADC I need to then map to a 0-1023 range.
The sensor has a range of 0-5000uS. Its accurate from 800uS-3000uS, or rather its less accurate outside that range. My measurements will always be between 1000uS and 2800uS.
Whats the best way to do this mapping? Thanks for the input.