Alternative sensor for Data Logger Shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Alternative sensor for Data Logger Shield

by missnoitall on Wed Mar 09, 2011 12:26 pm

The data logger shield and example code base forms a great basis for many interesting projects involving file writing to an SD card, time keeping and light and temperature sensing. My sensor choice for the later would not, however, be the Analog Devices TMP36. I am instead using the Maxim DS18B20 device and have successfully integrated it into an Arduino using only one resistor and an input port. There are many reasons why the Maxim device is a better choice. First and foremost, this device is digital and not analog, like the TMP36. Claims of 0.1 degree accuracy are not supported by the TMP36 data sheet. Perhaps the project can achieve 0.1 degree resolution with the TMP36, but this is different. The data sheet says +-1 degree accuracy only at 25 degrees C and +-2 degrees accuracy over a -40 to +125 degree range. The Maxim device (about $3 at Mouser) data sheet accuracy, however, is +-0.5 degrees C from -10 to +85 degrees C and operates between -55 to +125 degrees C. But what is really interesting about the MAXIM device is it's two to three wire interface, it's ability to communicate with a long string of temperature sensors with zero expansion in parts or computer ports and it's much more noise immune digital interface. Without any loss of accuracy, you can read temperatures from N devices strung out on a two wire cable (this requires one resistor, one FET and one CPU port) or, if your supply 3.3 to 5.5V on a third wire, you achieve the same performance without ever needing the FET. Even better, there is a code solution that eliminates the need for the FET device in the two wire configuration. So by using the MAXIM device and very little hardware resources, you could monitor temperatures in every room in the house, outdoors in as many places as you can wire to and the refrigerator as well!. MAXIM app notes have detailed code usage examples and I have very easily ported some of their example code onto the Arduino so that I can monitor and print measured temperature in C and F from one device. I have not yet done the multiple device case, but it does not appear difficult. Example code attached (I hope!) :D
Posts: 4
Joined: Mon Jan 10, 2011 6:20 pm

Re: Alternative sensor for Data Logger Shield

by adafruit on Wed Mar 09, 2011 5:52 pm

sure! go for it!

Posts: 12131
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Alternative sensor for Data Logger Shield

by fuceye on Sat Feb 16, 2013 2:14 pm

do you have any example code with the sd card and the ds18b20?

i'd like to use 3 temp sensors and log all data to a file...

Posts: 25
Joined: Sun Nov 25, 2012 5:43 pm

Please be positive and constructive with your questions and comments.