Relay for Raspberry Pi or Arduino 1-Channel 5V Relay Module 250V/10A
A "normal" style relay to switch a single "data" line to turn on/off.
Perfect for RaspberryPi or Aduino projects. You need 5v to power the relay coil. The input (IN) requires just a few milliamps at anywhere between 2.5v and 12v. You can even use the same voltage you are powering the coil from.
· Low cost way to control larger voltages and currents.
· No soldering required
· Supports any micro-controller
· On-board switching transistor.
· Easy 1 wire drive. High for on, low for off.
· Mains rated relay.
Pinouts (from the left)
5v supply (coil requires 400mw)
IN data line (TTL 3-12v)
A1 - contact 1 (normally open, applies to all models)
A2 - contact 2 (normally closed, only on 6 pin relays).
COM - common
Raspberry PI Relay switch example which will switch the relay on and off at 1 second intervals:
Connect VCC to Rpi Pin 2 (5V)
Connect GND to Rpi Pin 6 (GND)
Connect IN to Rpi Pin 7
Connect the Ground of the circuit you wish to switch to the middle screw terminal
Connect the +VE of the circuit you wish to switch on either of the outer terminal screws (one will switch on when the relay is on, and the other will switch off when the relay is on - you choose what you want).
Example Python code for Raspberry Pi will switch pin 7 on:
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD)