A DIY weather station is a small board, a few sensors and a screen that show the conditions where you are, not at an airport across town. With an ESP32 you need four things: a DHT11 sensor for indoor temperature and humidity, a waterproof DS18B20 probe for the outdoor temperature, a 16 × 2 text screen, and USB power. Put the probe outside in the shade, keep the board indoors, and the screen shows both readings live. Then log them for a week and look for the pattern.
This guide covers three ways to build it: on the MakerBuddy kit with no code, with a short Python logger on a laptop, and on a bare ESP32 with a complete Arduino sketch.
What a DIY weather station measures, and what it cannot
A shop-bought weather station usually measures temperature, humidity, air pressure, wind and rain. A first ESP32 weather station measures less. It does a few things well, and you can explain every number it shows.
| Measurement | Part | Range and accuracy | Where it goes |
|---|---|---|---|
| Indoor air temperature | DHT11 | 0 to 50 °C, ±2 °C | Inside, away from heat |
| Indoor relative humidity | DHT11 | 20 to 80%, ±5% | Inside, next to the temperature reading |
| Outdoor temperature | DS18B20 waterproof probe | −55 to 125 °C, ±0.5 °C from −10 to 85 °C | Outside, in the shade |
| Daylight | Light sensor (LDR) | 0 to 100, a comparison number, not lux | On the board, near the window |
| Air pressure, wind, rain | Not in a basic kit | Needs extra sensors | Outside, on a mast |
- Measurement
- Indoor air temperature
- Part
- DHT11
- Range and accuracy
- 0 to 50 °C, ±2 °C
- Where it goes
- Inside, away from heat
- Measurement
- Indoor relative humidity
- Part
- DHT11
- Range and accuracy
- 20 to 80%, ±5%
- Where it goes
- Inside, next to the temperature reading
- Measurement
- Outdoor temperature
- Part
- DS18B20 waterproof probe
- Range and accuracy
- −55 to 125 °C, ±0.5 °C from −10 to 85 °C
- Where it goes
- Outside, in the shade
- Measurement
- Daylight
- Part
- Light sensor (LDR)
- Range and accuracy
- 0 to 100, a comparison number, not lux
- Where it goes
- On the board, near the window
- Measurement
- Air pressure, wind, rain
- Part
- Not in a basic kit
- Range and accuracy
- Needs extra sensors
- Where it goes
- Outside, on a mast
The DHT11 figures come from Adafruit's guide to the DHT sensors (opens in a new tab), which also says the DHT11 gives no more than one reading a second. The probe figures come from Adafruit's DS18B20 waterproof probe page (opens in a new tab).
Two things in that table shape the whole design. First, the DHT11 stops at 0 °C. In a Canadian or northern US winter, or a cold night in the north of Pakistan, it cannot measure outdoor air at all. Second, the probe reaches far below freezing and is sealed against water. So the probe goes outside and the DHT11 stays in. The DHT11 sensor guide explains how the DHT11 measures humidity, and the DS18B20 probe explained covers the probe.

Parts list and three ways to build it
The parts are the same whichever way you build. What changes is how much wiring and code you do yourself.
| Kit, no code | Kit plus laptop logger | Bare ESP32 plus Arduino sketch | |
|---|---|---|---|
| Sensors | DHT11 and probe plug into labelled sockets | Same | Wired on a breadboard, with a 4.7 kΩ pull-up for the probe |
| Live display | Screen lines with live wildcards, set from the dashboard | Same | Your sketch writes to the screen |
| Phone or laptop view | Live readings in the dashboard | Same | Only if you write a web page yourself |
| Logging | By hand, in a logbook | A Python program adds a row every 10 minutes | The sketch prints a row every minute to the Serial Monitor |
| Code | None | About 25 lines of Python | About 70 lines of C++ |
| Good for | Ages 10 and up, a first session | Older students, a week-long study | Makers who want to see every step |
- Sensors
- Kit, no code
- DHT11 and probe plug into labelled sockets
- Kit plus laptop logger
- Same
- Bare ESP32 plus Arduino sketch
- Wired on a breadboard, with a 4.7 kΩ pull-up for the probe
- Live display
- Kit, no code
- Screen lines with live wildcards, set from the dashboard
- Kit plus laptop logger
- Same
- Bare ESP32 plus Arduino sketch
- Your sketch writes to the screen
- Phone or laptop view
- Kit, no code
- Live readings in the dashboard
- Kit plus laptop logger
- Same
- Bare ESP32 plus Arduino sketch
- Only if you write a web page yourself
- Logging
- Kit, no code
- By hand, in a logbook
- Kit plus laptop logger
- A Python program adds a row every 10 minutes
- Bare ESP32 plus Arduino sketch
- The sketch prints a row every minute to the Serial Monitor
- Code
- Kit, no code
- None
- Kit plus laptop logger
- About 25 lines of Python
- Bare ESP32 plus Arduino sketch
- About 70 lines of C++
- Good for
- Kit, no code
- Ages 10 and up, a first session
- Kit plus laptop logger
- Older students, a week-long study
- Bare ESP32 plus Arduino sketch
- Makers who want to see every step
Whichever way you choose, you also need a micro-USB cable, a 5 V USB charger and a 2.4 GHz Wi-Fi network. The ESP32 datasheet (opens in a new tab) lists 2.4 GHz Wi-Fi only, so a 5 GHz network will not work. A phone hotspot works fine.
On a bare ESP32 the probe needs a 4.7 kΩ resistor from its data wire to the power wire. Adafruit includes one with the probe and says it is required as a pull-up from the data line to VCC (opens in a new tab). On the MakerBuddy board there is nothing to wire: the probe plugs straight into its own socket.
Where to put your weather station sensors
Placement matters as much as the sensor. A ±0.5 °C probe in direct sun measures the sunlight on it, not the air, so it reads too warm. The US National Weather Service's siting guide for personal weather stations (opens in a new tab) gives the standard for a temperature and humidity sensor:
- Over level ground with a surface typical of the area, not over concrete, rock, roofs or dark surfaces.
- Inside a ventilated radiation shield, which keeps sunlight off the sensor but lets air flow past.
- Between 1.25 and 2 metres above the ground.
- At least twice as far from the nearest tree or building as that object is tall.
- Away from chimneys, air vents and air conditioners.
The same guide admits that most homes cannot meet every rule. The UK Met Office agrees that ideal sites have level ground with no nearby trees or buildings (opens in a new tab), because building warmth distorts a reading. For a student build, aim for these compromises:
- 1
Shade first.
Pick a wall that gets the least direct sun. In the US, Canada and Pakistan, that is usually a north-facing wall. The Met Office's thermometer box activity (opens in a new tab) notes that official screens face north too.
- 2
Make a shield.
Hang the probe inside an upside-down white plastic cup with a few holes near the top. White reflects sunlight, and the holes let air move. The Met Office's thermometer box uses white paint and slats for the same reason. Never seal the probe in a closed box, or it measures the box.
- 3
Keep it off the wall.
Even a few centimetres of gap helps keep the probe from reading warm brick.
- 4
Add a drip loop.
Let the cable dip below the window before it rises to come in. Rain then drips off at the bottom of the loop instead of running along the cable into the room.
- 5
Keep the board dry.
The board, the screen and the DHT11 stay indoors. Only the sealed probe goes outside.
Check how long your probe's cable is before you plan the route. Adafruit's version has a cable of about 91 cm, according to its product page (opens in a new tab), which is enough to pass through a window frame to a wall just outside.
Indoors, keep the DHT11 away from the laptop, the charger, radiators and a sunny sill. It measures the air right next to it.

Build it on the MakerBuddy kit with no code
On the MakerBuddy kit, the DHT11, the waterproof probe and the 16 × 2 text screen each plug into their own labelled socket. The board reads every sensor once a second, and the browser dashboard shows the readings live. Rules and screen settings are saved on the board, so the station keeps working when the laptop is closed.
- 1
Plug in the parts.
Plug the DHT11 into its socket, the probe into its socket, and the text screen into one of the connectors marked I2C, matching every wire by its printed name: VCC, GND, SDA, SCL.
- 2
Power and connect.
Power the board from the USB charger and connect it to your 2.4 GHz Wi-Fi. At start-up the screen shows the network name and the board's IP address. Write the address down.
- 3
Open the dashboard.
On a laptop, use Chrome, Edge or Firefox with the free MakerBuddy extension, or Safari on a Mac. On an iPhone or iPad, use the web app in Safari. On an Android phone, use the free MakerBuddy app from Google Play.
- 4
Check the readings.
Hold the probe in your hand. The probe temperature should climb towards body temperature. Breathe gently near the DHT11 and the humidity should jump, then fall back slowly.
- 5
Set the screen.
On the LCD Display card, choose Custom under Display Mode, type the two lines below and press Update.
- 6
Place the probe outside.
Route it as described above, then leave everything alone for 15 minutes so it settles.
The screen lines use wildcards: names in curly brackets that the board swaps for live readings. Type these two lines:
In {temp}C {humidity}%
Out {ds18b20}C L{light}On the screen they look like this:
In 21.5C 45.0%
Out 7.5C L62Each line must fit 16 characters. A wildcard counts as the width of the value it shows right now, not the length of its name. {temp}, {humidity} and {ds18b20} show one decimal place, and {light} shows a whole number, as the LCD screen reference explains. So the first line uses 14 characters. The second uses 12 today and 15 on a cold, bright day such as Out -12.5C L100. That still fits, which is why the lines leave out the degree sign and extra spaces.
The board redraws custom lines every 5 seconds. The visual output lesson teaches the screen, and the 16x2 LCD with I2C guide goes deeper into addresses and custom text.
Worked example: outdoor colour bands and a humidity light
A screen is good up close. From across the room, a colour is easier to read. This worked example adds five rules that turn the colour light into an outdoor temperature gauge and the blue light into a "humid indoors" warning. All five are Condition rules, built in the dashboard's rule editor.
The colour bands use range logic: each colour owns a slice of the temperature scale, with no gaps and no overlaps.
| Rule name | Watches | Condition | Step |
|---|---|---|---|
| Cold out | Probe Temp (DS18B20) | Less than 10 | RGB Blue |
| Mild out | Probe Temp (DS18B20) | Greater or equal 10 AND Less than 25 | RGB Green |
| Hot out | Probe Temp (DS18B20) | Greater or equal 25 | RGB Red |
| Humid in | Humidity (DHT11) | Greater than 70 | LED On |
| Dry in | Humidity (DHT11) | Less than 65 | LED Off |
- Rule name
- Cold out
- Watches
- Probe Temp (DS18B20)
- Condition
- Less than 10
- Step
- RGB Blue
- Rule name
- Mild out
- Watches
- Probe Temp (DS18B20)
- Condition
- Greater or equal 10 AND Less than 25
- Step
- RGB Green
- Rule name
- Hot out
- Watches
- Probe Temp (DS18B20)
- Condition
- Greater or equal 25
- Step
- RGB Red
- Rule name
- Humid in
- Watches
- Humidity (DHT11)
- Condition
- Greater than 70
- Step
- LED On
- Rule name
- Dry in
- Watches
- Humidity (DHT11)
- Condition
- Less than 65
- Step
- LED Off
Here is "Mild out" step by step, as you would enter it:
- 1
Name
type
Mild out. Names can be up to 20 characters. - 2
Loop mode
choose Condition. The rule now watches a sensor instead of running once.
- 3
Sensor
choose Probe Temp (DS18B20).
- 4
First test
Greater or equal (>=), value 10.
- 5
Range
tick Use Range, choose AND, then Less than (<), value 25. This adds a second test on the same sensor.
- 6
Step 1
RGB Green. Leave the wait at its default.
- 7
Save.
The rule is stored on the board and starts watching at once.
Now check the edges. At exactly 10.0 °C, "Cold out" is false because 10 is not less than 10, and "Mild out" is true because 10 is at least 10. At exactly 25.0 °C, "Mild out" is false and "Hot out" is true. Every possible reading lands in exactly one band. If you used "less than 10" for cold and "greater than 10" for mild, a reading of exactly 10.0 would match neither rule, and the light would keep its old colour.
The humidity pair works differently on purpose. "Humid in" switches the blue light on above 70%. "Dry in" switches it off below 65%. Between 65 and 70 nothing changes. Without that gap, a reading wobbling between 69 and 71 would flick the light on and off all day. This idea, two levels with a gap, has a name: hysteresis. You need it here because a Condition rule does not undo its steps when its condition ends. It finishes its run and stops, and the light stays as it was until another rule changes it.
Two honest limits. A probe that comes unplugged reads 0.0, which lands in the blue "cold" band, so if the light turns blue on a warm day, check the probe first. And the colour bands can still switch back and forth when the outdoor temperature sits right at 10 or 25 °C. The range logic lesson shows how to add gaps between bands if that bothers you.
The full rule format, including loop modes and step waits, is in the automation rules documentation.

Log a week of weather data
A screen shows now. A log shows a story. The MakerBuddy board has no clock and keeps no history, so something else has to write the readings down with a time beside them. There are two ways to do it.
By hand, three times a day
Draw a table with columns for date, time, outdoor temperature, indoor temperature, humidity and notes. Take a reading at the same three times each day, for example before school, after school and before bed. Seven days gives 21 rows, which is enough to draw a line graph and see the daily rise and fall. Use the notes column for anything that might explain a jump: "sunny", "heater on", "window open". The data logger lesson runs this method in class, every 5 minutes for a lesson. It is meant to feel slow, so students see why devices log by themselves.
With a laptop, every 10 minutes
The board answers a web request at /api/sensors with a snapshot of every reading. The probe temperature is d8, the DHT11 temperature is te, humidity is hu and light is li, as listed in the REST API documentation. This Python program asks for that snapshot every 10 minutes and adds a row to a spreadsheet file. The laptop's clock supplies the time. It uses only Python's standard library, including urllib.request (opens in a new tab), so there is nothing to install.
"""Weather station logger: asks the MakerBuddy board for its readings
every 10 minutes and adds a row to weather.csv. Run it on a laptop
that is on the same Wi-Fi as the board, and keep the laptop awake."""
import csv
import json
import time
import urllib.request
from datetime import datetime
BOARD = "http://192.168.1.100" # your board's IP address, or its name.local
EVERY_SECONDS = 600 # 10 minutes: 144 rows a day, 1,008 a week
FILE = "weather.csv"
with open(FILE, "a", newline="") as f:
log = csv.writer(f)
if f.tell() == 0: # a new file gets a header row first
log.writerow(["time", "outdoor_c", "indoor_c", "humidity", "light"])
while True:
try:
with urllib.request.urlopen(BOARD + "/api/sensors", timeout=5) as reply:
data = json.load(reply)
now = datetime.now().isoformat(timespec="seconds")
log.writerow([now, data["d8"], data["te"], data["hu"], data["li"]])
f.flush() # save the row now, not when the program ends
print(now, "outside", data["d8"], "C, inside", data["te"], "C")
except (OSError, ValueError, KeyError) as problem:
print("No reading this time:", problem)
time.sleep(EVERY_SECONDS)The numbers behind the 10 minutes: 6 rows an hour × 24 hours = 144 rows a day, and 144 × 7 = 1,008 rows for the week. That is plenty for a smooth graph. Weather changes slowly, so logging every second would only give you 604,800 nearly identical rows.
- BOARD. The address the screen showed at start-up, or the board's name followed by
.local. - The `a` in `open`. It adds to the file instead of replacing it, so a restart loses nothing.
- The try block. If Wi-Fi drops at 3 am, the program tries again 10 minutes later instead of crashing.
- Keep the laptop awake. Plug it in and turn off sleep, or the log will have gaps.
A failed DHT11 or probe reading reaches the laptop as 0.0, not as an error. This second program skips those values and prints one line per day:
"""Summarise weather.csv: one line per day with the outdoor low and high,
the indoor average and the humidity range."""
import csv
from collections import defaultdict
days = defaultdict(lambda: {"rows": 0, "out": [], "in": [], "hum": []})
with open("weather.csv", newline="") as f:
for row in csv.DictReader(f):
day = days[row["time"][:10]] # the date part, e.g. 2026-11-20
day["rows"] += 1
for key, column in (("out", "outdoor_c"), ("in", "indoor_c"), ("hum", "humidity")):
value = float(row[column])
if value != 0.0: # 0.0 is how a failed read arrives
day[key].append(value)
print("date rows out low out high in avg humidity")
for date, d in sorted(days.items()):
if not (d["out"] and d["in"] and d["hum"]):
print(date, " not enough good readings")
continue
print(f"{date} {d['rows']:4} {min(d['out']):7.1f} {max(d['out']):8.1f}"
f" {sum(d['in']) / len(d['in']):6.1f} {min(d['hum']):.0f}-{max(d['hum']):.0f}%")One catch: an outdoor reading of exactly 0.0 °C could be real on a freezing night. If your outdoor temperature sits near zero, look at those rows by hand before you trust the low. The IoT projects for students list has more laptop logger ideas, and the guide to data logging explained covers the idea in general.
The board's web connection has no password. Run the logger only on a Wi-Fi network you trust, and never open the board to the internet.
Build it on a bare ESP32 with Arduino code
If you are building from loose parts, this sketch does the same job: indoor and outdoor readings on the screen, and a spreadsheet row every minute. The pins match the MakerBuddy board, so the sketch also runs on it.
| Part | Part pin | ESP32 pin |
|---|---|---|
| DHT11 | Data | GPIO 25 |
| DS18B20 probe | Data (white or yellow wire) | GPIO 26, with 4.7 kΩ to 3.3 V |
| 16 × 2 screen (I2C) | SDA | GPIO 21 |
| 16 × 2 screen (I2C) | SCL | GPIO 22 |
| All parts | Power and ground | 3.3 V or 5 V as each module needs, and GND |
- Part
- DHT11
- Part pin
- Data
- ESP32 pin
- GPIO 25
- Part
- DS18B20 probe
- Part pin
- Data (white or yellow wire)
- ESP32 pin
- GPIO 26, with 4.7 kΩ to 3.3 V
- Part
- 16 × 2 screen (I2C)
- Part pin
- SDA
- ESP32 pin
- GPIO 21
- Part
- 16 × 2 screen (I2C)
- Part pin
- SCL
- ESP32 pin
- GPIO 22
- Part
- All parts
- Part pin
- Power and ground
- ESP32 pin
- 3.3 V or 5 V as each module needs, and GND
The probe's wire colours come from Adafruit's DS18B20 probe page (opens in a new tab): red to power, black to ground, and white (or yellow) to data.
// Weather station for the MakerBuddy board (or any ESP32).
// Indoor air from the DHT11, outdoor temperature from the DS18B20 probe,
// both on the 16x2 I2C screen, plus a spreadsheet row every minute.
#include <DHT.h> // "DHT sensor library" by Adafruit
#include <OneWire.h> // "OneWire"
#include <DallasTemperature.h> // "DallasTemperature"
#include <Wire.h>
#include <LiquidCrystal_I2C.h> // "LiquidCrystal I2C" by Frank de Brabander
const int DHT_PIN = 25; // DHT11 data pin on the MakerBuddy board
const int PROBE_PIN = 26; // DS18B20 data pin on the MakerBuddy board
const unsigned long SCREEN_MS = 2000; // refresh the screen every 2 seconds
const unsigned long LOG_MS = 60000; // write a log row every 60 seconds
DHT dht(DHT_PIN, DHT11);
OneWire oneWire(PROBE_PIN);
DallasTemperature probe(&oneWire);
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27, 16 columns, 2 rows
unsigned long lastScreen = 0;
unsigned long lastLog = 0;
void setup() {
Serial.begin(115200);
dht.begin();
probe.begin();
lcd.init();
lcd.backlight();
Serial.println("seconds,indoor_c,humidity,outdoor_c"); // header row
}
void loop() {
unsigned long now = millis();
if (now - lastScreen < SCREEN_MS) return; // not time yet
lastScreen = now;
float inC = dht.readTemperature(); // indoor air, degrees C
float humidity = dht.readHumidity(); // indoor relative humidity, %
probe.requestTemperatures(); // ask the probe to measure
float outC = probe.getTempCByIndex(0); // outdoor, degrees C
bool dhtOk = !isnan(inC) && !isnan(humidity);
bool probeOk = outC != DEVICE_DISCONNECTED_C;
// Every line is exactly 16 characters, so old digits are overwritten.
lcd.setCursor(0, 0);
if (dhtOk) lcd.printf("In %4.1fC %3.0f%% ", inC, humidity);
else lcd.print("In sensor error ");
lcd.setCursor(0, 1);
if (probeOk) lcd.printf("Out %5.1fC ", outC);
else lcd.print("Out probe error ");
if (now - lastLog >= LOG_MS) {
lastLog = now;
// One CSV row. A failed reading leaves its column empty, never 0.
Serial.print(now / 1000);
Serial.print(',');
if (dhtOk) Serial.print(inC, 1);
Serial.print(',');
if (dhtOk) Serial.print(humidity, 0);
Serial.print(',');
if (probeOk) Serial.print(outC, 1);
Serial.println();
}
}What each part is doing:
- The four libraries. Install "DHT sensor library", "OneWire", "DallasTemperature" and "LiquidCrystal I2C" from the Library Manager, and accept "Adafruit Unified Sensor" when asked.
- `millis()` instead of `delay()`. The sketch acts only when 2 seconds have gone by, so the screen and the log run on separate timers.
- Two failure checks. A failed DHT11 read returns NaN, "not a number". A missing probe returns
DEVICE_DISCONNECTED_C, which the DallasTemperature library sets to −127. The sketch shows an error instead of a fake number. - Empty columns, not zeros. A failed reading is left blank, so a spreadsheet skips it when it draws a graph.
- Seconds, not times. With no clock, the first column counts seconds since power-on. Note when you plugged it in.
- 0x27. The screen's I2C address. A lit but blank screen usually means yours uses a different one.
To upload it, add ESP32 support to the Arduino IDE first. In File > Preferences, add https://espressif.github.io/arduino-esp32/package_esp32_index.json to "Additional Board Manager URLs". Then install "esp32 by Espressif Systems" from the Boards Manager, as Espressif's installation guide (opens in a new tab) describes. The guide to programming an ESP32 with the Arduino IDE walks through the rest. To keep the log, open the Serial Monitor at 115200 baud, copy the rows and paste them into a spreadsheet.
If you add an analog sensor, such as a light sensor, use an ADC1 pin (GPIO 32 to 39). Espressif's documentation warns that ADC2 pins cannot be used when Wi-Fi is used (opens in a new tab), so an ADC2 sensor fails the moment you add Wi-Fi.
Common weather station mistakes and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
| The outdoor reading jumps on sunny afternoons | Sunlight is heating the probe, not the air | Move it to a shaded wall and hang it inside a white, vented cup |
| The indoor reading is higher than the room thermostat | The DHT11 sits near the laptop, the charger or a sunny sill | Move it away from heat and wait 15 minutes |
| A reading shows exactly 0.0 | The kit sends a failed DHT11 or probe read as 0.0 | Check the plug, then skip those rows in the log |
| A DHT11 placed outside stops making sense in winter | The DHT11 is rated for 0 to 50 °C only | Use the waterproof probe outdoors and keep the DHT11 inside |
| The dashboard will not accept a screen line | The line would be longer than 16 characters with today's values | Shorten the text; leave out units and spaces |
| The blue light flicks on and off around 70% humidity | One level for both on and off | Use two levels with a gap, such as on above 70 and off below 65 |
| The log has a gap overnight | The laptop went to sleep or lost Wi-Fi | Plug it in, turn off sleep, and leave the try block in place |
| The dashboard or logger cannot find the board | 5 GHz Wi-Fi, or the wrong address | Use a 2.4 GHz network and the IP address shown at start-up |
| Bare build: the probe always reads −127 | No pull-up resistor, or the wrong data pin | Fit 4.7 kΩ between data and power and check the pin number |
- Symptom
- The outdoor reading jumps on sunny afternoons
- Cause
- Sunlight is heating the probe, not the air
- Fix
- Move it to a shaded wall and hang it inside a white, vented cup
- Symptom
- The indoor reading is higher than the room thermostat
- Cause
- The DHT11 sits near the laptop, the charger or a sunny sill
- Fix
- Move it away from heat and wait 15 minutes
- Symptom
- A reading shows exactly 0.0
- Cause
- The kit sends a failed DHT11 or probe read as 0.0
- Fix
- Check the plug, then skip those rows in the log
- Symptom
- A DHT11 placed outside stops making sense in winter
- Cause
- The DHT11 is rated for 0 to 50 °C only
- Fix
- Use the waterproof probe outdoors and keep the DHT11 inside
- Symptom
- The dashboard will not accept a screen line
- Cause
- The line would be longer than 16 characters with today's values
- Fix
- Shorten the text; leave out units and spaces
- Symptom
- The blue light flicks on and off around 70% humidity
- Cause
- One level for both on and off
- Fix
- Use two levels with a gap, such as on above 70 and off below 65
- Symptom
- The log has a gap overnight
- Cause
- The laptop went to sleep or lost Wi-Fi
- Fix
- Plug it in, turn off sleep, and leave the try block in place
- Symptom
- The dashboard or logger cannot find the board
- Cause
- 5 GHz Wi-Fi, or the wrong address
- Fix
- Use a 2.4 GHz network and the IP address shown at start-up
- Symptom
- Bare build: the probe always reads −127
- Cause
- No pull-up resistor, or the wrong data pin
- Fix
- Fit 4.7 kΩ between data and power and check the pin number
The 0.0 behaviour comes from the REST API documentation, which says a DHT11 or DS18B20 read failure shows as 0.0. The DHT11 range is from Adafruit's DHT guide (opens in a new tab).
Turning it into a science fair project or class unit
A weather station becomes a science project when it answers a question. "Build a weather station" is a build. "How much warmer is the air by a south-facing wall than a north-facing one?" is an investigation. It has one thing you change (the wall), one thing you measure (temperature) and a result you can graph.
Good questions for a week of logged data:
- How much does the outdoor temperature rise between sunrise and the warmest part of the day?
- Does indoor humidity go up when people cook, shower or dry clothes indoors?
- How far behind the outdoor temperature does the indoor temperature follow?
- How close is your station to the official reading from your national weather service, and why are they different?
The last question suits older students. Your station will not match the official one, and explaining the gap with the siting rules above shows real understanding.
For a class, the lessons line up with the build. The atmospheric sensing lesson introduces the DHT11, the precision temperature lesson adds the probe, the data logger lesson is the Term 2 project, and the visual output lesson puts the readings on the screen. More ideas that use the same sensors are in ESP32 project ideas for students, and more guides like this one are on the MakerBuddy blog.
FAQ
How does a weather station work?
Sensors turn a condition into an electrical signal. A microcontroller such as the ESP32 reads those signals, converts them into numbers like degrees Celsius or percent humidity, and shows them on a screen or sends them over Wi-Fi. A logger adds a time to each reading so you can see how conditions change. Official stations work the same way, with better sensors and stricter placement.
How do you make a weather station for a school project?
Start with temperature and humidity on a screen, then add an outdoor probe and log readings for a week. Choose a question the data can answer, such as how much a shaded wall differs from a sunny one. On the MakerBuddy kit this needs no code: the sensors plug in, and the dashboard sets the screen. Present the graph and explain why your readings differ from the official ones.
What sensors do you need for a DIY weather station?
For a first build, a DHT11 for indoor temperature and humidity and a waterproof DS18B20 probe for outdoor temperature. Adafruit lists the DHT11 at 0 to 50 °C and 20 to 80% humidity (opens in a new tab), so it belongs indoors. Pressure, wind and rain need extra sensors, and they are best added once the basic station works.
Where should you put a weather station sensor?
In the shade, over level natural ground rather than concrete or rock, away from walls, vents and air conditioners. The US National Weather Service's siting guide (opens in a new tab) recommends 1.25 to 2 metres above the ground, in a ventilated radiation shield. At home, a shaded north-facing wall and a white vented cup over the probe are a sensible compromise.
Can an ESP32 weather station work without the internet?
Yes. The MakerBuddy board needs a 2.4 GHz Wi-Fi network for the dashboard, but not an internet connection, and a phone hotspot works. The board needs no account, and its readings stay on your own network. The screen and the rules keep working even with no dashboard open.
Is a DHT11 accurate enough for a weather station?
For indoor readings and student projects, yes. Adafruit gives it (opens in a new tab) ±2 °C and ±5% humidity, which is enough to see daily patterns, though not to compare tenths of a degree. For outdoor temperature use the DS18B20 probe, which Adafruit rates (opens in a new tab) at ±0.5 °C from −10 to 85 °C.
Can I add wind speed, rain or air pressure?
Yes, but they need extra parts that are not in the MakerBuddy kit, and your own code. A wind gauge and a rain gauge also need a mast and a clear spot outdoors. The National Weather Service's siting guide (opens in a new tab) puts a wind sensor ideally at 10 metres, which is hard at home. Get temperature and humidity right first.
How long does a DIY weather station take to build?
On the MakerBuddy kit, plugging in the parts and setting the screen fits in about one class period, and the colour band rules take a second. Logging takes a week, but it runs by itself once started. A bare ESP32 build takes longer, mostly for wiring and installing the libraries.
Sources
- US National Weather Service: Personal Weather Station siting (CWOP) (opens in a new tab)
- Met Office: Weather stations and observation sites (opens in a new tab)
- Met Office for Schools: Make your own thermometer box (opens in a new tab)
- Adafruit: DHT humidity and temperature sensors, overview (opens in a new tab)
- Adafruit: Waterproof DS18B20 digital temperature sensor (opens in a new tab)
- Espressif: ESP32 datasheet (opens in a new tab)
- Espressif: Installing the Arduino-ESP32 core (opens in a new tab)
- Espressif: ESP32 GPIO and RTC GPIO (ADC2 and Wi-Fi) (opens in a new tab)
- Python documentation: urllib.request (opens in a new tab)




