制造商零件编号 4030
CBL ASSY RECT 3P PL-GATOR 0.63'
Adafruit Industries LLC
License: See Original Project STEMMA
Courtesy of Adafruit
Guide by Kattni Rembor
Overview
STEMMA plug-and-play parts make your next project solder-free! This is the STEMMA Non-Latching Mini Relay. It gives you power to control, and control over power. Put simply, you can now turn on and off lamps, fans, solenoids, and other small appliances that run on up to 250VAC or DC power using any microcontroller or microcomputer, with ease.
No worrying about flyback diodes, level shifting, pin protection. The STEMMA board takes care of all that for you. You can use it with any 3V or 5V microcontroller/microcomputer. To use with a breadboard, Raspberry Pi or Arduino, pair with a JST 3-pin to breadboard cable. If you want to use with a Circuit Playground or micro:bit, we have a cable with alligator clips.
You can switch up to 2A of resistive current at 30VDC or ~40VAC or lower. At 110VDC you can switch up to 0.3A, at 120VAC up to 0.5A, and at 250VAC you can switch up to 0.6A. Check the datasheet for the relay for the exact switching capacity, and of course, for reactive/inductive loads you will need to de-rate. This isn't a relay you can use to turn on and off your washer/dryer, stick to 60W or less.
Each STEMMA board comes with a fully assembled and tested PCB but no cable. No soldering is required to use it. There's an optional second switch on the side of the PCB, if you get a 3-pin terminal block you can solder that in place, but its optional.
Please note: If using with high voltages (> 24V) use care and common sense! High voltages require experience and are only for use by engineers who are comfortable with guidelines and know how to use safely!
Pinouts
This board has two connectors, one on either side and a space for an optional third. Let's take a look!
You can use any of these cables - they are JST PH 2.0mm connectors
Parts
• Relay - Located in the center of the board.
Terminal block - The connects for the relay are the white tubular thing at the far end of the PCB. You can poke wire into the holes, they will automatically grip onto wire that is 24AWG to 18AWG. Once you poke the wire in, give it a light pull to verify its clamped. To release the wire, use a thin screwdriver or pen to press on the button on the top while pulling the wire out.
This board has a single Signal pin (the white wire). Normally, the relay's COM pin is connected mechanically to the NC pin and the NO pin is disconnected.
When the Signal pin is pulled high, the relay switches and the internal switch changes so that the COM pin is mechanically connected to the NO pin and NC is then disconnected
Usage
It's easy to use the STEMMA Non-Latching Mini Relay to control power. This page will show you how to wire up the breakout board and use simple code to turn the relay on and off.
Wiring
Use a STEMMA cable to connect the relay board to your project. The following is an example of the relay board connected to a Circuit Playground Bluefruit using the STEMMA-to-alligator-clip cable.
Circuit Playground Bluefruit Example
This example uses CircuitPython. If you're not already using CircuitPython, check out the Circuit Playground Bluefruit guide for information on how to install and use CircuitPython on your device.
This example switches the relay once every second.
Save the following example as code.py on your CIRCUITPY drive:
Download: Project Zip or Adafruit_STEMMA_Relay.py
import time
import board
import digitalio
relay = digitalio.DigitalInOut(board.A1)
relay.direction = digitalio.Direction.OUTPUT
while True:
relay.value = True
time.sleep(1)
relay.value = False
time.sleep(1)
Read the ratings on the relay for the maximum current values for a given voltage. Beware switching any voltage over 24 volts up to and including mains (110/220V AC) which could harm you if touched. Proper insulation techniques are essential.
This board has a single Signal pin (the white wire). Normally, the relay's COM pin is connected mechanically to the NC pin and the NO pin is disconnected.
When the Signal pin is pulled high, the relay switches and the internal switch changes so that the COM pin is mechanically connected to the NO pin and NC is then disconnected.
When the relay is active, a red LED is lit, and about 50mA of current from the red power wire is used to keep the coil switched on. Note, if power is lost, the relay will go back 'open'.
The connects for the relay are the white tubular thing at the far end of the PCB. You can poke wire into the holes, they will automatically grip onto wire that is 24AWG to 18AWG. Once you poke the wire in, give it a light pull to verify its clamped. To release the wire, use a thin screwdriver or pen to press on the button on the top while pulling the wire out.
That's all there is to using the STEMMA non-latching mini relay with the Circuit Playground Bluefruit!
Downloads
Files
Fab Print
Schematic