Go Down

Topic: Strange problem with batch of DS18B20's (Read 1 time) previous topic - next topic

jtlns

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

Erdin


tkbyd

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.

michinyon


jtlns

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

gasperinn

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

jtlns

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

Jack Christensen

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

tkbyd

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.

Jack Christensen

I do have some metric crescent wrenches for sale ;)
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Erdin

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.

Go Up