Skip to the content
PCBKitNew board
2 layers131.5 × 113 mmESP32EnvironmentController, the printed circuit board in 3D

Hardware and firmware for an ESP32 based environment controller

Size
131.5 × 113 mm
Copper layers
2
Thickness
1.6 mm
Parts
33
Nets
16
Pads
147
Tracks, vias
257, 12
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
1 Jun 2022
Updated
18 Sep 2026

Overview

ESP32EnvironmentController is an open-source printed circuit board by thecannawiki, from the thecannawiki/ESP32EnvironmentController repository on GitHub. It is a 2-layer board of 131.5 × 113 mm with 33 parts on 16 nets, routed with 257 tracks and 12 vias.

It belongs with the ESP32 boards of this library.

README

README.md

ESP32EnvironmentController

An environment (Temperature, humidity, Co2) controller for ESP32 Controller Hardware

Node-red interface

Feature list:

  • Automatic fan and heater control to meet target VPD
  • Post live data to MQTT server
  • Sensor data retrievable via HTTP
  • Using a cloud MQTT Broker makes the controller accessible from anywhere you have an internet connection
  • Compatibility with Node-red dashboard to display graphs of temperature, humidity, VPD, co2 levels and state of appliances being controlled.
  • All data is saved to a file on the Node-red server and graphs can be generated by using the DataPlotter.py script
  • Automatic watering based on hourly schedule

Part list:

Only the ESP32 and temp/humidity sensor are strictly required

  • ESP32 board
  • BME280 or SCD40 temp and humidity sensor
  • Motor driver board, ideally H-bridge mosfet based driver or TB6612FNG for smaller motors
  • SGP30 Co2 sensor (For Co2 reading when using the BME280. SCD40 is recommended)
  • Neopixel LED (optional for status indicator)
  • Relay for heater control

Installing on an ESP32

  1. Download the latest release and flash the .bin to your esp32 using esptool
  2. Register on MQHive for a cloud MQTT Broker or setup a MQTT broker locally.
  3. Once flashing is complete the ESP will enter setup mode and create a Wifi access point. Connect to it using a phone or computer and setup your wifi and MQTT credentials. You can re-enter setup mode by shorting Pin 23 to GND
  4. Connect sensors to the ESP32 (see below), and connect the esp to power either via the pins or USB port (Requires 5v 2A). Unfortunately, most PC usb ports only provide 1A so you will need a usb plug adapter or power supply.
Dashboard setup
  1. Install Node-red on any computer. This can be a desktop, phone or raspberry pi. There are lots of options Raspberry pi the best in most cases
  2. In Node-red import the dashboard.json (or Mobile.json on mobile) flow file in this repo.
  3. In Node-red configure MQTT broker login details you created in step 2.

MQTT Topics

The Topic the grow controller will publish sensor data to MQTTPUBLISHTOPIC. The controller can be instructed by sending messages to the MQTTCONTROLTOPIC + the endpoint e.g MQTTCONTROLTOPIC + "dehumidifier/auto" The following endpoints are supported: /dehumidifier/autoVpd /dehumidifier/auto /dehumidifier/lower /dehumidifier/upper /dehumidifier/target /dehumidifier/press /exhaust /targetVpd

Sensor connections:

The BME280, SGP30, SCD40 and are all I2C devices that require the following pins on the esp32 3.3v, GND, pin 21 for SDA and pin 22 for SCL When using the BME280 and SGP30 in conjunction you will need a splitter cable

Peripheral connections:

  • An external fan be controlled via a motor driver connected to pin 12. Be sure to use the appropriate driver for your fan size
  • A dehumidifier can be attached via a relay or mosfet on pin 13
  • A Neopixel LED can be connected to 5v and Pin 16 where it will act as a status indicator. This mostly for development and debug purposes
  • waterSensor1 pin 34;
  • waterSensor2 pin 4;

User manual

Control modes:

There are a number of switches that effect how the controller behaves

  • Autovpdfan (On/Off) - The fan is controlled automatically to reach a target VPD

  • Autodehumidifer (On/Off) - The dehumidifier is automatically controlled to maintain target VPD

  • Primary dehumidifier mode - Automatically control dehumidifier to maintain VPD

  • Secondary dehumidifier mode - dehumidifier is controlled based on fan power. turn on when over 90%, turn off when under 50%

Build instructions:

  1. Download this repo and open in Vscode. You will need the Platformio extension installed.

thanks to

https://maakbaas.com/esp32-soil-moisture-sensor/logs/testing-the-sensor https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/

Parts

33
QtyValueFootprintReferences
2,

The 2 most common of 33 parts.

Questions

How big is the ESP32EnvironmentController PCB?

It measures 131.5 × 113 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESP32EnvironmentController use?

33 parts. 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 ESP32EnvironmentController KiCad files?

From the thecannawiki/ESP32EnvironmentController repository on GitHub, at the commit this page was made from: the board is Hardware/main_board/main_board.kicad_pcb and its schematic Hardware/main_board/main_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESP32EnvironmentController design in my own project?

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

Similar boards

  • 2 layers65 × 30 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    33 parts1kGPL-3.0
  • 2 layers127 × 96 mmAmiga gfxcard, the printed circuit board in 3D

    Amiga gfxcard

    mntmn/amiga2000-gfxcard

    MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog

    33 parts1k
  • 2 layers92.7 × 58.4 mmHacky holidays, the printed circuit board in 3D

    Hacky holidays

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    33 parts915
  • 2 layers240 × 120 mmQuiver PDB 01, the printed circuit board in 3D

    Quiver PDB 01

    Arrow-air/project-quiver

    Project Quiver documentation, designs, and project artifacts.

    33 parts617CERN-OHL-S-2.0
  • 2 layers75 × 26 mmDIY detector, the printed circuit board in 3D

    DIY detector

    ozel/DIY_particle_detector

    A mobile low-cost spectrometer for measuring radioactivity and the energy of ionising radiation like alpha particles and electrons

    33 parts558BSD-2-Clause
  • 2 layers100 × 50 mmPixelix, the printed circuit board in 3D

    Pixelix

    BlueAndi/Pixelix

    Full RGB LED matrix, based on an ESP32 and WS2812B LEDs or emulated LEDs on TFT.

    33 parts447MIT
  • 2 layers65 × 30 mmCanHat, the printed circuit board in 3D

    CanHat

    bondus/KlipperToolboard

    A 3D printer tool head controller board

    33 parts373GPL-3.0