

Terraesp2
ESP32 terrarium controller
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 81
- Nets
- 73
- Pads
- 248
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 5 (file 20171130)
- Created
- 29 Oct 2017
- Updated
- 12 Feb 2026
Overview
Terraesp2 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 with 81 parts on 73 nets.
It is built around the ESP32-WROOM-32, LM2596S-5.0 and AMS1117, with the DMG4800LSD, SS54 and WS2812 among its other parts. Its parts include 25 connectors, 23 resistors, 7 diodes, 6 transistors and 4 capacitors. It belongs with the ESP32 boards of this library.
Main components
6ESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesLM2596S-5.0
TO-263-5-40℃~+125℃@(TJ) 1 150kHz 3A 4.5V~40V 5V 5mA Buck Buck Built-in Fixed No TO-263-5 DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersAMS1117
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 IncorporatedMOSFETsSS54
SMA(DO-214AC)-55℃~+125℃ 1mA@40V 40V 550mV@5A 5A Independent SMA(DO-214AC) Schottky Diodes ROHSMDDSchottky DiodesWS2812
SMD5050-4P1.57mm 1000mcd 110mcd 120us 2kHz 3.7V~5.3V 300ns 320mcd 451nm 523nm 5mm 5mm 623nm 800Kbit/s Built-in power-on reset circuit、Built-in power-on reset circuit Top-mount SMD5050-4P RGB LEDs(Built-in IC) ROHSWorldsemiRGB LEDs(Built-In IC)
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
81| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 10k | Resistor_SMD:R_1206_3216Metric | R2, R5, R6, R9, R10, R12, R15, R18, R21, R23 |
| 8 | 1k | Resistor_SMD:R_1206_3216Metric | R3, R4, R7, R8, R11, R14, R17, R20 |
| 4 | 12V | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J2, J4, J6, J7 |
| 4 | 220 | Resistor_SMD:R_1206_3216Metric | R13, R16, R19, R22 |
| 4 | 2A | Fuse_holder:ASI PTF-76 5x20mm Fuse Holder | F1, F2, F3, F4 |
| 4 | G3MB202PDC12 | G3MB202PDC12:RELAY_G3MB202PDC12 | K1, K2, K3, K4 |
| 4 | I2C | Connector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_Vertical | J19, J20, J21, J22 |
| 4 | LED | LED_SMD:LED_1206_3216Metric | D3, D4, D5, D6 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 4 | Q_NPN_BCE | Package_TO_SOT_SMD:SOT-23 | Q3, Q4, Q5, Q6 |
| 4 | SSR_OUT | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J14, J16, J17, J18 |
| 3 | 5V_OUT | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J1, J3, J5 |
| 2 | DMG4800LSD | eec:Diodes_Inc.-SO-8-03_2017-0-MFG | Q1, Q2 |
| 1 | 10uF | Capacitor_SMD:C_1206_3216Metric | C1 |
| 1 | 220uF | Capacitor_SMD:CP_Elec_6.3x5.8 | C4 |
| 1 | 22uF | Capacitor_Tantalum_SMD:CP_EIA-1608-08_AVX-J | C2 |
| 1 | 33uH | Inductor_SMD:L_12x12mm_H8mm | L1 |
| 1 | 470uF | Capacitor_SMD:CP_Elec_10x10.5 | C3 |
| 1 | 500 | Resistor_SMD:R_1206_3216Metric | R1 |
| 1 | A0 | Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_Vertical | J23 |
| 1 | A1 | Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_Vertical | J24 |
| 1 | AC_IN | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J15 |
| 1 | AMS1117 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | Conn_01x02_Male | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J9 |
| 1 | D | Diode_SMD:D_1206_3216Metric | D1 |
| 1 | DHT | Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_Vertical | J25 |
| 1 | ESP-Prog | Connector_IDC:IDC-Header_2x03_P2.54mm_Vertical | J8 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U1 |
| 1 | LM2596S-5 | Package_TO_SOT_SMD:TO-263-5_TabPin3 | U3 |
| 1 | PWM0 | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J10 |
| 1 | PWM1 | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J11 |
| 1 | PWM2 | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J12 |
| 1 | PWM3 | Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical | J13 |
| 1 | SS54 | SS54:DO-214AC | D7 |
| 1 | WS2812 | LED_SMD:LED_WS2812_PLCC6_5.0x5.0mm_P1.6mm | D2 |
More from fehlfarbe/terraesp
1- 2 layers127 × 54.3 mm

Similar boards
- 4 layers100.8 × 65 mm

ESP32 SLAM PCB DESIGN
zaidh-mech/PROJECTS
Engineering, robotics, embedded systems, CAD, and PCB projects
60 parts - 2 layers305.7 × 108.4 mm

FullKeyboardV1
alxhoff/RGB-Mechanical-Keyboard
Mechanical keyboard with various configurations and "in-PCB" WS2812 RGB LEDs
751 parts2GPL-3.0 - 4 layers169 × 71.3 mm

- 2 layers111 × 113.8 mm

Obs studio controller
CommanderRedYT/obs-studio-controller
DIY hardware + software to control obs studio
64 parts2GPL-3.0 - 2 layers120 × 106 mm

- 2 layers96 × 97.3 mm

DO AN DKTD
PHAP0610/ThaoRDBoard
All file include and source in this: https://github.com/nguyentrungthao/STM32/tree/dev
164 parts - 4 layers80 × 50 mm

- 2 layers117 × 81.5 mm

PressLog Edge Node
bansalsaksham/PressLog
Manufacturing-ready PCB design for an industrial IoT downtime-logging edge node. Offline-first firmware architecture, KiCad schematics, Gerbers, and BOM.
45 parts1
Questions
What parts does the Terraesp2 use?
81 parts, built around the ESP32-WROOM-32, LM2596S-5.0, AMS1117 and DMG4800LSD. 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 Terraesp2 KiCad files?
From the fehlfarbe/terraesp repository on GitHub, at the commit this page was made from: the board is hardware/kicad_v2/terraesp2/terraesp2.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Terraesp2 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).