Skip to the content
2 layers127 × 54.3 mmTerraesp, the printed circuit board in 3D

ESP32 terrarium controller

Size
127 × 54.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
83
Nets
69
Pads
242
Tracks, vias
377, 39
Pours
7
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
29 Oct 2017
Updated
12 Feb 2026

Overview

Terraesp is an open-source printed circuit board by fehlfarbe, from the fehlfarbe/terraesp repository on GitHub, published under the MIT licence. It is a 2-layer board of 127 × 54.3 mm with 83 parts on 69 nets, routed with 377 tracks and 39 vias.

It is built around the TSR 1-2450, AMS1117 and DMG4800LSD, with the COM-11821 and TAJA226M010RNJ among its other parts. Its parts include 27 resistors, 6 diodes, 4 switches, 4 fuses and 3 capacitors. It belongs with the ESP32 boards of this library.

Main components

5

README

README.md

ESP32 terrarium controller

With this project you can control your terrarium's temperature, light, sprinkler and so on via webinterface.

Features

  • Reads different Sensors for temperature and humidity (DHT22, SHT3x, DS1820, ...) and analog sensors to measure soil moisture etc.
  • Timers for day/night light switch
  • Actions if threshold for a sensor is reached e.g. to start sprinkler for 10s if humidity is under threshold
  • Webinterface:
    • 24h log of temperature and humidity, actions etc.
    • control for buttons/actors and sliders for PWM pins
    • change config
  • OTA update via WiFi

Webinterface

webinterface

The webinterface has interactive controls to toggle relays or set PWM values to set the brightness of LEDs or fan speed.

A chart shows the measured temperatures (red) and humidity (blue) of your configured sensors and events (green) like time on, off and so on.

You can add sensors, actuators (relay, pwm), timers and thresholds in the 'settings' section.

Parts needed

  • ESP32 dev board
  • DHT22 / SHT31 / analog temperature and humidity sensor
  • Relay or SSR board to control lights/pump
  • MOSFET board to control LED brightness, fan speed etc. via PWM
  • WiFi connection for time sync

The device creates an access point on first start. Then you can configure your WiFi and pin settings.

Caution

The WiFi password is saved without encryption on the device. Also OTA-update has default password "admin" at the moment. Change it if you want to secure your device for unauthorized updates.

Make the webinterface accessible from the internet is a very bad idea! Please use a VPN or something else to prevent a flooded terrarium ;-)

Installation

  • Download / Clone this repository
  • Install PlatformIO: https://docs.platformio.org/en/latest/ide/pioide.html
  • Open this project in PlatformIO
  • Connect your ESP32 via USB cable and upload sketch and filesystem
    • Run task -> Upload file system image
    • or run pio run -t uploadfs
    • Uploading filesystem will overwrite your settings!
  • Reboot ESP32, it will create an AccessPoint with name ESP_xxxx
  • Connect to the AP and open http://192.168.4.1 in Browser
  • Connect to your WiFi network
  • Setup pins, sensor and so on in the webinterface

Problems

  • If PlatformIO can't find the libraries, switch to the cloned directory, open a terminal and type pio lib install. The command should download all necessary libraries.
  • Windows users: if you get errors like error: 'timeinfo' has incomplete type just delete the Time.h header in .pio/libdeps/{ota,usb}/Time after installing the libs. The bug happens only on Windows because it's not case-sensitive and mixes the time.h header with Time.h of TimeLib library.

PCB

Prototype PCB with several new features:

  • 12V supply voltage for board and PWM/switches
  • Directly soldered ESP32 with 12V -> 5V -> 3V3 converter
  • 4x SSR to switch 230V AC with one 230V AC input and 3-4x outputs (is this safe??)
  • 4x MOSFETs for PWM with supply voltage (to set the brightness of a 12V LED strip or control the speed of a fan)
  • Connect multiple sensors/displays/whatever via i2c bus
  • Connect analog sensors

PCB

ToDo

  • webinterface with authorization
  • better instructions
  • import/export config
  • The current hardware setup is a mess with many jumper cables and so on. So I want to create PCB with relays/SSR, MOSFETS, power supply
  • PID controller for heater/humidifier?
  • PCB: switch from EAGLE to KiCAD (in progress...)
  • PCB: replace the expensive 12V -> 5V step down (in progress...)

Parts

83
QtyValueFootprintReferences
1110kterraesp:M1206R5, R6, R15, R16, R17, R18, R19, R21, R23, R25, R27
81kterraesp:R1206R2, R7, R10, R13, R20, R22, R24, R26
822-23-2021terraesp:22-23-2021+12V-1, PWM0, PWM1, PWM2, PWM3, X1, X2, X3
622-23-2041terraesp:22-23-2041A0, A1, I2C1, X6, X7, X8
5691212710002terraesp:691212710002SSR_0, SSR_1, SSR_2, SSR_3, SSR_IN1
5PINHD-1X2terraesp:1X02-5V+1, BOOT1, CON0_5V1, EN1, OTA1
4@HOLE0, @HOLE1, @HOLE2, @HOLE3
410kterraesp:R1206R1, R4, R9, R12
4220terraesp:R1206R3, R8, R11, R14
42Aterraesp:0207_10F1, F2, F3, F4
4BC850terraesp:SOT23T1, T2, T3, T4
4G3MB202PDC12terraesp:RELAY_G3MB202PDC12K1, K2, K3, K4
4LEDCHIPLED_1206terraesp:CHIPLED_1206LED1, LED2, LED3, LED4
2DMG4800LSDterraesp:SOIC127P600X144-8U$2, U$3
11N4004terraesp:DO41-10D2
1AMS1117terraesp:SOT229P700X180-4NU2
1C-EUC1206terraesp:C1206C3
1COM-11821terraesp:LED_COM-11821D1
1CPOL-EUE5-10.5terraesp:E5-10,5C1
1ESP32-WROOM-32(8MB)terraesp:MODULE_ESP32-WROOM-32(8MB)U1
1OSHWLOGOLOGO5MMterraesp:OSHW_5MMGOLD_ORB_SM2
1PINHD-1X4terraesp:1X04UART0
1TAJA226M010Rterraesp:CAPCP3216X180NC2
1TSR1-2450terraesp:TSR1-2450U$1

More from fehlfarbe/terraesp

1
  • 2 layersTerraesp2, the printed circuit board in 3D

    Terraesp2

    fehlfarbe/terraesp

    ESP32 terrarium controller

    81 parts25MIT

Similar boards

  • 2 layers106 × 102.3 mmAcorn motherboard, the printed circuit board in 3D

    Acorn motherboard

    kitspace-test-repos/kicad6-file-collection

    115 partsMIT
  • 4 layers72.4 × 95.3 mmDingoPDM, the printed circuit board in 3D

    DingoPDM

    corygrant/dingoPDM

    Hardware - dingoPDM is an open source, affordable automotive PDM (Power Distribution Module). Pre-assembled and tested units are available or the design can be used to build a DIY version.

    156 parts128MIT
  • 2 layers51.6 × 26.8 mmMHI AC CTRL, the printed circuit board in 3D

    MHI AC CTRL

    hberntsen/mhi-ac-ctrl-esp32

    Control MHI Airconditioning locally using your own ESP32 series chip!

    8 parts74MIT
  • 2 layers65 × 74 mmRP2040 MPG and DRO, the printed circuit board in 3D

    RP2040 MPG and DRO

    terjeio/GRBL_MPG_DRO_BoosterPack

    Tiva C BoosterPack for GRBL MPG/DRO

    54 parts46
  • 2 layers94.8 × 67.2 mmArgo v9-stable rev4, the printed circuit board in 3D

    Argo v9-stable rev4

    SensorsINI/argo

    Code for Autonomous sail boat

    139 parts16
  • 2 layers110 × 75 mmShark bait remote, the printed circuit board in 3D

    Shark bait remote

    idlehandsdev/shark_bait

    The files and firmware for the Shark Bait wireless pumping system.

    65 parts13
  • 2 layers70 × 40 mmRx V1.2, the printed circuit board in 3D

    Rx V1.2

    TRD-B/EasyRC

    Open source RC platform

    52 parts9MIT

Questions

How big is the Terraesp PCB?

It measures 127 × 54.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Terraesp use?

83 parts, built around the TSR 1-2450, AMS1117, DMG4800LSD and COM-11821. 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 Terraesp KiCad files?

From the fehlfarbe/terraesp repository on GitHub, at the commit this page was made from: the board is hardware/kicad/terraesp.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Terraesp design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).