Relay for Raspberry Pi or Arduino 1-Channel 5V Relay Module 250V/10A
Relay for Raspberry Pi or Arduino 1-Channel 5V Relay Module 250V/10A

Relay for Raspberry Pi or Arduino 1-Channel 5V Relay Module 250V/10A

Normaler Preis $9.99 $5.95 Angebot

A "normal" style relay to switch a single "data" line to turn on/off.  

Perfect for Raspberry Pi or Arduino projects. You need 5V to power the relay coil. The input (IN) requires just a few milliamps at voltages between 2.5 V and 12 V. You can even use the same voltage you are powering the coil from.

Features:

· A low-cost way to control larger voltages and currents.

·         No soldering required

·         Supports any microcontroller 

·         On-board switching transistor.

·         Easy one-wire drive. High for on, low for off. 

· Mains-rated relay.

Pinouts (from the left)

  •  5v supply (coil requires 400mw)
  • GND
  • IN data line (TTL 3-12v)

A1 - contact 1 (normally open, applies to all models)

A2 - contact 2 (normally closed, only on six-pin relays).

COM - common

Raspberry PI Relay switch example, which will switch the relay on and off at 1-second intervals:

Wiring:

  • 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 to 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 seven on:

Import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)

def on():
        GPIO.setup(7, GPIO.OUT)
        GPIO.output(7, 1)

def off():
        GPIO.setup(7, GPIO.IN)


While (1):
        on()
        time.sleep(1)
        off()
        time.sleep(1)

Project:

  • Switch the relay using our Flex RF module

Flex Relay Documentation

Flex Module

  • Switch an appliance on/off from a browser or smartphone.

http://projects.privateeyepi.com/home/on-off-project