College of Industrial Technology
Embedded Systems II
Final Project Documentation
Distributed Multi-Node IoT Monitoring and Control System with Central Gateway
Duration: 4 Weeks
Total Points: 100
What You Will Build
Your team will design, build, and deploy a complete IoT system consisting of:
+-------------------------------------------------------------+
| |
| 4 SENSOR NODES (ESP32) |
| Each node: |
| - Reads sensors from its location |
| - Sends data to the central server |
| - Receives and executes commands |
| - Can be updated over-the-air |
| |
| 1 CENTRAL SERVER (ESP32) |
| - Receives data from all 4 nodes |
| - Stores data in local storage |
| - Hosts a web dashboard |
| - Sends commands to nodes |
| - Provides OTA updates |
| |
+-------------------------------------------------------------+
System Architecture
+----------+ +----------+ +----------+ +----------+
| NODE 1 | | NODE 2 | | NODE 3 | | NODE 4 |
| (Client) | | (Client) | | (Client) | | (Client) |
+----+-----+ +----+-----+ +----+-----+ +----+-----+
| | | |
+-------------+-------------+-------------+
|
WiFi + HTTP
|
v
+------------------+
| SERVER ESP32 |
| (HTTP Server) |
| |
| - REST API |
| - Dashboard |
| - LittleFS |
| - NTP Sync |
| - OTA Hosting |
+--------+---------+
|
| WiFi
v
+------------------+
| Phone / Laptop |
| (Browser) |
+------------------+
Course Modules Integrated
| Course Module | Application in Project |
| ESP32 Basics | 5 ESP32 boards used |
| ADC | Light, gas, and current sensors |
| PWM | Buzzer tones and fan speed |
| Interrupts | Motion detection and button presses |
| Timers | Periodic sensor reads |
| Wi-Fi | All nodes connect to network |
| REST APIs | Nodes use HTTP POST and GET |
| IoT Architecture | Complete sensor-to-dashboard flow |
| Local Storage | Preferences and LittleFS |
| HMI / Dashboard | Web interface on server |
| OTA Updates | Firmware updates for all nodes |
| NTP | Accurate timestamps |
| Device Configuration | Each node has a configuration portal |
Learning Objectives
By completing this project, you will be able to:
- Design a multi-device IoT system architecture
- Implement client-server communication using REST APIs
- Integrate multiple sensors and actuators on a single device
- Store data persistently using Preferences and LittleFS
- Build a functional web dashboard for monitoring
- Deploy firmware updates over-the-air to multiple devices
- Synchronize time across distributed devices using NTP
- Manage device configuration without recompilation
- Handle network failures with offline buffering
- Document and present a complete engineering project
Select Your Project Theme
Your team must select one of the following themes. All four nodes must relate to the selected theme.
Theme A
Smart Building Monitoring System
Entrance, Classroom, Equipment Room, Storage Room
Theme B
Smart Agriculture Monitoring System
Field Zone A, Field Zone B, Greenhouse, Water Tank
Theme C
Campus Safety System
Hallway, Laboratory, Parking Area, Entrance Gate
Theme A: Smart Building Monitoring System
Node 1 - Entrance / Lobby
- Temperature and Humidity (DHT22)
- Motion detection (PIR sensor)
- Door status (Reed switch)
- Output: LED indicator
Node 2 - Classroom / Office
- Temperature and Humidity (DHT22)
- Light level (LDR sensor)
- Motion detection (PIR sensor)
- Output: Buzzer alert
Node 3 - Equipment Room
- Temperature (LM35 analog sensor)
- Current consumption (ACS712)
- Relay-controlled exhaust fan
- Output: OLED display
Node 4 - Storage / Utility Room
- Temperature and Humidity (DHT22)
- Gas leak detection (MQ2 sensor)
- Water leak detection (analog sensor)
- Output: Buzzer and LED alert
Theme B: Smart Agriculture Monitoring System
Node 1 - Field Zone A
- Soil moisture sensor
- Temperature (LM35)
- Light intensity (LDR)
- Output: Relay-controlled water pump
Node 2 - Field Zone B
- Soil moisture sensor
- Humidity (DHT22)
- Rain detection
- Output: Buzzer alert for dry conditions
Node 3 - Greenhouse
- Temperature and Humidity (DHT22)
- Light level (LDR)
- Output: Relay for exhaust fan and grow light
Node 4 - Water Tank
- Water level (ultrasonic sensor)
- Water quality (analog TDS sensor)
- Output: LED status indicators
Theme C: Campus Safety System
Node 1 - Hallway
- Motion detection (PIR)
- Sound level (analog sound sensor)
- Emergency button (with interrupt)
- Output: Buzzer and LED alarm
Node 2 - Laboratory
- Gas sensor (MQ2)
- Temperature (LM35)
- Fire/smoke sensor (analog)
- Output: Buzzer alarm and relay (gas valve)
Node 3 - Parking Area
- Light level (LDR)
- Motion detection
- Output: Relay for automatic lights
Node 4 - Entrance Gate
- Door status (reed switch)
- Motion detection
- Vibration sensor
- Output: Buzzer and LED indicator
Server ESP32 Requirements
| Feature | Description | Points |
| Wi-Fi Connection | Station mode with auto-reconnect | 3 |
| HTTP Server | Handles all API endpoints | 5 |
| REST API | Proper GET/POST with JSON | 5 |
| LittleFS | Stores HTML files and logs | 4 |
| NTP Sync | Timestamp all data | 3 |
| Web Dashboard | Serves real-time dashboard | 5 |
| Command Distribution | Sends commands to nodes | 4 |
| Data Logging | Saves all node readings | 4 |
| OTA Hosting | Provides firmware files | 3 |
| Version Reporting | Reports firmware version | 2 |
| Configuration Portal | Web-based configuration | 3 |
| Error Handling | Handles missing nodes | 3 |
| Total | | 44 |
Node ESP32 Requirements
| Feature | Description | Points |
| Wi-Fi Connection | Station mode with auto-reconnect | 2 |
| Sensor Reading | Timer-based periodic reads | 2 |
| Data Reporting | HTTP POST to server | 3 |
| Command Handling | HTTP GET from server | 2 |
| Local Storage | Buffer if offline | 2 |
| Preferences | Store configuration | 1 |
| Configuration Portal | Web-based setup | 2 |
| OTA Capable | Can receive updates | 2 |
| Local Output | LED, buzzer, relay, or display | 1 |
| Error Handling | Reconnects, buffers, retries | 1 |
| Total per Node | | 18 |
Dashboard Requirements
| Feature | Description | Points |
| All 4 Nodes Visible | Cards showing each node status | 3 |
| Real-Time Updates | Auto-refresh (maximum 5 seconds) | 3 |
| Data Visualization | Charts showing trends | 3 |
| Node Status | Online/offline indicator | 2 |
| Alert Display | Shows when thresholds are exceeded | 2 |
| Control Buttons | Buttons to send commands | 3 |
| Historical Data | View past readings | 2 |
| Responsive Design | Works on phone and desktop | 2 |
| Total | | 20 |
Project Deliverables
Working Prototype (60% of grade)
- One Server ESP32 with all features
- Four Node ESP32s with sensors and outputs
- All five devices communicating over Wi-Fi
- Functional web dashboard
- Data logging and retrieval
- OTA update capability
- Configuration portals
- Proper wiring and enclosures (optional)
Documentation (25% of grade)
- Project proposal (1-2 pages)
- System architecture diagram
- Circuit diagrams for all five ESP32s
- Complete source code (commented)
- API documentation
- User manual
- Testing and results documentation
Presentation (15% of grade)
- Live demonstration (10-15 minutes)
- Explanation of design decisions
- Challenges and solutions
- Future improvements
- Question and answer session
Four-Week Timeline
Week 1
Planning and Server Foundation
Team formation, theme selection, server basic setup, dashboard skeleton
Week 2
Node Development and Integration
Build all four nodes, test reporting, test commands, integrate
Week 3
Dashboard and Advanced Features
Complete dashboard, OTA, offline buffering, version management
Week 4
Testing, Documentation, Presentation
Final integration testing, documentation, live demo preparation
Time Management Advisory
Weeks 1 and 2 will be the most demanding. Week 3 focuses on refinement. Week 4 is reserved for polishing and presentation. Do not fall behind during the first two weeks.
Week 1: Planning and Server Foundation
Deliverables
- Select project theme
- Submit project proposal
- Assign team roles
- List required components
- GitHub repository for version management initialized
- Server ESP32 connects to Wi-Fi
- HTTP server running
- LittleFS initialized
- NTP time synchronization working
- Basic REST API endpoints created
- Dashboard HTML/CSS/JS skeleton
- Test with Postman or browser
Milestone Check (End of Week 1)
- Server responding to HTTP requests
- Time from NTP visible on Serial Monitor
- Basic dashboard loading successfully
Week 2: Node Development and Integration
Deliverables
- Node reads sensors via timer
- Node sends HTTP POST to server
- Server receives and logs data
- Test command sending from server to node
- Configuration portal for each node
- All nodes reporting to server
- All nodes receiving commands
- Test all four nodes simultaneously
Milestone Check (End of Week 2)
- All four nodes showing data on server
- Each node has working configuration portal
- Command sent from server executes on node
Week 3: Dashboard and Advanced Features
Deliverables
- Complete dashboard with all node data
- Real-time updates working
- Charts showing historical data
- Control buttons functional
- Alert system
- Data export (CSV download)
- Offline buffering on nodes
- OTA update capability
- Version management
- Error handling and reconnection
Milestone Check (End of Week 3)
- Dashboard shows all four nodes
- Controls work from browser
- Data updates every five seconds
- Disconnect server - nodes buffer data
- Reconnect server - buffered data syncs
- OTA update pushes successfully
Week 4: Testing, Documentation, and Presentation
Deliverables
- Full system integration testing
- Edge case testing
- Complete documentation
- Presentation slides
- Live demo preparation
- Final presentation
Milestone Check (End of Week 4)
- Working prototype demonstrated
- All documentation submitted
- Presentation delivered
- Question and answer session handled
Team Roles and Responsibilities
Role 1 - Server Developer
- Write all server ESP32 code
- Implement REST API endpoints
- Handle data reception from nodes
- Store data to LittleFS
- Integrate NTP
- Test API with Postman
Role 2 - Dashboard Developer
- Create HTML, CSS, and JavaScript files
- Design user interface
- Implement real-time updates
- Create data visualizations
- Upload files to LittleFS
Role 3 - Node Developer A
- Build Nodes 1 and 2
- Wire sensors and outputs
- Write node firmware
- Test data reporting
Role 4 - Node Developer B
- Build Nodes 3 and 4
- Wire sensors and outputs
- Write node firmware
- Test command handling
Server API Endpoints
| Endpoint | Method | Purpose |
/ | GET | Dashboard page |
/api/data | POST | Receive node data |
/api/data | GET | Query stored data |
/api/commands/node1 | GET | Node 1 fetches commands |
/api/commands/node2 | GET | Node 2 fetches commands |
/api/commands/node3 | GET | Node 3 fetches commands |
/api/commands/node4 | GET | Node 4 fetches commands |
/api/commands/set | POST | Browser sends command |
/api/nodes | GET | All nodes status |
/api/status | GET | Server status |
/api/history | GET | Historical data |
/api/version | GET | Firmware version |
/update | POST | OTA firmware upload |
Data Format (JSON)
Node sends to server:
{
"node_id": "NODE_01",
"node_name": "Entrance",
"timestamp": "2026-01-15T14:30:45",
"temperature": 28.5,
"humidity": 65,
"motion": true,
"rssi": -65
}
Server responds to node:
{
"ack": true,
"server_time": "2026-01-15T14:30:45",
"command": "led_on"
}
File Structure for Each ESP32
Server ESP32:
ServerProject/
|-- ServerProject.ino
+-- data/
|-- index.html
|-- style.css
+-- script.js
Node ESP32:
NodeProject/
|-- NodeProject.ino
+-- data/
+-- config.html
Note
The data/ folder must be uploaded separately to LittleFS using the ESP32 LittleFS Data Upload tool in Arduino IDE.
Minimum Components
| Qty | Component |
| 5 | ESP32 DevKit V1 |
| 3 | DHT22 Temperature/Humidity |
| 1 | LM35 Temperature Sensor |
| 2 | PIR Motion Sensor |
| 1 | Reed Switch |
| 2 | LDR with 10k Resistor |
| 1 | MQ2 Gas Sensor |
| 1 | Water Leak Sensor |
| Qty | Component |
| 1 | ACS712 Current Sensor |
| 2 | Relay Module (Single Channel) |
| 3 | Active Buzzer |
| 1 | OLED Display SSD1306 |
| 10 | LEDs with Resistors |
| 2 | Large Breadboard |
| 3 | Jumper Wire Sets |
| 1 | Push Buttons (pack) |
Overall Breakdown
| Component | Weight | Due Date |
| Project Proposal | 5% | Week 1 |
| Milestone 1: Server Basic | 10% | End of Week 1 |
| Milestone 2: All Nodes | 15% | End of Week 2 |
| Milestone 3: Dashboard and Features | 15% | End of Week 3 |
| Final Demonstration | 25% | Week 4 |
| Documentation | 20% | Week 4 |
| Code Quality | 10% | Week 4 |
| TOTAL | 100% | |
Detailed Rubric for Final Demonstration
| Criteria | Points | Description |
| All four nodes reading sensors | 5 | Every node shows data |
| Server dashboard functional | 5 | All nodes visible |
| Command and control working | 5 | Browser controls nodes |
| OTA updates demonstrated | 3 | Live OTA update |
| NTP timestamps accurate | 2 | Correct timestamps |
| Offline buffering demonstrated | 3 | Disconnect and recover |
| Configuration portal working | 2 | Can change Wi-Fi via web |
| TOTAL | 25 | |
What to Submit
- GitHub Repository
- All source code
- README.md with setup instructions
- Commit history showing individual contributions
- Documentation (PDF)
- Project proposal, architecture diagram, circuit diagrams
- API documentation, user manual, testing results
- Video Demonstration (5-10 minutes)
- System overview, all features demonstrated
- Explanation of each node, dashboard tour
- Live Presentation
- Working prototype, team presentation, Q and A session
Getting Started
Step 1 - Form Your Team
- Select a team leader
- Assign preliminary roles
- Exchange contact information
- Create a group chat
Step 2 - Select Your Theme
- Review the three themes carefully
- Consider available components
- Submit your choice to the instructor
Step 3 - Development Environment
- Install Arduino IDE 2.x
- Install ESP32 board package
- Install LittleFS upload tool
- Install required libraries
- Test upload to ESP32
Step 4 - GitHub Repository
- One repository per group
- Add all team members as collaborators
- Create branches per member
Guidelines for Success
Recommended Practices
- Test each component separately before integration
- Use the Serial Monitor constantly for debugging
- Commit code to GitHub frequently
- Document as you go rather than at the end
- Ask for help early when stuck
- Back up your code regularly
Practices to Avoid
- Waiting until the last week to begin
- Working alone without communicating
- Ignoring error messages
- Applying 5V directly on ESP32 GPIO pins
- Forgetting to connect all grounds
- Skipping documentation
Common Mistakes to Avoid
- Not testing components individually first
- Not handling Wi-Fi disconnection
- Hardcoding credentials in source code
- Using
delay() in the main loop
- Not implementing error handling
- Waiting until the last week to integrate
Frequently Asked Questions
Q: Can we use a different microcontroller?
A: No. The course is specifically about ESP32. All projects must use ESP32.
Q: Can we use a cloud server instead of a local server ESP32?
A: No. One of the required features is a local server ESP32. This demonstrates device-to-device communication.
Q: Can we use Bluetooth instead of Wi-Fi?
A: No. Wi-Fi is required. You may add Bluetooth as an enhancement.
Q: What if a component breaks?
A: Report immediately to your instructor. Have backup components if possible.
Q: Can we use libraries not taught in class?
A: Yes, if you understand what they do and can explain them. Document all libraries used.
Q: Is four weeks enough time?
A: Yes, if you start immediately. Week 1 is critical. Do not delay ordering components.
Simplified Scope Option
If your team finds the four-week timeline too tight, here is a simplified scope that still meets the minimum requirements:
Required Elements
- One Server ESP32 with dashboard
- Four nodes with at least one sensor each
- Wi-Fi and HTTP communication
- Basic configuration portal
- NTP timestamps
- LittleFS for logs
Elements that May Be Simplified or Omitted
- OTA updates (may be demonstrated on one node only)
- Offline buffering (only buffer ten readings)
- Detailed dashboard charts (a simple table is acceptable)
- Multiple sensors per node (one sensor is sufficient)
Result
- Still earns 70-80 points
- Much more achievable in four weeks
- Advanced features may be added in Week 4 if time permits
Recommended References
Documentation and Tutorials
- Random Nerd Tutorials: randomnerdtutorials.com
- ESP32 Arduino Core: docs.espressif.com
- ArduinoJson: arduinojson.org
- W3Schools for HTML, CSS, and JavaScript
Sample Code Repositories
- GitHub search: "esp32 iot server"
- Your instructor's example code
- Previous students' projects (if available)
Code References from Previous Modules
- Server REST API code (Module 8)
- LittleFS file operations (Module 11)
- Preferences library (Module 11)
- Web dashboard (Module 12)
- OTA updates and NTP (Module 14)
- Configuration portal (Module 15)
Acknowledgment Form
By submitting this project, we confirm the following:
- We have read and understood the project requirements
- All team members contributed to the project
- The code is original, except for library usage
- We have documented all sources and references
- We understand the grading rubric
- We are ready for the final demonstration
GROUP NUMBER: ______
MEMBER SIGNATURES:
1. ____________________________ Date: __________
2. ____________________________ Date: __________
3. ____________________________ Date: __________
4. ____________________________ Date: __________
TEAM LEADER: ___________________
Thank You
Start early. Communicate often. Document everything.
Embedded Systems II
College of Industrial Technology