augx3 wrote: ↑Wed Jan 15, 2020 12:17 pm
Now i only need 4 to 5 relays so can i plug em to pi?
P.s i actually opened ur links and read a thing or two and i will surely study it for further projects but rn im on a rush so can you just say me of with 4 or 5 relays somethin can go wrong?
if you switch a number of relays at once it can cause a sudden voltage dip on the 5v supply , if this is take from the 5v pin on the pi gpio header , you might find your pi will do a sudden reboot.
Gpio 5 and 6 which i use for buttons are input 1 and they wont work if connect those to 3v3,do u know how to set them input 0 in nodejs or just default state at boot on the pi?
sorry no I don't use nodejs
I also noticed that if i boot the pi with all circuit connected the relays will be kind of powered by the IN gpios that are going to be set as output once i start the program,can this cause faults or is not a big deal?
It sounds like you relay board is active low, and is using the gpio as a ground as explained in the link I posted, so you are grounding a 5v circuit via the gpio not good in the long term for your pi.
I would suggest using an interface circuit between the pi gpio and the relay board , you can use a simple ULN2803A between the pi and the relay board, that way the 5v will be connected a an actual ground .
it will also make you relay board active high , so a high output will turn the relay on.
Here is an example of such a ULN2803A in use
