3
\$\begingroup\$

I have a project of automatically refilling my water tank using an ESP32-WROVER board, a water pressure sensor and a switch that toggles the pump.

What I can't seem to find online is the name for such a power switch that I can control from the ESP32 board.

I would prefer a switch that also has a manual mode in case something is wrong with the sensor/board/programming

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Depending on the pump, you could probably use a transistor or relay to be controlled by the GPIO. Is there any reason the "manual" switch couldn't be separate from the switch controlled by the GPIO? \$\endgroup\$ Commented Jan 10, 2023 at 7:58
  • \$\begingroup\$ @MicrocontrollerEnjoyer it can be the same switch, but I want there to be a manual override for it, so basically a "relay" right? \$\endgroup\$
    – YaRmgl
    Commented Jan 10, 2023 at 8:21
  • \$\begingroup\$ Making it the same switch is reducing your options by about a million to 1. \$\endgroup\$
    – Andy aka
    Commented Jan 10, 2023 at 11:04
  • \$\begingroup\$ it's not as bad as a million to one, I've used pulse relays that have external manual controls \$\endgroup\$ Commented Jan 10, 2023 at 11:36

2 Answers 2

10
\$\begingroup\$

As I understand what you want at the end is to have control from ESP board and being able to override it manually.

  • If you need to override the relay in its OFF position (to maually switch the pump ON when the relay isn't enabled) you should connect a normally-open switch in parallel to the relay and that's it.
  • If you need to override the relay in its ON position (to manually stop the pump when the relay is ON) you should connect a normally-closed switch in series with the relay. So when you open the switch the circuit will break.
  • If you need to do both you might consider having something like a 3-way switch and 1st position will be ON, 2nd(middle) will be OFF, 3rd will be AUTO managed by ESP with a relay (see my paint drawing)

enter image description here

\$\endgroup\$
5
  • 1
    \$\begingroup\$ It’s worth noting that designing it as multiple components will almost certainly be cheaper than using a relay with an integrated manual override, assuming you can even find such a relay that fits the other requirements in the first place. \$\endgroup\$ Commented Jan 10, 2023 at 18:13
  • 1
    \$\begingroup\$ In industrial process control, those three-way switches are common. They are usually labeled "HAND/OFF/AUTO" instead of "ON/OFF/AUTO," but I never knew why. \$\endgroup\$ Commented Jan 10, 2023 at 18:18
  • \$\begingroup\$ @WayneConrad, I will try to find such a relay, but if I can't I will get multiple switches \$\endgroup\$
    – YaRmgl
    Commented Jan 12, 2023 at 4:03
  • 1
    \$\begingroup\$ Sometime also called "on-off-on" or "SPDT centre-off" \$\endgroup\$ Commented Jan 12, 2023 at 4:56
  • \$\begingroup\$ @YaRmgl A HAND/OFF/AUTO switch will be very expensive, but be designed to operate safely in adverse environments such as dirt, vibration, etc. A regular three-way switch will be much, much less expensive. \$\endgroup\$ Commented Jan 12, 2023 at 17:21
5
\$\begingroup\$

Basically a switch that can be controlled by GPIO is a relay.

relays that include manual controls do exist but these are typically going to be pulse (latching) relays because otherwise there would be no benefit from having the external control. theses relays are typically much more expensive than ordinary relays.

with the pulse relay there are only two switch settings on and off and both the user and the gpio get to fight over which setting is chosen.

If you find these relays unsuited you are basically left with some circuit that combines both a manual switch and a relay, it could be a circuit like the automotive dome light circuit where there are three switch settings on automatic and off.

For your tank application I would considwer using float switches as limit switches in combination with the relay, perhaps give the user a button that runs the pump, and a breaker to throw to turn everything off.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ I think what OP really needs is just a regular relay in parallel with a manual switch. \$\endgroup\$
    – floppydisk
    Commented Jan 10, 2023 at 11:50
  • \$\begingroup\$ Thanks for the answer, @floppydisk how would I override the relay state manually that way? \$\endgroup\$
    – YaRmgl
    Commented Jan 10, 2023 at 12:36
  • \$\begingroup\$ @YaRmgl i'll post an answer bc too many symbols for comment. \$\endgroup\$
    – floppydisk
    Commented Jan 10, 2023 at 14:48
  • \$\begingroup\$ as in the other answer, I could use 2 switches or an HOA switch \$\endgroup\$
    – YaRmgl
    Commented Jan 12, 2023 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.