πŸ“š Table of Contents

🧰 Parts List

Component Function Idle Current Active Current Notes
ESP32-C3 SuperMini Main MCU, Wi-Fi β‰ˆ0.01mA (deep sleep) β‰ˆ80–120mA (peak during WiFi) β‰ˆ20–30mA avg over wake time
AHT20 Temp + Humidity β‰ˆ0.5mA β‰ˆ1.0mA Very low power
BMP280 Pressure β‰ˆ0.5mA β‰ˆ0.7mA Combined board w/ AHT20
TMP102 Internal enclosure temperature monitor β‰ˆ10–50ΞΌA β‰ˆ100ΞΌA max [[]]IΒ²C-based, very low-power
SH1107 OLED (128x128) Visual output (IΒ²C) β‰ˆ0.5mA (off or idle) β‰ˆ10–15mA (typical on) Display will be turned on briefly with button press
TEMT6000 Ambient Light 0mA (powered off) β‰ˆ0.5–1mA Simple analog sensor
HC-SR04 Ultrasonic distance 0mA (powered off) β‰ˆ15–20mA Only on briefly to take reading
2Γ— INA219 Current/voltage monitor β‰ˆ0.6mA each β‰ˆ1.0mA each Continuously powered
DS18B20 Waterproof temp (fish pond) β‰ˆ0.5mA β‰ˆ1.5mA Needs pull-up resistor
PI Heating Element (5V, 1W) Maintains safe temp in cold climates 0mA (off) β‰ˆ200mA (when on) Controlled via GPIO + MOSFET
PMS5003 (optional) Air quality sensor β‰ˆ1.0mA (sleep) 100–120mA Wakes β‰ˆ5s per cycle
CN3065 Solar charge controller Negligible Passive device Handles charging logic
5V 200mA Solar Panel Solar input N/A 200mA max One panel used
3000mAh LiPo Battery Power storage N/A N/A Powers the full system
3Γ— STP55NF06L N-MOSFETs Power switching (OLED, heater) 0mA 0mA Logic-level, TO-220, controlled by 3.3V GPIO
3Γ— 4.7kΞ© Resistor (1/4W) Pull-ups for SDA, SCL, and DS18B20 N/A N/A 2 for IΒ²C (SDA/SCL), 1 for DS18B20
100nF Ceramic Capacitor (50V) High-frequency filtering near ESP32 N/A N/A Place close to ESP32 power pin and sensor power rail
470Β΅F Electrolytic Capacitor (6.3–10V) Bulk decoupling N/A N/A Use near ESP32 VIN to buffer inrush currents

ESPHome Configuration

YAML configuration for the Sensor Station
is provided in this repository.

This will configure the ESPHome firmware for the sensor station.

See ESPHome documentation for more details
on how to set up and use ESPHome.

Configuring Secrets

The firmware will reference a secrets.yaml file for sensitive information.
Naturally, that file should not be included in this repository.

However an example file is provided as secrets.yaml.example
for reference.

You should create a new file called secrets.yaml in the same directory
as the sensor-station.yaml file.

Then, using the example as a guide, fill in the required information.

Your WiFi credentials go in the wifi_ssid and wifi_password fields.

Optionally, you can provide a backup_wifi_ssid and backup_wifi_password.
(See the note on line 17 of the sensor-station.yaml file to enable this.)

You may choose an ota_password for over-the-air updates, or leave it blank.

You may also choose a hotspot_password for the fallback hotspot, or leave
it blank for no password.

The api_encryption_key must be a 32-byte base64 encoded string.
You can find a randomly generated key
in the ESPHome documentation.

This key is used during the station setup in Home Assistant to encrypt
the API communication between the ESP32 and Home Assistant.

πŸ“‘ ESPHome Sensor Station Entities

🌑️ Environmental Sensors

⚑ Power & Energy Monitoring

🌫️ Air Quality

πŸ“Ά WiFi Signal Strength

πŸŽ›οΈ Switches & Buttons

🌑️ Enclosure Climate Control


⚑ Daily Energy Use Summary

Base System (5-minute wake cycle)


With PMS5003 Included


With OLED Usage (occasional manual activation)

Assuming:

β†’ 12mA Γ— (15s Γ— 10) / 3600s = β‰ˆ0.5mAh/day


β˜€οΈ Solar Power Summary


πŸ”‹ + β˜€οΈ Battery Backup & Solar Requirements

With 3000mAh LiPo and 5V 200mA Solar Panel

Scenario Daily Draw Backup Days Solar Required Sun Hours Needed
Base system only β‰ˆ16.25mAh β‰ˆ184 days β‰ˆ16.25mAh β‰ˆ0.08 hr (β‰ˆ5 min)
With OLED use β‰ˆ16.75mAh β‰ˆ179 days β‰ˆ16.75mAh β‰ˆ0.08 hr
With PMS5003 β‰ˆ80.05mAh β‰ˆ37 days β‰ˆ80.05mAh β‰ˆ0.40 hr (β‰ˆ24 min)
PMS5003 + OLED use β‰ˆ80.55mAh β‰ˆ37 days β‰ˆ80.55mAh β‰ˆ0.40 hr
Base system + heater β‰ˆ216.25mAh β‰ˆ13.9 days β‰ˆ216.25mAh β‰ˆ1.08 hr
OLED + heater β‰ˆ216.75mAh β‰ˆ13.8 days β‰ˆ216.75mAh β‰ˆ1.08 hr
PMS5003 + heater β‰ˆ280.05mAh β‰ˆ10.7 days β‰ˆ280.05mAh β‰ˆ1.40 hr
PMS5003 + OLED + heater β‰ˆ280.55mAh β‰ˆ10.7 days β‰ˆ280.55mAh β‰ˆ1.40 hr

ESP32-C3 SuperMini GPIO Pinout Plan

Purpose GPIO Wire Color Notes
5V ---- Red 5V Rail
GND ---- Black Ground Plane
3V3 ---- Red w/ stripe 3.3V Rail
IΒ²C SDA (AHT20/BMP280) GPIO4 White Shared IΒ²C bus
IΒ²C SCL (AHT20/BMP280) GPIO5 Yellow w/ stripe Shared IΒ²C bus
1-Wire (DS18B20) GPIO6 Blue /w stripe Needs 4.7kΞ© pull-up resistor
Heater Power Switch GPIO2 Yellow Drives N-MOSFET to power heater
HC-SR04 Trigger GPIO10 Brown w/ stripe Fires Ultrasonic Output
HC-SR04 Echo GPIO9 White w/ stripe Receives Ultrasonic Input
PMS5003 TX β†’ RX GPIO21 Yellow w/ 2 stripes UART receive from PMS5003
PMS5003 RX ← TX GPIO20 Green w/ stripe UART send to PMS5003
PMS Power Switch GPIO8 White w/ 2 stripes Drives N-MOSFET to power PMS
TEMT6000 (Analog Out) GPIO0 Green Analog read (ADC1), safe and accessible
OLED Power (MOSFET Gate) GPIO7 Brown Drives N-MOSFET to power OLED
OLED Button Input GPIO1 Blue Safe as input only; must be HIGH or float at boot
Sensor Power (MOSFET Gate) GPIO3 Yellow Drives N-MOSFET to power IΒ²C and Ultrasonic

These color assignments are not electrically required but help reduce
wiring mistakes during assembly.


πŸ’€ Deep Sleep and Power Management

The ESP32-C3 enters deep sleep between sensor readings to conserve energy.
In this state, the main processor halts and only the RTC (real-time clock)
memory and wake-up timer remain powered.
This reduces current consumption to as low as 5Β΅A,
making deep sleep essential for maintaining long battery life in
solar-powered deployments.

During deep sleep, most GPIO pins are inactive, and peripheral
devices are unpowered unless explicitly designed to stay on.

πŸ”Œ Devices Powered Down During Deep Sleep

The following components are fully powered off
while the ESP32-C3 is in deep sleep:

Only the battery-backed RTC and wake timer remain active.

πŸ”“ Wake Lock Behavior

A wake lock can temporarily prevent the ESP32-C3 from
returning to deep sleep.
This mechanism is useful for debugging, testing, or when extended uptime
is required (e.g. for screen visibility or serial logs).

When a wake lock is active, the OLED display shows a clear full-screen message:

WAKE
LOCK

This mode takes priority over the normal page-based display logic,
ensuring the user is alerted whenever the wake lock is engaged.
The message uses a large font and occupies the full screen for visibility.

πŸ‘† Display Button Behavior

The OLED remains off by default and only lights up on button press.
It is automatically turned off after a brief timeout to preserve energy.

πŸ’€ Smart Sleep Behavior

The system uses a script-based approach to determine when and how long to enter
deep sleep, with logic based on wake-lock state,
battery voltage, and solar input.

Wake Timing

An initial delay of 30s occurs at the start of wake/boot
when the PMS5003 is enabled.
This allows the PMS5003 to stabilize before taking readings.

After the initial wake-up (or boot-up) the smart sleep script is executed.

Smart Sleep Timing

This script dynamically chooses a sleep duration
based on current power conditions:


Preparing for Sleep

This script ensures all major components are powered down
before entering deep sleep.

Actions:


Smart PMS Control

The PMS5003 is relatively power-hungry, so it is only powered on
when conditions are favorable.
The PMS5003 uses ~80–100β€―mA when measuring and ~20–30β€―mA in its idle state.

This script decides whether to power the PMS5003 sensor
based on power availability.


🧾 Bill of Materials (BOM Summary)

Microcontroller & Power

Sensors

Display & Interface

Power Management

Passive Components

Optional Components


Downloadable BOM Formats


Case and Assembly

An optional 3D-printable enclosure and PCB design will be provided later.
Assembly instructions using those components will be provided later.

3D-Printed Enclosure

A 3d-printed enclosure is used to house the components.

Although optional, using this enclosure is recommended for best performance.

This design will provide acceptable waterproofing and
protection from the elements while still allowing the sensors
to access the ambient temperature, humidity, light, and
particulate matter.

A section of the enclosure will require additional insulation
to help maintain the internal temperature of the LiPo battery
and PMS5003 sensor.

The model and STL files for the enclosure will be provided
at a later date.

PCB Design

An optional custom PCB board design allows simple assembly
and compact building of the sensor station.

Some PCBs will be available for purchase, but the design files
will also be provided for those who wish to build their own.

Soldering is still required, but the PCB design will allow for
easy installation of the soldered components like
MOSFETs, resistors, and connectors.

Alternatively, you can simply assemble the station using wires and no PCB.

All of the components use through-hole soldering,
so no special tools or skills are required.

The PCB designs will be available at a later date.

Assembly Instructions

Assembly instructions will show how to assemble the station using
the printed enclosure and PCB.

These instructions will be provided at a later date.


βœ… Conclusion