5V Relay (Raspberry Pi)

by piddlerintheroot in Circuits > Raspberry Pi

71173 Views, 55 Favorites, 0 Comments

5V Relay (Raspberry Pi)

5VR.png

Basic tutorial of how to setup a 5V Relay with the Raspberry Pi.

Parts

vlcsnap-8719-03-29-03h54m17s518.png

RPI 3 - https://amzn.to/2VA9pQY

4 Amp Power Adapter - https://amzn.to/2CTptWu

16GB micro SD - https://amzn.to/2SFMwd3

120 pcs jumper cable: https://ebay.to/2VAb9cY

5 Volt Relays: https://amzn.to/2SYHxnH

12 Volt Power Supply - https://amzn.to/2srHmWv

5.5x2.1mm Male+Female DC Power Socket: https://amzn.to/2VA5ZNW

Setup

schem.PNG

VCC -> 5 volt pin

GND -> Ground pin

IN -> GPIO 21

*Ensure postive leads are hooked up to NO and C terminals

Code

vlcsnap-1318-05-03-01h42m11s289.png

1. Copy Script to Raspberry Pi

2. Type "python relay.py" to run

Downloads

Additional Info

vlcsnap-piddler.png
5 Volt Relay (Raspberry Pi)