Final Project: Gecko State — Smart Reptile Habitat System


Section 1: Final Project Proposal

What I prepared for Week 01

Concept

Project Sketch

I want to build an automatic environment control system for my reptile terrarium.

My pet reptiles (geckos and snakes) need specific temperature and humidity. It is hard to keep the perfect environment all the time by hand.

The system will: - Monitor temperature and humidity inside the enclosure (two positions) - Automatically control the fan, heater, lighting, and humidifier - Let the user control each device manually from a web dashboard

What I Planned to Build

Component Plan
Custom PCB Microcontroller board with sensors, fan driver, relay, Grove connectors
Terrarium Rack CNC-milled wooden shelf to hold the tank
Web Dashboard Real-time browser dashboard with history graph and device control
Gecko Emblem Decorative emblem using molding and casting

See Week 1 Documentation for the original project proposal.


Section 2: Final Project Development

What I built during the course — week by week

What I Made

Control Board — Integration Board (Custom PCB)

I designed and milled a custom PCB using KiCad and a CNC router.

Component Purpose
Seeed XIAO ESP32C6 Main microcontroller (WiFi built-in)
SHT31 × 2 (I2C 0x44 / 0x45) Temperature and humidity sensors (top / bottom)
Grove 2-ch SPDT Relay Lighting (SW1/D0) and heater (SW2/D1) ON/OFF
Grove Water Atomization Humidifier control (D2)
4-pin PC fan × 2 Intake / exhaust airflow (PWM + TACH)

Gecko Shelf (Terrarium Rack)

I CNC-milled a wooden shelf (394 × 359 × 1094 mm) from 12 mm plywood. The terrarium sits on the top section. The shelves below store supplies.

Web Dashboard — Gecko State

A real-time browser-based dashboard running on my NAS.

  • Live sensor display (temperature and humidity, top and bottom)
  • History graph — 1D / 1W / 1M (Chart.js + Flask + SQLite)
  • 5 device controls: lighting, intake fan, exhaust fan, heater, humidifier
  • MQTT over WebSocket for real-time updates and control

Gecko Emblem

A decorative gecko emblem made by silicone molding and UV resin casting.


System Architecture

Physical Integration

System Integration Overview Full system — top lid (fans), integration board, and web dashboard

Software Architecture

Software Architecture ESP32C6 → MQTT → NAS Docker → Browser dashboard


How It Works

  1. The ESP32C6 reads two SHT31 sensors every 5 seconds
  2. Sensor data is published via MQTT over WiFi
  3. The web dashboard receives data in real time (MQTT over WebSocket)
  4. Devices are controlled automatically based on sensor values and NTP schedule
  5. The user can enable manual override from the dashboard at any time

System Integration

To complete the system, all components are connected into one working unit:

Part Description Method
Integration Board Custom PCB with XIAO ESP32C6, relay connectors, fan connectors KiCad → CNC milling → hand soldering
In-Tank Modules Sensor mount, humidifier mount, cable guide Fusion 360 → 3D print (PETG)
Top Lid Holds enclosure, two 12V fans, and power connectors JW-CAD → laser cut (MDF)

For full details see Week 15: System Integration.


Weekly Progress

Week 1: Planning & Documentation ✅

Week 2: Computer-Aided Design ✅

Week 3: Computer-Controlled Cutting ✅

Week 4: Embedded Programming ✅

Week 5: 3D Scanning and Printing ✅

Week 6: Electronics Design ✅

Week 7: Computer-Controlled Machining ✅

Week 8: Electronics Production ✅

Week 9: Input Devices ✅

Week 10: Output Devices ✅

Week 11: Networking and Communications ✅

Week 12: Machine Design ✅

Week 13: Molding and Casting ✅

Week 14: Interface and Application Programming ✅

  • Full MQTT dashboard: Bootstrap 5.3, Chart.js 4, MQTT.js 5
  • Flask + SQLite backend with 1-month history
  • See Week 14 Documentation

Week 15: System Integration ✅

  • Integration Board completed: all 4 devices (fans, heater, humidifier, lighting) working
  • Auto control + manual override via dashboard confirmed
  • See Week 15 Documentation

Week 16: Wildcard ✅

Week 17: Applications and Implications ✅

Week 18: Invention, IP and Income ✅


Schedule

Phase 5/7 5/14 5/21 5/28 5/29 6/1 6/4 6/8
Design May 7 – 13
Build May 14 – 28
Integration May 29 – Jun 3
Presentation Jun 4 – 8

Section 3: Final Project

Final Video


Summary Slide

Summary Slide


Gecko State — System Description

This system reads environmental changes and responds to them, keeping reptiles comfortable at all times.

System Integration

Sensors

Sensor Position Measurement
SHT31 Top Temperature (°C), Humidity (%RH)
SHT31 Bottom Temperature (°C), Humidity (%RH)
Fan TACH signal Intake / Exhaust Fan speed (RPM)

Actuators & Control Logic

Device Hardware Auto Mode Manual Mode
Intake Fan 4-pin PC fan, LEDC PWM Always on (set speed) PWM slider 0–100%
Exhaust Fan 4-pin PC fan, LEDC PWM Always on (set speed) PWM slider 0–100%
Heater Grove 2-ch SPDT Relay (SW2/D1) ON < 24°C / OFF > 26°C Dashboard toggle
Humidifier Grove Water Atomization (D2) ON < 60% / OFF > 70%RH Dashboard toggle
Lighting Grove 2-ch SPDT Relay (SW1/D0) ON 6:00 / OFF 20:00 JST (NTP) Dashboard toggle

Reptiles are generally sensitive to bright light, so I use a dim grow light designed for plants. The tank also contains live plants — this lighting works well for both.

Integration Board (Custom PCB)

Milled PCB

Designed in KiCad, milled on a LUNYEE 3018 PRO MAX, and hand-soldered. All Grove connectors, fan headers, and power inputs are on a single board.

Dashboard

Dashboard

The Gecko State web dashboard runs as a static HTML page hosted on a local NAS. It connects to the MQTT broker over WebSocket and updates in real time.

MQTT Topic Direction Purpose
reptile/sensor ESP32 → Dashboard Live sensor data
reptile/fan/in/cmd Dashboard → ESP32 Intake fan speed
reptile/fan/ex/cmd Dashboard → ESP32 Exhaust fan speed
reptile/relay/heat/cmd Dashboard → ESP32 Heater on/off
reptile/relay/hum/cmd Dashboard → ESP32 Humidifier on/off
reptile/relay/light/cmd Dashboard → ESP32 Lighting on/off

Results

  • ✅ Fans: PWM speed control + live RPM readout
  • ✅ Heater: auto temperature control (24–26°C) + manual override
  • ✅ Humidifier: auto humidity control (60–70%RH) + manual override
  • ✅ Lighting: NTP schedule (6:00–20:00 JST) + manual override
  • ✅ Dashboard: real-time monitoring and control from any device on the network

Bill of Materials (BOM)

Item Qty Unit Price Total Source
Seeed XIAO ESP32C6 1 $6.50 (¥1,000) $6.50 Seeed Studio
Sensirion SHT31 (Grove) 2 $10.30 (¥1,600) $20.60 Switch Science
Grove 2-ch SPDT Relay 1 $7.75 (¥1,200) $7.75 Switch Science
Grove Water Atomization 1 $6.45 (¥1,000) $6.45 Switch Science
4-pin PC fan 60mm 12V 2 $3.90 (¥600) $7.75 Amazon
FR1 PCB blank (100×100mm) 2 $1.30 (¥200) $2.60 FabLab
12mm plywood (1220×2440mm) 1 $22.60 (¥3,500) $22.60 Home center
AC-DC converter 5V 2A 1 $5.15 (¥800) $5.15 Amazon
AC-DC converter 12V 2A 1 $5.80 (¥900) $5.80 Amazon
PETG filament (250g) 1 $5.15 (¥800) $5.15 Bambu Lab
MDF 3mm (300×300mm) 1 $1.95 (¥300) $1.95 Home center
Silicone rubber (200g) 1 $9.70 (¥1,500) $9.70 Amazon
UV resin (50g) 1 $3.90 (¥600) $3.90 Amazon
Wax block (CNC) 1 $3.25 (¥500) $3.25 FabLab
Miscellaneous (wire, connectors, screws) $6.45
Total ~$121 (¥18,700)

Questions and Answers

What does it do? Gecko State automatically controls the temperature, humidity, lighting, and airflow inside a reptile terrarium. It monitors the environment with two sensors and responds with relays and fans. The user can also override any device manually from a web dashboard.

What did you design? - Integration Board (custom PCB) — KiCad schematic and PCB layout - Gecko Shelf — CNC-milled plywood rack (1094 mm tall) - In-tank modules — 3D-printed PETG mounts and guides - Top lid — laser-cut MDF - Web dashboard — HTML/JS frontend + Python Flask backend - Gecko emblem — silicone mold + UV resin cast

What materials and components were used? See BOM above.

How much did it cost? Approximately 18,700 JPY (~125 USD) total.

What processes were used? CNC milling (PCB + shelf + wax mold), 3D printing, laser cutting, hand soldering, silicone molding, UV resin casting, embedded programming (Arduino/ESP32), web development.

What worked? What didn't? All four auto-control functions and manual overrides work correctly. The main challenge was the PubSubClient MQTT buffer (default 256 bytes was too small — increased to 512 bytes to fix MQTT receive failures). Fan minimum speed (~150 RPM at PWM=0) is a hardware limitation of 4-pin PC fans and is accepted as an idle state.

How was it evaluated? Full end-to-end test: sensors → MQTT → dashboard → device response. All 5 devices confirmed working in both auto and manual modes.


Files for Replication

File Description
integrated_board.ino ESP32C6 firmware — all device control
index.html Gecko State web dashboard
Reptile_Monitor/ KiCad PCB project (Reptile Monitor)
Integrated_borad/ KiCad PCB project (Integration Board)
Gecko_Shelf_Cut.dxf Gecko Shelf CNC cut file

License

This project is released under the Creative Commons Attribution Non-Commercial Share-Alike 4.0 International License (CC BY-NC-SA 4.0).

You are free to use, modify, and share this work for non-commercial purposes, as long as you give credit and share under the same license.


Acknowledgments

  • FabLab Nagoya — machine access, materials, and support throughout the course
  • Fab Academy instructors — global reviews and technical guidance
  • Seeed Studio — XIAO ESP32C6 and Grove module ecosystem
  • Neil Gershenfeld and the Fab Academy community — for building this program

References


Last updated: June 2026