How does it work?
Brushless 26 Click is based on the DRV8317H, a three-phase PWM motor driver from Texas Instruments. Its integrated protection features include VM undervoltage lockout, VM overvoltage protection, charge pump undervoltage, overcurrent protection, overtemperature warning and shutdown, and fault condition indication pin. The motor driver provides two configurable schemes, a 6x or a 3x PWM, which can be used to implement sensor or sensor-less field-oriented control (FOC), sinusoidal control, or trapezoidal control using an external microcontroller. It is capable of driving a PWM frequency of up to 200KHz.
To control all high and low side driver control inputs of the DRV8317H, Brushless 26 Click features the PCA9538A, a low-voltage 8-bit I2C I/O port with interrupt and reset from NXP. Besides driver control inputs, this I/O port also controls the Sleep mode of the motor driver. The BLDC motor can be connected over the screw terminal, labeled U, V, and W. Additional screw terminal is just aside for connecting an external power supply in a range of 4.5V up to 20V.
The DRV8317H is a hardware variant of this motor driver, so the Brushless 26 Click is equipped with jumper selections of the gain, slew, and mode; by default, all three are set to 0. This way, you can set the current sense amplifier gain (GA) and output slew rate (SW) through pin voltage levels. The mode jumper (MD) allows you to use a 6x or 3x PWM mode. The 6x PWM is set by default. Additionally, three current sense amplifiers are available over the 4-pin header labeled A1, A2, and A3.
Brushless 26 Click uses a standard 2-wire I2C interface of the PCA9538A to communicate with the host MCU, supporting clock frequencies up to 400kHz. The I2C address of the PCA9538A can be set over the ADDR SEL jumpers, where 0 is selected by default. If a fault condition occurs, the DRV8317H will pull the FLT pin to a low logic state. The RST pin resets the PCA9538A I/O port.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this 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 for the development of brushless DC (BLDC) motor modules, air purifiers, dishwasher pumps, vacuum robots, washer and dryer pumps, coffee machines, and more
On-board modules
DRV8317H – three-phase PWM motor driver from Texas Instruments
Key Features
Three-phase BLDC motor driver, configurable slew rate for EMI mitigation, programmable fain current sensing, supports up to 200kHz PWM frequency, integrated shoot-through protection, wide power supply voltage operating range, multiple control interface options, integrated current sensing, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Brushless 26 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-JP3 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP4 | MD | Left | Mode Selection 0/1: Left position 0, Right position 1 |
JP5 | SW | Left | Slew Selection 0/1: Left position 0, Right position 1 |
JP6 | GA | Left | Gain Selection 0/1: Left position 0, Right position 1 |
Brushless 26 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Power Supply Voltage | 4.5 | – | 20 | V |
Peak Current | – | – | 5 | A |
Software Support
We provide a library for the Brushless 26 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 Brushless 26 Click driver.
Key functions
-
brushless26_reset_port_exp
Brushless 26 reset port expander function. -
brushless26_set_pins
Brushless 26 set pins function. -
brushless26_drive_motor
Brushless 26 drive motor function.
Example Description
This example demonstrates the use of the Brushless 26 Click board™ by driving the motor in both directions at different speeds.
void application_task ( void )
{
log_printf ( &logger, "rn Driving motor clockwise rn" );
for ( uint8_t speed = BRUSHLESS26_SPEED_MIN; speed <= BRUSHLESS26_SPEED_MAX; speed += 20 )
{
log_printf ( &logger, " Speed gain: %urn", ( uint16_t ) speed );
if ( BRUSHLESS26_OK != brushless26_drive_motor ( &brushless26, BRUSHLESS26_DIR_CW, speed, 2000 ) )
{
log_error ( &logger, " Drive motor " );
}
}
Delay_ms ( 1000 );
log_printf ( &logger, "rn Driving motor counter-clockwise rn" );
for ( uint8_t speed = BRUSHLESS26_SPEED_MIN; speed <= BRUSHLESS26_SPEED_MAX; speed += 20 )
{
log_printf ( &logger, " Speed gain: %urn", ( uint16_t ) speed );
if ( BRUSHLESS26_OK != brushless26_drive_motor ( &brushless26, BRUSHLESS26_DIR_CCW, speed, 2000 ) )
{
log_error ( &logger, " Drive motor " );
}
}
Delay_ms ( 1000 );
}
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.Brushless26
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.