VIDEO VBOX LITE MANUAL
Page | 69
22 December 2009
APPENDIX 2: Calculating scale and offset of a CAN parameter
When reading data from a vehicle using sensor equipment such as the Mini-Input Module or Micro Input Module it is
often necessary to convert the data into a more meaningful format, for example converting a voltage from a throttle
or brake pedal into something more useful like percentage pedal press.
This application note will explain step-by-step how to calculate the scale and offset values required to convert the
throttle position voltage from an Input Module to percentage throttle applied.
It should be noted that this calculation only works for linear data where the plot of the data produces a straight line.
1: Obtain full scale voltage values
Assume that the voltage read by the Input Module is
0.5 volts when the pedal is not being pressed and 5
volts when the pedal is fully pressed. You have two
values which correspond to 0% and 100% throttle
pedal position. So how do we determine what scale
and offset values to apply to a voltage value to obtain
throttle position as a percent?
2: Visualising the Data
If you were to plot voltage (x) against percent (y), you have two sets of points that you can plot.
The line between these two points is a straight line.
3: The equation of a straight line.
The equation describing a straight line is as follows:
Y = mX + c
Where;
Y = The Y values (% pedal press)
X = The X values (sensor voltage)
m = scale
(gradient of the line)
c = offset
(intercept with the Y-axis)
Voltage (x)
Pedal Press (y)
0.5
0 %
5
100 %