Go Down

Topic: DS18S20 and DS18B20 are both 5 degrees off (Read 4120 times) previous topic - next topic

Raegin

I am trying to get proper temperature readings for both of these one-wire sensors (not at the same time). They are connected in parasite mode as described on http://www.arduino.cc/playground/Learning/OneWire. Along with the sketch on that page.

The problem is that both the DS18S20 and DS18B20 are about 5 degrees too high when compared to a calibrated digital thermometer with probe. To check this I have put the one-wire sensors along with the thermometer probe in ice water. The probe gave me a reading of 0-1 while both one-wire sensors gave a reading of 3-4 degrees. All sensors were in ice water for several minutes.

When everything is at room temperature the probe gives me a reading of 19 while the one-wire sensors give a reading of 23.xx. I have tried two different DS18S20 sensors and two different DS18B20 but no joy for me.

I have absolutely no idea why I'm reading the temperature with such an offset. Does anyone know what could cause this?

WillR

Why not supply power and retest before this goes any further. I have several digital thermometers that do track well and the DS18B20 is one of them.

I do supply regular power.
Just another Hacker

Raegin

I've tried the normal power mode as well, forgot to mention that. With both modes I get the same reading. I know that the DS18B20 and DS18S20 are suppose to be calibrated already and I trust that mine are too. My guess is that the error comes from somewhere else but I don't understand where.

I've tried changing the cables but that doesn't change anything. 

MarkT

With normal power you have decoupling on the chip?  It does sound like they are out of spec (are they genuine parts or clones?  Were they soldered for too long causing thermal stress perhaps?)

(Also double check your caclulations - print the raw temperature value and do the conversion by hand to check)
[ I won't respond to messages, use the forum please ]

WillR

Maybe there should be "post  the code" reminder?

And a good question is -- are you using the Dallas One-Wire code found here or where is it from?

The Dallas Library from here works...
http://milesburton.com/index.php/Arduino#Libraries
Just another Hacker

Raegin


With normal power you have decoupling on the chip?  It does sound like they are out of spec (are they genuine parts or clones?  Were they soldered for too long causing thermal stress perhaps?)

(Also double check your caclulations - print the raw temperature value and do the conversion by hand to check)


I don't think I understand your first quetion about decoupling on the chip.
The parts I'm using are genuine dallas chips. I have the same issue with multiple chips, two were ordered last week and the other two were ordered a year or two ago. The chips are never soldered and were stored in anti-static bags.


Maybe there should be "post  the code" reminder?

And a good question is -- are you using the Dallas One-Wire code found here or where is it from?

The Dallas Library from here works...
http://milesburton.com/index.php/Arduino#Libraries



I've tried several different codes, as I mentioned in the first post I've used the code found on the arduino playground. As well as the dallas library. They all give me the same readings. I even tried different wires and different values of pull-up resistors but no luck so far.

robtillaart

You have tried different DS18B20's.

Did you also test different Arduino boards? Or other processor board?

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

WillR

Decoupling -- capacitors on the POWER line only. NOT using parasitic power.

Maybe you got a bad run... all I can think of at the moment.
Just another Hacker

asselinpaul

I am having the same problem!
I have two different sensors, both from Sparkfun (legit).
Everything is wired up correctly and the temperature is 5 degrees too high.
Emailed them about whether the batch had been tested.


wildbill

I have the same issue, I have a pair that both read a little high. Never been that bothered by it - they're just reporting temperature in the house to a web server. Now I'm intrigued though. This:

Quote

print the raw temperature value and do the conversion by hand to check)


Is good advice I'll follow this evening.

asselinpaul

I know why XD !
The sensor was too close to the arduino.
When I keep them apart ( sensor and board), the temperature is good.
As soon as I take it close to the arduino the temperature shoots up!
I do not know why this happens but it's clear that it does influence my results.

Go Up