0

I have a relay module exactly like the one on the next page : https://microcontrollershop.com/product_info.php?products_id=5919

I wanted to consult you about the correct way to use it. I connected the 5V port of my RPi to "+", GND to "-" and "S" to GPIO17.

1- In the first measure when directly connecting the module to the RPi, take the current between the gpio port and the "S" (SIGNAL) output, and measure a value of 4 mA.

2- In addition, I made the previous connection but I connected between "s" and the gpio a resistance of 2.2 K, took its current and obtained a value of 0.42 mA.

3- The voltage difference between + and - is 5 V.

4- The voltage between "S" and "-" is 3.30 V.

I could use one of the 2 previous connections (Point 1 or 2), or I should add an additional transistor ?(I have seen several websites but I have doubts about the connection with the module I have). I'm currently using point 2 without problems but I'm afraid of damaging my Rpi.

Greetings.

  • Point 1 is good. No need using resistor or transistor. Other kinds eg, Low level trigger relay usually need a voltage level converter. I am a huge fan of your cheapie relay, Keyes KY019/SR1y. You might like to read the following references for more details: (1) https://raspberrypi.stackexchange.com/questions/99988/how-to-wire-a-raspberry-pi-to-a-16-channel-relay-module-it-wont-work, (2) https://raspberrypi.stackexchange.com/questions/100831/what-pins-to-close-a-circuit, (3) https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158#p1323061 – tlfong01 Aug 13 '19 at 23:48

1 Answers1

2

The connections you have made are fine.

You don't need the resistor in series between GPIO 17 and S. However if the relay still operates it will not do any harm to leave it there.

The relay board itself has the circuitry needed to protect the Pi from the relay load.

joan
  • 67,803
  • 5
  • 67
  • 102
  • Thank you for your prompt response. I take this opportunity to make 2 small queries: 1- When placing the resistance of 2.2 K I see that it lowers the current but this really helps or harms something? 2- If I want to add other similar models to different GPIO, I must consider that the sum of all of them does not exceed 16 mA? or 50 mA as the Raspberry manual says? Thanks for the help – Seba San Blas Aug 13 '19 at 20:09
  • The current needed for logic switching should be low. I'd be suspicious of the 4 mA reading, it seems a bit high. The 50 mA limit is for the current drawn from all the GPIO at any one time. The 16 mA limits is the most you should draw from an individual GPIO. – joan Aug 13 '19 at 21:08
  • @SebaSanBlas inserting an additional resistor may be harmful. This would reduce the base current and (depending on the hFE of the transistor) may prevent it going into saturation with potential for over heating. NOTE the 50 mA limit only applied to the original Pi and was a limit of the regulator. There is NO documented current limit for the SoC. – Milliways Aug 14 '19 at 00:21