Thermistor experiment - 18x

ZeroScope

New Member
I have been having trouble with a part of a project i am undertaking. The project title is using a thermistor for temperature control. I have reached a stage in the project where i am confused.
I am using an 18X chip ( first time picaxe user also ) and the circuit consists of a potential divider which has a 5k thermistor and an Xohm resistor (havent decided what resistance this needs to be yet). I understand the ADC works in such a way that the 256 signals are split up to approximatly give 0.02 volt incriments. Now does this mean that when i hook the potential divider to the chip that it can only read 256 temperatures?
If this is not the case then a kick in the right direction would be much appreciated. Thankyou.
 

ZeroScope

New Member
sorry i dont think i was very descriptive of the project. i am trying to make it so that i can set a temperature and keep it at that temperature. I would like to have it so i can select any temperature (within reason: not below freezing, not avove boiling of water)
 

BeanieBots

Moderator
It all depends on your thermistor and what the datasheet says about it.
The resistance of the thermistor will change with temperature in accordance with some non-linear function usually given in graphical form in the datasheet.
From that, you could calculate the required resistance and determine the required ADC value to test for.
Alternatively, experiment.
Get the thermistor to the required temperature and simply measure its resistance with a multimeter. Then, make the other resistor which makes up your potential divider the same value. Your potential divider will now give you mid value when at the required temperature.
If you use ReadADC then it should return a value close to 128
For ReadADC10, it will be about 512.

How sensitive it will be to temperature changes will be down to the thermistor. If you require more sensitivity then you need to explore using op-amps to amplify the change.
 

premelec

Senior Member
I like thermistors! less complication and price than DS18B20 with the caveat that they aren't linear and don't put out digital data. Since the A/D converter on a PICAXE is ratiometric you can put a thermistor in series with a resistor and put that from V+ to V- and the junction to an A/D input and it won't be sensitive to supply voltage.

You either measure or use manufacturers table of values to get resistance temperature values for the thermistor...

I set up an Excel spread sheet with these values and the resultant A/D readings for 8 or 10 bit resolution - you need to calculate the voltage divider ratio for each temperature with its series resistance and then multiply that times 1024 or 256 to get the A/D reading at that temperature... using a lookup table or whatever approximation you then come out with the temperature from the A/D reading in
your software.

Typically for a greater than 1 bit change per F Deg you can get a range of about -10 to 200 DegF with a resistor equal to the 75 deg F resisistance in series...

Another caveat is self heating from the V^2/Rt power into the thermistor - manufactures tables/specs have self heating factors shown - the smaller the thermistor mass the larger the effect per milliwatt of self heating.

For simpler readings than thermistors OR DS18B20s look at the www.analog.com AD590 type unit - this draws a linear to temperature current which then can be read, even over long wires, through a resistor converting it to a voltage again going into the A/D convertor.

And then there is the thermocouple and why not platinum RTD -? Cost!

Good luck with it - a lot depends on precision, accuracy and temperature span you require - just a constant current forward through a silicon diode will give you a linear voltage vs temperature with various other caveats [RF recification!].

As Manuka says - you can never have too many thermometers! [or methods]
 

ZeroScope

New Member
thanks alot guys for the help, so far its helped loads :)

I can get the thermistor to keep a constant temperature (as ive said before i NEED to use a thermistor for the project) now but i'm still unsure on how im going to go about what i call the "wow" factor of the project. I would like to have it so that i can have two buttons connected into the circuit. One of which will increase the temp. by 1 degree and the other to decrease it by the same amount.

For this would i need to set up a look up table and then tell the 18x to up the temperature it wants to keep constant?
 

Dippy

Moderator
I take it you're making an adjustable thermostat?

Be aware that thermistors vary with manufacturer etc. I'm sure u knew that.

Maybe post your electronic schematic so that everyone is talking from the same podium.
Coding should be pretty easy by sound of it.
 

premelec

Senior Member
Sounds like you are progressing well! The A/D reading from the thermistor will vary by different amounts per degree at different start temperatures so that needs to be considered.

Something additional to consider would be how to prevent overshoot or undershoot as you are trying to reach a new temperature settings - and indeed to keep from oscillating too far around a set temperature... a small 'wow' would be to add a lamp [LED?] across the heater which you are controlling so you get visual readout power going to it... Aquaint yourself with the term 'hysteresis' and what it does. And 'proportional' control. Your experiment may seem common but it is the basis of billions of control circuits around the world! Let us know how it's going and what new features you've added!
 
Top