The Solid State Relay Bricklet 2.0 can be used to extend Bricks by the possibility to switch solid state relays (SSR).
With solid state relays large loads can be switched while being galvanically isolated. Mechanical relays can create switching sparks and other interferences. Solid state relays do not. Furthermore solid state relays are wearless and allow higher switching frequencies.
The maximum switching capacity depends on the connected solid state relay, which is controlled by the Solid State Relay Bricklet 2.0.
We offer two compatible solid state relays in our shop:
Property | Value |
---|---|
Current Consumption | 31mW |
Necessary Contact Space of SSR Input | 25.4mm (1") |
Dimensions (W x D x H) | 19 x 33.4 x 5mm (0.75 x 1.31 x 0.2") |
Weight | 2g |
The Bricklet has to be connected to the control inputs of a solid state relay. You have to consider the polarity. Connect the SSR input marked with "+" with the "+" marked contact of the Bricklet.
The load terminals of the AC solid state relays has no polarity. Typically you want to switch the phase wire. To do this you cut the phase wire (typically black or brown) and connect both ends with the relay.
The load terminals of DC solid state relays has a polarity. "+" marks the higher voltage. For example, if a power supply should be switched, you have to cut the "+" wire. Each end will be connected to the SSR, whereas the wire directly connected to the power supply has to be connected to the "+" pole of the SSR.
Warning
The handling of alternating currents and high direct currents is potential hazardous!
To test a Solid State Relay Bricklet 2.0 you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the Solid State Relay Bricklet 2.0 to a Brick with a Bricklet Cable.
If you connect the Brick to the PC over USB, you should see a new tab named "Solid State Relay Bricklet 2.0" in the Brick Viewer after a moment. Select this tab. If everything went as expected the Brick Viewer should look as depicted below.
Play around with the buttons, you should see the LED of the relay switching.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the Solid State Relay Bricklet 2.0 and examples in different programming languages.
With Pulse-width modulation the power of loads connected to the solid state relay can be controlled (e.g. brightness of a lamp, speed of a motor). With a fixed frequency the load will be switched on for a variable time. Depending on the time the power will be controlled.
Example: We want to control a heating device. A heating device has a high inertia so a frequency of 1Hz will suffice. By varying the on-time between 0-1 second the power can be controlled between 0-100%. To do this we write a small program with a timer that calls the "set_monoflop" function of the Solid State Relay Bricklet 2.0 every second with an on-time between 0-1 seconds.
Warning
High switching frequencies produce heat in the solid state relay. If these frequencies are too high, and there is not enough cooling, the relay can be destroyed. The maximum switching frequency with sufficient cooling is 30Hz.
See Programming Interface for a detailed description.
Language | API | Examples | Installation |
---|---|---|---|
C/C++ | API | Examples | Installation |
C/C++ for Microcontrollers | API | Examples | Installation |
C# | API | Examples | Installation |
Delphi/Lazarus | API | Examples | Installation |
Go | API | Examples | Installation |
Java | API | Examples | Installation |
JavaScript | API | Examples | Installation |
LabVIEW | API | Examples | Installation |
Mathematica | API | Examples | Installation |
MATLAB/Octave | API | Examples | Installation |
MQTT | API | Examples | Installation |
openHAB | API | Examples | Installation |
Perl | API | Examples | Installation |
PHP | API | Examples | Installation |
Python | API | Examples | Installation |
Ruby | API | Examples | Installation |
Rust | API | Examples | Installation |
Shell | API | Examples | Installation |
Visual Basic .NET | API | Examples | Installation |
TCP/IP | API | ||
Modbus | API |