P—06 · Case study
Connected weather station
A probe outside, a unit inside, and a radio link between them. The system measures the weather and opens or closes the shutters on its own based on what it sees.
Code on GitHub ↗ Report (French, PDF) ↗In 30 seconds
Many weather stations display readings but never act on them.
Two Arduinos linked by XBee radio: an outdoor probe that measures, an indoor unit that displays and decides.
Shutters open and close on their own based on temperature, light and wind.
Measure, then act.
Most weather stations stop at showing a number. The goal here was to go one step further: have the readings trigger a physical action in the house, in this case opening and closing the shutters.
And make the display readable by anyone, no need to know what a volt is.
Two modules, one radio link.
The system is split across two independent Arduinos. The transmitter stays outside; the receiver sits indoors next to the user. They talk over XBee, a point-to-point radio link.
Temperature, humidity, wind, light
Frame decoding and decisions
Display and motorized shutters
This split keeps things modular: you can swap a sensor without touching the interface, or rewrite the shutter rules without touching the outdoor probe.
What gets measured.
| Reading | Sensor and method |
|---|---|
| Temperature & humidity | DHT-type sensor: °C and relative humidity. |
| Wind | Pulse anemometer: pulses are counted to estimate speed in km/h. |
| Light | Photoresistor (LDR), used to decide whether to let daylight in. |
A lightweight text frame.
The transmitter packs the readings into a short string and sends it over the XBee serial port. The receiver reads it, splits it up, refreshes the screen, then moves the servos if needed.
// Transmitter: read, assemble, send void loop() { String frame = "T:" + readTemperature() + ";H:" + readHumidity() + ";W:" + readWindSpeed() + ";L:" + readLight() + ";"; xbee.print(frame); // e.g. "T:23.4;H:41;W:12;L:380;" } // Receiver: read, decode, display, act void loop() { if (xbee.available()) { parseFrame(xbee.readStringUntil('\n')); updateLCD(); updateServos(); } }
When to move the shutters.
| Condition | Shutter action |
|---|---|
| Above 30 °C | Closed, to keep the room cool. |
| Between 20 and 30 °C | Half open. |
| Low light | Open, to let daylight in. |
| High wind | Closed, to prevent damage. |
Readable by everyone.
- An LCD with a keypad shows the readings in plain terms, one page at a time: temperature, humidity, wind, light.
- A PAJ7620 gesture sensor lets you flip pages with a wave of the hand.
- The display refreshes with every frame received.
What I learned.
- Designing a small communication protocol and making it robust on the receiving end.
- Reading sensors continuously while driving actuators.
- Designing the interface for the end user, not for the engineer with the serial monitor open.