Electronic – arduino – Reliability of DS18x20 temperature sensors

1-wirearduinotemperature

I'm using Maxim's DS18x20 (I've actually got more than one variant) 1-Wire temperature sensors to log the temperatures in various rooms in my house once a minute. About one reading in a thousand, I get something completely bogus back. In the middle of a sequence that's gradually rising from 65F to 70F I get something like -32.1F or 15.64F.

Has anyone else had that kind of problem, or is this something wrong with my setup? If this is just a known issue with these things, I'll have to do something like taking three readings and throwing out the outlier.

Just a few statements about my setup:

  • I'm running at 3.3V
  • I'm checking the checksum of the reading as it comes back to the arduino, and it matches (or I think it does – there could always be a bug in that code).
  • These are running off of normal power, not parasite power.
  • I have the 4.7K pullup resistor in place.
  • I'm only using a single sensor on each sensing platform.
  • The sensor is on a PCB attached to the arduino that's reading it.
  • I see the same problem reading from a variety of different arduinos (diecimilla, pro-mini, homemade custom)

Best Answer

I have see this with occasionally with the DS18B20. For my application, it was simple enough to filter out the spurious results with code.