News:

Let's find out together what makes a PIC Tick!

Main Menu

DS18B20_Read speed vers Thermistor code

Started by TimB, May 02, 2024, 09:38 AM

Previous topic - Next topic

TimB

Hi all

I currently use a MCP9701 to measure temperatures. It's a TO92 style chip but needs leads added and is a pain to attach to the surface I need to measure the temp off.

Code is simple just read the ADC and a bit of maths.

Looking online for a ready wired probe the only things I can find are probes made from the DS18820 that uses Onewire to read it. The issue is that Onewire looks slow I need to read the thing fast. I have other things I need to do and interrupts WILL breakup the coms.

If I'm wrong and the read speed is fast enough I perhaps could read it.

The other option is a thermistor but there is a lot of code I think to convert the A/D input to a temp. HOWEVER I only need approx 1oc accuracy and 1-100 scale so could use a lookup table.

Thoughts appreciated..

Tim

John Lawton

Hi Tim,

I see that the MCP9701 is also available in SOT-23 and SC70 SMT packages. I note from the datasheet that the absolute accuracy is only +/-2 degC from 0 - 70 degC so it may not be accurate enough anyway.

If the temperature (ambient air?) is changing quickly then the body of the sensor may not follow fast enough to be accurate. In that situation I would choose the sensor package with the least mass and also use some method to couple the sensor body to whatever you are measuring as well as possible to improve the response.

John

JonW

#2
What about RTD's? RS 2mm RTD

There are loads of analog sensors in WSON packages now, and some new super accurate digital ones from ti, should be easy to make a really small PCB and bond it to the DUT


TimB


Hi

My current set up connects as per picture. I need a probe now I can insert into a water source

The probes I want like in second pic have the option of a one wire DSxxxx or thermistor
One wire I think is slow I might go for a thermistor and lookup table unless the code is small and fast

Tim


top204

For a 0.5 or 1 degree accuracy, a thermistor will work nicely, and fast.

A list of values could be created on a serial terminal using the floating point calculation to convert the resistance into a temperature in a seperate program. Then the values made into a flash memory table with a simple interpolation procedure to read it based upon the value read from the ADC. Or if you are already using floating point, just use the calculation to linearise the thermistor. It's still faster than a one-wire interface, and more sturdy.