Pages: [1]   Go Down
Author Topic: DS18S20 and DS18B20 are both 5 degrees off  (Read 3015 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Just another Hacker

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

0
Online Online
Shannon Member
****
Karma: 162
Posts: 10516
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

[ I won't respond to messages, use the forum please ]

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Just another Hacker

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12483
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have tried different DS18B20's.

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

Logged

Rob Tillaart

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

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Just another Hacker

Madrid, Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 41
void guarantee{};
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3435
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Madrid, Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 41
void guarantee{};
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I know why smiley-lol !
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.
Logged

Pages: [1]   Go Up
Jump to: