Maker.io main logo

Adafruit STEMMA Non-Latching Mini Relay

2020-02-12 | By Adafruit Industries

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.

set_1

max_2

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.

board_3

  • 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.

switch_4

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.

current_5

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.

block_6

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

pinouts_7

This board has two connectors, one on either side and a space for an optional third. Let's take a look!

  • STEMMA connector - on the left side, the black connector is the STEMMA connector. Compatible with 3-pin JST STEMMA cables.

You can use any of these cables - they are JST PH 2.0mm connectors

  • Red goes to 3 to 5V DC power (this is used to power the transistor that turns on the relay, not to the output of the relay)
  • Black goes to power/signal ground on your microcontroller or device
  • White goes to 3 to 5V signal. The signal is amplified on the relay board, so it does not have to be a powerful pin

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.

pin_8

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

  • LED - Status LED, located below the STEMMA connector.
  • Optional terminal block - Connect a 3-pin terminal block to this optional spot to add another switch.

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.

clip_9

  • Plug the 3-pin JST to alligator clip cable into the 3-pin JST connector on the STEMMA Relay
  • Connect the white alligator clip to A1
  • Connect the black alligator clip to GND
  • Connect the red alligator clip to 3.3v

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

Copy Code
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!

relay_10

Downloads

Files

Fab Print

print_11

Schematic

schemetic_12

制造商零件编号 4030
CBL ASSY RECT 3P PL-GATOR 0.63'
Adafruit Industries LLC
¥15.87
Details
制造商零件编号 3893
JST PH 3PIN TO MALE HEADER CABLE
Adafruit Industries LLC
¥10.18
Details
制造商零件编号 3894
JST PH 3PIN TO FEMALE SOCKET CAB
Adafruit Industries LLC
¥10.18
Details
制造商零件编号 4336
JST PH 3-PIN PLUG-PLUG CABLE
Adafruit Industries LLC
¥6.11
Details
制造商零件编号 4409
STEMMA NON-LATCHING MINI RELAY
Adafruit Industries LLC
¥61.54
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum