A complete, simplified IoT monitoring system for tracking cocoa bean fermentation and drying using ESP8266 and ESP32 microcontrollers.
Cocoa Monitor logs environmental data and internal fermentation temperatures to a Google Sheet, enabling real-time fermentation tracking across multiple sensor nodes.
- TEMP Node: Bean mass temperature profile (3× DS18B20 probes)
- GREENHOUSE Node: Inside drying environment (DHT11)
- OUTSIDE Node: Outside reference environment (DHT11)
All nodes upload to a single Google Sheet via a shared Google Apps Script backend.
- 3× ESP32 Dev Boards
- 3× DS18B20 temperature probes (TEMP)
- 2× DHT11 sensors (GREENHOUSE, OUTSIDE)
- WiFi network (SSID:
xxxxxxxxxxxxx)
- Flash firmware from
/firmwareto each board (see guide) - Deploy Apps Script from
/apps-scriptto Google Apps Script - Verify uploads within 5–10 minutes (data appears in Google Sheet)
See docs/COCOA_MONITOR_SIMPLIFIED_GUIDE.md for complete setup instructions.
cocoa-monitor/
├── firmware/ # Arduino sketches (ready to flash)
│ ├── TEMP_DS18B20x3.ino # NodeMCU ESP8266 (fermentation temps)
│ ├── GREENHOUSE_DHT11.ino # ESP32 (inside greenhouse)
│ └── OUTSIDE_DHT11.ino # ESP32 (outside environment)
├── apps-script/
│ └── AppScript_Simplified.gs # Google Apps Script backend
├── docs/
│ └── COCOA_MONITOR_SIMPLIFIED_GUIDE.md # Complete installation guide
└── README.md # This file
✅ 4 Independent Nodes — Fermentation environment + temps + drying (indoor/outdoor)
✅ Real-Time Logging — Automatic uploads every 5–30 minutes
✅ NTP Time Sync — Accurate UTC-4 (Trinidad) timestamps
✅ Error Handling — WiFi reconnection, sensor fault detection, fallback timestamps
✅ Simplified Code — All bloat removed, lean & focused
Internet
▲
│ HTTPS GET (Apps Script)
│
┌──────────────────────────────┐
│ Google Sheets │
│ (3 worksheets) │
│ • TEMPERATURE │
│ • GREENHOUSE │
│ • OUTSIDE │
└──────────────────────────────┘
▲ ▲ ▲
│ │ │
[TEMP] [GHSE] [OUTSIDE]
DS18B20x3 DHT11 DHT11
ESP32 ESP32 ESP32
All nodes share the same WiFi and Apps Script URL:
WiFi SSID: your info
WiFi Password: your info
Timezone: UTC-4 (Trinidad)
Apps Script URL: https://script.google.com/macros/s/your info/exec
Modify in each sketch before flashing.
Sheet ID: your info
Worksheets created automatically:
- TEMPERATURE — Timestamp, T1_Top_C, T2_Middle_C, T3_Bottom_C, Average_C
- GREENHOUSE — Timestamp, Temp_C, Humidity_%
- OUTSIDE — Timestamp, Temp_C, Humidity_%
- Verify SSID and password match in sketch
- Check WiFi range and signal strength
- Verify 4.7kΩ pull-up resistor between D2 and 3.3V
- Run address-scan sketch to get probe hex addresses
- Paste correct addresses into
TEMP_DS18B20x3.ino
- Check serial monitor (115200 baud) for HTTP error codes
- Verify Apps Script URL is correct
- Ensure NTP time sync completes (wait 30 sec after boot)
- Do NOT create a new deployment after edits — edit in place
- Use "Manage Deployments" to refresh the existing URL
- Check Apps Script Execution Log for debug messages
See docs/COCOA_MONITOR_SIMPLIFIED_GUIDE.md for more troubleshooting.
| Node | Interval | Purpose |
|---|---|---|
| TEMP | 60 min | Fermentation heat curve |
| GREENHOUSE | 60 min | Drying progress (indoor) |
| OUTSIDE | 60 min | Drying reference (outdoor) |
For ESP32 (GREENHOUSE, OUTSIDE):
WiFi(built-in)HTTPClient(built-in)DHT sensor libraryby Adafruit
Install via Arduino IDE Sketch → Include Library → Manage Libraries.
- Read the guide —
docs/COCOA_MONITOR_SIMPLIFIED_GUIDE.md - Flash firmware to your 3 boards
- Deploy Apps Script to Google Apps Script
- Monitor uploads via serial monitor (115200 baud)
- Create charts in Google Sheets to visualize fermentation data
MIT License — see LICENSE file for details.
- Remove test code before deployment — ensure
READ_INTERVALandUPLOAD_INTERVALare production values - Backup your Google Sheet — no version control, edits are permanent
- Check sensor baselines — DS18B20 probes are ±0.5°C accurate; no calibration needed
Last Updated: July 2026
Version: 1.0 (Simplified)
For questions or issues, refer to the complete guide in docs/.