Basic tutorial of how to setup a 5V Relay with the Raspberry Pi.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts
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
Step 2: Setup
VCC -> 5 volt pin
GND -> Ground pin
IN -> GPIO 21
*Ensure postive leads are hooked up to NO and C terminals
Step 3: Code
1. Copy Script to Raspberry Pi
2. Type "python relay.py" to run
Step 4: Additional Info
Online Guide: https://www.piddlerintheroot.com/5v-relay/