thermistor measuring problem

dmaxben

Member
For starters, this is NOT in a road-going vehicle, but I suppose it might be considered an "auto application", because its being used on an engine in a stationary dyno cell/room.

I have the appropriate "clean power" circuits in place for the Picaxe 08m.

What I am trying to do is "tap into" or "piggyback" on the coolant temperature sensor circuit that goes to the engine's ECU. I am going to use the Picaxe to monitor the existing coolant temperature sensor to turn on some radiator fans in the dyno room.

Here is the circuit that the factory ECU uses to monitor the coolant temp sensor. Its a simple thermistor that ranges from 47ohms at 302*F (150*C) to 100700ohms at -40*F (-40*C). So basically from 50ohms to 100k.

The ECU monitors the thermistor ("ECT", engine coolant temperature) like this:

There is only one ECU obviously, the diagram shows "two" just to make it easier to draw.



One side to ground, the other to the ECU's internal +5v reference with a pullup resistor, and then goes to the ECU's 10-bit ADC. (0 = 302*F, 1024 = -40*F)

To generate a basic "map" for the Picaxe, I started the engine cold, then ran it up to operating temperature, and monitored the Picaxe's ADC value in the debug window. The way I have it wired is I tapped into the +5v reference side of the thermistor, and went straight to the Picaxe ADC input. (with a resistor in series) I then had my ECU scantool hooked up to the ECU to monitor "actual" temperature. Then I would simply make notes on what Picaxe ADC value corresponded to what "actual" temperature as displayed by the ECU scan tool.

Worked perfectly. Starting at 37*F, the Picaxe ADC was reading 190, then it would ramp down to 165 at 50*F, 80 at 100*F, 70 at 110*F, 60 at 120*F....

HOWEVER...something "odd" happens (to the Picaxe's ADC value) around ~130*F (as indicated by the scan tool). At ~130*F, the Picaxe ADC value jumped back up to 200. Then at 140*F, the ADC would go down to 190, 150*F, ADC would go down to 170, etc and then the ADC value would go down from there.

I cant figure out why, the scale seems to "start over again" from 200 ADC-value (and ramp down as temp goes up) at around ~130*F.

Its not a "special" thermistor or anything.

The thermistor's resistance at ~130*F is around 820ohms. Is there something internal on the Picaxe ADC that would cause it to start reading differently and rescale if it sees less than ~820ohms on the ADC input?

Im stumped on this one...I tried adding pullup and pulldown resistors on the Picaxe's ADC input, did not seem to do anything. I have no idea what the ECU's internal pullup resistor value is, im not sure if that would make a difference... :confused:
 

cravenhaven

Senior Member
Did you mean that you connected the PICAXE power supply to the +5V reference and then the ECT sensor signal to the PICAXE ADC pin?.
I was thinking that maybe the PICAXE power supply is less than the cold temp ADC voltage causing some weird effect. Just to be sure, have you measured the voltage output with multimeter?.
 

MFB

Senior Member
You could try removing the PICAXE and monitoring the thermister output with a scope. Maybe noise is effecting the PICAXE ADC. If that's the problem, a 10K resistor in series with the ADC input and a large capacitor to ground my filter out the spikes from the external wiring.
 

dmaxben

Member
No, the Picaxe has its own "cleaned" power supply. (same common 'chassis' ground and +12v electrical system that the ECU is on though, of course)
 

dmaxben

Member
Here is a rough schematic.



Putting a 10k resistor inline with the signal wire did not change anything. It did not even change the displayed ADC value on the Picaxe debug window, which I thought it would, because you are "adding" resistance to the resistance that the Picaxe ADC input is seeing from the thermistor no? I also tried super low value resistors, and then a big (1 meg) resistor, no change either.

I did not try putting a capacitor on the input though, Ill try that too. How big a value should I use? I have a whole pile of 100uF capacitors left over from making the Picaxe's cleaned power supply.

Im going to put a DMM on the ECU's output today and see what its doing, if it changes something on the output at ~130*F, etc...

thanks everyone for the help/advice so far!
 

mrburnette

Senior Member
Since you have the PICAXE ceiling and floor values based on direct observation, use a 100K potentiometer to represent the measure circuit, from GND to +12 of a separate power source... then adjust the hi/lo value of the pot to provide a matching low PICAXE reading and using a very high impedance DVM, read the wiper voltage. Repeat for the other extreme. Between the two points, does the PICAXE ADC provide "smooth" numerical transitions from near 0 to near 255? (assuming you are using 8-bit ADC.)

I am not generally a fan of using a separate 5V source for the PICAXE and the "measured circuit." I say this from experience with "weird" happenings when a common ground really is not a common ground... which is to say, is not a theoretical "0" ohm point-to-point.

- Ray
 

dmaxben

Member
I put a DMM on the supply side. With the thermistor unplugged, the ECU is giving it ~5.01v reference.

Plugged in, the scaling goes something like this:

70*F.....2.32v
80*F.....2.01v
90*F.....1.75v
100*F....1.45v
110*F....1.27v
120*F....1.09v
123*F....1.02v
124*F....3.67v
125*F....3.65v
130*F....3.71v

So It seems that something happens when the sensor drops below 1.00v.

The sensor itself is somewhat linear; if you just put the sensor in a pot of hot water, nothing odd happens to the resistance curve at 124*F. It just continues on down, ultimately to 47ohms at 302*F. As I said before, its not "special" or anything, just the standard "47ohm coolant temp sensor" that GM has used for years.

Perhaps could the ECU be doing something to the "low reference" side of the wire? Maybe to make the sensor "shift gears" so to speak, for accuracy? Because if the curve continued on down in its current fashion (decreases roughly .5v every 20* of temp increase) as measured from 70* to 123*....the sensor would be "tapped out" (0.00v) at only ~160-170*F...when obviously the ECU can read up to 302*F.

Ill have to wait for the engine to cool down a bit (below 124*F), and then Ill measure some things on the "low reference" side of the sensor wiring.
 

hippy

Ex-Staff (retired)
I have no idea what the ECU's internal pullup resistor value is, im not sure if that would make a difference... :confused:
Block diagrams of ECU and the like are often only a simplistic representation of what they are and may not represent the actuality of what they contain.

The thermistor goes between sensor input and some "low reference" and we don't know what that low reference is, nor much about what else is going on in the ECU regarding thermistor control and measurement. It's notable that it's "low reference", not 0V, negative or chassis, so it could be that the low reference changes in response to thermistor reading or some other ECU assessment so it's possibly not across a static reference. That could easily lead to the result you are seeing. Perhaps the ECU tries to maintain a constant current through or a constant voltage across the thermistor or something clever like that.

To analyse what you have I suspect you will have to monitor the low reference and the sensor input to see what's actually going on.

Added : Seems you came to the same conclusion while I was typing !
 
Last edited:

dmaxben

Member
Well I did some more research on the ECU's internal structure and sensor monitoring tables in the Operating System. Seems as though that is the case...the ECU is switching in a resistor on the LOW reference circuit at a certain temperature, to make the scale start all over again. Theoretically giving the sensor twice as good resolution over its -40*F to 302*F temperature monitoring range.

The ECU already has a 10-bit ADC, so with this "dual-range" sensor, it would certainly generate an accurate coolant temp signal.

Here is the ECU's operating system mapping of the coolant temp sensor tables/ADC scaling. I bet if I used a Picaxe M2 chip (readadc10), it would correspond to the same ADC values vs. temperature...and then start all over again at ~124* (when the ECU changes resistance-to-ground on the "coolant temp sensor low reference" circuit). :D

Now the trick is, how to get the Picaxe to interpret which "scale" its on. The first thought that came to mind was to use the Picaxe EEPROM to write a 1 or 0 each time the Picaxe ADC gets to the "switchover" threshold, but then again that could get confusing if the picaxe power is disconnected and then reconnected while the engine is still above the "124* threshold"... hmmm. :confused:

OR...if there was some way to get the Picaxe to read/tap-into the coolant temp sensor signal independently without interfering with the signal going back to the ECU.



 
Last edited:

hippy

Ex-Staff (retired)
OR...if there was some way to get the Picaxe to read/tap-into the coolant temp sensor signal independently without interfering with the signal going back to the ECU.
Can't you ADC the sensor input and the low reference and use both to determine the temperature ?
 

dmaxben

Member
Can't you ADC the sensor input and the low reference and use both to determine the temperature ?
So you're saying splice the Picaxed ADC1 into the "+5v reference" wire, and then Picaxe ADC2 into the "low reference" wire, and then use both of those to determine whether its in "high temp" or "low temp" low-reference mode?

Unfortunately Im all out of inputs on the 08m, and I dont have any extra room on the circuit board to use a 14m.
 

hippy

Ex-Staff (retired)
Yes, that was the idea. It may be possible that you can ADC one or the other lines and use a current limiting resistor on the other and read it as a digital input pin to determine which range you are in, but if you are out of signal lines then it could be problematic.

You could upgrade to an 08M2 which might offer some additional options, particularly that Serial In can be used as a digital input. A full circuit of what pins are used and how on this part of the circuit would help in considering what options there may be.

You could prototype such a circuit off-PCB to test if the concept works and then make a decision on what to do with that better knowledge, consider if it merits a PCB redesign and what your alternatives are.
 

cravenhaven

Senior Member
Maybe it might be easier to put another temperature sender into the engine and just run it into the PICAXE, independent of the ECU sender. Maybe a T-piece where the original sender is, or tapping a new one into some other part of the cooling system.
 

dmaxben

Member
Maybe it might be easier to put another temperature sender into the engine and just run it into the PICAXE, independent of the ECU sender. Maybe a T-piece where the original sender is, or tapping a new one into some other part of the cooling system.
Yes, this would be the logical/easiest solution...but I was really hoping to be able to tie it into the factory sensor. :)
 
Top