Electrical – Funduino/Keyes relay board doesn’t switch off relays

raspberry pirelay

I've build a simple set up with a Raspberry Pi and this relay board to switch some lights. I have removed the jumper from the relay board, connected 12V to the VCC/GND pins, connected the Pi GND to the relay board's COM pin, and the GPIO pins to the relay board inputs. I connected the load to the relay's NO (normal open) connectors. When I use the gpio utility I can switch the pins on the Pi on and off; the relay board follows this, as confirmed by the LED and the load on the relays switching on and off. So far so good.

But then, after a little bit of playing around, the relays stopped switching off. The LED for the relay does switch off, but the contact stays closed; the lights connected to that relay stay on. Not all relays have the problem, and every now and then the ones who do have the problem work once or twice; but they don't reliably switch off.

So, if we ignore mechanical failure of the relays for a second (I doubt all relays on a board would have the same defect…), what could cause this behaviour? I mean, when I remove the signal from the relay board, the optocoupler on the board would stop conducting, the signal would disappear on the 'other side' of the optocoupler, and all relays should switch back to 'open', right? But even if I unplug the Pi, the relays stay closed! And when I unplug everything (the Pi, the power to the relay board, the power to the load) and replug, the relays that were stuck still are closed.

What further steps can I take to debug this? Thanks.

Best Answer

what could cause this behaviour?

Welding the relay contacts together due to a high initial current.

If your lights on the load side are incandescents, they have a low resistance until the filaments heat up. So a relatively high current can pass for several milliseconds.

enter image description here
Image from Lamptech

Note the 500W lamp has a normal operating current of around 2A but during the first five milliseconds the current is greater than 15A. Your relays are rated 10A.

What further steps can I take to debug this?

Measure the current flowing in the first few milliseconds.

Hit the recalcitrant relay with a blunt object so that the mechanical shock can break the contacts free?

Take a relay apart and inspect the contacts?


See also