0
\$\begingroup\$

I'm currently having trouble with my relay, and I suspect it's a problem with my setup. Here's how I have it setup.

I have a raspberry pi 3 B. I want to power something using the 5V output, so I have bought this relay.

Right now I have the relay powered to

VCC -> 5V / GPIO 2

GND -> GND / GPIO 39

SIG -> pin 7 /GPIO 4

I know the relay is powered since the D0 light has turned blue to indicate it is on.

I am running a python program to power HIGH GPIO 4 for 5 seconds, then LOW for 5, and loop.

I have a bubble machine that I'm trying to power from the raspberry pi, and have tested it's red line & GND line is working by hooking it up straight to the Raspberry PI directly and it turning on.

So, even if I have gotten the low/high trigger wrong, I know that the power should turn on eventually.

enter image description here

Here's my problem. When running the python script, I hear the "click" of the system, and a red light turn on. No matter what though, I never get any voltage when I hook the power line of the bubble machine to the outputs (shown on photo). I have tried just tapping it with the metal end on the wire for all 3, I have un screwed and rescrewed it into the openings, and even tried tapping the wire to the soldered points on the bottom.

What am I doing wrong? Which of the three points should I be expecting to send out 5V for the machine? Am I assuming correctly that it will output 5V?

Thanks!

\$\endgroup\$
3
  • 3
    \$\begingroup\$ The relay is just a switch. It doesn't supply power, it switches power. The 'input' side is completely isolated from the 'output' side. You shouldn't expect 5V out if you haven't put 5V on the switch. \$\endgroup\$
    – brhans
    Sep 22, 2018 at 13:55
  • \$\begingroup\$ @brhans got it, I figured it was a fundamental understanding. So I need to put 5V on the switch/one of the screws, and the power of what I want to control in there too? \$\endgroup\$
    – Kat
    Sep 22, 2018 at 13:57
  • 1
    \$\begingroup\$ Show a diagram of how the relay is connected to this "bubble machine" thing. \$\endgroup\$ Sep 22, 2018 at 14:29

2 Answers 2

1
\$\begingroup\$

If you are hearing the relay clicking when expected, then you are probably driving it correctly. The problem is therefore on the relay output side.

Check the relay contacts with a ohmmeter. You have 3 contacts, which should be labeled something like NO (normally open), COM (common), and NC (normally closed). The relay switches COM to one of NO or NC. When the relay is unpowered, COM is connected to NC, and NO is open. When powered, COM is connected to NO and NC is open. This is easy to verify with a ohmmeter.

If the relay is working according to the ohmmeter test, then you have its outputs connected wrong. Since you have given no real information about your system on the output side of the relay, there is little more we can say about it.

Note that relays don't "output voltage". If you are expecting this bubble machine thing to somehow be powered by just connecting it to the relay without a power connection, then you need to go back and learn some very basic concepts.

\$\endgroup\$
0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

The NO contact as the open switch output.

I added 2 parts to reduce interference and indicated twisted pair wires.

\$\endgroup\$

Your Answer

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

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