So this seems odd to me, I am using a 4-relay module 2 of these relays attached to GPIOs 7 and 0 (Header pins 7 and 11 respectively on a Raspberry Pi B 2).

Mains AC is passing through relay 2 using a normally closed setup. The relay module has a 5V power supply and ground connection from the pi header.

While all the other relays switch happily, the one with mains wires connected to it gets "stuck" - that is, the light illuminates and goes out as it should, indicating the relay state, but there is only a very faint "click" in each case, as opposed to the very obvious and louder "click" when the relay actually switches.

You can hear the difference in the sound of the "clicks" here: https://youtu.be/2NZOYJ4op_I

In short: the relay indicator light changes, but the relay doesn't switch (although there is a faint click of some kind...).

Most interestingly, the relay works fine for the first few switches when controlling mains AC, before getting stuck. This occurred first with relay 1 which is why I am now using relay 2. Strangely, after detaching the mains from relay 1 the problem persisted, but after an arbitrary amount of switching it suddenly started to work as normal again!

I must be missing something, and I bet it's obvious, any thoughts?


Trimming the ends of the mains wires attached to the relay and using a normally open configuration seems to have solved the problem... Maybe there was a short circuit, but if anyone has another explanation I would be very interested!

  • 1
    GPIO pins are 3.3v, not 5v. If the relay is expecting 5v to operate, the GPIO output voltage may not be enough. – stevieb May 27 '17 at 22:27
  • Point taken, I am using this relay module, that has a dedicated 5V line from the 5V pin on the RPi header to the relay module board (VOC Pin on the module). I have noticed though, that the relay seems to turn on when I set the GPIO pin to "LOW", which is backwards isn't it? – Sam3000 May 27 '17 at 22:33
  • 1
    @Sam3000 No, it is not backwards, it is just a choice made by the hardware designer as to whether a low or high signal switches a circuit on or off. – joan May 28 '17 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.