How does it work?
LED Driver 14 Click as its foundation uses the BD18337EFV-M, a four-channel constant current LED driver with built-in MOSFET ideal for LED rear lamps (turn/stop), fog lamps, and turn signals for automotive use from Rohm Semiconductor. The BD18337EFV-M incorporates a proprietary thermal dissipation circuit and individual LED control function to drive LED lamps with different specifications by one driver, allowing the possibility for up to 3 LEDs in series on its output OUTx pin. It also has integrated protection circuitry to guard against output-short, overvoltage, LED short-circuit protections, and overtemperature.
This Click board™ provides an output current of 150mA per channel with an output current accuracy of ±5%, limited by two MCP4661 digital potentiometers from Microchip Technology, which establishes communication with the MCU via I2C serial interface. The MCP4661 also allows the choice of the least significant bit (LSB) of its I2C slave address by positioning SMD jumpers labeled as ADDR SEL to an appropriate position marked as 1 and 0. The MCP4661 also has a configurable Write Protection function labeled as WP routed on the RST pin of the mikroBUS™ socket, which protects the entire memory and all registers from write operations and must be set to a low logic state to inhibit all the write operations.
The BD18337EFV-M offers two ways to implement LED dimming: analog dimming and PWM dimming. Both methods control the average current flowing through the LEDs. The analog dimming can be achieved by adjusting the LED current by using an external voltage source on the VIN terminal, while the PWM dimming is implemented by direct control of the dimming control signal routed to the PWM pin on the mikroBUS™ socket. The selection can be made by positioning the SMD jumper labeled as CRT SEL to an appropriate position marked as PWM or VIN.
This board also has a two-channel switch labeled as MSET, which allows changing output channel operation mode based on detecting an LED error. It also uses the INT pin of the mikroBUS™ socket in two ways, used as a ‘fault’ indicator which immediately notifies the host when a fault condition occurs or as an input that disables the output current. The output channel operation mode is automatically selected according to a switch position. More information about these selectable modes can be found in the attached datasheet.
This Click board™ supports an external power supply for the motor, which can be connected to the input terminal labeled as VIN and should be within the range of 5.5V to 20V (typically about 12V). This wide range can lead to significant device power consumption in applications where a high input voltage is applied to the device, and the output is relatively low. This amount of power can increase the BD18337EFV-M internal temperature to an unacceptable level depending on the package’s thermal resistance. The BD18337EFV-M employs an Energy Sharing Control to solve this issue, which dissipates the extra power that can overheat the device in external resistors R2 and R3 (R3 is unpopulated by default configuration).
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
LED Drivers
Applications
Can be used for LED rear lamps (turn/stop), fog lamps, and turn signals for automotive applications
On-board modules
BD18337EFV-M – four-channel constant current LED driver from Rohm Semiconductor
Key Features
Built-in energy sharing control, high reliability, PWM or analog dimming control, license lamp mode, protection features, and more
Interface
I2C,PWM
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 LED Driver 14 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 |
JP2 | CRT SEL | Left | LED Dimming Selection PWM/VIN: Left position PWM, Right position VIN |
JP3-JP4 | ADDR SEL | Left | I2C Address Selection 1/0: Left position 1, Right position 0 |
SW1 | MSET | Down | Output Channels Operation Mode Switch |
LED Driver 14 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
External Supply Voltage VIN | 5.5 | – | 20 | V |
Maximum Output Current | – | – | 150 | mA |
Output Current Accuracy | – | 5 | – | % |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the LED Driver 14 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 LED Driver 14 Click driver.
Key functions
-
leddriver14_set_rset
This function sets the resistance of the selected rset channel. -
leddriver14_get_int_pin
This function returns the int pin logic state. -
leddriver14_set_duty_cycle
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).
Example Description
This example demonstrates the use of LED Driver 14 Click board™ by controlling the brightness of LEDs by changing the PWM Duty Cycle.
void application_task ( void )
{
static int8_t duty_cnt = 1;
static int8_t duty_inc = 1;
float duty = duty_cnt / 10.0;
leddriver14_set_duty_cycle ( &leddriver14, duty );
log_printf( &logger, "> Duty: %d%%rn", ( uint16_t )( duty_cnt * 10 ) );
if ( 10 == duty_cnt )
{
duty_inc = -1;
}
else if ( 0 == duty_cnt )
{
duty_inc = 1;
}
duty_cnt += duty_inc;
if ( !leddriver14_get_int_pin ( &leddriver14 ) )
{
log_info ( &logger, " Abnormality such as LED Open or the OUTx pin short circuit occured " );
}
Delay_ms( 500 );
}
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.LEDDriver14
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.