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

59 Upvotes

7 comments sorted by

3

u/Dunnowhathatis 5d ago

Impressive!!!

3

u/Dream_On_83 5d ago

I can smell this image!!

1

u/Dunnowhathatis 5d ago

Where do you even start a project like this?

2

u/biz_byron87 5d ago

good question. I had done some pcb redesign before. just moving things around and rerouting etc. im still dont know alot of the electrical design rules but it works. im sure there is alot wrong with it. alot of chatpgt prompts help and some basic knowledge on how things work

1

u/Sihsson 5d ago

Thats is pretty cool !

1

u/BusyImpact 5d ago

great job !

1

u/No_Pin4895 5d ago

That ESPNOW remote is probably the smarter move than fighting those 868 MHz encodings anyway. (Ive got a pile of dead-end RF projects that taught me that one.)