##### ## ## ## ## ##### ## ##
### # #### # # ### #
###### ## ## ## ######
## ## ## ## ## ## #### ##
# # ### # # ## # # # ## ### #
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '''Easytherm is a tool that helps making curves from a few calibration points for an NTC temperature sensor.''' To make the process easier: * EasyTherm/SensorTable * [http://www.vems.hu/files/Firmware/release/ntc_ptc_hexpatch.zip calibration data and hexpatch utility] for the most common NTC (Bosch, GM, etc...) sensors ** 2063_256 is the most popular with v3.3. Should be able to get tables very close to real real values, without any recompile or any special too ** 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 [http://www.vems.hu/download/v3gui/ 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) '''RUN''' * ''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) * [http://www.vems.hu/files/MembersPage/MiskaPeippo/AudiS6/mat_data.txt 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?) <code> -40,395 -20,425 0,457 20,490 30,503 40,520 60,555 80,585 100,620 </code> ---- '''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 The coolant and manifold air temperature sensors are (in 99.9% of cases) NTC type. The ExhaustGasTemp sensor can never be an NTC type. [http://www.atpsensor.com/index.html ATP Inc] has some useful notes about [http://www.atpsensor.com/ntc/ntc_engineering/ntc_engineering.html NTC] and [http://www.atpsensor.com/ptc/ptc_engineering/ptc_engineering.html PTC] sensors. ---- '''Easytherm''' * '''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 !''' files are located in the files section of the Megasquirt group at http://groups.yahoo.com/ or directly from [http://www.msefi.com/dload.php?action=category&cat_id=27 msefi.com] '''Steps:''' * 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/ Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.