19 votes

GPIO pin voltage is too low to energize relay

If you want to drive a single low-voltage relay, using a 7-channel driver chip will be an overkill. You'll be perfectly fine with a single NPN transistor and a flyback diode: simulate this circuit &...
Dmitry Grigoryev's user avatar
14 votes
Accepted

GPIO pin voltage is too low to energize relay

You should not directly drive a relay from the Raspberry Pi. An individual GPIO can only safely provide about 16mA at 3V3 which is unlikely to be enough to energise the coils of a standard ...
joan's user avatar
  • 71k
14 votes

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

I had the same problem as you, but I finally solved it. As you are powering it with 5V, both 0V or 3.3V coming from the GPIO pin are considered as "low level", so it won't actually switch. You need ...
netsuso's user avatar
  • 141
12 votes

Power a 5V relay from GPIO pins

# Introduction # The OP would like to use Rpi to safely control a bank of 5 Sparkfun's Beefcake relay module. He had a problem because Rpi GPIO logic level is 3.3V, but his relay uses 5V logic ...
tlfong01's user avatar
  • 4,675
9 votes
Accepted

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

The black housings are available for more than just one contact, as one row or two row version. The contacts are crimped to the wires , which means you either have a crimp tool or somehow solder it. ...
sweber's user avatar
  • 516
8 votes
Accepted

Can you use a 5V Relay Module with the Pi?

There are a number of poorly-designed relay modules on the market. They may work with Arduino (and TTL logic) BUT ARE A LOUSY DESIGN even for that purpose and totally unsuitable for the Pi as they are ...
Milliways's user avatar
  • 60k
6 votes

Sainsmart 12V, 16 Channel relay module connected to RpiZW has unwanted triggering when booting

You could use an IO expander module (e.g. PCF8575 or MCP23017) between the Pi and the relay board: those modules don't change pin states unless they receive a valid I2C/SPI command, so they will not ...
Dmitry Grigoryev's user avatar
5 votes

Is this behaviour of GPIO pins normal?

On many electronics boards, GPIO pins are set to a "floating voltage" (not on, not off, just somewhere in the middle) until the pin actually gets initialized or used for the first time. Remember, ...
tlhIngan's user avatar
  • 3,372
5 votes

Is this behaviour of GPIO pins normal?

Most of the pins are configured as inputs. This is normal, and usually the safest option. All of these inputs are put into a defined state with either a pullup or pulldown. The normal values are ...
Milliways's user avatar
  • 60k
5 votes
Accepted

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

I am interpreting the picture of the printed circuit board of the relay module with accompanying notes as follows: the board includes a transistor and a diode - and while it is impossible to tell ...
Ghanima's user avatar
  • 15.9k
5 votes

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

The Relay module in your picture is what so called Relay shield specific designed for directly interfacing with micro controller such as Raspberry Pi or Arduino, the board already consists of the ...
hcheung's user avatar
  • 845
5 votes
Accepted

"Blinking" relay by toggling pins between input and output

The problem The problem is that your relay board is designed to run at 5V, but your Pi's GPIO is 3.3V. The relay is a 5V relay, so the power supply needs to be 5V, but you can alter the design of the ...
Edward's user avatar
  • 961
5 votes
Accepted

Rpi GPIO pin's High level signal possibly not High enough to switch off the 5V relay problem

Introduction I found OP's "GPIO pin Low not Low enough" question very interesting. I agree with Jaromanda X in chat saying: ... relay triggers on LOW not on HIGH ... when ... LOW, it should be in ...
tlfong01's user avatar
  • 4,675
5 votes
Accepted

Voltage dropped significantly on GPIO 4 with a relay coil

There is nothing wrong with the GPIO, it just can't supply enough current for your coil. If the coil has just 24Ω, at a 3,3V the GPIO would need to supply 137mA. This source at raspberrypi.org says ...
RalfFriedl's user avatar
  • 2,188
4 votes

Controlling a fan on a relay with python

Final code: #! /usr/bin/env python3 import os import RPi.GPIO as GPIO import time import datetime import sys # 5 * * * * sudo python /home/pi/fan.py # A crontab will run every hour and check the ...
Sandbird's user avatar
  • 163
4 votes

Is this behaviour of GPIO pins normal?

The programmable pins (General Purpose Input/Output) can be used in a variety of ways - but not all at the same time. Before the point where power is applied to the RPi's Systen-on-Chip (Soc) AND it ...
SlySven's user avatar
  • 3,621
4 votes

Home automating lighting, while preserving light switches

To me it seems a lot easier to connect the pi outside your existing relay - essentially making the pi work as just another switch in parallel with the other ones on the circuit you want to control. ...
Bex's user avatar
  • 2,929
4 votes
Accepted

How to set a GPIO pin to default HIGH before setting it to output?

As suggested by anonymoose's comment and RPi.GPIO's documentation RPi.GPIO module basics setting a pin to output allows to specify an initial value: To set up a channel as an output: GPIO.setup(...
4 votes

Verifying relay module state

This is a great question because the actual relay state may differ from its nominal state. Feedback is critical, since actuators are physical objects that die over time. It is well worth the effort ...
OyaMist's user avatar
  • 1,119
4 votes
Accepted

Rasberry pi 4 channel relay switch off after 10 seconds

GPIO4 is the default for the 1-wire interface. If that is activated in /boot/config.txt it may interfere with other hardware connected to that pin. Check config.txt for a line like this: dtoverlay=...
Dirk's user avatar
  • 3,541
4 votes

Can a relay be on for 16 hours continuously?

To add to @Ghanima's excellent answer, you may also wish to consider a latching relay. Briefly, a latching relay has two stable states (i.e. it is a bistable device, similar to a flip-flop). This ...
Seamus's user avatar
  • 22k
4 votes

How to turn off relay when RPi shuts down

You do not understand the way GPIO work. You can control GPIO pins, setting High or Low, and the pins retain their state, even if the Pi is shutdown. When you remove the Pi power the pins become ...
Milliways's user avatar
  • 60k
4 votes

using 2 pins to power the same relay

I would recommend a transistor - not only does it reduce the current required but it isolates the Pi from the relay which helps to ensure that the Pi is less likely to suffer damage. Is this just a ...
PeteC's user avatar
  • 341
3 votes

Even setting a pin to output activates the relay

I think you have misinterpreted a few things. First, keep in mind the product page notes "low level suction close, high level release". This means the contacts are closed and the circuit will be ...
goldilocks's user avatar
  • 58.9k
3 votes
Accepted

Is a 500 watt floodlight compatable with Raspberry Pi Relay Board v1.0?

The specifications for the board state a maximum of 250 volts AC, which covers your 220v reference. The current draw that the board can handle is rated for AC voltage at 15 amperes. Considering the ...
fred_dot_u's user avatar
3 votes
Accepted

Get export state of GPIO pin (pi-gpio)

If GPIO X has been exported then the directory /sys/class/gpio/gpioX will exist. E.g. if GPIO 4 has been exported $ ls /sys/class/gpio export gpio4 gpiochip0 gpiochip100 unexport If it has been ...
joan's user avatar
  • 71k
3 votes
Accepted

Connecting relays to a Raspberry Pi via radio

Use readymade remote-controlled sockets. They should be tested AND work already. The hard part is replacing the supplied remote with a cheap 433 Mhz transciever , which might need reverse-...
flakeshake's user avatar
  • 6,235
3 votes

Raspberry PI Light Switch

As some other users said, is not a good option to mess with that voltage if you don't know what you're doing. Although, if you want to take a look, this is a common schematic of a relay controlled ...
Luis Diaz's user avatar
  • 483
3 votes
Accepted

Simple Relay Control Pi Zero W

The relay was designed to be operated with a +5V signal, according to its specification. The Raspberry Pi GPIO outputs 3.3V signals. So, this relay is not usable as is with the Raspberry Pi. You ...
RubberStamp's user avatar
  • 1,399
3 votes

No audible click from 5V relay when using Raspberry Pi Zero W

It is very likely that your module circuit is similar to that below. Module spec says 5V High to trigger. That means S input expects 5V to trigger. If your Rpi GPIO outputs only 3V3 actually a ...
tlfong01's user avatar
  • 4,675

Only top scored, non community-wiki answers of a minimum length are eligible