Electronic – arduino – What waterproof temperature sensor do I need to measure water temp using an arduino mega

arduinosensortemperaturewaterproof

I consider myself a complete novice when it comes to electronics. My current project consists of measuring water temperature using an arduino mega. What parts will I need to complete this project? So far I searched sparkfun and arrived at this: http://www.sparkfun.com/products/11050. Do I terminate the leads directly to the arduino or to a breakout board to calculate the Dallas 1-wire signal?

Best Answer

The DS18B20 used by the Sparkfun sensor can be used with or without external power supply. The Sparkfun seems to have three wires, so that will be ground and data and Vcc. (so far for a 1-wire interface!).

enter image description here

Black is ground, red is Vcc, and white is data (per comments here).

The data line will be pulled high by the resistor when idle. You're not supposed to make the I/O high! If you want a high level, switch to high-impedance input. To make the line low, set to output and set the level to "0".
May sound a bit complicated, but once you set the output level low, you don't have to touch it anymore, and set high/low by just changing the Data Direction bit.