1
\$\begingroup\$

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?

\$\endgroup\$
4
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ I think that Sparkfun sensor has three wires - at least in one of the photos and by the comments. I would strongly recommend avoiding parasitic power - it seems to cause more problems than it is worth. \$\endgroup\$ – Cybergibbons May 14 '12 at 7:24
  • \$\begingroup\$ @Cybergibbons - You're right, I didn't give it a good look. I'll edit my answer. \$\endgroup\$ – stevenvh May 14 '12 at 7:26
0
\$\begingroup\$

On the page you linked to, there is a link to a complete tutorial on bildr.com - including a clear wiring diagram:

enter image description here

and sample code. Have you tried that, and did it work?

Edit: I read the question of how to hook it up and missed that you were asking about parts as well.

You have a choice of (among others) thermocouples, thermistors, and digital temperature sensors like the DS18b20 in the article. Thermistors, which are variable resistors, are probably the simplest to work with, but you'd need a part that was contained/embedded in a waterproof probe suitable for your devices. Thermocouples need an amplifier between them and the microprocessor but offer a huge temperature range, and being just a junction at end of a pair of wires, are rather more adaptable for experimenting - a small smear of epoxy is probably all you'd need to make it completely waterproof, and is probably not even necessary.

\$\endgroup\$
  • \$\begingroup\$ @stevenvh I have the arduino, but do not have a temp sensor yet. I will be ordering one asap! \$\endgroup\$ – dottedquad May 14 '12 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.