The perfect choice for enhancing the performance of home appliances such as fans and pumps, offering flexibility and versatility to optimize their operation
A
A
Hardware Overview
How does it work?
Brushless 21 Click is based on the AMT49400, a three-phase BLDC controller with integrated MOSFETs from Allegro Microsystems. The integrated field-oriented control (FOC) algorithm achieves the best efficiency and dynamic response and minimizes acoustic noise. Also, Allegro's proprietary non-reverse startup algorithm improves startup performance. The BLDC motor, connected to the terminals labeled U, V, and W, will start towards the target direction after power-up without reverse shaking or vibration. The Soft-On Soft-Off (SOSO) feature gradually increases the current to the motor at the ON command (windmill condition). It gradually reduces the current from the motor at the OFF command, further reducing the acoustic noise and operating the motor smoothly. This Click board™ allows interface selection to communicate with MCU. The selection between PWM and I2C interface can be
made by positioning SMD jumpers labeled as COMM SEL in an appropriate position. Note that all the jumpers' positions must be on the same side, or the Click board™ may become unresponsive. While the I2C interface is selected, setting motor-rated voltage, rated current, rated speed, resistance, and startup profiles are allowed via the EEPROM programmability. On the other side, the motor speed is controlled by applying a duty cycle command to the PWM input pin of the AMT49400. Alongside the PWM pin from the mikroBUS™ socket, this Click board™ also has the Enable pin labeled as EN and routed to the CS pin of the mikroBUS™ socket to optimize power consumption used for power ON/OFF purposes. The FG pin routed on the default INT pin of the mikroBUS™ socket provides motor speed information to the system, such as motor lock detection.
This feature monitors the motor position to determine if the motor is running as expected. If a lock condition is detected, the motor drive will be disabled for 5 seconds before an attempted auto-restart. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VIO SEL jumper. It allows both 3.3V and 5V capable MCUs to use the communication lines properly. Additionally, there is a possibility for the AMT49400 power supply selection via jumper labeled as VBB SEL to supply the AMT49400 from an external power supply terminal in the range from 4V to 16V or with 5V from mikroBUS™ power rail. 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.

Features overview
Development board
PIC18F57Q43 Curiosity Nano evaluation kit is a cutting-edge hardware platform designed to evaluate microcontrollers within the PIC18-Q43 family. Central to its design is the inclusion of the powerful PIC18F57Q43 microcontroller (MCU), offering advanced functionalities and robust performance. Key features of this evaluation kit include a yellow user LED and a responsive
mechanical user switch, providing seamless interaction and testing. The provision for a 32.768kHz crystal footprint ensures precision timing capabilities. With an onboard debugger boasting a green power and status LED, programming and debugging become intuitive and efficient. Further enhancing its utility is the Virtual serial port (CDC) and a debug GPIO channel (DGI
GPIO), offering extensive connectivity options. Powered via USB, this kit boasts an adjustable target voltage feature facilitated by the MIC5353 LDO regulator, ensuring stable operation with an output voltage ranging from 1.8V to 5.1V, with a maximum output current of 500mA, subject to ambient temperature and voltage constraints.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
48
RAM (Bytes)
8196
You complete me!
Accessories
Curiosity Nano Base for Click boards is a versatile hardware extension platform created to streamline the integration between Curiosity Nano kits and extension boards, tailored explicitly for the mikroBUS™-standardized Click boards and Xplained Pro extension boards. This innovative base board (shield) offers seamless connectivity and expansion possibilities, simplifying experimentation and development. Key features include USB power compatibility from the Curiosity Nano kit, alongside an alternative external power input option for enhanced flexibility. The onboard Li-Ion/LiPo charger and management circuit ensure smooth operation for battery-powered applications, simplifying usage and management. Moreover, the base incorporates a fixed 3.3V PSU dedicated to target and mikroBUS™ power rails, alongside a fixed 5.0V boost converter catering to 5V power rails of mikroBUS™ sockets, providing stable power delivery for various connected devices.
2207V-2500kV BLDC Motor is an outrunner brushless DC motor with a kV rating of 2500 and an M5 shaft diameter. It is an excellent solution for fulfilling many functions initially performed by brushed DC motors or in RC drones, racing cars, and much more.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Brushless 21 Click driver.
Key functions:
brushless21_set_duty_cycleThis function sets the duty cycle in percentages ( Range[ 0..1 ] ).brushless21_get_motor_speedThis function reads the motor speed in Hz.brushless21_switch_directionThis function switches the motor direction by toggling the DIR bit.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief Brushless21 Click example
*
* # Description
* This example demonstrates the use of the Brushless 21 Click board by driving the
* motor at different speeds.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and performs the Click default configuration which sets the GPIO
* as a default communication and enables the PWM.
*
* ## Application Task
* Controls the motor speed by changing the PWM duty cycle once per second. The duty cycle ranges from 0% to 100%.
* When the Click board is configured in I2C mode the motor switches the direction at a minimal speed.
* Also, the chip internal temperature, VBB voltage and the motor speed readings are supported in I2C mode.
* Each step will be logged on the USB UART where you can track the program flow.
*
* @author Stefan Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "brushless21.h"
static brushless21_t brushless21;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
brushless21_cfg_t brushless21_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
brushless21_cfg_setup( &brushless21_cfg );
BRUSHLESS21_MAP_MIKROBUS( brushless21_cfg, MIKROBUS_1 );
err_t init_flag = brushless21_init( &brushless21, &brushless21_cfg );
if ( ( PWM_ERROR == init_flag ) || ( I2C_MASTER_ERROR == init_flag ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( BRUSHLESS21_ERROR == brushless21_default_cfg ( &brushless21 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
static int8_t duty_cnt = 1;
static int8_t duty_inc = 1;
float duty = duty_cnt / 10.0;
if ( BRUSHLESS21_OK == brushless21_set_duty_cycle ( &brushless21, duty ) )
{
log_printf( &logger, "\r\n Duty Cycle : %d%%\r\n", ( uint16_t )( duty_cnt * 10 ) );
}
if ( BRUSHLESS21_DRV_SEL_I2C == brushless21.drv_sel )
{
int8_t temperature = 0;
float motor_speed = 0;
float vbb_voltage = 0;
if ( BRUSHLESS21_OK == brushless21_get_temperature ( &brushless21, &temperature ) )
{
log_printf( &logger, " Temperature: %d C\r\n", ( int16_t ) temperature );
}
if ( BRUSHLESS21_OK == brushless21_get_motor_speed ( &brushless21, &motor_speed ) )
{
log_printf( &logger, " Motor Speed: %.2f Hz\r\n", motor_speed );
}
if ( BRUSHLESS21_OK == brushless21_get_vbb_voltage ( &brushless21, &vbb_voltage ) )
{
log_printf( &logger, " VBB Voltage: %.2f V\r\n", vbb_voltage );
}
if ( 0 == duty_cnt )
{
duty_inc = 1;
if ( BRUSHLESS21_OK == brushless21_switch_direction ( &brushless21 ) )
{
log_printf( &logger, " Switch direction\r\n" );
}
}
}
if ( 10 == duty_cnt )
{
duty_inc = -1;
}
else if ( 0 == duty_cnt )
{
duty_inc = 1;
}
duty_cnt += duty_inc;
Delay_ms ( 1000 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:Brushless



































