← All work
Case study

Bay Watch — IoT Weather Station

A shoreline weather station that sends readings over LoRa to the municipal hall, forecasts the next hours with a Random Forest model, and warns local officials before fishermen head out.

The Bay Watch mobile app splash screen on a phone
TypeUndergraduate thesis · BS Computer Engineering
SchoolCebu Technological University – Main Campus
Team3 researchers
Year2024
StackESP32 · LoRa-E5 · Firebase · Python · Flutter
300 mShore to municipal hall over LoRa
0Packets lost from the 8th test session on
0.53Mean absolute error of the forecast model
3.62 / 4App rating from 10 respondents

Project Overview

Bay Watch is a localized weather monitoring and forecasting system built for San Remigio, Cebu. A sensor station on the shore reads pressure, temperature, humidity and light, sends it over long-range radio to a receiver at the municipal hall, and a mobile app shows the current conditions, an hourly forecast and an emergency alert.

It was our undergraduate thesis for the BS Computer Engineering program at Cebu Technological University – Main Campus, presented in July 2024.

The Challenge

The Philippines sees about 20 tropical cyclones a year, and weather can change from one town to the next. For fishermen, a storm or poor visibility offshore can be fatal. Small coastal towns rarely have access to a high-end weather station, and there was no real-time, local warning that the municipality could act on before boats went out.

My Role

One of three researchers on the project. Together we:

  • Built the transmitter and receiver around two ESP32 boards with LoRa-E5 modules
  • Wired and calibrated the sensors, and housed the station in a 3D-printed Tough PLA case
  • Trained and tuned the Random Forest forecasting model
  • Built the Bay Watch app in Flutter on a Firebase Realtime Database
  • Deployed the system in San Remigio and ran the range, model and user tests

How It Works

  1. Shore stationESP32 with a BMP180 pressure sensor, DHT11 temperature and humidity sensor, light sensor and a 6-axis gyroscope, in a 3D-printed case
  2. LoRa link · 300 mLoRa-E5 radios carry each reading from the shore to the municipal hall without Wi-Fi or mobile data
  3. ReceiverA second ESP32 at the hall pushes the data to Firebase Realtime Database
  4. ForecastA Random Forest model trained on local historical weather assigns a condition and predicts the next hours
  5. Bay Watch appFlutter app with the current weather, an hourly forecast and an emergency notification when conditions aren't clear

The Process

  • Calibrate against the real thing. Sensor readings were checked against online forecasts that use the Mactan, Cebu weather station.
  • Test the range where it matters. Ten sessions of 14 packets each were sent from the shore to the municipal hall, logging signal strength and packet loss.
  • Train on local data. The model learned from 1,008 rows of San Remigio weather history, split 80/20, tuned with a grid search and 5-fold cross validation.
  • Ask the people who would use it. Five municipal officials and five people with tech or mobile backgrounds rated each screen on a 4-point scale.

The Solution

Weather station

  • Pressure, temperature, humidity, dew point and light readings
  • Battery powered, in a durable 3D-printed case

Long-range link

  • LoRa-E5 from shore to municipal hall
  • Average signal of −107 dBm across the test sessions

Forecasting

  • Random Forest model on local weather history
  • Hourly predictions close to AccuWeather and Meteostat

Bay Watch app

  • Current conditions and hourly forecast
  • Emergency notification for the local government

Results & Learnings

  • Reliable once it settled. Packet loss peaked early, then dropped to zero from the eighth session onward.
  • Forecasts close to the big sites. The model's mean absolute error was 0.53 (RMSE 1.49), and its hourly forecasts tracked AccuWeather, Meteostat and Google Weather despite only a few sensors.
  • Easy for officials to use. Every screen scored "strongly agree", 3.62 out of 4 overall.

What I learned: the hardest part of an IoT system isn't any single piece. It's getting a sensor, a radio, a database, a model and an app to agree with each other in the field. Next steps would be rain and water sensors, a tougher case, and an app tuned for people who aren't comfortable with technology.

See the app code on GitHub ↗

Next case study MQ Printing Services →