Difference between revisions of "Special:Badtitle/NS500:Relay Cape"

From eLinux.org
Jump to: navigation, search
m
(Add code sample)
 
Line 23: Line 23:
 
Device tree overlay is coming soon.
 
Device tree overlay is coming soon.
  
 +
Below is an example script to drive each relay in sequence:
 +
 +
 +
import Adafruit_BBIO.GPIO as GPIO
 +
import time
 +
 +
RELAY1 = "P9_12"
 +
RELAY2 = "P9_15"
 +
RELAY3 = "P9_23"
 +
RELAY4 = "P9_27"
 +
 +
GPIO.setup(RELAY1, GPIO.OUT)
 +
GPIO.setup(RELAY2, GPIO.OUT)
 +
GPIO.setup(RELAY3, GPIO.OUT)
 +
GPIO.setup(RELAY4, GPIO.OUT)
 +
 +
a = [RELAY1, RELAY2, RELAY3, RELAY4]
 +
 +
while True:
 +
        for x in a:
 +
                GPIO.output(x, GPIO.HIGH)
 +
                time.sleep(1)
 +
                GPIO.output(x, GPIO.LOW)
 +
                time.sleep(1)
  
 
==Specifications==
 
==Specifications==

Latest revision as of 13:54, 13 October 2014

Descriptions

Relay Cape

The Relay Cape provides 4 3 amp capable relays with screw terminals. The relays are SPST, Normally Open. They are driven from GPIO lines.









Revision Changes

Revision A1

Initial version of the Relay Cape

Software Support & Compatibility

All revisions are compatible with BeagleBone and BeagleBone Black using 3.8 kernel.


Device tree overlay is coming soon.

Below is an example script to drive each relay in sequence:


import Adafruit_BBIO.GPIO as GPIO
import time

RELAY1 = "P9_12"
RELAY2 = "P9_15"
RELAY3 = "P9_23"
RELAY4 = "P9_27" 

GPIO.setup(RELAY1, GPIO.OUT)
GPIO.setup(RELAY2, GPIO.OUT)
GPIO.setup(RELAY3, GPIO.OUT)
GPIO.setup(RELAY4, GPIO.OUT)

a = [RELAY1, RELAY2, RELAY3, RELAY4]

while True:
        for x in a:
                GPIO.output(x, GPIO.HIGH)
                time.sleep(1)
                GPIO.output(x, GPIO.LOW)
                time.sleep(1)

Specifications

Followings are some specifications of the Relay Cape:

Mechanical Specifications

Size 2.15" x 2.825"
Layers 2
PCB Thickness .062"
RoHS Compliant Yes



Signal Usage

Relay Cape
Power SYS_5V
GPIO GPIO1_28
GPIO1_16
GPIO1_17
GPIO3_19

Distributors

Please visit Where To Buy for a list of distributors who carry BeagleBoardToys' capes.



Product Images



Documentations

Relay Cape Revision A1