this post was submitted on 29 Dec 2025
21 points (95.7% liked)
Home Automation
1038 readers
1 users here now
Home Automation, smart home, and related topics.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How did you connect the esp board to the momentary switch?
Sorry - looks like I forgot to include the link to the step by step I wrote about the thing, daft of me.
Anyway, soldering onto the back of the momentary switch PCB - here's the guide with pics too https://digdilem.org/home-automation/smarter-diffuser/
Hmm, so if I'm understanding you correctly, you are pulling a normally high pin low with the GPIO pin? And by connecting the ground pins you ensure that both grounds are the same? Sorry for the basic questions, I am a beginner.
One of the images showing the PCB wasn't working for me.
It's just using the ESP to close a NO (normally open) circuit to closed, effectively shorting those two in the same way the momentary switch would. The code causes the ESP to create that short between its GND and the GPIO D5, thus closing the switch.
If this was using any significant amount of current, you'd add a relay in there as the ESP can only handle a tiny amount in this configuration - but for small PCB loads like this, it's normally fine.
Oops - looks like I missed a file extension off. Fixed now, thanks.