Simple bypass button for relay

Should be simple enough. I want a pump trigger either manually by a push button or by a relay when soil moisture is below a certain point. I don’t really want the extra wiring in my pump enclosre…so would the following cause me problems?

Ignore the relay in the picture…it was all that was in the bin!
Obviously power out to the right is going to the pump.


It is much better to put the bypass circuit on the low voltage, controller side of the relay. If the relay is active low then you just need a button to pull the Arduino pin low with a 10K resistor.

It is only 12v

Yes, that will work as drawn, provided the switch is rated at sufficient volts/amps for the pump. Also, provided you don’t connect anything to the other terminal on the relay, because the button connects all three terminals together when the relay is in the released position.

Would @Dougie’s suggestion work? I’m concerned about forcing an active Arduino output to the opposite level. I don’t see how a 10k resistor could pull down an active high output from the Arduino. If you make the resistor low enough to pull the logic level down, won’t you risk damaging the I/O port?

Thanks the NC terminal will not be used. (The diagram was a quick cut n’ paste)

1 Like

The relay module you show is for a WeMOS D1 Mini. It includes a transistor to switch the relay (as do all relay modules of course). If you connect the switch to emitter and collector of the transistor it will switch the relay (as long as the power to the circuit is on) with no danger to the Arduino or ESP.

1 Like

I was too lazy to dig around for the fritzing part and that was the only Relay in the bin. I’m using a simple chinese copy of a standard relay.

1 Like

Putting the switch across the transistor applies to any relay module. You cannot switch a relay from a microcontroller without the transistor.