Need to automate mechanical push button switches for van build

Hello!

In the process of building a van. Would like to go through home assistant to activate water pump, lights, etc. Looked at an ESP32 MOSFET board. The question is…I would like to create standard push button switches to send commands to the MOSFET/Home Assistant. Basically, I would like to create rather nice looking decorative push-button switches to send the command to go on and off. I am familiar with Fibaro on Z wave (I run Hubitat at home). Can an EPS 32 handle 4 analog switches to send commands to the mosfet board? For instance, 1 switch for lights, second for water pump, etc. Do I need a sonoff relay for each individual switch? I am also trying to simplify wiring. Just run power to the switch panel and home run wire all the accessories. Thoughts?

Welcome to forum.
Your post is quite hard to understand. Instead of proposing different components, post what you exactly want to approach.

Shelly devices may be helpful for your build. They would sit between your switches and your lights/pumps/etc., allowing both manual usage of the switches, and automation control via wifi, zigbee, matter or bluetooth.

1 Like

Thank you! I have looked at Shelley’s and this is exactly the solution. The question is, is it one Shelley per physical switch? Can one ESP board handle multiple switches? I need to control 6 physical switches from a single location. And then, of course, have a home assistant dashboard as well. I know it’s redundant, but there’s something about a physical switch versus a touchscreen :grinning:

Thank you for the welcome. I need to design a home assistant system to control pumps, led lights, report Victron from a Cerbo GX in a van. Etc. I am familiar with basics (I use Hubitat). Looking to convert dumb latch push button switches to interact with home assistant.

One Esp32 can control ~20 outputs but the question is what are your “latch push button switches” exactly controlling? It’s completely different case to switch 3kw pump from switching a button of pump control board… For the first you use beefy solid state relay or contactor, for latter just optocoupler…

1 Like

Yes, so the plan if feasible, is the following……

You push a physical push button switch. That commands an ESP32. ESP32 Wi-Fi to a ESP32 relay or mosfet board that receives the primary voltage to power the led lamps, water pumps, dump valves, etc. Those devices are at 12v and no more than 20amps (for the pumps). All reporting through HA. The reason I am doing this is to simplify the wiring installation. If this works, all I need is power (5v or 3v) where the physical switches are. The pumps, led, etc, could be home run wired to a central location. Thoughts?

What I think I’m asking is there a wiring diagram for let’s say, for 6 SPST switches to provide 6 separate triggers of ON and OFF to a ESP32? Low voltage 5 or 3 volts of course. To a single ESP32?

In theory everything is dead simple. But in practice, don’t think you just pick whatever mosfet/relay board from AE and all is fine…
That module has to be capable to switch 20A inductive load and to be compatible with 3.3V trigger. You also need beefy flyback diode/rc-snubber (or better both).
You signal wires have to be located far from power wires and if they are long you use shielded wiring.

To connect spst switch to esp32, you just wire it between Esp GPIO-pin and GND and enable pullup on that gpio. In practice, use external pullup to make it less vulnerable to interferences:

2 Likes

Wow, thank you very much! That’s exactly the answer I was looking for! I did not think of having the need to use a resistor. Wow, I guess we are triggering the ESP 32 with 3.3 V across a 10 k ohm resistor… That voltage must be like a hair drop :-). Using a 32d development board, like this…

[AITRIP 3pcs for ESP32-DevKitC core Board ESP32 Development Board ESP32-WROOM-32D Compatible with Arduino IDE Amazon.com: AITRIP 3pcs for ESP32-DevKitC core Board ESP32 Development Board ESP32-WROOM-32D Compatible with Arduino IDE : Electronics](AITRIP 3pcs for ESP32-DevKitC core Board ESP32 Development Board ESP32-WROOM-32D Compatible with Arduino IDE Amazon.com: AITRIP 3pcs for ESP32-DevKitC core Board ESP32 Development Board ESP32-WROOM-32D Compatible with Arduino IDE : Electronics)

How many SPST switches can this support, and along with indicator LEDs?

And again, thank you again for all your help.

BTW,

This is the relay board. I was thinking of using. But it’s rated it only 10 A.

[AC/DC Power Supply ESP32 Development Board Programmable Development Board Wireless WiFi 8 Way Channel 5V Relay Module ESP32-WROOM-32E for Arduino Amazon.com: AC/DC Power Supply ESP32 Development Board Programmable Development Board Wireless WiFi 8 Way Channel 5V Relay Module ESP32-WROOM-32E for Arduino : Electronics](AC/DC Power Supply ESP32 Development Board Programmable Development Board Wireless WiFi 8 Way Channel 5V Relay Module ESP32-WROOM-32E for Arduino Amazon.com: AC/DC Power Supply ESP32 Development Board Programmable Development Board Wireless WiFi 8 Way Channel 5V Relay Module ESP32-WROOM-32E for Arduino : Electronics)

In theory it has 22 input/output pins plus 4 input only pins, 26 in total.
Few of them are strapping pins so you need to consider the pullup/pulldown strategy.

Those relays you linked are 10A and not rated for inductive load. I wouldn’t use them for more than 3A motor/pump.

Thank you again so very much! I guess for these very high loads, I will use the Shelly relay-switch system. My point is to try to combine many dumb devices onto a single smart device. But I guess the amperage speaks for itself.

Shelly doesn’t have relays for 20A inductive load.

Then, I guess I’m stuck with a hardwire switch., Or I guess I can power a massive relay with a smaller relay :slight_smile:

You have many options, but not really something plug and play from AE/AMZ.
You could use some mosfet module like LR7843 but you need to add heatsink.
Or get DC-SSR from Mouser/Digikey etc.
Or use contactor driven by smaller relay.

Thank you again, you have been awesome…I will post my build when done (I hope) :slight_smile: :smiley:

Start with the lights etc and when you have them perfectly working step forward to pumps.