Hey everyone, I wanted to share an exciting project I’ve been working on with the ESP32 and shift registers. I’ve managed to control 12 relays using two 74HC595 shift registers, and it’s been working like a charm in Home Assistant. But now I want to take it a step further by adding physical buttons for each relay.
The plan is to have 12 buttons, each corresponding to a relay, and I was hoping to use shift registers on the button input side, just like I did with the output. However, I’ve hit a bit of a snag. From what I’ve researched, the 74HC595 isn’t the right component for handling button inputs, and I think I need 74HC165 shift registers instead.
I’ve been poking around for a couple of days, but I haven’t found the right solution yet. I do have enough GPIOs on the ESP32 board where I could just wire them directly, but where’s the fun in that? Is it possible to use a 74HC595 as the shift register to accept the button inputs? I know I need to create a separate “hub” for the inputs, but it doesn’t look like the 74HC595 is the right component.
I don’t see a pre-built component for 74HC165 shift registers in ESPHome, so I’m wondering if anyone has any experience using them with an ESP32 board. Or, is there another component that I should be using for my use case? Any advice or suggestions would be greatly appreciated!
On a lighter note, I’ve also been experimenting with creating custom widgets for my Xiaomi Mi Robot Vacuum. It’s been a fun way to visualize the vacuum’s status and keep track of its battery level and any errors it might encounter. If anyone has tips or tricks for creating custom widgets, I’d love to hear them!
Looking forward to hearing from you all and sharing more updates on my project. Cheers! ![]()