# 3.3 V relay switches on/off/on - off fails 2nd switch off connected to Pi4

UPDATE Issue only happens when load is connected, triggers every time without load

This 3.3 V .relay, link to the the >>> Datasheet

As the title mentions, it works fine until I try to switch it off the second time round, then I see the red LED turning on (it looks a touch dim).

Tapping the relay housing(lightly) triggers the relay Stuck relay then!

But why only after the second attempt and never on the first power off ?

EDIT: I looked at the datasheet thinking it needs a bit more voltage, but max is 3.9v!

import RPi.GPIO as GPIO
#from time import sleep
pin =2
# Set up input pin
# set bcm pin mode
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.OUT)
#  turn on relay in revese mode so sety pin to low
state = GPIO.input(pin)
if state:
print('on')
GPIO.output(pin, GPIO.LOW)
else:
print('off')
GPIO.output(pin, GPIO.HIGH)


Edit schematic Sorry I have really bad drawing skills!

I have posted this on the raspberry pi.stackexchange but think the question may be better suited here. Thank-you.

• Hi saj, a schematic of the hardware is appreciated for questions like this, even if it is very simple. (you can edit the question to add it) Feb 18, 2021 at 18:22
• Hi @PeteW, schematic added as suggested, thanks for looking Feb 18, 2021 at 18:41
• There are a few problems: (1) You've linked to an AliExpress ad which has no datasheet for the module. (That's typical of them.) (2) You've linked to the datasheet for the relay used on the board which is useful as it contains the specifications including drop-out voltage. (3) Your schematic is only a connection diagram and it doesn't show the components on the board. We may not have enough information to solve the problem as it is likely that a switching transistor on the board is not turning off. Feb 18, 2021 at 19:01
• HI @Transistor,thanks for your input sadly I don't know how to get or create a schematic as I have no idea about the circuit Feb 19, 2021 at 0:02