SparkFun Qwiic Dual Solid State Relay Hookup Guide

Pages
Contributors: El Duderino, Englandsaurus
Favorited Favorite 1

Hardware Overview

The SparkFun Qwiic Dual Solid State Relay is built on a similar design to our Qwiic Quad Relay and uses an ATTiny84 to act as the "brain" for the board. To allow for faster and quieter switching of the load, this board uses solid state relays instead of electromechanical relays. The ATTiny84 comes pre-programmed with firmware to accept commands via I2C from an attached microcontroller so you can keep other I/O pins free for other uses.

In this section we'll cover the hardware present on the Qwiic Dual Solid State Relay and note some of the unique functionality of the components.

Solid State vs Mechanical Relays

Let's talk briefly about two types of relays before we get into the details on the solid state relays included with the kit. A relay is a special kind of switch that has a switching mechanism inside isolated from the switch. This allows us to control the high-output side of the relay from a low-power input like a microcontroller.

Now, when it comes to the comparing an electromechanical relay (EMR) and a solid state relay (SSR), the primary difference is an EMR uses an electromagnetic field to physically close a mechanical switch inside the relay where an SSR uses a semiconductor like a MOSFET or an opto-isolator to switch the load on and off. This allows the SSR to switch at much higher speeds than an EMR and also increases their durability since there are no moving parts inside. Theoretically, and if used within spec, an SSR can last forever where EMR's are designed with an expected lifetime. EMR's are typically cheaper and also can allow multiple loads on a single relay (if it has multiple contacts) where SSR's are limited to a single load.

There is a lot of discussion out there about which type of relay is best but it really comes down to two things: budget and versatility. This brief outline covers the very basics of electromechanical and solid state relays so with some more research you can decide which type of relay will be best suited for your project. For a short yet informative overview of electromechanical relays, check out this section of our Qwiic Quad Relay Hookup Guide.

SSRF-240D25 Solid State Relays

The board includes two PCB-mount SSRF-240D25 solid state relays from Tyco Electronics. Let's cover some characteristics from the relay's datasheet so you know what to expect from them and the Dual Solid State Relay.

Characteristic Range
Input Voltage 3V-15V
Supply Current 15mA @5V (20 mA @3.3V)
Load Voltage 12-280VAC
Max Current (Through Relay) 25A (@240 VAC)

Photo highlighting relays and screw terminals

Heads up! The 25A rating for these relays is for forced air cooling installations. Without forced air cooling, a max of 10A continuous draw is recommended per the datasheet.

The relays use the Zero Voltage Cross trigger method so when operating on a 60Hz AC carrier signal you can switch the relays up to 120 times per second! Read on in the Arduino Examples section where we'll demonstrate how to do that using a PWM signal.

Both relays' outputs are tied to their own 2-pin screw terminal so all you need to connect your load is a pair of wire strippers and a screwdriver. We've also included two footprints so you can solder 5mm LEDs to act as indicators for when the load is powered.

One last note before we move on from the relays. The relay control circuit is designed for a Normally Open circuit only. This means your load is normally off until the relay is switched on. For more information on how this circuit is configured, check out the schematic and the relay datasheet.

ATTiny84

The ATTiny84 comes pre-programmed with firmware to control the two relays on the board via I2C commands. The ATTiny84's I2C address is 0x0A by default. There is also a 2x3 header broken out on the back of the board for programming the ATTiny84. This is primarily used for programming during manufacturing but you can re-program the IC if you would like. You an download and modify the firmware from the Hardware GitHub repo.

Photo highlighting ATTiny84 IC

Need help re-programming the ATTiny84? Take a look at our Tiny AVR Programmer Hookup Guide and our Re-Programming the LilyTiny/LilyTwinkle Tutorial.

Power

Power for the board is provided either via the Qwiic interface or through the labeled 3.3V and GND pins broken out on the bottom left of the board.

Qwiic and I2C Interface

The I2C interface is broken out to two Qwiic connectors on either side of the board as well as 0.1"-spaced header pins for those who prefer a more traditional soldered connection. We have also broken out the ATTiny84's reset pin in case you would like to reset the IC without resetting your entire circuit.

Photo highlighting Qwiic and I2C Interface pins

Jumpers

If you have never worked with solder jumpers and PCB traces before or would like a quick refresher, check out our How to Work with Solder Jumpers and PCB Traces tutorial for detailed instructions and tips.

There are three jumpers on the Qwiic Dual Relay labeled PWR, I2C and ADR. The PWR jumper enables the Power LED, the I2C jumper pulls the SDA and SCL lines to 3.3V and the ADR jumper sets the I2C address of the ATTiny84.

Photo highlighting solder jumpers

Power Jumper

The power jumper (labeled PWR) controls voltage to the power LED on the board. This jumper is closed by default. To disable the power LED, simply open the jumper by severing the trace in between the two pads. Disabling the power LED can help reduce the total current draw of the board.

Address Jumper

The address jumper (labeled ADR) sets the I2C address for the ATTiny84. The jumper is closed by default with the address set to 0x0A. Opening the jumper will change the address to 0x0B.

I2C Jumper

The I2C Jumper pulls the SDA and SCL lines to 3.3V via two 4.7K Ohm resistors. The jumper is closed by default. Open this jumper if you have multiple sensors connected to the bus with their own pull-up resistors enabled to avoid causing the parallel equivalent resistance creating too strong of a pull-up for the bus to operate correctly. As a general rule, disable all but one pair of pull-up resistors if multiple devices are connected to the bus.

Note: If you disable the pull-up resistors on your Qwiic Dual Relay, make sure the rest of your I2C bus is operating at 3.3V Logic. If your bus is running at a different logic, you will need to shift that logic to 3.3V to avoid damaging the ATTiny84 on this board.

Board Dimensions

The Qwiic Dual Solid State Relay measures 3.55" x 2.65" (90.17mm x 67.31mm) and includes nine mounting holes that fit a 4-40 screw so you have plenty of mounting options.

Qwiic Dual Solid State Relay Board Dimensions
Having trouble seeing the detail in the dimensional drawing? Click on the photo for a larger view

With all the hardware included with the Qwiic Dual Solid State Relay covered, now it's time to connect it to your microcontroller and assemble your high voltage load circuit.