

Terraesp
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
5TSR 1-2450
SIP,11.6x7.5mm-40℃~+85℃ 10.2mm 11.6mm 1A 2200uF 300uA 50mVp-p 5V 7.5mm 7V~36V 850kHz 94% Short Circuit Protection、Automatic fault recovery ±1% SIP,11.6x7.5mm DC-DC Power Modules ROHSYLPTECDC-DC Power ModulesAMS1117
1.0 A Low-Dropout Fixed RegulatorAdvanced Monolithic SystemsUncategorisedDMG4800LSD
SO-8-55℃~+150℃ 1.5W 1.6V 122pF 128pF 2 N-Channel 22mΩ@4.5V 30V 798pF 8.56nC@5V 9.8A SO-8 MOSFETs ROHSDiodes IncorporatedMOSFETsCOM-11821
SMD5050LED Indication - DiscreteSparkFun ElectronicsTAJA226M010RNJ
CASE-A-3216-18(mm)-55℃~+125℃ 10V 22uF 3Ω@100kHz ±20% CASE-A-3216-18(mm) Tantalum Capacitors ROHSKyocera AVXTantalum Capacitors
README
README.mdESP32 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

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 typejust delete theTime.hheader in.pio/libdeps/{ota,usb}/Timeafter installing the libs. The bug happens only on Windows because it's not case-sensitive and mixes thetime.hheader withTime.hof 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

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| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | 10k | terraesp:M1206 | R5, R6, R15, R16, R17, R18, R19, R21, R23, R25, R27 |
| 8 | 1k | terraesp:R1206 | R2, R7, R10, R13, R20, R22, R24, R26 |
| 8 | 22-23-2021 | terraesp:22-23-2021 | +12V-1, PWM0, PWM1, PWM2, PWM3, X1, X2, X3 |
| 6 | 22-23-2041 | terraesp:22-23-2041 | A0, A1, I2C1, X6, X7, X8 |
| 5 | 691212710002 | terraesp:691212710002 | SSR_0, SSR_1, SSR_2, SSR_3, SSR_IN1 |
| 5 | PINHD-1X2 | terraesp:1X02 | -5V+1, BOOT1, CON0_5V1, EN1, OTA1 |
| 4 | @HOLE0, @HOLE1, @HOLE2, @HOLE3 | ||
| 4 | 10k | terraesp:R1206 | R1, R4, R9, R12 |
| 4 | 220 | terraesp:R1206 | R3, R8, R11, R14 |
| 4 | 2A | terraesp:0207_10 | F1, F2, F3, F4 |
| 4 | BC850 | terraesp:SOT23 | T1, T2, T3, T4 |
| 4 | G3MB202PDC12 | terraesp:RELAY_G3MB202PDC12 | K1, K2, K3, K4 |
| 4 | LEDCHIPLED_1206 | terraesp:CHIPLED_1206 | LED1, LED2, LED3, LED4 |
| 2 | DMG4800LSD | terraesp:SOIC127P600X144-8 | U$2, U$3 |
| 1 | 1N4004 | terraesp:DO41-10 | D2 |
| 1 | AMS1117 | terraesp:SOT229P700X180-4N | U2 |
| 1 | C-EUC1206 | terraesp:C1206 | C3 |
| 1 | COM-11821 | terraesp:LED_COM-11821 | D1 |
| 1 | CPOL-EUE5-10.5 | terraesp:E5-10,5 | C1 |
| 1 | ESP32-WROOM-32(8MB) | terraesp:MODULE_ESP32-WROOM-32(8MB) | U1 |
| 1 | OSHWLOGOLOGO5MM | terraesp:OSHW_5MM | GOLD_ORB_SM2 |
| 1 | PINHD-1X4 | terraesp:1X04 | UART0 |
| 1 | TAJA226M010R | terraesp:CAPCP3216X180N | C2 |
| 1 | TSR1-2450 | terraesp:TSR1-2450 | U$1 |
More from fehlfarbe/terraesp
1- 2 layers

Similar boards
- 2 layers40 × 65 mm

- 2 layers106 × 102.3 mm

- 4 layers72.4 × 95.3 mm

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 mm

MHI AC CTRL
hberntsen/mhi-ac-ctrl-esp32
Control MHI Airconditioning locally using your own ESP32 series chip!
8 parts74MIT - 2 layers65 × 74 mm

- 2 layers94.8 × 67.2 mm

- 2 layers110 × 75 mm

Shark bait remote
idlehandsdev/shark_bait
The files and firmware for the Shark Bait wireless pumping system.
65 parts13 - 2 layers70 × 40 mm

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).