Objective: Design and build a custom relay board using the ESP32 microcontroller with integrated Power over Ethernet (PoE) functionality. The board will control 8 relays, each capable of handling up to 10A at 24VDC, and include current monitoring for each relay using ACS712 sensors. The system will be compatible with ESPHome for easy integration with Home Assistant.
Project Requirements:
-
Relay Control:
- 8 relays, each rated for 16A at 250VAC and 10A at 24VDC.
- Relay model: G5RLU-1A-E DC3 (Omron Electronics), with a 3V coil voltage.
- Controlled via the ESP32 microcontroller.
- Maximum Load: 10A per circuit at 24VDC.
-
Power Monitoring:
- Each relay circuit will include an ACS712 current sensor for real-time current monitoring, calibrated for up to 10A.
- The current sensors will be configured and calibrated for accurate power measurements in ESPHome.
-
PoE Power Supply:
- Power input through an Ethernet RJ45 connector (TRP Connector B.V. 2250506-1).
- PoE module: Silvertel AG9903-MTB, providing 3.3V output for the ESP32 and relays.
-
Microcontroller:
- ESP32-WROOM-32 or ESP32-WROVER module with Wi-Fi and Bluetooth support.
- Programmed using ESPHome for integration with Home Assistant.
-
Relay Driver:
- ULN2803A 8-channel Darlington array for driving the relay coils.
- Input Voltage: 36V - 57V DC from the PoE module.
- Output Voltage: 3.3V DC, up to 2A (provided by the PoE module).
- Relay Coil Voltage: 3V DC, 200mA per relay.
- Load Voltage: 24VDC, maximum current per circuit: 10A.
- Current Measurement Range: 0A - 10A per relay (using ACS712 sensors).
- Communication Protocol: Wi-Fi (802.11 b/g/n) for ESP32.
-
PCB Layout:
- Compact design with all components securely mounted.
- Proper trace width for high-current paths (at least 2mm) to handle up to 10A per circuit.
- Adequate isolation between high-voltage (24VDC) and low-voltage (3.3V) sections.
-
Component Placement:
- PoE module and RJ45 connector placed close together to minimize power loss.
- Relays and current sensors placed with sufficient spacing to reduce interference.
-
Ground Planes:
- A solid ground plane for noise suppression and signal integrity.
-
ESPHome Configuration:
- Define GPIO pins for each relay.
- Configure each ACS712 sensor for accurate current monitoring.
- Implement calibration logic for the current sensors based on the 10A max load.
-
Integration with Home Assistant:
- Each relay and sensor will be configured as an entity in Home Assistant.
- Ability to control relays and monitor current consumption remotely.
- Schematic Design: Detailed schematic diagram of the complete system.
- PCB Layout: Optimized PCB design files in Gerber format.
- BOM (Bill of Materials): Complete list of components with part numbers and quantities.
- ESPHome Configuration Files: YAML configuration for ESPHome with all relays and sensors defined.
- Prototype Board: Fully assembled and tested prototype for evaluation.
- External Fusing: No internal fuses will be included on the board. It is assumed that each load will be fused externally using a separate fuse block.
- Flyback Diodes: For inductive loads (e.g., motors or solenoids), flyback diodes should be added externally to protect the relay contacts from voltage spikes.
2026 March - OpenAI Review
Here are the main issues I see in that gist, with the most important ones first.
You call out Omron G5RLU-1A-E DC3. That specific part is “Latching, Single Coil” (not “energize coil = relay on”). 
But the doc describes a traditional “drive coil while ON” design and budgets coil current as if it’s continuous. 
Impact: driver design, power budget, and firmware behavior all change (you need pulses and defined set/reset behavior, typically needing polarity control for single-coil latching).
The relay coil current is 200 mA. 
A Darlington array like ULN2803A has a non-trivial saturation drop at high current, which can easily leave the coil under-voltage at worst case. (Your own comment thread calls this out, and the ULN280x family is explicitly Darlington.) 
Impact: intermittent pull-in, temperature sensitivity, and brownouts when multiple channels switch.
The gist assumes 3.3V up to 2A from the PoE module. 
AG9903-MTB class modules are commonly specified around 3.3V / 1.8A / 6W (and output power derates at higher ambient temps). 
Impact: if you ever intended multiple coils on simultaneously (non-latching assumption), you’d blow the budget; even with latching pulses, inrush + Wi-Fi TX + sensor load can cause droop unless you design for it.
The requirement says “ACS712 sensors… configured… in ESPHome”. 
ACS712 supply is 4.5–5.5V (5V single-supply operation). 
Also its zero-current output is ~VCC/2 (so ~2.5V at 5V supply), and the swing can exceed 3.3V depending on variant/current. 
Impact: you either add a 5V rail + output scaling to 0–3.3V, or choose a different current sensor that’s truly 3.3V-friendly.
With ESP32, ADC2 is problematic when Wi-Fi is active, so you must constrain readings to ADC1 pins (and still be careful about pin mux/strapping behavior). 
Impact: pin planning is a real design constraint; you may need an external ADC (I²C/SPI) or a different sensor interface strategy.
The gist says “accurate power measurements” but only includes current sensors per channel. 
If your 24V rail varies (very common), power = V * I requires at least a voltage measurement (or an explicit assumption + calibration strategy).
It states “Power input through an Ethernet RJ45 connector” and a PoE module, but doesn’t specify the PoE magnetics / center-tap wiring / layout & isolation boundary requirements that make or break PoE reliability and compliance. 
Impact: this is a common “works on bench, flaky in the field” failure mode if you don’t follow the reference design closely.
“At least 2mm trace width for 10A” is not a safe generic rule (copper weight, temperature rise targets, path length, vias/bottlenecks, terminal blocks all matter). 
Impact: overheating, voltage drop, and eventual delamination or connector failures.
⸻
Concrete changes I’d make to this spec (fastest path to “real design doc”)
• Decide relay behavior: switch to a non-latching relay or explicitly design for single-coil latching (set/reset pulses + driver topology).
• Replace ULN2803A with logic-level MOSFET drivers (or an H-bridge approach if you keep single-coil latching).
• Replace ACS712 with a 3.3V-capable current-sense solution (or add a 5V rail + proper scaling + ADC strategy).
• Add a rail voltage measurement (even one ADC channel + divider) if you want “power,” not just current.
• Lock down ADC pin plan early (ADC1 only if Wi-Fi stays on), and avoid ESP32 strapping pins for relay control.
• Add a PoE section that references the exact AG9903 reference design expectations (magnetics, isolation, input filtering, layout).
If you want, paste the relay part number variant you actually intend (latching vs non-latching), and I’ll rewrite your “Requirements” section into a tighter, buildable spec (driver choice, power budget table, ADC map, and a PoE front-end checklist).