10.19.2013

Arduino Sensor: DS18B20 1-Wire Temp. Probe

This is the first of many posts which deal with setting up the environmental sensors on our submersible. The first sensor we experimented with was the DS18B20 Waterproof Temperature Sensor. This sensor was extremely easy to setup and therefore a good start for us.

We also decided to choose this temperature sensor because of its diverse capabilities. The DS18B20 is designed on a "1-Wire" data transfer technique. This allows for the easy addition of multiple temperature sensors on one Arduino.

Materials Needed:

  • Arduino UNO (and Arduino software)
  • DS18B20 Waterproof Temperature Sensor
  • 4.7k ohm resistor (***make sure it is 4.7k ohm NOT 4.7 ohm)
  • Wire cutters/strippers and electrical tap
  • Solder

1. Visit our Download Page and download our code + libraries in the folder: Arduino - DS18B20

2. Download the libraries and then move them into Documents---->Arduino---->Libraries (may have to make  the library folder).

3. Acquire a DS18B20. There will be three different wires (white=data, red=power, black=ground)

4. Stip off the waterproof casing from the first 6 inches of the sensor.

5. Cut both the power and data wires about 1 inch from the end of the casing.

6. Solder one side of the resistor onto the data wire and the other side to the power wire.

7. Solder on pins to the end of each sensor wire.

8. A picture of the final product is below (we recommend wrapping the open wire in electrical tape):






and this is a sketch of the setup we used (yellow=data):


and here is a picture of the sensor and our Arduino. 


9. Upload the code to the Arduino. You should see a serial monitor output (baud 9600) like this:



Stay updated for tutorials on how to use Java to display Serial Outputs from the Arduino over the Video Stream. To output the data using Python on the Raspberry Pi check out the Arduino UNO: Serial Outputs to Raspberry Pi. To use the DS18B20 through Java check out this post.

6 comments:

  1. We're glad it was useful!

    I Just edited the code on our downloads page. Everything is now up-to-date. Thanks for pointing out the discrepancy between the picture and the code.

    ReplyDelete
  2. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    python Training in Pune
    python Training in Chennai
    python Training in Bangalore

    ReplyDelete
  3. This is very good content you share on this blog. it's very informative and provide me future related information.
    Best Devops Training in pune
    Devops Training in Bangalore
    Power bi training in Chennai

    ReplyDelete
  4. Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
    Data Science course in kalyan nagar
    Data Science course in OMR
    Data Science course in chennai
    Data science course in velachery
    Data science course in jaya nagar
    Data Science interview questions and answers
    Data science course in bangalore

    ReplyDelete