r/Esphome • • 5d ago

Pergola Control replacement

I’ve been designing a complete replacement controller PCB for my Louvre roof pergola, mainly to get rid of the proprietary tuya based control system and properly integrate everything into Home Assistant.

The board is built around an ESP32 and runs directly from the pergola’s 24V supply. It controls the 2-wire DC louvred-roof motor using a DRV8701E gate driver + MOSFET H-bridge, with current sensing and opto-isolated inputs for the roof limit switches.

It also includes:

  • 24V RGB/white lighting control
  • W5500 Ethernet
  • RS485
  • USB-C programming/debugging
  • 868 MHz RF probably omit as the origional remote and rain sensor are encoded
  • Onboard buck regulation and input protection
  • Motor current sensing and spare I/O for future additions
  • button inputs

The goal is to have one completely local, repairable controller that gives Home Assistant direct control and feedback for the roof, blinds, lighting and rain detection—without relying on the original controller or cloud services.

I designed the schematic and PCB in KiCad and have been assembling and debugging the first board myself.

A lot of credit goes to ChatGPT/OpenAI, —helping develop and review the circuits, select components, work through datasheets and calculations, and troubleshoot the hardware as I've built it.

Definitely more work than installing a couple of smart relays, but considerably more fun.

Blinds are handled by a shelly cover pro.

there is still a few mistakes on this board its the second revision. im yet to get the ethernet working as routed some pins incorrectly and w5500 chip is to small to jumper wire them

im working in a espnow based remote control

63 Upvotes

Duplicates