How does it work?
DC Motor 26 Click, as its foundation, uses the TB9053FTG, a dual-channel H-bridge, brushed DC motor driver from Toshiba Semiconductor. It comes with an enhanced package for an extra high thermal performance. The TB9053FTG allows a dual configuration with two motors with 5A current ratings per channel or one 10A channel drive in a Parallel mode of operation. It is also rated for an operating voltage range from 4.5V to 28V, with the motor controlled directly through a PWM signal (CLK) from the mikroBUS™ socket or SPI serial interface. The PWM control with low on-resistance enables highly efficient motor drive output, ensuring reliable operation for highly competitive automotive applications.
Besides the SPI communication, several GPIO pins connected to the mikroBUS™ socket pins are also used to control the TB9053FTG associated with the PCA9538A I2C-configurable port expander, such as Sleep Mode pin and DC motor channels current monitor routed to the SLP and CM pins (default positions of RST and AN pins) of the mikroBUS™ socket. The PCA9538A also allows choosing the least significant bit (LSB) of its I2C slave address by positioning SMD jumpers labeled as ADDR SEL to an appropriate position marked as 0 and 1, alongside its interrupt feature routed to the INT pin of the mikroBUS™ socket.
As mentioned, this Click board™ supports double or single DC motor configuration. The corresponding switches on the board marked with SW1-SW4 are used to select the motor control and operational modes. The first two represent the switches for motor control selection, more precisely, the choice of control directly by the PWM signal or through the SPI interface, while the second two represent the selection of the motor operational mode. There are four possible modes, i.e., Small Mode (two separated channels), Large Mode (two channels are connected and support one DC motor), Half Mode, and Prohibited Mode, where the channels are completely disabled.
In addition, the control and PWM signals can also be brought externally via the onboard header J1. In that case, the PWM1 and PWM2 pins specify forward, reverse, or brake modes for motor 1, and the PWM3 and PWM4 pins specify these modes for motor 2. The enable EN pins select the drive or stop mode for the motor. A broad range of configuration options for this driver, control, and mode selections can be found in the attached datasheet. This Click board™ also has additional LEDs for anomaly indication. Suppose a state such as an overtemperature or overcurrent/under voltage is detected. In that case, such anomaly is indicated by red LEDs marked as DIAG1 and DIAG2 associated with the interrupt pin.
The DC Motor 26 supports an external power supply for the TB9053FTG, which can be connected to the input terminal labeled as VM and should be within the range of 4.5V to 28V, while the DC motor coils can be connected to the terminals labeled from OUT1 up to OUT4.
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. 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
Brushed
Applications
Can be used for automotive applications (AEC-Q100 Grade 1 qualified), such as control of the throttle valve, engine valves, retractable door mirrors, and seat heater
On-board modules
TB9053FTG – thermal enhanced QFN package brushed DC motor driver from Toshiba Semiconductor
Key Features
Driver for one or two DC motors, direct PWM control or through SPI interface, selectable motor control functions and operational modes, Sleep mode and current monitoring, full protection and diagnostics, and more
Interface
I2C,PWM,SPI
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 DC Motor 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 |
LD2-LD3 | DIAG1-DIAG2 | – | Diagnostic LED Indicators |
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 |
SW1-SW2 | SW1-SW2 | Default | Motor Control Selection |
SW3-SW4 | SW3-SW4 | Default | Mode Selection |
J1 | J1 | Unpopulated | External PWM/Control Signals Header |
DC Motor 26 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Supply Voltage | 4.5 | – | 28 | V |
Output Current | 5 | 6.5 | 10 | A |
Software Support
We provide a library for the DC Motor 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 DC Motor 26 Click driver.
Key functions
-
dcmotor26_get_motor_current
DC Motor 26 get motor current function. -
dcmotor26_set_ch1_operation_mode
DC Motor 26 set ch1 operation mode function. -
dcmotor26_set_cm_sel_pin
DC Motor 26 set cm sel pin function.
Example Description
This example demonstrates the use of DC Motor 26 Click board™ by controlling the speed of DC motor over PWM duty cycle as well as displaying the motor current consumption.
void application_task ( void )
{
if ( DCMOTOR26_OK == dcmotor26_set_ch1_operation_mode ( &dcmotor26, DCMOTOR26_MODE_OUTPUT_OFF ) )
{
log_printf ( &logger, " MODE: OFFrn" );
Delay_ms ( 3000 );
}
if ( DCMOTOR26_OK == dcmotor26_set_ch1_operation_mode ( &dcmotor26, DCMOTOR26_MODE_FORWARD ) )
{
dcmotor26_set_cm_sel_pin ( &dcmotor26, DCMOTOR26_PIN_LOW_LEVEL );
for ( uint16_t duty = 0; duty <= DCMOTOR26_CONFIG56_DUTY_PERIOD_MAX; duty += 100 )
{
float current;
log_printf ( &logger, " MODE: FORWARDrn" );
if ( DCMOTOR26_OK == dcmotor26_set_ch1_duty_period ( &dcmotor26, duty ) )
{
log_printf ( &logger, " Duty: %urn", duty );
}
if ( DCMOTOR26_OK == dcmotor26_get_motor_current ( &dcmotor26, ¤t ) )
{
log_printf ( &logger, " Current: %.3f Arnn", current );
}
Delay_ms ( 500 );
}
}
if ( DCMOTOR26_OK == dcmotor26_set_ch1_operation_mode ( &dcmotor26, DCMOTOR26_MODE_BRAKE ) )
{
log_printf ( &logger, " MODE: BRAKErn" );
Delay_ms ( 3000 );
}
if ( DCMOTOR26_OK == dcmotor26_set_ch1_operation_mode ( &dcmotor26, DCMOTOR26_MODE_REVERSE ) )
{
dcmotor26_set_cm_sel_pin ( &dcmotor26, DCMOTOR26_PIN_HIGH_LEVEL );
for ( uint16_t duty = 0; duty <= DCMOTOR26_CONFIG56_DUTY_PERIOD_MAX; duty += 100 )
{
float current;
log_printf ( &logger, " MODE: REVERSErn" );
if ( DCMOTOR26_OK == dcmotor26_set_ch1_duty_period ( &dcmotor26, duty ) )
{
log_printf ( &logger, " Duty: %urn", duty );
}
if ( DCMOTOR26_OK == dcmotor26_get_motor_current ( &dcmotor26, ¤t ) )
{
log_printf ( &logger, " Current: %.3f Arnn", current );
}
Delay_ms ( 500 );
}
}
}
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.DCMotor26
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, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.