AfreshTiny/AnalogInput

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=175 is a good starting value (appr 3.4V). Button_threshold=0 disables the button-switches-displaymode function. If the button has no effect, check this setting.

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


Using high output impedance transducers with round devices manufactured before 2008-10

Using the analog input with OE Marelli MAP sensor makes some problem as we discussed on the vems.co.uk forum [1]with Rob. He adviced me to write here my observations.

I used an OE Marelli map sensor ( pdf datasheet is [2] ), measured the applied pressure, MAP sensor output signal and megatune raw value (linear curve, calibration is 255, offsett is 0)

The range of the sensor is 250 mV to 4750 mV from 17 kPa to 216 kPa, with linear out.

On athmospheric pressure it shows 2400 mV.

I got this without serial resistor (the map sensor signal into the vemsgauge analog input):

map_table.gif

map_graph.gif

The positive range is nearly linear, but the vacuum is unusable. The sensor can't pull the signal below 2400 mV. Even than it is able to measure below athmospheric pressure, just compensate with the 17 point curve. (without connected signal line the map sensor out is working properly of course).

I made another measurement without the sensor:

Calibrate the 17 point curve so it shows 0 where you like (eg. when connecting ground). That's all.

The input impedance of round devices since 2008-10 have much higher input impedance (around 40 kOhm). Therefore it is easier to use with high output impedance transducers. Recommended operation modes: