Pages: [1]   Go Down
Author Topic: Strange problem with batch of DS18B20's  (Read 1066 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

Recently I bought a batch of DS18B20 temperature sensors. When I plugged them in I noticed they all returned incorrect values: using the DallasTemperature.h library around 54 decrees C.

Using the same sketch and same hardware but switching the DB18B20 sensor with one I got in the past, the problem is solved. So my guess is that it's really an issue with the sensors. The strange thing is that the complete batch of sensors gives the problem (I bought 5), and the error margin is consistent (when I add 54°C to the result, it seems to be correct).

Any ideas?

Thanks!
Jan
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure they are the DS18B20 ?
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are various VERSIONS of the "1820"... that letter in the middle is important... 18B20, 18S20, etc. There are datasheets for each, and if you look closely, you'll see how they differ. (Some have wider ranges, at the cost of less precision, some are cheaper, etc, etc.)

The basic priciples they all run on are consistent... but the control of features, and the reporting of temperature sensed varies in details.
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3013
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You got the Fahrenheit model ?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestions. I checked what's written on the sensor: DALLAS 18B20, so I guess it's indeed the one I'm writing the code for. :-)

michinyon, is there a Fahrenheit model? The library I'm using both has a method to report the temperature in C and in F.

J
Logged

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

@jtlns, did you wired it like that: http://bildr.org/blog/wp-content/uploads/2011/06/DS18S20-hookup.png ?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, only difference I used a 10K resistor. But as said, other DS18B20 sensors work correctly on the same sketch/wiring.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

is there a Fahrenheit model?

No.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Michinyon! That was naughty!

Dear Newbies: He was just kidding. There's only a "celcius" model of any of the 1820s. If you want to display the tture in F, there's nothing to stop you, but you convert the C reading to F in your software.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I do have some metric crescent wrenches for sale smiley-wink
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

jtlns, I have no clue.

If you download the newest library for OneWire, it includes examples for the DS18B20 family sensors.
Could you try that, instead of the DallasTemperature library.
http://playground.arduino.cc/Learning/OneWire

Perhaps you could try another pin of the Arduino.
Or if you use only USB power, you could try a power supply.
But in the end, I have no clue what it could be.
Logged

Pages: [1]   Go Up
Jump to: