-1

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.sstatic.net/CAWmF.jpg)

(https://i.sstatic.net/WSzLG.jpg)

(https://i.sstatic.net/1YSy3.jpg)

Relay Datasheet:

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

1 Answers1

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.

mhaselup
  • 206
  • 1
  • 3