Back to Projects
HardwareJugend forscht 2022 – 2024

Intelligent Classroom Environmental Control

A comprehensive IoT system for monitoring and controlling classroom environments. Built with ESP8266 and Arduino Mega microcontrollers running ESP8266WebServer, JSON-over-Bluetooth communication, and a hybrid AI solution using TensorFlow.js for real-time CO2 saturation prediction. Integrated Discord Webhooks for alerts and mDNS for seamless device discovery.

ESP8266
Arduino Mega
ESP8266WebServer
Bluetooth
JSON
TensorFlow.js
Discord Webhooks
mDNS

2022 - 2024

Duration

12+

Sensor Nodes

~3 000

Readings / min

94.7 %

CO2 Accuracy

Architecture & Hardware Integration

At the heart of the system sits a hardware pairing of an ESP8266 and an Arduino Mega coupled via a robust DIP switch configuration. This hybrid controller acts as the central classroom node. The Arduino handles the heavy array of analog and digital I/O, while the ESP8266 runs the ESP8266WebServer, seamlessly serving static dashboard files and managing local network traffic directly from the edge.

Security and alerting were integrated natively without heavy cloud middleware. The microcontroller firmware establishes direct Discord Webhookconnections, securely transmitting real-time security alerts and critical environmental threshold breaches straight to the administration's encrypted chat channels. The wider mesh relies on JSON-over-Bluetooth coordination and mDNS discovery so nodes can find each other with minimal setup friction.

Hybrid AI Prediction Engine

Rather than relying on simple threshold triggers, the system deploys a client-side TensorFlow.js (TF.js) prediction model. This model runs entirely in the browser, continuously ingesting data to predict necessary environmental actions based on an advanced matrix of 14 parameters.

The primary data feed relies on a live MH-Z14A CO2 sensor, engineered with a robust UART/PWM fallback mechanism to guarantee uninterrupted operation. When the model evaluates the sensor data against its multi-parameter matrix and detects an impending air quality saturation issue, the control loop automatically triggers networked servo motors to crack open windows, pre-emptively restoring air quality before students notice any degradation.

Key Highlights

  • Designed and implemented ESP8266 + Arduino Mega sensor network for real-time environmental monitoring
  • Developed hybrid AI architecture combining TensorFlow.js for client-side CO2 prediction
  • Implemented JSON-over-Bluetooth protocol for low-latency device communication
  • Integrated Discord Webhooks for real-time alert notifications
  • Implemented mDNS for automatic device discovery on the network
  • Achieved accurate CO2 saturation predictions using time-series analysis