Monitoring the temperature of a fish tank is very important, Although mine has an automatic heater, I still don’t trust the mechanical thermostat. While working on a simple inside and outside temperature meter I wondered what if we needed to monitor many different temperature zones. Initially I started with the DS1631 I2C temperature sensor as that was the only one I had to hand. The results were good but having to set the address manually and at least 4 wires were required to each sensor. The Fish also did not feel comfortable watching an integrated circuit partially suspended in their waters. Dallas one wire seemed to be a better idea to use in such a situation. I must admit that ive always overlooked the one wire devices until now. The protocol at first seemed hard to implement, maybe because I am used to not reading all the information provided by the manufacturers. It was time to read all that was available. The next big task was to source the part. I did not want to bother Dallas/Maxim for free samples because I wanted more parts. Maxim have always been the most generous at sending samples and also do not ask too many questions. Headed to Ebay, I got two DS18B20′s for the price of one 1820 in India, shipped to my door within 5 days. That was quick. it all arrived in a small package roughly the size of a visiting card. It did have a visiting card inside with 5 DS18B20′s sticking to the back of it:

The next part was coding, there are various codes available on the internet to read one wire devices but I could not find any using multiple devices. An application note from Dallas AN162 is all you need to read many devices on the same bus. My code can accept up to 5 devices on the fly and display their temperatures one by one, because of Ram limitations I have restricted it to 5 devices. The devices can be added and removed without resetting the circuit.

Source Code