Skip to the content
4 layers62.5 × 69 mmSmart thermostate, the printed circuit board in 3D

This project is a thermostat control system based on the STM32F405RGTx microcontroller. It includes schematic design and PCB layout created using KiCad 8, intended for manufacturing with a 2-layer JLCPCB template.

Size
62.5 × 69 mm
Copper layers
4
Thickness
1.6 mm
Parts
69
Nets
87
Pads
266
Tracks, vias
503, 50
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
27 Apr 2025
Updated
28 Apr 2025

Overview

Smart thermostate is an open-source printed circuit board by attarkousar, from the attarkousar/Thermostate_PCB repository on GitHub. It is a 4-layer board of 62.5 × 69 mm with 69 parts on 87 nets, routed with 503 tracks and 50 vias.

It is built around the BTA16-600CW, SHTC3 and MOC3020M, with the NHD-C12832A1Z-FSRGB among its other parts. Its parts include 30 capacitors, 20 resistors, 6 ICs, 5 switches and 1 transistor. It belongs with the STM32 boards of this library.

Main components

4

README

README.md

Smart Thermostat

This project is a thermostat control system based on the STM32F405RGTx microcontroller.
It includes schematic design and PCB layout created using KiCad 8, intended for manufacturing with a 2-layer JLCPCB template.


📜 Project Overview

The system is designed to monitor and control environmental conditions (temperature, humidity, gas levels) and control an HVAC system accordingly.

✨ Features:

  • Microcontroller: STM32F405RGTx
  • Input Sensors:
    • SHTC3 — Humidity Sensor (I²C)
    • CCS811 — Gas Sensor (I²C with interrupt, reset, wake control)
    • TMP36xS — Analog Temperature Sensor
    • 4 Push Buttons — User Inputs
  • Output Devices:
    • NHD-C12832A1Z-FSRGB — 128x32 RGB OLED Display (SPI Interface)
    • MOC3020M — Optotriac Driver
    • BTA16-600CW — Triac for HVAC switching
    • 4-Pin Connector — Interface to HVAC (AC Load Control) + 3.3V and GND for external circuitry
  • Power:
    • Entire circuit operates on a 3.3V supply, including MCU and peripherals.

🧩 Schematic Structure

  • Root Schematic (Sheet 1):

    • STM32F405 Startup Circuit
      • Power supply connections (3.3V, GND)
      • Reset circuit
      • BOOT0 setup
      • Debugging interface (SWD/JTAG)
  • Child Sheets:

    • Input Sheet (Sheet 2):
      • Humidity Sensor (SHTC3)
      • Gas Sensor (CCS811)
      • Temperature Sensor (TMP36xS)
      • 4 Push Switches
    • Output Sheet (Sheet 3):
      • OLED Display (NHD-C12832A1Z-FSRGB)
      • MOC3020M + BTA16-600CW (HVAC control)
      • 4-pin Connector to HVAC System
      • Power supply connector (3.3V input)

Connections between sheets are organized using Global Labels to maintain clarity and prevent errors during schematic hierarchy validation.


🖨️ PCB Design

  • Software: Designed in KiCad 8
  • PCB Layers: 2-Layer Board
  • Board Size: 63mm x 69mm
  • Highlights:
    • Clean separation between low-voltage control signals and high-voltage HVAC control path.
    • Proper trace width calculations for AC control lines.
    • Decoupling capacitors placed close to STM32 and critical sensors.
    • Minimal cross-talk between analog and digital sections.
    • Mounting holes provided for mechanical stability.

🛠️ Custom Libraries and Models

During development, several custom components and footprints were created:

  • SHTC3 3D Model:

    • The 3D model for the SHTC3 humidity sensor was missing in KiCad libraries.
    • A custom 3D model was added and is available in the 3D/ folder.
  • 4-Pin Connector:

    • A complete library for a 4-pin connector was created including:
      • Symbol
      • Footprint
      • 3D Model
    • Available in the 4PinConnector/ folder.
  • New Libraries Created:

    • MOC3020M — Optotriac Driver
    • NHD-C12832A1Z-FSRGB-FBW-3V — OLED Display
    • These libraries were created from scratch since they were not available in standard KiCad libraries.

🧩 JLCPCB Template Usage

This template ensures standard design rules for JLCPCB manufacturing are applied automatically.


📂 Repository Structure

plaintext
/Project
│
├── smart_thermostate
│   ├── Root_Sheet.kicad_sch
│   ├── Input_Sheet.kicad_sch
│   └── Output_Sheet.kicad_sch
│   └── Thermostat_PCB.kicad_pcb
│   └── ERC.rpt
│   └── DRC.rpt
│   └── Manufacturer Files
│       └── Gerber Files/
├── 3D/
├── 4PinConnector/
├── MOC3020M/
├── NHD-C12832A1Z-FSRGB/
│
├── kicad_templates-master/
│
└── README.md

⚡ Notes:

  • Ensure opto-isolation for MOC3020M when interfacing with HVAC to guarantee user and system safety.
  • Follow standard ESD precautions when handling or assembling the board.
  • 3.3V input should be clean and regulated — consider using an external LDO if the supply is noisy.

Parts

69
QtyValueFootprintReferences
13100nCapacitor_SMD:C_0402_1005MetricC5, C7, C8, C9, C10, C12, C14, C15, C16, C17, C18, C19, C20
81uCapacitor_SMD:C_0402_1005MetricC11, C21, C22, C23, C24, C25, C26, C30
510KResistor_SMD:R_0402_1005MetricR1, R2, R4, R8, R9
51KResistor_SMD:R_0402_1005MetricR10, R11, R12, R13, R16
42.2uCapacitor_SMD:C_0603_1608MetricC3, C4, C27, C28
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
4SW_PushButton_Switch_THT:SW_PUSH_6mmSW1, SW2, SW3, SW4
34.7KResistor_SMD:R_0402_1005MetricR5, R6, R7
20.1uCapacitor_SMD:C_0402_1005MetricC13, C29
210RResistor_SMD:R_0402_1005MetricR19, R20
210pCapacitor_SMD:C_0402_1005MetricC1, C2
10RResistor_SMD:R_0402_1005MetricR3
1100RResistor_SMD:R_0402_1005MetricR18
1120RInductor_SMD:L_0603_1608MetricFB1
1150RResistor_SMD:R_0402_1005MetricR14
124MCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1330RResistor_SMD:R_0402_1005MetricR15
133RResistor_SMD:R_0402_1005MetricR17
14.7uCapacitor_SMD:C_0603_1608MetricC6
1BTA16-600CWPackage_TO_SOT_THT:TO-220-3_VerticalQ1
1CCS811Package_LGA:AMS_LGA-10-1EP_2.7x4mm_P0.6mmU3
1Connector_4_Pin4PinConnector:TE_282837-4J1
1MOC3020MPackage_DIP:DIP-6_W7.62mmU7
1NHD-C12832A1Z-FSRGBDisplay:NHD-C12832A1Z-FSRGBU5
1SHTC3Sensor_Humidity:Sensirion_DFN-4-1EP_2x2mm_P1mm_EP0.7x1.6mmU4
1STM32F405RGTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1SW_SPDTButton_Switch_SMD:SW_SPDT_PCM12SW5
1TMP36xSPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU2

Similar boards

  • 2 layers1,008.5 × 98.7 mmMike ky board, the printed circuit board in 3D

    Mike ky board

    Marc-Blanco/Mykey-board

    I tried to make a functional and cool midi keyboard like a piano with 88 keys DIY, with cool features. It has 2 speakers and 2 rotary encoders to tingle things, I would like to improve on the project and this is kind of…

    190 parts
  • 2 layers42 × 32 mmAZ1 Series Breakout, the printed circuit board in 3D

    AZ1 Series Breakout

    sdp8483/Newhaven_Display_AZ1_Breakout

    Breakout PCB for Newhaven Display NHD-C12831A1Z

    17 partsMIT
  • 2 layers39 × 83 mmDimmer 2.0, the printed circuit board in 3D

    Dimmer 2.0

    ageurtse/Wifi-Dimmer

    This is all about my home build WiFi Dimmer

    27 parts6
  • 2 layers80 × 100 mmReflow oven, the printed circuit board in 3D

    Reflow oven

    gratinDeTopinambour/Reflow_Soldering_DIY

    reflow soldering module to pilote small furnace

    52 parts1
  • 2 layers34.3 × 32.9 mmMcu sensor firmware studies, the printed circuit board in 3D

    Mcu sensor firmware studies

    AssaadMH/mcu-sensor-firmware-studies

    A set of small but complete embedded programs — PIC instrumentation with LCD readout, and an NFC tag reader.

    7 parts1MIT
  • 2 layers240 × 63 mmPowerampC300, the printed circuit board in 3D

    PowerampC300

    profdc9/PowerAmpAudio

    Power Amplifier based on Michael Chua's C300 amplifier

    128 parts25
  • 2 layers147.8 × 106.3 mmMr washi, the printed circuit board in 3D

    Mr washi

    mayermakes/MyGenWashy

    Generic washing Machine Controller - Result of the TuttleButtle Hackathon 2025

    54 parts12GPL-3.0
  • 4 layers78 × 78 mmBEEIRON v0.0, the printed circuit board in 3D

    BEEIRON v0.0

    Krishnawa/BEEIRON

    A JBC soldering station

    136 parts7CC0-1.0

Questions

How big is the Smart thermostate PCB?

It measures 62.5 × 69 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Smart thermostate use?

69 parts, built around the BTA16-600CW, SHTC3, MOC3020M and NHD-C12832A1Z-FSRGB. 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 Smart thermostate KiCad files?

From the attarkousar/Thermostate_PCB repository on GitHub, at the commit this page was made from: the board is smart_thermostate/smart_thermostate.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Smart thermostate design in my own project?

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