IoT Coffee-Drying Monitoring and Control System
A full-stack IoT coffee-drying automation system combining a custom ESP32 controller board, Fuzzy Logic closed-loop motor regulation, Firebase Realtime Database telemetry, and a web analytics dashboard. Built around a stainless-steel belt-driven rotary drum dryer, the system maintains uniform chamber heat distribution while protecting coffee beans from overheating.
Embedded Firmware & Fuzzy Logic Control (ESP32 C++)
- Fuzzy Logic PWM Actuation: Evaluates overlapping temperature membership sets (cool 30–40 °C, warm 35–55 °C, hot 50–60 °C) in firmware (
fuzzyMotorSpeed) to smoothly modulate rotary drum speed (130–180 PWM) through a BTS7960 H-bridge motor driver, automatically cutting power at ≥60 °C. - Multi-Sensor Telemetry Suite: Samples chamber temperature via an SPI MAX6675 K-type thermocouple, ambient conditions via an I²C BME280 sensor (temperature & humidity), load current and voltage via an INA219 power monitor, and drum shaft speed via hardware interrupt counting (
IRAM_ATTR) from an NJK-502C inductive proximity sensor. - Safety Interlocks & Local HMI: Controls relay-switched Heater, Exhaust Fan, and DC Motor interlock stages through an optocoupler-isolated 3-channel relay circuit, paired with a rotating 3-page 20×4 I²C LCD local diagnostic readout.
Custom Hardware & EasyEDA PCB Engineering
- Integrated Carrier PCB: Designed in EasyEDA with an onboard LM2596 DC-DC step-down regulator (+5 V rail), PC817 optoisolated relay drivers with BC547 transistors and 1N4007 flyback diodes, modular breakouts, and verified 2-layer copper trace routing.
- Mechanical Bench Integration: Fabricated PCB and switching power supply integrated directly with the stainless-steel rotating drying drum, proximity RPM bracket, and dual cooling fans.
Dual-Path Cloud Sync & Web Analytics Dashboard
- Sub-Second Real-Time Sync: Streams live telemetry snapshots every ~1 second to Firebase Realtime Database over SSL, powering live circular gauges (temperature, RPM, current, humidity, PWM), relay state badges, ESP32 online/offline indicators, and customizable card visibility toggles.
- Historical REST Ingestion & Reporting: Pushes serialized JSON payloads (
ArduinoJson/HTTPClient) every 5 minutes to/api/getdatasensor, visualized with dual-axis time-series charts and a searchable DataTables audit log (4,900+ entries) with date-range filtering plus Excel, CSV, Copy, and Print export.