How does it work?
Relay 4 Click is based on dual J1031C3VDC, high-current single-pole double-throw (SPDT) signal relays from CIT Relay and Switch. The J1031C3VDC relay is well known for its reliability and durability, high sensitivity, and low coil power consumption housed in a small package with PC pin mounting. Despite its size (12.5×7.5×10 millimetre (LxWxH)), the J1031C3VDC relay can withstand up to 2A and 125VAC/60VDC maximum. These relays are designed to easily activate their coils by relatively low currents and voltages, making them a perfect choice that any MCU can control.
As mentioned, the contact configuration of the J1031C3VDC is a single-pole double-throw (SPDT), which means that it has one pole and two throws. Based on the default position of the pole, one throw is considered normally open (NO) while the other is normally closed (NC), which is, in this case, its default position. When the coil is energized, it will attract the internal switching elements similar to a switch.
This Click board™ uses two mikroBUS™ pins for its proper operation, the RL1 and RL2 pins routed to the RST and PWM pins of the mikroBUS™ socket. These pins control small N-channel MOSFET RET (Resistor Equipped Transistor) transistors that provide enough current for the relay coil. Two resistors are already integrated into the RET, providing it with the correct biasing and simplifying the design. Also, each relay has its own yellow LED indicator, which signalizes the state of the relay. When the current flows through the RET, the coil will be energized, and the relay will be switched from a closed to an open switch state.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Relay
Applications
Can be used for controlling high-power applications
On-board modules
J1031C3VDC – general-purpose signal relay from CIT Relay and Switch
Key Features
Low power consumption, reliable switching, high current, hig sensitivity, PC board mounting, SPDT configuration, relay activity indicators, and more
Interface
GPIO
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Relay 4 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2-LD3 | REL1-REL2 | – | Relay Activity Status LED Indicators |
Relay 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Current Rating | – | – | 2 | A |
Switching Voltage | – | – | 60 | VDC |
Software Support
We provide a library for the Relay 4 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Relay 4 Click driver.
Key functions
-
relay4_set_relay1_open
This function sets the relay 1 to normally open state by setting the RL1 pin to low logic level. -
relay4_set_relay1_close
This function sets the relay 1 to normally close state by setting the RL1 pin to high logic level. -
relay4_set_relay2_open
This function sets the relay 2 to normally open state by setting the RL2 pin to low logic level.
Example Description
This example demonstrates the use of Relay 4 Click board™ by toggling the relays state.
void application_task ( void )
{
relay4_set_relay1_open ( &relay4 );
log_printf( &logger, " Relay 1 set to normally open statern" );
relay4_set_relay2_close ( &relay4 );
log_printf( &logger, " Relay 2 set to normally close staternn" );
Delay_ms ( 5000 );
relay4_set_relay1_close ( &relay4 );
log_printf( &logger, " Relay 1 set to normally close statern" );
relay4_set_relay2_open ( &relay4 );
log_printf( &logger, " Relay 2 set to normally open staternn" );
Delay_ms ( 5000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Relay4
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.