Ordinateur de bord pour voiture de collection 7.1
ADC error compensation

How to reduce the error on the ADC input.

Static Error Compensation
The static error come from :
  • the divider bridge (1.666%),
  • the 3V3 power supply in acquisition board,
  • the polarisation resistor you have add to polarize the sensor (PR03, 47kΩ, …).

For some sensors, by example the NTC, a 0.1V error on the ADC is a 10°C error near 100°C (it's not a linear curve). So, the accurate of acquisition is need.
To increase accurate, I have add a python program compensation.py, and I send you with the board a paper with the good values of correction (generaly about 1.02).
You should edit param.py and add the value in the "ANACOMPENS_00" to _05.
This parameter is send at start in the sensor constructor, in the "COMP" parameter. The static compensation is just a factor (multiplier).
After that, the accuracy is near the LSB, I.E. ≈1mV.

Dynamic Error Compensation
Because some sensors are plugged in 12V batterie, and the acquisition batterie read the voltage on this sensor, the accuracy is related to the battery voltage, between 11V and 14V... The solution is to link the sensor with a ClVariable that will be the source of the correction (generaly the battery). Please see a part file, for example in Vehicule.py, the sensor "T_MOT" (The sensor, not the ClVariable !)