0

I am using raspberry pi zero W for a home automation project. I am using 5V 16 channel relay board and using all the 16 relays as part of the project. I have not connected a separate 5V power supply to the relay board and using 5V pin of pi instead. The relays are working perfectly fine(switching on and off with no issues). I have connected a 5V 2A power supply to pi. I have the following doubts, please clarify with in-depth explanation if possible:

  1. Is it OK to avoid separate 5V supply to relay board and use the pi's 5V pin ?
  2. I have a use case where sometimes all the relays needs to be switched on at the same time. will that have any bad consequence on the pi ?
  3. I am able to switch on 10 or sometimes 11 relays only. When trying to switch on more relays, the led of the relay glows but there is no tick sound and the relay is not passing the electricity through it. Can someone please help me understand what's happening and please suggest a better way of connecting the 5V 16 channel relay board to pi zero W so that the pi doesn't get damaged.
  4. Does supplying 5V 3A power to the pi solves the problem stated in question 3 ?

The connections are as shown below:

(https://i.stack.imgur.com/CAWmF.jpg)

(https://i.stack.imgur.com/WSzLG.jpg)

(https://i.stack.imgur.com/1YSy3.jpg)

Relay Datasheet:

http://www.datasheetcafe.com/srd-05vdc-sl-c-datasheet-pdf/

9
  • 1
    Little to do with the Pi and you have not provided any information to allow the question to be answered.
    – joan
    Jul 12 at 10:44
  • Can you please ask me the information you would like to have to clarify Jul 12 at 10:48
  • Does this answer your question? Can you use a 5V Relay Module with the Pi?
    – Milliways
    Jul 12 at 11:35
  • Sorry. That is not what I'm looking for. Jul 12 at 12:47
  • What is the model/spec of the relay board? How are you turning on the relays-with 16 GPIO pins? Each GPIO pin can only provide 16mA per pin with the total current from all pins not exceeding 51mA. This won't meet your needs if you want to operate all relays independently.
    – mhaselup
    Jul 17 at 12:24
0
  1. It does not matter whether the relay is powered from the Pi or independently. You will however need sufficient power for both devices, a 3A PSU should be sufficient.

  2. Yes the GPIO pins are limited to provide 16mA individually and no more than 50mA or so in aggregate. You cannot address this limitation without some transistor circuitry to provide current gain. If all 16 relays are energised you cannot draw more than 3mA or so from each GPIO. If the coils require 72mA you'll need a current gain of 72/3 or 24 per GPIO pin.

  3. This is a symptom of insufficient drive for all of your relays. See item 2.

  4. No. You should use a 3A PSU but it will not help with item 3 (please see my commentary below)

On the basis of 72mA for switching each relay you will need 16x72mA=1.15A for the relays + 1.2A (the recommended current draw required for the Pi Zero W see raspberrypi.org/documentation/hardware/raspberrypi/power/…). A 3A power supply should be sufficient for this. The main issue here is the requirement for each GPIO pin to provide 72mA which is not possible (max 16mA per pin, total no more than 50mA). You are going to need some transistor circuitry to provide the current gain you'll need to drive the relay coils.

2
  • Then how am i able to switch 10 relays without any issues? 10x72=720mA, which is also big number compared to max. 50mA theory. Since each pin can provide 16mA, even switching one relay should not be possible right? I think maybe 72mA is the wrong number or there may be a different logic for the working of relays. Can you please have a look at the spec sheet of the relay board(datasheetcafe.com/srd-05vdc-sl-c-datasheet-pdf) and confirm that 72mA is the correct number? So that we can look at this issue in a different perspective other than power consumption. Thanks Jul 20 at 8:29
  • Please can you provide a circuit diagram for the current setup showing the connectivity between the RPi and the relay board.
    – mhaselup
    Jul 20 at 11:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.