Wireless Temperature Sensor

3 min read
Wireless Temperature Sensor

My goal of this project was to track the temperature in different rooms in my house using multiple temperature sensors to send the data back to a raspberry pi and have the data stored historically so I could display it in charts and send alerts. As a follow up to my wireless power outlet project, I wanted to use the 433mhz receiver. I came across some wireless temperature sensors that work over 433mhz. These temperature sensors are great because they are cheap, well built, battery powered and outdoor resistant. I was surprised at how difficult it is to decode the signal coming from the temperature sensors.

After a lot of searching, I came across a great post on reverse engineering temperature sensors. The code in this article helped tremendously. I was able to get the temperature readings for the AcuRite 606TX Wireless Temperature Sensor. The next part was to store the temperature readings. I decided to use a sqlite database since it would be easy to use in php. Finally, I wrote a simple php file to read the sqlite database and display the temperature readings in a line chart.

So with everything working, I ran into a major problem that I haven’t been able to resolve. Currently, the receiver only works from at a max of 10 feet. Obviously, this will not work. I’ve tried different receivers and antennas with no success. I’m hoping someone will have a suggestion on boosting the receiver strength so it will work over 150 feet.

Updated 3/4/2018: After a suggestion to switch to a 433mhz Superheterodyne Receiver, I have been able to successfully receive the signal around 100 ft away. Thanks for everyone’s help and suggestions! I’ve updated the guide to link to the correct parts.

Hardware

Steps

  1. Connect wires to Rf receiver chip(wiring diagram). See this article for more info on gpio pins.
  2. Install Rasbian on Raspberry Pi
  3. Install Wiring Pi
  4. Install Apache and PHP on the Raspberry Pi
  5. Install php sqlite3: sudo apt-get install php5-sqlite
  6. Clone web files
    1. Install git: sudo apt-get install git
    2. Then type: sudo git clone https://github.com/timleland/temperaturesensor.git /var/www/html/temperaturesensor
  7. You should now be able to capture the temperature readings from the command line.
    1. Change to the directory: cd /var/www/html/temperaturesensor
    2. Then type: sudo ./capture
  8. Browse to Raspberry Pi ip address: http://<your-pi-ip>/temperaturesensor/ 
  9. You should see a graph with the temperature readings

Notes

  • AcuRite 606TX sends updates every 30 seconds
  • Gpio 21/27 is wiringPi pin 2.  To use a different pin, edit this line.
  • Command to compile capture.cpp: sudo c++ -std=c++0x capture.cpp -o capture -lwiringPi -lsqlite3

Let me know if you have any questions in the comments below.