How does it work?
Brushless 17 Click as its foundation uses the L6229Q, DMOS fully integrated three-phase BLDC motor driver with overcurrent protection from STMicroelectronics. It combines a three-phase bridge, which consists of 6 power MOSFETs. Switching patterns are generated by the PWM current controller and the hall-effect sensor decoding logic, which represents a combinatory logic that provides the appropriate driving signals for the three-phase bridge outputs (1, 2, and 3). Drive signals are based on the signals coming from the three hall sensors, H1, H2, and H3, appliable on the upper-left header reserved for Hall sensor connection. These hall sensors detect rotor position in a 3-phase BLDC motor.
The L6229Q can perform PWM current control, with analog reference voltage provided at its VREF pin. This control can be achieved by using a PWM signal from the mikroBUS™ socket or applying an external reference voltage. When using PWM signal from mikroBUS™, leave R10 resistor populated. This is a straightforward way of obtaining a variable voltage without using a DAC, using a low-pass filter to filter the PWM signal. Alternatively, a fixed reference voltage can also be obtained through an external voltage supply on the VREF pin. This board also provides a tachometer function, a TACH output signal, which can be used to implement a simple frequency-to-voltage converter (speed loop control).
Brushless 17 Click communicates with MCU using several GPIO pins. The Enable pin, labeled as EN and routed to the CS pin of the mikroBUS™ socket, optimizes power consumption used for power ON/OFF purposes (performs Start and Stop controls of the motor operation), while AN pin labeled as BRK allows users to implement the brake function. The F/R pin, routed on the RST pin of the mikroBUS™ socket, is used to select the direction of motor rotation (forward/reverse). Besides, it is possible to detect operational irregularities, such as overcurrent and thermal detection, where an indication of such a condition is performed using the red LED indicator labeled as ERROR routed on the INT pin of the mikroBUS™ socket, labeled as DIA.
This board supports an external power supply for the motor, which can be connected to the input terminal labeled as INPUT and should be within the range of 8V to 52V, while the BLDC motor coils can be connected to the terminals labeled as 1, 2, and 3.
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
Brushless
Applications
Can be used driving three-phase brushless DC motors with currents up to 1A DC
On-board modules
L6229Q – DMOS fully integrated three-phase BLDC motor driver with overcurrent protection from STMicroelectronics
Key Features
Low power consumption, overcurrent detection and protection, diagnostic output, PWM current controller, brake function, and more
Interface
GPIO,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 Brushless 17 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 | ERROR | – | Fault Condition LED Indicator |
J1 | – | Populated | Hall Sensor Connection Header |
J2 | – | Unpopulated | Tachometer for Speed Contol Loop pin / External Reference Voltage for PWM Current Control |
Brushless 17 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
External Supply Voltage INPUT | 8 | – | 52 | V |
Maximum Output Current | – | – | 1.4 | A |
Operating Temperature Range | -25 | +25 | +120 | °C |
Software Support
We provide a library for the Brushless 17 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 Brushless 17 Click driver.
Key functions
-
brushless17_set_duty_cycle
This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ). -
brushless17_switch_direction
This function switches the direction by toggling the DIR pin state. -
brushless17_get_diagnostic_pin
This function returns the DIAG pin logic state.
Example Description
This example demonstrates the use of the Brushless 17 Click board™ by driving the motor in both directions at different speeds.
void application_task ( void )
{
static int8_t duty_cnt = 4;
static int8_t duty_inc = 1;
float duty = duty_cnt / 10.0;
brushless17_set_duty_cycle ( &brushless17, duty );
log_printf( &logger, "> Duty: %d%%rn", ( uint16_t )( duty_cnt * 10 ) );
duty_cnt += duty_inc;
if ( 8 == duty_cnt )
{
duty_inc = -1;
}
else if ( 3 == duty_cnt )
{
duty_inc = 1;
duty_cnt = 4;
log_printf( &logger, " Switch directionrnn" );
brushless17_switch_direction ( &brushless17 );
}
if ( !brushless17_get_diagnostic_pin ( &brushless17 ) )
{
log_info ( &logger, " An overcurrent or overtemperature event has 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.Brushless17
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.