Listen to the Rain, Raspberry Pi Style

There’s an old proverb algebra teachers often recite: You have to use what you know to find out what you don’t know. The same could be said about sensors. For example, analog to digital converters use something computers are good at finding (like time) and use it to determine something they aren’t good at finding (like voltage). So how do you detect rainfall? If you are [lowflyerUK], you use the microphone in your web camera and a Raspberry Pi.

The idea was to reduce irrigation usage based on rainfall, so an exact measurement isn’t necessary. The Python code that analyzes the audio input is calibrated with three configuration parameters and attempts to remove wind noise. Even so, it needs to be in a room that gets a lot of noise from rainfall and ambient noise can throw the reading off.

The weather service is never going to adopt this system. Still, it is a great example of taking something you know and using it to get something you don’t know. If you want a more complete weather station, we have a few options for you.

Raspberry Pi Sense HAT Super Weather Dashboard

[InitialState] posted a great multipart tutorial about building what he calls a “Hyper-local Weather Dashboard.” In plain language, he created a Raspberry Pi-based web page that fuses weather data from Wunderground along with locally sensed weather data.

The tutorial has thee parts. The first part covers reading data from Wunderground using their developer’s API (you’ll need an API key; a free one is good for 500 queries a day). The second part covers using the Pi Sense HAT to measure local temperature, humidity, and pressure. The final part ties it all together using producing the hyper-local weather dashboard (whatever that really means).

We talked about the Sensor HAT earlier (and there’s more info in the video, below). Seems like those lights could do something, although that wouldn’t do you any good over a web interface. This is a good-looking project (and tutorial) and easy enough that it would be a good place to start
experimenting with the Raspberry Pi.

Continue reading “Raspberry Pi Sense HAT Super Weather Dashboard”

WiFi Fob Acquaints OLED with ESP

When you think of WiFi in projects it’s easy to get into the rut of assuming the goal is to add WiFi to something. This particular build actually brings WiFi awareness to you, in terms of sniffing what’s going on with the signals around you and displaying them for instant feedback.

[0miker0] is working on the project as his entry in the Square Inch Project. It’s an adapter board that has a footprint for the 2×4 pin header of an ESP8266-01 module, and hosts the components and solder pads for a 128×64 OLED display. These are becoming rather ubiquitous and it’s not hard to figure out why. They’re relatively inexpensive, low-power, high-contrast, and require very few support components. From the schematic in the GitHub Repo it looks like 5 resistors and 7 caps.

The video below shows off two firmware modes so far. The first is an AP scan that reads out some information, the second is a weather-display program. Anyone who’s worked with the ESP modules knows that they have the potential to gather all kinds of data about WiFi signals — one of our favorite demos of this is when [cnlohr] used it to create a 3d light painted map of his WiFi signal strength. Chuck a rechargeable LiPo on this thing, tweak the example code for your needs, and you have a new gadget for wardriving-nouveau.

Continue reading “WiFi Fob Acquaints OLED with ESP”

Raspberry Pi Weather Station In Progress

[Jeremy Morgan] is building a weather station from scratch using a Raspberry Pi, and he has put together a nice write up that shows where he is at, and how it works. Currently, his setup is in the breadboard stage and is measuring humidity, temperature, pressure and light level using sensors that connect over one wire and I2C. He also shows how he is using Google Docs to store the data, by getting the Pi to write to a Google Spreadsheet over email: the Pi emails the data to Google every 30 seconds.

There is an analysis portion, with a Microsoft Azure web site that graphs the data over time. It’s a bit of a dogs breakfast (he might have used one interface technology for all of the sensors, for instance), but it is still a nice overview of the overall process.

Automatically channeling data into an easily accessible medium has been the target of many hacks going way back. We’ve seen a ton of companies pop up to help satisfy the need but between those and the hacked together (usually) open source solutions, there doesn’t seem to be a clear winner. What’s your favorite method of gathering and displaying data from projects like this onto the web? Let us know in the comments.

Build a Sensor Network Around a Weather Station

[Yveaux] had a problem. The transmitter on his outdoor weather station had broken, rendering the inside display useless. He didn’t want to buy a new one, so, like the freelance embedded software designer that he is, he decided to reverse engineer the protocol that the transmitter uses and build his own. He didn’t just replace the transmitter module, though, he decided to create an entire system that integrated the weather system into a sensor network controlled by a Raspberry Pi. That’s a far more substantial project, but it gave him the ability to customize the display and add more features, such as synching the timer in the display with a network clock and storing the data in an online database.

Fortunately for [Yveaux], the transmitter itself was fairly easy to replace. The weather station he had, like most, transmitted on the 868MHz frequency, which is a license-free ISM (Industrial, Scientific and Monitoring) spot on the spectrum. After some poking around, he was able to figure out the protocol and teach the Pi to speak it. He then added a Moteino and an nRF2401+ transmitter to the weather station, so it can send data to the Pi, which then sends it to the display. It is a more complicated setup, but it is also much more flexible. He’s had it running for a couple of years now and has collected more than a million sensor readings.

Wireless Weather Station

High schooler [Vlad] spent about a year building up his battery-operated, wireless weather station. Along the way, not only has he learnt a lot and picked up useful skills, but also managed to blog his progress.

The station measures temperature, humidity, pressure and battery voltage, and he plans to add sensors for wind speed, wind direction and rainfall soon. It is powered via a solar panel and can run on a charged battery for a full month. The sensor module transmits data to a remote receiver connected to a computer from where it is published to the internet. Barometric pressure is measured using the BMP180 and the DHT22 provides temperature and humidity values. The link between the transmit and receive sections uses a 433MHz Superhetrodyne RF Kit which gives [Vlad] a range of 50m. There’s an ATMega328 on the transmitter and receiver side. He’s taking measurements once every 12 minutes, and putting the micro controller in low power mode using the Rocket Scream Low Power Library. A 5W, 12V solar panel charges the 6V Lead Acid battery via a LM317 based charge circuit. This ensures the battery gets charged even when the solar panel is not receiving optimal radiation. One hour of sunlight provides enough charge to keep it going for 2 days. And a fully charged battery will keep it running for a full month even when there’s no sunlight.

The server software consists of two parts. The first pushes serial data to a mySQL database. This is written in Visual Studio C# using help from Oracle mySQL connector. The second part publishes the entries in the mySQL database to the web server. This is written in php, and uses  Libchart for graphing. He’s got the code, schematics, parts list and a lot of other information available for download on his blog. There’s a couple of items pending on his to-do list, so if you have any tips to offer post your comments below.

Hacklet 49 – Weather Display Projects

Everyone wants to know what the weather is, and what it is going to be. Today’s internet enabled forecasts give us continuous streams of current weather data and predictions from any of several computer models. Couple that with data from an on-site station, and you’ve got a lot of information to display! It makes sense that weather display projects would be popular with hackers, makers and engineers. What do you do after you build the worlds most awesome clock? Build the worlds most awesome weather display (and then incorporate a clock in there as well!).

Last week on The Hacklet I mentioned that there are two basic types  of weather projects on Sensing and Display projects. There was a bit of foreshadowing there, as this week’s Hacklet covers some of the best weather display projects on!

geoWe start with [Ashley Hennefer] and G.E.O, a project which is out of this world – literally. Geological Environment Observer, or G.E.O was created for NASA’s Space Apps Challenge. G.E.O’s mission is to keep astronauts on long-distance space flight missions connected with their home city (and planet). An astronaut programs the device with their home city and G.E.O takes it from there. Inside a glass globe, G.E.O creates weather patterns mirroring the programmed city. It does this with Adafruit NeoPixel LEDs, a water pump, a mist generator, and a wave shield. An Intel Edison controls the system. For now, weather data and programming are completed using a web interface. Once G.E.O launches though, data will be streamed via NASA’s deep space network.

flaps[Sephen DeVos] keeps track of the weather with a glance at his Internet Split Flap Weather Clock. Lots of weather apps use simple icons to display the current conditions. [Sephen] placed those icons on a mechanical split flap display which lets him know the conditions outside. The project’s case came from a donor clock given to [Sephen] by his parents. He then 3D printed an entire split flap mechanism, including the gears! Each 50 mm x 100 mm flap forms half an image.  A small stepper drives the flaps, while an IR detector lets the system know when it has reached a home position. Control is handled by an Arduino Nano and companion Ethernet shield. The Arduino checks the weather every 30 minutes. If conditions have changed, it flips to the right icon. Genius!

usmap[Dan Fein] is keeping track of the temperature across the entire USA with Weather Map. [Dan] works for Weather Underground, so it’s no surprise that he uses their API (accessed via a node.js script) for weather data. The data is fed into a spark core which then drives a string of 100 WS2812 LEDs. Each LED is mapped to a specific point in the continental USA. Color indicates the current temperature at that location. [Dan] does caution that you’ll have to slow down access to Weather Underground  if you’re using a free API key. Even with slower updates, this is still an awesome project!

yaws[Jeff Thomas] went the traditional route with YAWS – (Yet Another Weather Station). YAWS uses a 5 inch TFT LCD to display weather data from a number of sensors. [Jeff] got his display and the driver board from The driver board uses the venerable RA8875 display driver chip. The RA8875 handles all the hard parts of driving an LCD, like video RAM, refresh, and clocks. This allows a relatively slow Arduino to drive all those pixels. [Jeff] created a very handsome interface to display all his data, but he has a small problem – a memory leak causes the system to freeze up every 18 hours! We’re hoping [Jeff] will share his source code so the community can help him find that pesky bug!

If you want to see more projects like these, check the Weather Display Projects list on That’s it for this week’s Hacklet, As always, see you next week. Same hack time, same hack channel, bringing you the best of!