Maker Pro
Maker Pro

Switch hookup with relay (arduino)

StealthRT

Sep 4, 2010
146
Joined
Sep 4, 2010
Messages
146
Hey all i have the following 5v relay board:

image.png


Please ignore the light bulb hook up. That was an example on the website that had the same relay :)

And i am looking to hook one of the relays up to a monetary switch:

image.jpg


Now this is what i am guessing is the way i connect the switch to the relay board:

image.png


Connecting the ground to both the left connector pads on the switch and shorting them together "presses" the button. I just want to make sure the hookup i have drawn there is the way it should be connected to that relay board?

So when i apply 5v to the pin 1 on the relay board (Arduino Digital pin 3 goes high) it will close the circuit in relay 1 which will act as if i "pressed" the button?
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,738
Joined
Nov 17, 2011
Messages
13,738
Your images are not displayed. This is obviously an access right problem for the site you linked to.

Please use another server or upload the images into your post.

Harald
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,738
Joined
Nov 17, 2011
Messages
13,738
1) your first image says 5V->relay off, not on. To turn on a relay you use 0V as control signal.
2) Do not connect the switch to GND.That way you short-circuit the potential isolation given by the relay. This is dangerous!
3) The switch you show is probably ont up to the task. You didn't state what load and what voltage or current you are going to switch. Bt this switch looks like being useful for maybe 12V/100mA, not more, maybe even less. If you are going to switch a power load (e.g. 230 V (AC), 1A) you need a suitable power switch.
 

StealthRT

Sep 4, 2010
146
Joined
Sep 4, 2010
Messages
146
1) your first image says 5V->relay off, not on. To turn on a relay you use 0V as control signal.
2) Do not connect the switch to GND.That way you short-circuit the potential isolation given by the relay. This is dangerous!
3) The switch you show is probably ont up to the task. You didn't state what load and what voltage or current you are going to switch. Bt this switch looks like being useful for maybe 12V/100mA, not more, maybe even less. If you are going to switch a power load (e.g. 230 V (AC), 1A) you need a suitable power switch.

Its a 3v wireless button switch remote for a door lock.

looping a wire around the switch to both pins on the left side causes it to act as if i were to hit the button. So i am guessing its 0v.

And it has nothing to do with the bulb as i stated in the OP. That was on the image before i photo-shopped it in the last image to depict what i wanted to do.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,738
Joined
Nov 17, 2011
Messages
13,738
That was on the image before i photo-shopped it in the last image to depict what i wanted to do.
What is it you want toi do? A manual override for the control signal from the arduino? In that case It would be better to
- add a series resistor from the arduino to the relay card
- connect the button from the input of the relay card (after the series resistor) to GND. That way you can control the relay either by the arduino or by the switch.
Note that in this setup there is no connection of the pushbutton to the switch side of the relay.
 

StealthRT

Sep 4, 2010
146
Joined
Sep 4, 2010
Messages
146
Got it working by hooking it up via the common/normally open connections.
 
Top