How does it work?
SolidSwitch 2 Click as its foundation uses the L9026, an automotive multi-channel relay driver optimized for automotive relay and LED applications from STMicroelectronics. Eight channels of the L9026 represent two high-side and six configurable high-side/low-side drivers, which can be driven by an SPI interface or by two dedicated parallel inputs (IN0 and IN1 pins routed to the PWM and INT pins of the mikroBUS™ socket). Operating from an external power supply from 3V up to 18V, it provides a maximum current of 1A on its output terminals making this board an excellent choice for automotive applications (LEDs and relays) compatible with resistive, inductive, and capacitive loads.
As mentioned before, this Click board™ communicates with MCU through a standard SPI interface used to control and configure the loads and the device. The L9026 also offers advanced diagnostic and protection features such as short-to-ground, open load, overcurrent, and overtemperature detections, with status feedback of all diagnostic functions provided via the SPI interface.
Besides, the L9026 also features Idle mode for reduced current consumption, controlled via IDL pin routed to the AN pin of the mikroBUS™ socket and the “Limp home” mode. This mode allows using two selected drivers in particularly faulty conditions, such as SPI fault, micro fault, or supply undervoltage. The device can guarantee operations under a cranking scenario with a supply voltage down to 3V and ensures a low quiescent current under reset conditions.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Relay
Applications
Can be used for automotive applications and driving resistive, inductive, and capacitive loads
On-board modules
L9026 – multi-channel relay driver from STMicroelectronics
Key Features
AEC-Q100 qualified, six configurable LS/HS drivers, two parallel input pins with input mapping functionality, cranking capability down to 3V, protection features, Limp Home mode, and more
Interface
GPIO,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V,External
Pinout diagram
This table shows how the pinout on SolidSwitch 2 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 |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
SolidSwitch 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
External Supply Voltage VCC-PWR | 3 | – | 18 | V |
Output Current | – | – | 1 | A |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the SolidSwitch 2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for SolidSwitch 2 Click driver.
Key functions
-
solidswitch2_write_register
This function writes a desired data to the selected register by using SPI serial interface. -
solidswitch2_toggle_in0_pin
This function toggles the IN0 pin logic state. -
solidswitch2_toggle_in1_pin
This function toggles the IN1 pin logic state.
Example Description
This example demonstrates the use of SolidSwitch 2 Click board™ by controlling the output state.
void application_task ( void )
{
for ( uint16_t duty_cycle = SOLIDSWITCH2_MIN_DUTY_CYCLE; duty_cycle <= SOLIDSWITCH2_MAX_DUTY_CYCLE; duty_cycle += 5 )
{
if ( SOLIDSWITCH2_OK == solidswitch2_write_register ( &solidswitch2, SOLIDSWITCH2_REG_PWM_GEN_DC,
( uint8_t ) ( SOLIDSWITCH2_MAX_DUTY_CYCLE - duty_cycle ) ) )
{
log_printf ( &logger, " PWM GEN DC: %urn", ( SOLIDSWITCH2_MAX_DUTY_CYCLE - duty_cycle ) );
}
if ( SOLIDSWITCH2_OK == solidswitch2_write_register ( &solidswitch2, SOLIDSWITCH2_REG_PWM_LED_DC, ( uint8_t ) duty_cycle ) )
{
log_printf ( &logger, " PWM LED DC: %urn", duty_cycle );
}
solidswitch2_toggle_in0_pin ( &solidswitch2 );
log_printf ( &logger, " Toggle IN0 pinrn" );
solidswitch2_toggle_in1_pin ( &solidswitch2 );
log_printf ( &logger, " Toggle IN1 pinrnn" );
Delay_ms ( 250 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.SolidSwitch2
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 MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika 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.