MegaSquirt uses
coolant and air temperature sensors to determine the warm-up characteristics of the engine and the density of the intake air. They are essential to proper functioning of a MegaSquirt® controller. Both sensors are Negative Temperature Coefficient (NTC) thermistors. This means that they are resistors whose resistance decreases as their temperature goes up.
MegaSquirt® uses the temperature sensor as one leg of a voltage divider. 5.00 Volts (we will call this Vs) is supplied to a default 2,490 Ohm (2.49K Ohm) resistor (called a "bias resistor", and we will denote it as Rb) and this resistor is connected to the temperature sensor (denoted here by Rs) which in turn is connected to ground.
The voltage between the two resistors is:
V = Vs * (Rs/(Rb+Rs)) = 5.00 * (Rs/(Rs+2490))
Resistor Rp does not affect the voltage divider, it simply limits the current to the processor pin (there should be very little current anyhow, the input is "high impedance").
MegaSquirt reads this voltage as a series of voltage steps: 256 0.020 Volt steps for MS-I, 1023 0.005 Volt steps for MS-II. The conversion from volts to steps is done by the analog-to-digital converter (ADC).
Before electronic fuel injection, the temperature sensors were used mostly to drive gauges or 'idiot lights', rather than control the engine. In addition, these gauges were highly damped, and electrical noise in the signal was not a problem. As a result, many non-EFI vehicles have 'one-wire' temperature sensors, and ground the sensor through the engine block. However, when EFI came along (in the mid 1980s) temperature sensors were used to determine the instantaneous fuelling and spark advance in some cases, and reducing noise became essential. The manufacturer's solution was 'two-wires' sensors that use a dedicated ground return to the ECU (instead of the much more noisy high current ground). MegaSquirt® controllers adopt a similar scheme. DB37 pin #19 is used for the sensor ground, and the IAT, CLT and TPS ground wires should be run to it (or the labeled spots ('ret') on the relay board that connects to pin #19). In addition, if you are using a VR trigger, you should bring the VR ground back to the MegaSquirt® controller (pin #2 or pin #7 - pin #2 will be a dedicated ground for the VR circuit in future revisions, pin #7 is a general ground, as is #2 on V2.2 and V3.0 main boards).
Naturally aspirated engines using MegaSquirt® can use the same sensors for coolant and air temperature. These
sensors are inexpensive (roughly $18 US) GM units readily available from any parts store (GM part number
12146312, may have been replaced by #15326386). They have a
3/4" hex.
However, you will save some money if you can source these from a salvage yard, with the mating connectors (which are GM #12162193). If you are unable to get them this way, consider using a “spade-type” connector or reusing your existing sensors (with EasyTherm and/or resistor calibration adjustments).
Turbocharged or supercharged engines should use an open-element air temperature sensor for a faster response time. Here are some reported part number equivalents for both the coolant and air temperature sensors (verify before ordering):
Coolant temperature sensor (CLT)
GM #12146312
(may have been replaced by #15326386)
Standard TX3
GP SORENSEN TSU81
AC DELCO 213-928
NIEHOFF DR134AK
WELLS SU109 MSD 2310 (includes connector)
Connector Pigtail (CLT)
(mushroom key way)
Wells PN 254
NAPA PN ECHTSC200
Conductite/Dorman 85100
(~$10 @ Autozone (PN 047131))
Air temperature sensor (IAT)
GM #25036751
Standard AX1
GP SORENSEN 779-19001
AC DELCO 213-190
NIEHOFF IGNITION TS83631 was DR-136W
WELLS SU107 MSD 2320 (includes connector)
Connector Pigtail (IAT)
(square key way)
Wells PN
254
Wells PN 235
NAPA PN ECHTSC300
Niehoff PN PS77421 (~$15)
Conductite/Dorman PN 85110
The coolant temperature sensors were apparently found in the following applications:
- ALL GENERAL MOTORS (Chevrolet, Pontiac, Buick, Oldsmobile, Cadillac, GMC) 81-96
- HONDA TRUCK 94-96
- ISUZU TRUCK 92-96
- JEEP 82-87
Note: A few early installations using the open-cage MAT sensor experienced vibration induced failure of the sensor. The thermistor bulb is supported only by two thin wire legs. These can apparently fatigue and break when installed in high vibration environments, such as occurs when you screw it directly into an intake manifold. Several people solved the problem by "potting" the legs of the thermistor with O2-sensor-safe silicone (most silicone sealer/adhesives destroy O2 sensors, so pay attention!), squeezing it down inside the sensor body but leaving the bulb exposed.
Note that these sensors have different connectors. The coolant temperature sensor uses a “mushroom” shaped key way where it inserts into the sensors, while the open element intake air temperature sensor uses a “rectangular” connector key way.
The wiring schematic for DB37 shows only one input for all of the sensors (except for the two for the TPS). The recommended GM sensors all have two wire connectors. The missing connection is a ground wire for the sensor. Sensor grounds should be brought to the same grounding point on the engine block as the MegaSquirt ground, unless they are grounded through the body of the sensor.
If you are looking for sensors with a standard “spade” type connector and a ground through the body of the sensor (
not recommended, see above), GM part number
25036135 is what you need - see the illustration below:
(There is also a spade type GM sensor with a ¼" NPT thread available as GM part number 25036292. This part was originally used as an oil temperature sensor on 84-87 Corvettes, and has the same resistance curve as other GM sensors.)
The resistance curves for the MegaSquirt®/General Motors coolant and air temperature sensors, as well as various part number cross-references, are listed below:
GM Temperature Sensor Resistance
Degrees F - Degrees C - Ohms
-40º -40 100,700
0º -18 25,000
20º -7 13,500
40º 4 7,500
70º 21 3,400
100º 38 1,800
160º 71 450
210º 99 185
The thread for the recommended General Motors (and equivalent replacement) coolant and air temperature sensors for the MegaSquirt® controller is
3/8 inch National Pipe Taper [NPT] thread. A 9/16 inch pilot hole is required for the tap. Recall that pipe sizes are based on nominal inside diameters, not outside diameters as for standard National Coarse [NC] and National Fine [NF] threads. The sensors are designed to be tightened to 20 N-m (15 lb·ft).
Approximate sizes
Nominal Pipe Size (actual ID is slightly bigger) - Approx. Outside Thread Diameter - Drill Size
1/8" 3/8" 5/16"
1/4" 1/2" 7/16"
3/8" 5/8" 9/16"
These sensors were been used on practically all GM cars in the 1980s and are easy to find - the same is true for the correct connectors. However, other sensors can be used if the EasyTherm software is used to recalibrate your MegaSquirt® EFI controller.
Easy Therm
If you are using non-standard coolant and/or air temp sensors with a MS-I™ controller, you must create “.inc” files that are essentially look-up tables for your MegaSquirt® EFI controller to relate resistance to temperature (For MS-II™ you can change the curves directly in MegaTune, with not other steps necessary). These files must then be compiled into one .s19 file, and then down loaded to the MegaSquirt® controller.
EasyTherm makes it very easy to use “non-standard” temperature sensors with the MegaSquirt® controller. It does three things that otherwise can be a bit of a pain:
1) It automatically creates the .inc files from 3 temperature/resistance pairs. Entry in degrees Fahrenheit or degrees Celsius is allowed. Non-standard bias resistor values can be entered.
2) It creates the .s19 file using the above data - you do not need a compiler!
3) It downloads this .s19 file to the MegaSquirt® controller via the serial link (once R6 is shorted to enter bootloader mode), and reboots the MegaSquirt® - so you do not need to mess with Hyperterminal.
Do not forget that you need to copy the applicable .inc files that EasyTherm creates to your MegaTune directory after a successful down load.
Note that you do not need EasyTherm with MS-II, you can calibrate the thermistor tables directly in MegaTune (under 'Tools') without reloading code.
To use a MegaSquirt® controller with an air cooled engine, you will have to decide where the best place is for the coolant sensor: in the oil, or on the cylinder head (CHT). There are various arguments for and against using either CHT or oil temperature as the 'coolant' temperature input on air cooled motors. A lot depends on whether the motor is substantially oil cooled or not. Since the CTS input is used for warmup enrichment, you want something that responds fairly rapidly, so this is highly engine-dependent.
For high temperature applications (i.e. air cooled engines with a CHT), in MS-II you can set the #unset EXPANDED_CLT_TEMP by changing:
#unset EXPANDED_CLT_TEMP
to
# set EXPANDED_CLT_TEMP:
Then the upper temperature limit should be 600 degrees F. This is from the INI notes:
; FAHRENHEIT (Expanded/Normal):
; Low Limit: -40F/-40F
; High limit: 600F/300F
; Low danger: 150F/50F
; Low warning: 200F/150F
; High warning: 325F/200F
; High danger: 350F/220F
However, you have to
calibrate the thermistor table(s) appropriately. However, note that the tuning software limits the temperature range. The thinking is that if you are at an extreme it is probably a bad or missing sensor, so it goes to a default value. This isn't a big deal in
TunerStudio though, you can change these limits in the ms2ReferenceTables.ini file. You can adjust these limits if EXPANDED_CLT_TEMP is set. Currently only the CLT sensor respects EXPANDED_CLT_TEMP, the IAT does not.
IAT min = -40, max=350 if outside that range it goes to 70 CLT min = -40, max=350 if outside that range it goes to 180 CLT with EXTENDED_CLT_TEMP min = -40, max=400 if outside that range it goes to 350 default
Here is the section of the ms2ReferenceTables.ini file that controls that:
; tableLimits (optional) = intentifier, min, max, defaultVal
; will set the default value if value is outside the min and max limits.
tableLimits = 001, -40, 350, 70
#if EXPANDED_CLT_TEMP
tableLimits = 000, -40, 400, 350
#else
tableLimits = 000, -40, 350, 180
#endif"
So the user can just edit the one line in ms2ReferenceTables.ini using notepad.exe or something similar to change it from:
tableLimits = 000, -40, 400, 350 to something like:
tableLimits = 000, -40, 600, 350
or similar, and it should work once the user re-burns the table.
The additional problem with very high temperatures is that the difference in voltage gets very small (and MegaSquirt can only read discrete voltage steps, about 5 milliVolts per step from 0.00 to 5.00). Also, if the volts at the processor pin gets very near 5.00 (~4.98) the values defaults to a safe value because it assumes there is an open circuit.
The ADC count result from the voltage divider circuit (
above) is:
ADC Count = V/Vs = ADC max count * (Rs/(Rb+Rs))
= 255 * (Rs/(Rs+2490)) for a MS-I (8-bit ADC)
= 1023 * (Rs/(Rs+2490)) for a MS-II (10-bit ADC)
One thing you can do is use a lower bias resistor (R7 for the CLT circuit) - this will give you more resolution at the high end of the temperature scale (but loose it at the cold end). The default value is 2.49K Ohms, and if that is what is in there you might try 2.2K Ohms or less (down as low as 1.0K). Note that you have to re-calibrate the thermistor tables when you change resistor values.
Here is a simple ADC count calculator that shows the number ADC steps for a given bias resistor and sensor resistance. If the ADC count values are very high or very low at your sensor's resistance (at a given temperature), the temperature range may be restricted:
Bias resistor:
Ωhms
Voltage supply:
Volts Sensor resistance: Ωhms ADC resolution: 8 bits 10 bits ADC Count:
For air-cooled use, side of the argument says to use the CHT over the oil, as the oil takes over twice as long to get to operating temperature than water in a water-cooled car does. The engine does not need to run rich for long periods, only enough to keep the car driveable while it is warming up. Once the cylinder head is up to temperature, the car is usually quite driveable. For an air cooled engine you can drill and tap into a fin in the head for the CHT sensor.
The other side of the argument says that it does not matter if the oil warms more slowly, you can just set the warm-up enrichment to come off at a lower temperature. In that case, the GM coolant sensor fitted in the oil (sump) will work nicely. Search the archives for extensive discussions on these points. It is your decision.