Introduction: Weather Station

About: My name is DJ and I previously made electronic whatsits, 3D-printed thingamabobs, and laser-cut kajiggers for the Instructables Design Studio; now I build and repair puzzles for Particle Industries.

Take back the power of weather forecasting from your local weatherman and begin your own foray into the world of amateur meteorology and citizen science with your very own DIY weather station and data logger. In this Instructable, I'll show you how I designed and built a weather station around the Intel Edison board and a handful of sensors. With little more than a few parts from the hardware store, and heaps of screws I'll take you step by step through the design and assembly process. Let's begin!

Step 1: Parts and Materials

Intel Edison with Arduino breakout board

altimeter

dust sensor

humidity sensor

anemometer

light sensor

solar panel

real-time clock

solar LiPo battery charger

5V boost converter

9V boost converter

4400 mAh LiPo battery

8 GB micro SD card

5mm green LED

5mm blue LED

(2x) 1K resistor

(capacitor for dust)

(resistors for dust)

M-F extension cables

22 gauge wire

26 gauge ribbon cable

female-male jumper wires

10-24 screws

(12x) 1"

(8x) 1.5"

(8x) 2"

(28x) 10-24 nut

(8x) 1/4-20 screws

(8x) 1/4-20 lock nut

(4x) 2-56 x 1/2" screw

(4x) 2-56 x 1/2" nut

18" dowel rod (1" diameter)

3/4"x60" EMT conduit

3/4" EM Flex coupling

3/4" shaft coupler

3/4" shaft to thread adapter

3/4" floor flange

3"x40" galvanized vent tube

3" vent bonnet

3" vent strap

water level

(3x) conductor strap

(3x) tent stakes

paracord (25ft)

(2x) 24"x36"1/4" plywood sheet

12"x12"x1/8" clear acrylic sheet

double stick tape

wood glue

black spray paint/primer

silicone caulk

Step 2: System Design

What Makes a Weather Station?

At it's most basic, a weather station is any system that gathers environmental/climate data. While more useful as a network, I designed a single node as this would be a practical introduction to weather data gathering. I wanted the system to collect and store a handful of metrics: wind speed, light, humidity, temperature, pressure, and air quality. The weather station has a lot of distinct parts and goals; to simplify the design process I broke it down into three distinct parts: electrical, hardware, and software. Here's a brief breakdown of each:

Electrical

I wanted to the make the weather station low maintenance, so I decided to make it solar powered with a built-in beefy (by embedded project standards) Li-Po battery pack. This setup allows the station to run remotely and, barring excessive daily darkness, a reasonably endless run time. The Edison board has very low current draw and Bluetooth and WiFi radios should I want to add wireless connectivity later on. The electrical design and components are discussed in depth on the following step.

Hardware

The main body consists mostly of parts available from a hardware store. A conduit tube forms the core of the body and a solid mounting point for the other components. A series of laser cut panels form the headpiece for mounting a couple of the sensors, and a solid mount place for the solar panel and power electronics. A large galvanized ventilation tube provides a weather resistant housing for the the additional sensors that need to be "exposed" to the elements for proper data collection. The hardware design is explained more in-depth on step 5.

Software

In order to minimize the amount of time I spent writing code, I chose sensors that were already well documented and had either libraries or simple analog interfaces. The actual software is the Wiring language written in Intel's custom Arduino IDE. Developing with Arduino style syntax allowed me to work quickly, since it is my go to environment for interactive projects. The software is discussed more in detail on step 10.

Step 3: Electrical Design

In order to speed up the build process, I chose sensors that came on breakout boards with the standard 2.54 millimeter pin out. The system is built using point-to-point wiring with only a handful of splices using as many temporary male to female header connections as possible to keep soldering to a minimum. Here's a breakdown of the different electrical systems. The illustration above is a hybrid block diagram/schematic since nearly all of the electronics are complete modules (the attachment is the Sharp sensor data sheet).

Power

The power system for the weather station is entirely self-contained (no external charging ports!). A small solar panel feeds roughly 6 volts at around 330 mAh (on a bright day) into the DC input pins of an Adafruit solar Lithium Polymer battery charger. The charger has two JST sockets: one for the battery and the other to the load. The entire system draws roughly 300 mAh, so it should have plenty of power to last through a long night before charging again during the day. The ground pin from the load connection on the charger are connected directly to system ground, with the positive output pin connected to a nice slide switch. The output of the slide switch has two connections (still at ~3.7) from the battery) with one connection to the VIN pin of the 5V step-up converter and the other to the VIN pin of the 9V step-up converter. Although the 9V out of the step-up converter could power both the VIN pin of the Intel Edison Arduino breakout board and the Anemometer (which is spec'd to run at 7-24V), regulating it back down to 5V would be wasteful, so I decided to use the separate 5V supply. The 5V supply is connected via a spliced micro USB cable to the IEABB, which then provides a nice 2.54 mm pin-friendly female socket for providing external 3.3V and 5V connections for the sensors.

Control

The Intel Edison is the main controller for the system. I decided to use the Arduino-style breakout board as it greatly simplifies wiring to the Edison and provides a micro SD card socket on board. The breakout board allows easy connection to the analog sensors and makes it tirivial to connect to the I2C and SPI ports.

I/O

Although I'm gathering six points of data, I only needed five sensors. I used an Anemometer that provides a nice low voltage analog signal that is proportional to wind speed. An altimeter breakout provides me with both temperature and pressure values over I2C. I used a tiny analog humidity sensor, which combined with the temperature from the altimeter, allowed me to calculate relative humidity. The light sensor is a TSL2561 which will allow me to measure a broad range of values in lux and communicates them over I2C as well, saving a couple pins. A Sharp optical dust sensor provides an analog voltage proportional to the concentration of particulate matter in the air. A real-time clock is connected to the Edison via SPI for timestamping the sensor data. An LED confirms the 5V converter is working properly. Lastly, an LED is connected to an Edison digital pin to allow it to communicate the system status.

The only real human "input" is the power switch. I wanted to keep holes in the enclosure to a minimum as this would increase the chances of water seeping in, so there is no user input from a hardware standpoint. The weather station is meant to be left alone for long periods of time, so any meaningful configuration should be done in software before the station is deployed outside.

Step 4: Electrical Assembly

Power System

The power wiring is fairly strait forward. The wires are all within 22 to 28 AWG since the total current draw should never exceed 500 mAh. The boost converters come with screw terminals to allow strong, yet easily removable power connections. A micro USB cable is split for easily powering the Edison board. Due to the nature of the power design on the Edison's Arduino breakout, it's important to feed power via the USB port and not directly via the 5V out socket.

Sensors and I/O

I stripped and tinned the power wires of the anemometer to make them more agreeable in the screw terminal. I added a male header to the analog signal pin in order to allow direct plugging to the Edison breakout board. For the altimeter I made an extension cable with a female header and a few strands of ribbon cable. I attached the altimeter, dust sensor, and humidity sensor to what I decided to call the sensor pod. The pod provides a secure vertical mounting position for the dust sensor and allows them to be removed if necessary. I tried to minimize the wires coming from the pod by combining GND and VCC pins. I extended the wires from the sensor pod by about two and a half feet and wrapped them with a cable sheath to make them more compact. I terminated the sensor pod wires in male headers for direct connection to the Edison board. I connected the real-time clock with unmodified extension wires since it will rest inside the main case with the Edison board.

Step 5: Hardware Design

I designed the weather station in a mix of Adobe Illustrator an Autodesk Fusion 360. I built the 3D model first, and then exported the profiles of the body plates from Fusion as vector files (attached above). I was able to use these for my 2D layout in Illustrator in order to fit everything withing the bounds of two 24"x36" sheets. Nearly all of the parts were laser cut from 1/4" plywood, the exception being a clear 1/8" acrylic "porthole" in order for the light sensor to be properly exposed to the sun, but not the elements. Here are the main hardware components of the unit:

Base Mount

The base of the weather station consists of a wooden dowel that is sanded down to a point; forming a stake that makes for a secure way to plant the center of the station about 14" in the ground. The station is rather tall and top heavy, so I designed holes angled 120 degrees around the center of the station, allowing the attachment of rope as guy lines in order to stabilize the station. Ordinary paracord rope ties eye bolts mounted in the holes to tent stakes in the ground.

Tube Vent

I needed a way to expose the altimeter, humidity sensor, and dust sensor to air without allowing any contact with water or debris. Normally, weather stations use a Stevenson screen, but I wanted to try another design. In order to induce some amount of air flow around the dust sensor, I enclosed the sensor pod in a 3" diameter ventilation tube. As the air in the tube warms, it will rise creating a convection current that pulls air and particulate up through the grate at the base of the tube, and out the vent "bonnet" which is angled to keep water out.

Anemometer Mount

The conduit attaches via a threaded couple to a mounting flange to the top plates. The doubled-up plates form the base for the anemometer and the eye bolts. The flange and anemometer attach via four 1/4-20 screws and lock nuts. These are a little overkill, but the holes for these pieces are quite large. Two square holes allow the attachment of four angled arm pieces, which, when doubled up, can be slotted in and screwed with a 10-24 x 1" screw.

Main Enclosure

The angled arm pieces are bent down and attach to the main enclosure plate via four square holes in the main enclosure plate, fastened with four more 10-24 screws. This tilt helps keep water and debris from piling up on the panel and dripping off the front. The top of the plate provides holes for mounting the solar panel and light sensor. On the rear of the panel stacked ribs of wood form an enclosure for housing the Edison board and power system.

Step 6: Base Assembly

I made the stake for the base by sanding the stake end down to a point. I then sanded the other end to narrow the diameter of the dowel to fit snugly within the conduit and coupler. Once sanded down I slide the coupler down onto the narrow edge, followed by the main conduit tube. The camping stakes already had convenient holes in their heads for attaching the para-cord guy wires. I cut mine to 7ft lengths and tied them to the eye bolts.

Step 7: Tube Mount

The tube assembly came together fairly quickly and largely consists of two rectangular plates of plywood painted black. I fastened the main plate to the conduit with three zip ties. I then attached the three vent straps around the main tube and secured them with six 1" long 10-24 screws. I mounted the level on the small wooden plate opposite the conduit and fastened it with four 2" long 10-24 screws. With the tube assembly mostly complete, I then dropped in the sensor pod and fished the cable through the top of the bonnet and mounting it on the vent top.

Step 8: Anemometer Mount

I bolted the Anemometer to the edge of the two plates to keep them aligned with four 1" 1/4-20 screws and pulled its wires through the hole bringing underneath the top assembly. I then attached the threaded flange with four more 1/4-20 screws. I fastened the eye bolts into place around the flange and twisted them out 120 degrees. I then popped in the arms for attaching the main case and secured them with 1" 10-24 screws each.

Step 9: Main Enclosure Assembly

I began assembling the main enclosure by screwing in the power switch and LED holders. I then slid the sensor pod, solar, and anemometer wires into the three holes at the top of the enclosure cover before I filled them in with silicone-based caulk. When it came to caulking, I had a simple philosophy: do it everywhere. Any hole or edge that opened up was caulked. If I couldn't permanently seal an edge, I laid a bead down in a ring to form a gasket, which I needed to do this for the case plate and light sensor port hole.

Step 10: Software: Configuring the Edison

The complete Arduino sketch for the Edison is attached above. The necessary libraries are also zipped up nicely as well. You’ll need to unpack everything and pop it into your Libraries folder first. I also needed to configure the MUX on the breakout board to support SPI. You can read about that configuration process on the Emutex Labs website.

The program retrieves and organizes the weather data in a series of independent functions, so you're not tied to the same sensors I used if you'd like to easily modify the sketch I wrote. The main functions are as follows:

int getWindSpeed(boolean whichSpeed) returns wind speed in MPH or KPH

int getAirQuality() returns air quality in terms of parts per million

int getLightLevel() returns light level in LUX

int getTemperature(boolean whichScale) returns temperature in degrees Celsius or Fahrenheit

int getHumidity(float outsideTemperatureCelsius) calculates the relative humidity

int getPressure(){ returns pressure in inches

The Edison gathers this data every 15 minutes and appends it to a .txt file on the SD card. The data is organized in a simple ASCII string in a format inspired by the NMEA syntax output by GPS receivers. Here is a sample string with added spaces for reading clarity:

$ D6 M4 Y2015 H12 M45 L100 H50 W10 P10 A40 T72 \r \n

Each string begins with a '$' character and is immediately followed by the day, month, year, hour, minute, light level, humidity percentage, wind speed, pressure, air quality, and temperature. The loadSensorDataToCard() function terminates each string with a carriage return and line feed making it much easier to read the raw .txt file without any elaborate parsing.

Step 11: Runtime+

Choosing a Proper Location

Once everything is installed, it's time to head out and set the station in the ground (with the stake fully sub surface)! I recommend placing the unit in a wide open space to prevent shadows from interfering with light readings and solar charging. You'll also need ample space to attach the guy wires properly tensioned away from the unit.

Unit Lifetime+

I'd qualify this as a light-duty weather station. I live on the northern California cost, so the station won't be subject to particularly extreme environments. I'd recommend a more robust enclosure system for anything expecting snow or heavy wind/rainfall.

Structural integrity aside, digitally I'm quite confident in the system's long term use. As it is, the station only logs about five kilobytes of data per day, which means any SD card with a handful of gigabytes of storage space may as well be infinite. The digital system certainly has room for improvement and expansion too! You could certainly add more sensors (rain gauge, UV exposure, soil moisture, etc.) and a wireless link for easy data access. With an array of wirelessly networked weather stations you could gather your own environmental data for a more meaningful dataset. Citizen science, here we come!