Page 1 of 1

How to do custom scaling for analog inputs?

Posted: Fri Apr 12, 2013 12:58 am
by GTIspirit
How exactly are the raw values converted to voltage so the voltage can be converted to physical units?
Image
Since the analog inputs are 0-5V, is 0d (raw) =0V and 1023d=5V?

For example, if I wanted to log the wideband O2 sensor signal from an Innovate Motorsports LC1 where 0V=7.35AFR and 5V=22.39AFR I would configure 0 raw =7.35AFR and 1023 raw = 22.39AFR? And must monotony be observed, or could I put 0d=7.35AFR in slot 1 and 1023d=22.35AFR in slot 2 and then 1023d=22.35AFR in slots 3, 4, and 5? Or do I manually need to interpolate the points so that 0d=7.35AFR in position 1 and 1023d=22.35AFR in slot 5 with a straight line between them?

Posted: Fri Apr 12, 2013 1:05 am
by dimondjack
You are right about 0V = 0 Raw and 5v being 1023 raw. I would imagine that you can put the value for 1023 in slot 2 (and then repeat values in the other slots, but I can't say for sure.

Posted: Fri Apr 12, 2013 2:56 am
by brentp
If you had a straight linear scaling you could do a 2-point map as described previously with the first value in Bin #1 and the 2nd value in bin #2, and ignore the remaining bins. The additional bins just allow for more resolution and flexibility for a non-linear curve.

Re: How to do custom scaling for analog inputs?

Posted: Tue Apr 23, 2013 5:18 am
by Alex W
GTIspirit wrote:could I put 0d=7.35AFR in slot 1 and 1023d=22.35AFR in slot 2 and then 1023d=22.35AFR in slots 3, 4, and 5?
This is roughly how I configured my TPS, and it works fine. In my case, .33 volts is 0 TPS, and 3.33v is 100%, so I set it as such using the first two colums and set the rest to 4v, 5v, and 5v, all at 100%. Works great.