|
Cadsoft Eagle |
FlexIO – Universal ESP32 I/O Expansion Board
FlexIO – Universal ESP32 I/O Expansion Board
The FlexIO is a versatile, modular I/O expansion board designed around the ESP32 Wemos D1 Mini module. It was primarily designed for use with ESPHome and WLED, but its flexible hardware configuration makes it suitable for a wide variety of ESP32-based home automation, lighting, sensor and control applications.
The main idea behind the FlexIO is that the PCB contains a large number of different interfaces and peripheral circuits, but not all components need to be populated. Only the functions required for a particular application need to be assembled. This makes it possible to build many different devices using the same PCB design.
The board measures 52x60mm, with mounting holes positioned on a 44×52mm mounting pattern.
Outputs for addressable LEDs
The FlexIO provides four dedicated outputs for addressable digital LEDs, such as WS2812, SK6812 and similar devices.
Each output can carry the digital data signal required by the LED strip or other addressable LED device. In addition, the power supply of the digital LED outputs can be actively switched by the ESP32.
This allows the connected LED devices to be completely powered down when they are not required, which can be useful for reducing standby consumption or for applications where the LED supply needs to be controlled independently from the rest of the circuit.
The power source for the DLED outputs can be selected using solder jumper J1. Depending on the configuration, the outputs can receive either the 5 V generated on the FlexIO board or the external input supply voltage.
If there is no need to switch the LED supply with the ESP32, transistors T2 and T3 do not need to be populated. In this configuration, J3 can be bridged with a small solder bridge.
Five open-drain outputs
The board also provides five open-drain (open-collector type) outputs suitable for controlling external loads such as:
- relays,
- fans,
- indicator LEDs,
- solenoids and similar loads,
- transistor-controlled lighting,
- analogue RGB/RGBW LED strips.
The five-channel configuration was deliberately chosen so that the outputs can also be used to control an analogue RGBWW LED strip, providing separate channels for the required colours and white channels.
The outputs are intended to be used as low-side switching outputs and can be adapted to the requirements of the connected load.
Four protected inputs
FlexIO provides four general-purpose inputs, labelled INPUT1–INPUT4.
Depending on the application and ESPHome configuration, these inputs can be used as either digital or analogue inputs.
Each input includes provisions for:
- overvoltage protection,
- pull-up resistance,
- pull-down resistance,
- optional voltage division.
The voltage-divider resistors R10, R12, R20 and R21 can be populated when the incoming signal voltage needs to be reduced before reaching the ESP32 ADC/input.
The required resistor values depend on the voltage range of the particular application. The voltage divider is therefore intentionally configurable rather than fixed to one specific input voltage.
This makes the inputs suitable for a wide range of sensors, switches and external signals.
Reverse-polarity protection
The main power input of the FlexIO is protected against reverse polarity.
This is particularly useful in practical installations where the board may be powered from an external supply and accidental polarity reversal is possible.
For example, when the FlexIO is controlling expensive, permanently installed LED strips, reverse-polarity protection can prevent an incorrectly connected power supply from damaging the connected equipment.
Integrated power monitoring
The FlexIO can optionally measure its own supply current and power consumption using an INA219 current/voltage monitoring IC.
When populated, the INA219 can be integrated into ESPHome and its measurements can be made available to Home Assistant. This allows the current consumption, voltage and calculated power consumption of the FlexIO and its connected loads to be monitored.
The INA219 is optional because power monitoring is not required for every application.
For cost reasons, I recommend purchasing an inexpensive INA219 module from AliExpress and transferring the INA219 IC from the module to the FlexIO PCB using hot air. The standalone INA219 IC can be considerably more expensive than an entire inexpensive module.
If power measurement is not required, IC1 can simply be left unpopulated. In this case, the current-sense resistor RS can also be bypassed with a short piece of wire.
Flexible power supply
The FlexIO contains a footprint for an M1 step-down converter module.
The M1 converter is an inexpensive ready-made DC/DC buck converter module commonly available from AliExpress. It is soldered directly onto the FlexIO PCB and generates the 5 V supply required by the ESP32 and other peripherals.
This allows the board to operate from a considerably higher input voltage, including 24 V, provided that the selected step-down converter and the connected loads are suitable for the applied voltage and current.
When the FlexIO is powered directly from a suitable 5 V supply, the M1 converter is not required.
In that case, the J1 solder jumper should be bridged with solder, bypassing the step-down converter.
ESP32 module
The main controller is a Wemos D1 Mini ESP32 module, installed as module M2.
I recommend installing the ESP32 module using female header sockets rather than soldering it permanently to the FlexIO PCB. This makes replacement considerably easier if the ESP32 module is damaged or if a different module needs to be installed.
The modular design also makes it possible to separate the relatively inexpensive FlexIO PCB from the ESP32 controller when troubleshooting or servicing the system.
Digital audio output
The FlexIO can be connected to a MAX98357 digital audio amplifier.
The MAX98357 can be controlled through ESPHome and exposed to Home Assistant as a Media Player. This allows a small speaker to be connected to the system for:
- notification sounds,
- spoken messages,
- TTS (text-to-speech),
- alarms,
- status announcements,
- other Home Assistant audio notifications.
This is particularly useful when the FlexIO is used as part of a room automation or presence-detection system.
Sensor interfaces
One of the main features of FlexIO is the number of different sensors that can be connected to the same board.
The PCB contains provisions for a variety of commonly available modules and sensors. Depending on the selected ESPHome configuration, several of these can operate simultaneously.
Supported sensor types include:
LD2410 presence sensor
The LD2410 is a 24 GHz radar-based human presence/motion sensor.
It can be used for presence detection and automation in combination with ESPHome and Home Assistant.
INMP441 digital microphone
The INMP441 is an I²S digital MEMS microphone.
It can be used for audio input and voice-related applications. It can also be used with WLED for audio-reactive lighting applications.
BME280 / BMP280
The board provides support for the BME280/BMP280 family of sensors for measuring:
- temperature,
- atmospheric pressure,
- relative humidity (BME280).
The BMP280 provides temperature and pressure measurements, while the BME280 additionally provides humidity measurement.
SGP30 / SGP40
The SGP30/SGP40 sensors can be used for indoor air-quality related measurements and can be integrated into ESPHome and Home Assistant.
AS7341
The AS7341 is a multi-channel spectral sensor capable of measuring different portions of the visible light spectrum.
It can therefore be used for applications where colour or spectral information is required.
VEML7700
The VEML7700 is an ambient light sensor suitable for measuring the surrounding illumination level.
This can be used, for example, to automatically adjust lighting according to the ambient brightness.
DS18B20
A DS18B20 digital temperature sensor can also be connected to the FlexIO.
The sensor is particularly useful for remote temperature measurements where the sensor itself needs to be placed away from the main PCB.
TSOP38238
The board also provides an interface for a TSOP38238 infrared receiver.
This allows the FlexIO to receive commands from conventional IR remote controls and can be used with both ESPHome and WLED.
Modular and application-specific design
The FlexIO is intentionally not designed as a single-purpose device.
The PCB contains considerably more functionality than is required for any one particular application. Components can therefore be omitted during assembly when they are not needed.
For example, a simple WLED controller may only require:
- the ESP32 module,
- the 5 V power supply,
- one or more addressable LED outputs.
A more advanced Home Assistant node could instead use:
- the ESP32,
- INA219 power monitoring,
- LD2410 presence detection,
- BME280 environmental sensing,
- VEML7700 ambient light measurement,
- an audio amplifier,
- several digital outputs and inputs.
Both devices can be built from the same PCB.
This modular approach also makes the FlexIO suitable for experimentation and custom ESPHome projects without having to design a new PCB for every application.
Recommended assembly
The exact component population depends on the intended application.
The M2 Wemos D1 Mini ESP32 is recommended to be installed in female header sockets instead of directly soldering it to the PCB.
The M1 step-down converter is only required when the input supply voltage is higher than the required 5 V supply. With a suitable 5 V input supply, the converter can be omitted and J1 can be bridged.
IC1 (INA219) is optional. It should only be populated when supply voltage/current/power monitoring is required. If it is omitted, the RS current-sense resistor can be bypassed.
The T2 and T3 transistors are only required when the power supply of the digital LED outputs needs to be switched by the ESP32. If this function is not required, they can be omitted and J3 can be bridged.
The voltage-divider resistors R10, R12, R20 and R21 are optional and should be selected according to the voltage range of the signals connected to INPUT1–INPUT4.
Because the FlexIO is intended to be configurable, the complete bill of materials depends on the particular application and therefore not every component shown in the schematic needs to be populated.
Intended applications
The FlexIO can be used as a general-purpose ESP32 platform for applications such as:
- WLED lighting controllers,
- addressable LED installations,
- analogue RGB/RGBW lighting control,
- Home Assistant automation nodes,
- room presence sensors,
- environmental monitoring,
- air-quality monitoring,
- power-consumption monitoring,
- IR remote control interfaces,
- audio/TTS notification devices,
- fan and relay controllers,
- custom ESPHome devices,
- experimental and maker projects.
The PCB is intended to provide a flexible hardware platform rather than a single fixed-function device.
The combination of configurable inputs, multiple output types, optional power monitoring, integrated power conversion, digital audio and a wide range of sensor interfaces makes it possible to build many different ESPHome and WLED devices around the same compact PCB.
Project dimensions
PCB size: 52×60 mm
Mounting-hole pattern: 44×52 mm
Controller: Wemos D1 Mini ESP32
Primary software platforms: ESPHome / WLED / Home Assistant
FlexIO – Universal ESP32 I/O Expansion Board
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(1)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Engineer
-
Programmable Mist Maker - XIAO / QT PY Extension
2371 2 2 -
RadioHAT - Raspberry Pi radio development platform
2054 0 4 -
QWIIC-VL53L4CD Time-of-Flight Distance Sensor Module
2254 0 2 -
-
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
4207 0 6 -
-
A Compact Charging Breakout Board For Waveshare ESP32-C3
4984 3 8 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
5749 2 2 -







