Reading the suspensions position could be easy , but in reality if You would like to have accurate measures , You should know how the sensor is made and how the ECU’s input is made .
Usually ECU have many analog inputs , each one with different characteristics , with PULL UP ( to 5 Volt VREF ) and/or PULL DOWN ( to GND ) , where You could connect Your sensor .
One of first steps to do is the sensor learization , to transform VOLT to millimeter , it’s possible to use different calcs :
- Table , mm = function( VOLT )
- Linear function , mm = ( VOLT – offset ) * gain
- Polinomial function , mm = c3 * VOLT3 + c2 * VOLT2 + c1 * VOLT + c0
Each one have PRO and CONS .
Calc (1) with table , could be accurate , but only in case You build a table for each sensor , and for each characteristic , this is very time spending , and in case You don’t do it You can have very false values .
Calc (2) with Linear function , is very simple to do , but You could have some false value in center postions ( estimated up to 5 mm ) .
Calc (3) with Polinomial function , is very very accuarate , but very difficult to setup if You must made it manually .
On our ECU We use calc ( 2 ) on simplest application , and calc ( 3 ) on more advanced applications .
In case of calc ( 3 ) , so a 4′ degree polinomial function , to made Your work very easy ( more than both other cases 1 and 2 ) , We hide on firmware all the hard work . So You need to setup only 2 parameters , the stroke of sensors in mm , and the total resistence of potentiomenter in ohm .
The ECU ( of course ) already know in details the input channel characteristic , so with all this data is able to calculate by itself the parameters C3 , C2 , C1 , C0 for polinomial function .
The only needs for this kind of measure is to use ONLY PURE POTENTIOMETER , so without added resistors on 3 extreme points . Please check image here below for a check of Your system .
Measure from A to B contacts , is the sensor resistence You should use to setup on MECAL software .
Of course to be sure to have a PURE potentiomenter , You should made measure on EXTREME positions A and B , and compare the MAX value with measure from A to B .
All the sensors on our store are PURE POTENTIOMENTERS :
https://www.mectronik.store/product/linear-position-sensor/
NOTE :
If would like to use a NOT PURE POTENTIOMENTER with our ECU , You can :
- Select sensor resistor to UNKNOW , so the ECU will use a simple LINEAR FUNCTION , mm = VOLT * K , where K is only in function of sensor stroke , K = STROKE / 5
- Adjust your postion value on Your data acquisition system ( runtime or in post processing ) using a table or any different calc Your DAQ system have