Skip to the content
2 layersTerraesp2, the printed circuit board in 3D

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

6

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

81
QtyValueFootprintReferences
1010kResistor_SMD:R_1206_3216MetricR2, R5, R6, R9, R10, R12, R15, R18, R21, R23
81kResistor_SMD:R_1206_3216MetricR3, R4, R7, R8, R11, R14, R17, R20
412VConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ2, J4, J6, J7
4220Resistor_SMD:R_1206_3216MetricR13, R16, R19, R22
42AFuse_holder:ASI PTF-76 5x20mm Fuse HolderF1, F2, F3, F4
4G3MB202PDC12G3MB202PDC12:RELAY_G3MB202PDC12K1, K2, K3, K4
4I2CConnector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_VerticalJ19, J20, J21, J22
4LEDLED_SMD:LED_1206_3216MetricD3, D4, D5, D6
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
4Q_NPN_BCEPackage_TO_SOT_SMD:SOT-23Q3, Q4, Q5, Q6
4SSR_OUTTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ14, J16, J17, J18
35V_OUTConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ1, J3, J5
2DMG4800LSDeec:Diodes_Inc.-SO-8-03_2017-0-MFGQ1, Q2
110uFCapacitor_SMD:C_1206_3216MetricC1
1220uFCapacitor_SMD:CP_Elec_6.3x5.8C4
122uFCapacitor_Tantalum_SMD:CP_EIA-1608-08_AVX-JC2
133uHInductor_SMD:L_12x12mm_H8mmL1
1470uFCapacitor_SMD:CP_Elec_10x10.5C3
1500Resistor_SMD:R_1206_3216MetricR1
1A0Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ23
1A1Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ24
1AC_INTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ15
1AMS1117Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1Conn_01x02_MaleConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ9
1DDiode_SMD:D_1206_3216MetricD1
1DHTConnector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ25
1ESP-ProgConnector_IDC:IDC-Header_2x03_P2.54mm_VerticalJ8
1ESP32-WROOM-32RF_Module:ESP32-WROOM-32U1
1LM2596S-5Package_TO_SOT_SMD:TO-263-5_TabPin3U3
1PWM0Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ10
1PWM1Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ11
1PWM2Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ12
1PWM3Connector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ13
1SS54SS54:DO-214ACD7
1WS2812LED_SMD:LED_WS2812_PLCC6_5.0x5.0mm_P1.6mmD2

More from fehlfarbe/terraesp

1
  • 2 layers127 × 54.3 mmTerraesp, the printed circuit board in 3D

    Terraesp

    fehlfarbe/terraesp

    ESP32 terrarium controller

    83 parts25MIT

Similar boards

  • 4 layers100.8 × 65 mmESP32 SLAM PCB DESIGN, the printed circuit board in 3D

    ESP32 SLAM PCB DESIGN

    zaidh-mech/PROJECTS

    Engineering, robotics, embedded systems, CAD, and PCB projects

    60 parts
  • 2 layers305.7 × 108.4 mmFullKeyboardV1, the printed circuit board in 3D

    FullKeyboardV1

    alxhoff/RGB-Mechanical-Keyboard

    Mechanical keyboard with various configurations and "in-PCB" WS2812 RGB LEDs

    751 parts2GPL-3.0
  • 4 layers169 × 71.3 mmB.B V1.1, the printed circuit board in 3D

    B.B V1.1

    RoboticsBrno/RB3203-BlackBox

    258 parts
  • 2 layers111 × 113.8 mmObs studio controller, the printed circuit board in 3D

    Obs studio controller

    CommanderRedYT/obs-studio-controller

    DIY hardware + software to control obs studio

    64 parts2GPL-3.0
  • 2 layers120 × 106 mmKitEducacional, the printed circuit board in 3D

    KitEducacional

    felipetrentin/KitEducacional

    46 parts
  • 2 layers96 × 97.3 mmDO AN DKTD, the printed circuit board in 3D

    DO AN DKTD

    PHAP0610/ThaoRDBoard

    All file include and source in this: https://github.com/nguyentrungthao/STM32/tree/dev

    164 parts
  • 4 layers80 × 50 mmBeam Deflector Board, the printed circuit board in 3D

    Beam Deflector Board

    MECSEM/electrical

    All the electrical designs for MECSEM.

    100 partsGPL-3.0
  • 2 layers117 × 81.5 mmPressLog Edge Node, the printed circuit board in 3D

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