Skip to the content
2 layers133 × 89.5 mmESP32-Simple Thermostat PCB, the printed circuit board in 3D

ESP32-Simple Thermostat PCB

jrtaylor71/ESP32-Simple-Thermostat2

Simple ESP32 Thermostat with touch screen

Size
133 × 89.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
52
Nets
62
Pads
188
Tracks, vias
477, 18
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
23 Jan 2025
Updated
19 Feb 2026

Overview

ESP32-Simple Thermostat PCB is an open-source printed circuit board by jrtaylor71, from the jrtaylor71/ESP32-Simple-Thermostat repository on GitHub. It is a 2-layer board of 133 × 89.5 mm with 52 parts on 62 nets, routed with 477 tracks and 18 vias.

It is built around the DHT11, LM2596S-5.0 and AHT20, with the DS18B20, G5Q-1A and 470UF 10V 6.3*7 among its other parts. Its parts include 8 diodes, 7 resistors, 6 transistors, 6 switches and 5 connectors. It belongs with the home automation and IoT boards and the ESP32 boards of this library.

Main components

8

README

README.md

ESP32 Simple Thermostat

A comprehensive, feature-rich thermostat system built on the ESP32 platform with professional PCB design. Perfect for DIY smart home automation with full Home Assistant integration.

Thermostat Display

🌟 Key Features

  • 📱 Local Touch Control: ILI9341 TFT LCD with intuitive touch interface
  • 🏠 Smart Home Ready: Full MQTT integration with Home Assistant auto-discovery
  • 🌡️ Dual Sensors: DHT11 for ambient conditions + DS18B20 for hydronic systems
  • ⚡ Multi-Stage HVAC: Support for 2-stage heating and cooling systems
  • 💨 Advanced Fan Control: Auto, continuous, and scheduled cycling modes
  • 🌐 Web Interface: Complete web-based configuration and monitoring
  • 📡 Offline Operation: Full functionality without WiFi connection
  • 🔧 Professional PCB: Custom PCB design for clean, permanent installation
  • 🔄 OTA Updates: Over-the-air firmware updates
  • 🔒 Factory Reset: Built-in reset capability via boot button

🚀 Quick Start

Hardware Requirements

  • ESP32 WROOM-32 Development Board
  • ILI9341 320x240 TFT LCD Touch Display
  • DHT11 Temperature/Humidity Sensor (digital pin)
  • DS18B20 Temperature Sensor (optional, for hydronic heating)
  • 6x Relay Module (5 HVAC + 1 hydronic pump)
  • Custom PCB (files included) or breadboard for prototyping

Software Setup

  1. Install PlatformIO IDE
  2. Clone this repository
  3. Open project in PlatformIO
  4. Build and upload to ESP32
  5. Use touch interface to configure WiFi and settings

Pin Configuration

TFT Display (ILI9341)
cpp
#define TFT_MISO 19    // SPI MISO
#define TFT_MOSI 23    // SPI MOSI
#define TFT_SCLK 18    // SPI Clock
#define TFT_CS   15    // Chip Select
#define TFT_DC    2    // Data/Command
#define TFT_RST   5    // Reset
#define TFT_BL   32    // Backlight (PWM)
#define TOUCH_CS  4    // Touch Chip Select
Sensors
cpp
#define DHTPIN 22           // DHT11 data pin
#define ONE_WIRE_BUS 27     // DS18B20 data pin (optional)
Relay Outputs
cpp
const int heatRelay1Pin = 13;   // Stage 1 heating
const int heatRelay2Pin = 12;   // Stage 2 heating
const int coolRelay1Pin = 14;   // Stage 1 cooling
const int coolRelay2Pin = 26;   // Stage 2 cooling
const int fanRelayPin = 25;     // Fan control
const int pumpRelayPin = 33;    // Hydronic pump control

💻 Web Interface

Access the thermostat's web interface by navigating to its IP address:

Status Page

[Image blocked: Web Status]

Real-time monitoring of:

  • Current temperature and humidity
  • Thermostat and fan modes
  • Relay states
  • System status

Settings Page

[Image blocked: Web Settings]

Complete configuration interface for:

  • Temperature setpoints and control modes
  • MQTT/Home Assistant integration
  • WiFi network settings
  • Multi-stage HVAC parameters
  • Hydronic heating controls
  • Fan scheduling options

🏠 Home Assistant Integration

Automatic discovery and integration with Home Assistant:

  1. Enable MQTT in thermostat settings
  2. Configure MQTT broker details
  3. Thermostat appears automatically in Home Assistant
  4. Full control via Home Assistant interface
  5. Supports climate entity with heating/cooling modes

MQTT Topics

  • Commands: esp32_thermostat/mode/set, esp32_thermostat/target_temperature/set
  • Status: esp32_thermostat/current_temperature, esp32_thermostat/mode
  • Discovery: Automatic Home Assistant device discovery

🔧 Professional PCB

The project includes a complete custom PCB design:

PCB Top PCB Bottom

PCB Features

  • Professional 4-layer design
  • All components integrated on single board
  • Labeled terminal blocks for easy HVAC wiring
  • Proper grounding and signal integrity
  • Standard mounting holes for enclosure installation

Manufacturing Files

Complete manufacturing package in ESP32-Simple-Thermostat-PCB/jlcpcb/:

  • Gerber files for PCB fabrication
  • Drill files for via and hole placement
  • Bill of Materials (BOM) for component sourcing
  • Component Placement List (CPL) for assembly

📖 Documentation

  • Complete Documentation: Comprehensive technical documentation
  • Copilot File: GitHub Copilot context for development
  • Inline Comments: Extensive code documentation
  • Serial Debug: Detailed debug output for troubleshooting

🛠️ Advanced Features

Multi-Stage Operation

  • Intelligent staging based on time and temperature
  • Configurable stage 2 activation parameters
  • Prevents system short-cycling
  • Optimizes energy efficiency

Hydronic Heating Support

  • DS18B20 water temperature monitoring
  • Safety interlocks prevent operation when water is too cold
  • Configurable high/low temperature thresholds
  • Perfect for radiant floor heating systems

Fan Control Options

  • Auto: Fan runs only with heating/cooling
  • On: Continuous fan operation
  • Cycle: Scheduled fan operation (configurable minutes per hour)

Safety Features

  • Watchdog timer prevents system lockups
  • Factory reset via boot button (10+ seconds)
  • Temperature limit enforcement
  • Graceful offline operation

🔧 Factory Reset

Press and hold the boot button for more than 10 seconds while the thermostat is running to restore all settings to defaults.

📄 License

This project is released under the GNU General Public License v3.0. Free to use, modify, and distribute.

🤝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📞 Support

  • Issues: Use GitHub Issues for bug reports
  • Discussions: GitHub Discussions for questions
  • Documentation: Comprehensive docs included
  • Serial Debug: Detailed logging at 115200 baud

⭐ Version

Current Version: 1.1.0

  • Complete thermostat functionality
  • MQTT/Home Assistant integration with auto-discovery
  • 7-day scheduling system
  • Multi-stage HVAC support with hydronic pump
  • DHT11 sensor support
  • PCB design
  • Web interface and OTA updates

Parts

52
QtyValueFootprintReferences
8MountingHole_M3_3.2mm_PadPCM_SL_Mechanical:MountingHole_3.2mm_PadH1, H2, H3, H4, H5, H6, H7, H8
61N4007PCM_Diode_THT_AKL:D_DO-41_SOD81_P7.62mm_HorizontalD1, D2, D3, D4, D5, D6
62N2222A-TO92PCM_Package_TO_SOT_THT_AKL:TO-92_Inline_Wide_EBCQ1, Q2, Q3, Q4, Q5, Q6
64.7kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2, R3, R4, R5, R7
6G5Q-1ARelay_THT:Relay_SPST_Omron-G5Q-1AK1, K2, K3, K4, K5, K6
4MountingHoleMountingHole:MountingHole_2.7mm_M2.5H5, H6, H7, H8
2100nF_CeramicCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P2.50mmC6, C9
11000uF_50VCapacitor_THT:CP_Radial_D16.0mm_P7.50mmC5
112uH_5.2A_1260Inductor_SMD:L_Bourns_SRR1260L1
13.2 lcd tftConnector_PinSocket_2.54mm:PinSocket_1x14_P2.54mm_VerticalJ4
1470uF_10VCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC8
1AHT20Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ5
1DHT11Sensor:Aosong_DHT11_5.5x12.0_P2.54mmU1
1DS18B20Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1ESP32_DevKit_V1_DOIT_30GPIOsPCM_SL_Development_Boards:DOIT_ESP32_DEVKIT_30PinsA1
1KBP210GPCM_Diode_THT_AKL:Diode_Bridge_KBPD7
1LM2596S-5Package_TO_SOT_SMD:TO-263-5_TabPin3U2
1PINHD_1x18_MaleConnector_PinHeader_2.54mm:PinHeader_1x18_P2.54mm_VerticalJ1
1ResistorResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
1SS34PCM_Diode_SMD_AKL:D_SMCD8
1Screw_Terminal_9_P3.50mmTerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-9-3.5-H_1x09_P3.50mm_HorizontalJ2

Similar boards

  • 2 layers50 × 100 mmServo tester, the printed circuit board in 3D

    Servo tester

    TobiasKaiser/servo_tester_pcb

    Servo tester PCB (KiCad)

    39 parts
  • 2 layers100 × 100 mmIr receiver, the printed circuit board in 3D

    Ir receiver

    adeboni/electronics

    This repository stores code for various electronics projects I've made

    89 parts
  • 4 layers100 × 100 mmLabathome pcb, the printed circuit board in 3D

    Labathome pcb

    klaus-liebler/labathome

    Der kleine Bruder von lab@home. Ermöglicht das Experimentieren mit PT1...PTn-Gliedern, die intern als RC-Kombination (entkoppelt über Operationsverstärker) ausgeführt sind.

    292 parts5MIT
  • 2 layers290 × 100 mmESP32-Wall Clock, the printed circuit board in 3D

    ESP32-Wall Clock

    SkullKill/ESP32-Wall-Clock-PCB

    ESP32 based 30cm Wall Mounted Clock. WiFi, NTP, SNMP, web interface, MicroUsb, Type-C, HG3613 Retrofit

    207 parts3GPL-3.0
  • 2 layers70 × 70 mmSensactUp4, the printed circuit board in 3D

    SensactUp4

    klaus-liebler/sensact

    Es gibt vier Namespaces für Nachrichten "REQUEST" und "RESPONSE", "EVENT" und "ACKNOWLEDGE". Dies wird mit den beiden LSB des Versions-Namespace-Bytes erklärt (Somit bleiben 64 Versionierungsmöglichkeiten) Alle vier…

    147 parts4Apache-2.0

Questions

How big is the ESP32-Simple Thermostat PCB PCB?

It measures 133 × 89.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESP32-Simple Thermostat PCB use?

52 parts, built around the DHT11, LM2596S-5.0, AHT20 and DS18B20. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ESP32-Simple Thermostat PCB KiCad files?

From the jrtaylor71/ESP32-Simple-Thermostat repository on GitHub, at the commit this page was made from: the board is ESP32-Simple-Thermostat-PCB/ESP32-Simple-Thermostat-PCB.kicad_pcb and its schematic ESP32-Simple-Thermostat-PCB/ESP32-Simple-Thermostat-PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESP32-Simple Thermostat PCB design in my own project?

Its repository states no licence, so its author keeps all rights: ask jrtaylor71 before reusing the design.