built by Chris Kirmse

I have had a La Crosse thermometer and wireless outdoor temperature and humidity sensor for many years, and I've always wanted to capture the exact data from that thermometer and create temperature graphs on a computer. Since the specific model that I have has no computer interface, I had no way to do this until I received the Practical Arduino book for my birthday last year. It described a simple circuit which could read the 433MHz broadcast from the outdoor sensor. I had been looking for a good project to learn more about microcontrollers so I thought this was a great opportunity. With a few modifications to the book's project I knew I could get the data into a database on my home server and then into a graph. In the future, I can compare year to year temperatures.

I started by getting an Arduino Uno and this nice 433MHz receiver shield from Freetronics. It has a little bit of prototyping room for additional wiring, which I figured I would need eventually. After plugging them together and running the program from the book, I was sad to find that I was getting no useful data. After a few hours of reading, I found that I had a different La Crosse sensor from the book's project, and in fact someone else had already modified the program to work with my sensor (the TX4U). I tried that program and soon saw some temperature reports coming in over the serial connection from the Arduino! Once I saw that, I knew I would eventually be able to finish this project.

Even though I was getting readings at this point, I was getting many more errors than successes. After much data logging (and reading about the bit encoding of the protocol), I eventually discovered that the timing of my sensor did not quite match up with what the program was expecting. Since the protocol was reverse engineered, this shouldn't have been too surprising--each device no doubt has slightly different timing than others, and over years each device can change as well. With some adjustments to the timing constants, I was eventually able to get relatively stable readings from the wireless sensor.

I knew that I wanted to have some local output on the device to show the temperature and status of the readings, so I wired up an LCD from Adafruit and added some output. This LCD even has a nice RGB LED backlight which I wanted to use to show errors (with red), normal working status (with green), and cold weather (with blue). It doesn't show up well in my photos, but the color backlight is quite beautiful.

Now that the basics were working, I started to think through the rest of the project. I knew I wanted to have the device plugged into ethernet so that it could send its readings to the server (the server is in the basement and the outdoor sensor's readings do not reach that far). I also wanted to add a barometer because air pressure is a key variable to use to predict the weather. As is, I would not have enough pins on the Arduino to connect these additional devices. I read about an i2c/SPI LCD backpack on Adafruit which would do all the complicated communication with the LCD while only taking 2-3 pins and I was sold. I soldered it up and hooked it up to a few pins with SPI, because I was going to use the i2c connection for the BMP085 barometer breakout from Sparkfun. The barometer only runs at 3.3V, whereas the LCD backpack needs 5V, so they cannot share the same bus. It turns out that Adafruit carries essentially the same board but I just happened to read about it on Sparkfun first.

Now it was time to change from prototyping mode to final build mode. This meant two things--setting up an ethernet connection from the Arduino instead of going through a serial connection to a laptop, and soldering final connections instead of using a breadboard. The ethernet problem should have been easy to solve by getting an Arduino/Ethernet combo board, and changing the program to upload data over http to my server in addition to dumping the data over serial.

In theory, this was a great solution. However, it proved problematic at first because the combo board does not have a USB connection; you need to use an USB/Serial adapter (or FTDI friend) to program it and send and receive serial data. Unfortunately, it requires 5V, and the only FTDI friend I have is 3.3V. Luckily I do have a USBTinyISP which I was able to use to program using the ISP port. This solved the programming problem but still gave me no serial connection for debugging. I eventually wired the serial connection to two pins on the standalone Arduino, and then wrote a little program that used the SoftSerial library to essentially forward the data from the Arduino/Ethernet combo to the hardware serial port back over USB to the computer. This was a messy setup but proved quite helpful during development.

With the ethernet problem solved, it was time to do some final wiring. I soldered the barometer in the prototyping area of the Freetronics shield and connected it over to the i2c pins (Analog pins 4 and 5 on the Arduino) as well as 3.3V power and ground.

After testing the fit into the awesome Adafruit enclosure, everything was looking good. I had to put some electrical tape between the receiver shield and the Arduino board because when they were pressed together I was getting some shorts, but that was pretty straightforward (numerous people talk about this on forums discussing the Arduino/Ethernet board). I replaced the last prototyping connections with permanently soldered wires and assembled the case. After some software revision, here is the final device:

The weatherino shows the current outside temperature (in Fahrenheit), barometric pressure (in hectoPascals), and whether the pressure is rising, falling, or steady (using custom arrow graphics). It also shows the current outdoor humidity and has a blinking heartbeat in the bottom right to show that it is still functioning. It uploads its data once per minute to my home linux server which stores the data in a simple MySQL database. The data is graphed using jqPlot, a nice javascript graphing library.

January 30, 2012