Questions tagged [relay]

Electrical device which, when energised by a small electrical current (low-power, control circuit), safely switches a larger electrical current (controlled circuit).

Relays could use an electromagnet to mechanically operate a switch which then also provides complete electrical isolation between control and controlled circuits. Semiconductor-based solid-state relays allow switching without moving parts and are therefore not subject to wear.

245 questions
28
votes
2 answers

Power a 5V relay from GPIO pins

I have a bank of relays (5) that I'm looking to run from my Pi. I'm using 5V TE Connectivity relays, powered by Sparkfun's high power relay kits, which use a NPN transistor to trigger the relay. So far the problem I'm having is I can't get the…
hightekjonathan
  • 416
  • 1
  • 5
  • 8
13
votes
2 answers

Properly wiring a solid-state relay to the GPIO pins?

tl;dr — I'd like to connect this relay to the GPIO pins on my Raspberry Pi B+. I'm looking into purchasing a solid-state relay for my Raspberry Pi. After a great deal of searching, I came across this 8-channel relay from Sainsmart: However, I'm…
Nathan Osman
  • 528
  • 2
  • 4
  • 17
9
votes
3 answers

GPIO pin voltage is too low to energize relay

I am trying to toggle a small relay on and off. I have connected a GPIO pin and GND directly to the relay. I can hear the relay clicking, when I set the GPIO pin to HIGH. However, the relay only rarely lets a signal through. It works some times, but…
Andreas
  • 193
  • 1
  • 3
9
votes
2 answers

Jumper function on relay modules

I purchased some very inexpensive one, two and four relay modules on AliExpress that I believe are commonly used with Arduinos. I noticed that the two relay modules have a three pin jumper block (JD) which a jumper came pre installed on. I have not…
Mike
  • 243
  • 1
  • 3
  • 9
8
votes
4 answers

5v Relay will not close (unless using GPIO cleanup)

This seems like it should be really simple, so maybe I am missing something. I am just trying to open and close my relay but all it does it open's and doesnt close. I can use GPIO.cleanup() to make it close but I dont want to apply this at this…
Oli Girling
  • 181
  • 1
  • 1
  • 3
8
votes
3 answers

Powering a 3-12V water pump on raspberry pi

I've got a 3-12V water pump, a raspberry pi, a relay (5V 10A/120VAC, and a breadboard power supply supply 3V-5V. The questions are : Is it possible, to rspi to breadboard power supply usb, and a pump to it's 5V output? I don't want to burn rspi 5V,…
Jan Hoffmann
  • 91
  • 1
  • 1
  • 3
7
votes
1 answer

How can I wire a Raspberry Pi to an 8-relay board in a tidy professional manner?

I want to connect a Raspberry Pi to an 8-relay board, such as this one. Together with ground and power this amounts to ten wires. One option to connect the two is by using female to female jumper cables, such as these. However, this will result…
7
votes
3 answers

Using single 5V relay (jqc-3ff-s-z) - safety advice required

Above is relay I'm using and everything works as expected using diagram below. I will add 1n4148 diode on IN line for safety and will connect VCC to power supply before Pi. Can I use ground (GND) for relay from Pi or should I connect to power…
goodevil
  • 95
  • 1
  • 2
  • 8
6
votes
4 answers

relay module led turn on but not working

I'm new to Raspberry Pi. I followed this source and am stuck on checking "sudo python lighton.py". The problem is the bulb is not turn on. Also there is no click sound from the relay. I'm using relay really similar to this Relay from amazon. The…
Azhar Zul
  • 61
  • 1
  • 2
6
votes
3 answers

Is this behaviour of GPIO pins normal?

I am using this tutorial: https://www.youtube.com/watch?v=b6ZagKRnRdM to connect that relay board to my PI, everything works fine, but I have noticed that till the GPIOs are set to out the 2 smd leds are on (lower light), after boot the GPIOs used…
Blue
  • 69
  • 2
6
votes
1 answer

How to add isolation between raspberry pi and relay board?

I want to use my Raspberry Pi to control mains(fans,lamp on 240v). Its very difficult to procure a good and reliable relay board for me in India. After bit of searching, I have decided to go with Seeed Studio's Groove Relay. Here are details:…
avi
  • 513
  • 3
  • 7
  • 14
5
votes
4 answers

"Blinking" relay by toggling pins between input and output

Edit for searches: This question is about using a 5v relay with Raspberry Pi GPIO pins that outputs 3.3v. There are a number of great questions below, read them through to understand whats going on. If you just need a tldr on what worked for me,…
hndr
  • 153
  • 1
  • 6
5
votes
3 answers

Home automating lighting, while preserving light switches

I'm doing a feasibility study for automating the lighting in our house (eg. with Home Kit), while keeping the existing light switches fully functional. With regular switches, that would be tough, however, we already have a centralised, yet analogue…
5
votes
2 answers

Controlling a fan on a relay with python

I have a Raspberry pi Model B revision 2 and I've set up a mini 5v fan on a relay switch which i want to control with python now. I will be running a crontab every hour to check the temperature of the pi and if the temperature is above 50C i will be…
Sandbird
  • 163
  • 1
  • 2
  • 11
5
votes
2 answers

Simple Relay Control

I've got a single relay connected to my RPi but I can't seem to control it. As you can see from the image above: RPi -> Relay 5V -> VCC Ground -> GND GPIO4 -> IN1 Measuring voltage I can successfully verify that I can turn on/high off/low…
1
2 3
16 17