AfreshTiny/AnalogInput (2008-02-13 16:23:19)

Analog input related subpage of AfreshTiny

The analog input can be

Use a 10k resistor to connect a 0..5V signal to the analog input (DSUB15/pin8).

This will add some added protection.


Analog input curve

Nonlinear curve is useful for (NTC based) CLT/MAT/head temperature sensors or resistive fuel pressure sensors, or allows some cheating with linear sensors ;-)

A linear curve is shown (0..240 in steps of 15):

analog_input_curve.jpg

Note that the analog input settings (calibration and offset) are applied AFTER the input curve. The displayed (and logged) value is curve(adc) * cal/32 + offs, that is 255*255/32+255 will display a maximum of 2287.0 (or appr 2032 with offset=0). Dot can be placed anywhere (or omitted), good for convenience only.

For an NTC sensor (with matching pullup if necessary), EasyTherm tables (or the csv spreadsheet file with all sensor data from recent propertherm zip) can be used to fill in the nonlinear points for certain sensor. If you have a certain sensor, or a few points, you can ask for help. You are also welcome to share (and back up) your work here for your sensor and any experience.

analog_input_settings.jpg

Button threshold can be adjusted (Analog input settings menu, since 2008-02-12), Button_threshold=128 is a good starting value (appr 2.5V). Button_threshold=0 disables the button-switches-displaymode function.

The measured analog input voltage is effected while the button is kept pushed, this is normal. This can be used to place "index entry" into logs (to make certain parts easier to find when analyzing).


Raw (unprocessed ADC) logging - for experts only

'A' command logs a total of 30 bytes. 14..29 are the 8 internal analog signals in 16bit big endian format

"Raw reading", 0..255 or rather 0..65535 is useful for calibration.

For linear signal like MAP or TPS a simple 1-line is enough in round.ini

For nonlinear signal, like NTC temperature sensor, fuel pressure with pullup resistor, a megatune calibration file is needed. Provide at least 3 calibration points (more is better) for your sensor (also with button pressed for each point if you care to read the signal while tweaking button).

There is probably little reason to use the unprocessed signal, maybe if one wants a crazy curve with more than 17 points