Temperature sensor with Arduino

I wanted to have a cheap temperature sensor to use with my home automation system (FruitHAP).
This sensor must be able to send its temperature through a 433 Mhz RF link since I have already a 433 Mhz RFXCom receiver.
Also a display would be nice to display the temperature so I could put this in a room of my house to monitor the temperature there.
I always wanted to do something with an Arduino, so i thought to create an Arduino project out of this. So I present you my first Arduino project.


Parts list

For this project you need:

Since i am too lazy to solder (and i am more a software than a hardware guy) I used components from the Seeed Grove platform
This platform enables you to very quickly cobble together a circuit, it’s literally plug and play.
It consists of a shield which you just click on top of your Arduino and in this shield you can click in various other Grove components.


Assembling the circuit

  • Plug the Base Shield onto the Arduino (check that the alignment is correct)
  • Plug the LCD with a grove cable into one of the I2C ports of the Base Shield
  • Plug the 433MHz transmitter with a grove cablee in port D2 of the Base Shield
  • Put the LED into the LED Socket kit (long leg is the anode/+)
  • Plug the LED socket kit with a grove cable in port D3 of the Base Shield
  • Plug the temperature sensor with a grove cable in port A0 (analog port 0) of the Base Shield

That’s all! The final result is in the pictures below.



Getting it

Get the code from here and upload it to the Arduino with the help of the IDE.
You need also some external libraries:

When all is correctly connected and set up, the current temperature should be displayed on the LCD (as a bonus the background color changes when the temperature changes, you can test it by putting you finger on the component labeled NTC on the temperature sensor)
The LED should blink every 10 seconds or so (can be altered, see source code), when this happens the current temperature is transmitted through the 433 Mhz transmitter.

Technical details

I won’t discuss all the code, you can view it yourself and in the comments there is also useful info, but i would like to point out some details.


Like mentioned before, the library used to transmit the measurements is X10 since this can emulate a so called RFXSensor device, which is basically
a protocol based off X10.

This protocol can be understood by the RFXCom RFXtrx433 receiver (which i am using already in combination), but you are free to use another receiver/solution. It’s  described in the docs of the X10 library (look for the file x10_RF_formats.pdf and then the section RFXSensor and you can look in the source code of the lib itself).

However, if you use the RFXtrx433 as receiver, pay attention to the fact that it transforms the received information into its own protocol.
Basically the data will be stored in 2 bytes and the temperature is actually stored as temperature * 100 so the range of temperatures to be send is limited.

Possible improvements

Possible improvents could be:
– Put the thingie in a nice box
– Use a combined temperature/humidity sensor, so that you can monitor humidity too!

Hope you like it! Happy coding!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.