1

I connected my FL-3FF-S-Z two channel relay board to my Raspberry Pi 3, with gpio 0 and gpio 1 (numbers are from to $ gpio readall). Following some guide, as GPIO generates only 3.3v I have removed the jumper from RY-VCC/VCC pins and connected 5v to RY-VCC from the RPI and 3.3v to VCC from the RPI then connected the ground from RPI to the ground of the relay board.

enter image description here

I can switch the relay on and off with no issues without load. Both on as well as off switches the led on and off respectively and the relay makes the typical 'click' sound indicating the switch has indeed switched inside. This I have also checked with my digital multimetre and when no load then the relay just works fine.

The problem I have is when I put the mains on a relay's middle pin with the load on the Normally Open pin (so it is off by default) and switch the relay on from my RPI then it does switches on with the 'click' sound and led, and my load gets the mains, but then it cannot be switched off: The led goes away but no 'click' sound and the relay is still on as my load still gets the mains. Even if I remove the mains and fully unplug the relay board from my RPI (unplug all 5v/3.3v/ground/GPIOs) the relay is staying on for some time. I do not know for how long as cannot babysit it but this I have also checked with my digital multimetre. I do not know what causes it to switch back, probably a capacitor or something else gets slowly discharged.

The load is a 2 channel AB amp, RMS 760 W. It has a 220v 10A fuse in it so the relay should be able to handle as it is certified for mains for 10A. With the assumption that the efficiency of the amp as well as of the PSU is 80%, the total power consumption is around 1200 W that makes it approx 5.5A on the mains. I however have no tools to measure the peak power at startup, that could be higher but both the 5.5A as well as the peak at startup should be below the threshold 10A.

Have you experienced anything similar? Would an npn for each relay input (see below, source: this) address my issue and switch the relay on/off properly when it is instructed to do so? My relay is very similar to that one shown in below picture but has only 2 channels rather than 4.

Source: https://myhydropi.com/connecting-a-relay-board-to-a-raspberry-pi

Source: https://myhydropi.com/connecting-a-relay-board-to-a-raspberry-pi


Update 1: There is no other configuration, no overlay and no other hardware being used just the above mentioned two GPIOs. The GPIO is controlled from cli $ gpio mode 0 output && gpio mode 1 output then $ gpio write <which> <value> where is either 0 or 1 for GPIO 0 and 1 respectively, and is 0/1 representing low/high.

The RPI's PSU is 5v 3A so the relay in theory is not an issue.

I have measured the voltage between ground and each GPIO and low/high works as expected (0v/3.24v)

The nominal output 5v/3.3v that the relay switch is getting from RPI versus RPI ground that the relay is using, is 5.31V/3.28v respectively. Could the delta .31v on high versus relay required 5v cause such issue? This is +6.2% than what the relay requires but my guess is it is within threshold - could be wrong though...

Update 2: Added information on load.

Added another picture with the Raspberry, Relay board and the additional circuit in question in order to make my question more understandable.

18
  • 1
    You have specified no details but whatever else you are using GPIO 0 & 1 are reserved. – Milliways Oct 31 '20 at 11:15
  • 3
    What is the mains load as it sounds like the relay is sticking on or the contacts are welded together by excess current – Bra1n Oct 31 '20 at 11:50
  • 1
    There is no other device connected and no overlay / other configuration. Only this two GPIOs that I am trying to use to control the switch. In regards of excess current, how can that be prevented or eliminated? – ben Oct 31 '20 at 12:45
  • 1
    Your relay seems to be the JD-Vcc jumper select Vcc 3V3/5V0, and your RY-VCC/VCC jumper is the same as JD-Vcc jumper. You might like to read the following Q&A to see if it is helpful: (1) "How to properly use a relay module with JD-VCC from Arduino/Raspberry?": electronics.stackexchange.com/questions/505318/…. Good luck. Cheers. – tlfong01 Oct 31 '20 at 13:57
  • 1
    You've not provided the details needed to diagnose the problem. Our language (English) is an amazing tool in many ways, but it's not well-suited for communicating wiring details and component interconnections. Suggest you learn to use the schematic tool. I've added a schematic to your question to help get you started. You can edit it, and add the details needed so that we can help get you an answer. – Seamus Oct 31 '20 at 16:15

Browse other questions tagged or ask your own question.