-
Update: 30 April 2017
04/30/2017 at 19:45 • 0 commentsCurrent hardware status: most peripherals [all, other than fuel flow and open drain outputs] have been tested and work as expected.
Current firmware status: about 60% complete. The sensor framework is mostly complete. Some dsPIC33 specific work is still required for saving non-volatile variables using the run-time-self-programming (RTSP) methods. Since an entire page needs to be erased before re-writing, all non-volatile variables need to be grouped together and aligned to the page boundary. The remote console menus for calibration are also still unimplemented.
-
Calibration Points
04/30/2017 at 19:31 • 0 commentsFor the Fuel Level and Water Temperature, calibration involves storing a set of user reference points. The module then linearly interpolates between these points (arbitrary spacing). The fuel level calibration involves starting with an empty tank, and incrementally adding a known measure (e.g. 5L steps), talking a reference point after each step.
The water temperature calibration is based on ideal values (from the datasheet) for my particular NTC sensor. The red line in the graph below shows the NTC temperature versus 12-bit ADC input value. The green line represents the interpolated values from the reference points.
The reference points are given in the table below. They were selected to minimize the error between interpolated and ideal values using Matlab / Octave.
ADC Value (12-bit) NTC Temperature 41 180°C 72 150°C 126 124°C 239 100°C 360 84°C 638 65°C 1154 44°C 3320 -4°C 3740 -19°C 3892 -30°C 3986 -40°C This results in an error of ±1°C, much better than the accuracy of the NTC.