How does it work?
DC Motor 13 Click is based on the TB67H481FNG, a dual-channel, H-bridge, brushed DC motor driver from Toshiba Semiconductor. The TB67H481FNG has a current limit function that monitors the current flowing in the motor and performs constant current PWM control. When the motor current reaches the set current value, determined using onboard VREF trimmers (VREFA and VREFB), the TB67H481FNG shifts to Decay mode and annotates the current. Various Decay mode functions are selectable by positioning the SMD jumper, labeled as DECAY, to an appropriate position marked as 0 and 1. Also, Mixed Decay Mode can be selected by removing the JP2 jumper for the board. The TB67H481FNG has a built-in regulator that allows the motor to be driven by a single power supply, provides a motor output voltage rating of around 40V, and has integrated protection mechanisms such as over-current, over-temperature, and under-voltage lockout for error detection.
The setting current value can be adjusted with the torque function (100%, 71%, 38%, or 0%), controlled through the PCA9538A port expander, which establishes communication with the MCU via the I2C serial interface. When high torque is not needed, lowering the torque setting can suppress the motor current. In addition to these torque setting pins, with the help of the expander, it is also possible to control some other signals, such as the control signals for selecting the operating mode of the motor driver. These pins, in combination with AI1 and BI1 pins, routed to default positions of CS and PWM pins of the mikroBUS™ socket, enable operational modes like CW, CCW, or short-brake.
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. Besides, all circuits can be stopped using the Sleep function, routed to default positions of the AN pin of the mikroBUS™ socket, and thus enable power saving mode, while the RST pin provides a general-purpose reset function.
The DC Motor 13 Click supports an external power supply for the TB67H481FNG, which can be connected to the input terminal labeled as VM and should be within the range of 8.2V to 44V, while the two brushed or one stepping motor coils can be connected to the terminals labeled as B+, B-, A-, and A+.
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 driving two brushed or one stepping motors in various applications such as consumer electronics and industrial equipment
On-board modules
TB67H481FNG – dual-channel, H-bridge, brushed DC motor driver from Toshiba Semiconductor
Key Features
Low power consumption, BiCD-based structure, high breakdown voltage/large current, power saving function, various protection features, selectable decay mode, error detection function, and more
Interface
GPIO,I2C
Feature
No 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 13 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 | DECAY | Left | Decay Mode Selection 1/0 , Left position 1, Right position 0 |
JP3-JP4 | ADDR SEL | Left | I2C Address Selection 1/0 , Left position 1, Right position 0 |
VREFA | VREFA | – | Motor A Current Threshold Trimmer |
VREFB | VREFB | – | Motor B Current Threshold Trimmer |
DC Motor 13 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Supply Voltage VM | 8.2 | 24 | 44 | V |
Maximum Output Voltage | – | – | 50 | V |
Maximum Output Current | – | – | 2 | A |
Software Support
We provide a library for the DC Motor 13 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 13 Click driver.
Key functions
-
dcmotor13_set_outa_mode
This function sets the OUTA mode. -
dcmotor13_set_outb_mode
This function sets the OUTB mode. -
dcmotor13_set_outa_torque
This function sets the OUTA torque.
Example Description
This example demonstrates the use of DC Motor 13 Click board™ by driving the motors in both direction in the span of 9 seconds.
void application_task ( void )
{
if ( DCMOTOR13_OK == dcmotor13_set_outa_mode ( &dcmotor13, DCMOTOR13_MODE_CW ) )
{
log_printf ( &logger, " OUTA: Clockwisern" );
}
if ( DCMOTOR13_OK == dcmotor13_set_outb_mode ( &dcmotor13, DCMOTOR13_MODE_CW ) )
{
log_printf ( &logger, " OUTB: Clockwisernn" );
}
Delay_ms ( 3000 );
if ( DCMOTOR13_OK == dcmotor13_set_outa_mode ( &dcmotor13, DCMOTOR13_MODE_CCW ) )
{
log_printf ( &logger, " OUTA: Counter-Clockwisern" );
}
if ( DCMOTOR13_OK == dcmotor13_set_outb_mode ( &dcmotor13, DCMOTOR13_MODE_CCW ) )
{
log_printf ( &logger, " OUTB: Counter-Clockwisernn" );
}
Delay_ms ( 3000 );
if ( DCMOTOR13_OK == dcmotor13_set_outa_mode ( &dcmotor13, DCMOTOR13_MODE_SHORT_BRAKE ) )
{
log_printf ( &logger, " OUTA: Short brakern" );
}
if ( DCMOTOR13_OK == dcmotor13_set_outb_mode ( &dcmotor13, DCMOTOR13_MODE_SHORT_BRAKE ) )
{
log_printf ( &logger, " OUTB: Short brakernn" );
}
Delay_ms ( 3000 );
}
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.DCMotor13
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.