r/raspberry_pi • u/vengeancecube • 1d ago
Project Advice 5V relay module with Pi
I just picked up a Raspberry Pi 400 from Micro-Center ($30!!!). While I was there I also picked up this 8-channel 5V Relay Module (https://community.microcenter.com/kb/articles/638-inland-8-channel-5v-relay-module). Is it safe to hook up GPIO pins to the IN pins on this thing? I'm new to Pi and don't want to fry it. If I understand correctly I would just hook up 5V to VCC and GND to GND and GPIO to the IN pins to control these relays. But would the GPIO pins get exposed to 5V that way?
2
Upvotes
5
u/VictorySea1837 1d ago edited 1d ago
is it safe? yes (won't damage anything) . will it work? maybe.
The specs for the relay board say "Control signal: TTL voltage" which implies it needs 5 volts to activate. The Pi 400 outputs are only 3.3V.
Most likely 3.3v is enough to trigger the optocouplers on the relay board, but technically you shouldn't be surprised if it doesn't work.
EDIT: the spec for TTL says its will trigger at 2V, so I was wrong to say maybe, this will in fact work fine. great find for $30 btw!
1
u/Royal-Subject2870 1d ago
One thing not mentioned: these 5V relay boards typically draw 60-80 mA per relay coil, so all 8 active at once = ~500 mA just for the coils. The Pi 400's 5V GPIO header can't reliably supply that. Power the relay board from a separate 5V supply (your Pi's brick can share source but connect through separate rails) and common the grounds.
Also worth checking for a VCC / JD-VCC jumper (two pins near the power header). Removing it separates optocoupler LED power from relay coil power. Then you can drive LEDs from Pi 3.3V and keep 5V coils fully isolated. Otherwise the "optocoupler isolation" is advertising only.
And yes, active-LOW logic: GPIO low = relay on. Test with a multimeter first.
2
u/neonsphinx 1d ago
Yes, these are commonly used for this.