Easytherm is a tool that helps making curves from a few calibration points for an NTC temperature sensor.
Virtually noone uses easytherm nowadays to generate these curves.
- either calibrate these curves during runtime (without firmware-upgrade), from VemsTune in 1.1.5x firmware
- or using files (pre-generated with propertherm), downloaded from web or included in VemsTune to be uploaded at firmware upgrade time
The rest of this page is for experts who want to download manually, or generate their own custom files.
To make the process easier:
- [calibration data and hexpatch utility] for the most common NTC (Bosch, GM, etc...) sensors
- 2063_256 or 2252_256 are the most popular with v3.3. The latter should be able to get tables very close to real real values, without any recompile or any special tool
- also includes PTC tables with appr 430 Ohm pullup, used in Audi 5cyl engines
How to update calibration - using hexpatch.exe
- Earlier a text editor was used, but users sometimes messed up a line or converted line-endings (win32 weirdness) unintentionally
- note that the new "VEMS Firmware Upgrade Tool" (codename [v3gui] ) allows to select temperature tables at the time of firmware upgrade (reflash). Most will find that more userfriendly than the separate steps (command line utils that do the same) below. However, when professionals prepare a setup for an on-site person, doing the steps in advance eliminate some on-site tasks
hexpatch.exe was developed to help updating the vems.hex with the calibration tables
- changes max 32 lines for airXfactor (near the beginning, 0x100 .. 0x2FF address), since airdenfactor and matfactor are separate tables
- changes max 16 lines for cltfactor (also called thermfactor), since it is just 1 table (address 0x300 .. 0x3FF).
(hexpatch binary is also available on linux, or in sourcecode, but linux users rarely have problem with copypasting 32 lines)
- hexpatch.exe vems.hex < airXfactor_3000_287.hex > vems_1.0.30_airXfactor_3000_287.hex
command will change the airdenfactor _and_ matfactor for 3000,287 parameters. The output is named accordingly (instead of the generic vems.hex) for distinguisment in your storage. You can copy to vems.hex before uploading with upload_firmware.bat (or change the .bat to use the long-descriptively-named file).
- hexpatch.exe vems_1.0.30_airXfactor_3000_287.hex < cltfactor_2252_287.hex > vems_1.0.30_airXfactor_3000_287_clt2252_287.hex
changes coolant temp calibration in the file previosly patched (with the airX 3000_287 airdenfactor and matfactor tables). So coolant (thermfactor) can be changed independently (or left alone, if you like default coolant temp readings).
- Always save your data and take note in the installer log so you know later what settings you used, and you can verify
- if you forgot to save the file you used, verification of these .hex files is possible in a similar way as the full firmware vems.hex: perl bin/prog.pl /svn/firmware/utilities/propertherm/ntc/airXfactor_3000_287.hex Report 2 page error (address 256 and 512) for air, and 1 page error (address 768) for coolant table mismatch. Similarly, if you get 1..3 pages mismatch (address 256, 512, 768), that means same firmware, only air/coolant tables differ. If you keep track of what firmware you upload, and name hexpatched firmwares sufficiently, you never need this.
- Always keep track of the firmware uploaded to a certain ECM (serialnumber!), because verification will fail (tables 1..3 will mismatch) yada yada
How to choose tables
Currently appr 56 example-tables are provided (28 airX + 28 clt), picking the best will closely match to almost any curve normally found in real life.
- THE EASY WAY: follow the instructions in airXfactors.csv (MAT) and cltfactors.csv (coolant) SPREADSHEET, that contains one (long) line for each calibration file to make calibration easy and quick, example:
- currently reads +25C
- in the spreadsheet, in the line of your current calibration file, find the temp closest to +25C. Take note of the column.
- now consider the column, and find the file that has your preferred value (data/sort according to that column might come handy), like +17C. If you find several such files, prefer the aref close to 256..260 (eg. 264 rather than 273).
- if you have more measured points, or know the sensor resistance at +25C, it is easier to select more precise calibration
- Don't hesitate to ask for help after documenting (on your MembersPage) your measurements , readings, wishes as precisely as you can (someone with experience will be able to point to a good curve in 4 minutes, unless you have some very weird setup or problem).
PTC - special type sensor with reverse slope (positive temperature coefficient: resistance, thus input voltage => ADC reading increases with temperature)
- [Audi 5cyl PTC MAT] we use 429..430 Ohm pullup (429=2700 x 510 Ohm). Note that min to max range for a PTC is worse than for an NTC (PTC slope is higher), appr. 1/7 of the ADC range is utilized for -40..+101C. This makes it more sensitive to calibration.
Audi 5cyl PTC (is this measurement of one of our members or from literature?)
-40,395 -20,425 0,457 20,490 30,503 40,520 60,555 80,585 100,620
vems.hex is distributed
with historical NTC calibration data (see 3050,256 file, it usually reads a bit high), though most will find 2063,256 a better match, as it will read (appr 7..9C) lower than a factory vems.hex
- NOT SUPPORTED SINCE WE HAVE the series of calibration files
- For custom applications deployed in large numbers (that require dead-on calibration data within 1C), it can still be useful as a first step: if someone publishes intermediate results, we can help in the further steps (to generate the hex-files)
- DO NOT USE THE EASYTHERM PARABOLA-FITTING METHOD for PTC, unless you know what you are doing !
- 3 calibration points must be measured. Say, at sensor temperatures
- 95C warmed engine
- 20C cold engine (or a little warmer, say 35C depending on the sensor, as the middle value should be around the inflection point of the thermistor curve)
- and 0C (a cup of icy water before installing the sensor to the final location)
- Check pullup resistor values, v3.2 has 2.7k resistor instead of 2.49k used in megasquirt. If incorrect pullup value is used, there will be a few degrees error in the lower temperature range.
- .inc file can be generated with easytherm, or other means. This is a very simple function, a few lines.
- note: (AFAIK) MSToolsII? can also be used to create .inc files
- but: the upload function in MSToolsII? is NOT compatible with GenBoard. GenBoard's has it's own firmware generation and upload procedure. The .inc files need a slight automatic formatting (into .c files) with the following commands, so that they will actually be used in the firmware build process:
- perl bin/inc2tbl NAME-OF-THE-MAT-INC-FILE > etc/airdenfactor.c
- perl bin/inc2tbl NAME-OF-THE-CLT-INC-FILE > etc/thermfactor.c
- See GenBoard/FirmWare for firmware compiling and uploading. NOTE THAT THIS IS FRUSTRATING for MOST USERS and NOT RECOMMENDED. Takes appr 1..2 hours for initial setup (after that it's 5 mins), while using hexpatch.exe is no more than 5 minutes.
Propertherm - only for developers, see /svn/firmware/utilities/propertherm/