Arduino Temperature Sensor – Winter is Coming

This blog post is old and the code is not up to date. Here’s a tutorial on how to connect the temperature sensor to your arduino. To send sensor data to the internet you need to use a service like COSM.

I’ve started tinkering with Arduino. My first real project was to connect a DS18B20 temperature sensor to Arduino. I have an ethernet shield on the arduino that uploads data to pachube.com.

The temperature sensor is protected by an old film case and is right outside my window. I wanted to have a web site where I can check the outside temperature so I found a small jQuery script that takes JSON data from my Pachube feed and outputs it on a small web site.

Here’s the pachube feed, and here’s the mobile web site. Get the code here.

19 Replies to “Arduino Temperature Sensor – Winter is Coming”

  1. Hi Sir, currently i doing project using fingerprint sensor connect to arduino and have ethernet shield on the arduino. Basically the output from fingerprint will be in id code(exp: 001). The problem is how to sent that data using ethernet shield to display on handphone. Help me plss

  2. Hi!

    First, sory for my english.

    I’m working on one project and I don’t know how to continue. Could you help me, please? I’m working with arduino uno, GPRS sheeld SIM900 and temperature sensor DS18S20. I would like that my virtual central heating sistem send me text message (worning: temperature lower then 19 °C) when temperature in my virtual house is lower then 19 °C. And than I send back text message ( sistem on), and my virtual central heating sistem will turn on and heat my house back to normal temperature (23,5 °C).

    Thanks for all your help,
    Luka

    1. Hi Luka!

      You have a pretty big project. You need to split it up in smaller parts and look for those solutions first.

      Have you figured out:

      1. How to send/recieve a message with the GPRS shield?
      2. How to connect the DS18S20 temperature sensor and read a value?
      3. How to connect the Arduino to the heating system and increase/decrease the temperature?

  3. Hi Adrian !

    I’m interested by your project. I would like to do the same in my house. Do I have to buy an arduino Uno to programm the ethernet board ? I have seen a wire DFTI do you know it ? I will use a long wire like you, to connect the sensor because i think if the sensor will be near from the board the temperature will be wrong.

    Thank you.

    Regards.

    1. Hi!

      I use an Arduino Ethernet shield, and for that I need an Arduino. If I would do the project today I would use the Spark Core. You can program it as an arduino (uses the same code), and it has Wifi (no cables!). It also has it’s own API, so it will be easy to get the temperature data into your phone.

      🙂

      1. thank you for the link !
        yea, I’ve already worked with Xively (cosm/pachube) before, so that shouldn’t cause a problem.

  4. Hello Adrian,

    This is my firs Arduino and I also want to make exactly the same thing as you did but i have stumbled across a serios of problems because some of the code that I am using in my arduino is writen in romanian and I don’t know exactly what to change in my code.Could you please help me ? The thing is that my arduino has Temperature, Humidity, Pressure and light sensor and there is a lot of code I must go through.

    Kind Regards,
    Flaviu Vlaicu

    1. Hello Flaviu!

      I might be able to help you, but I need to know what kind of sensors you have. Is it a combined temperature, humidity and pressure sensor or are they separate? You need to find the part/model numbers. My temperature sensor is a “DS18S20” digital temperature sensor.

  5. I thought the ethernet sheild used pin 10? Am I just reading this wrong?

    int DS18S20_Pin = 10; //DS18S20 Signal pin on digital 10

    Doesn’t this create a conflict?

    1. Thanks for information and the best tip , your blog is providing with useful information and benefit so winter is arriving I’ll try on this ,
      Thanks for sharing !!!!!

    1. Here’s the code for the pachube and the sensor.
      http://pastebin.com/E2xtcwar

      Make sure you have the correct settings for your network. That’s where I had the most problems.
      You need to input your pachube API-key on line 106.
      The function that connects the temperature sensor is on line 152.

Leave a Reply

Your email address will not be published. Required fields are marked *