OFF
MIKROE-5189
23 g
Status:
DC Motor 22 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TMC7300, a low voltage driver for one or two DC motors from Analog Devices. The TMC7300 is rated for an operating voltage range from 2V to 11V and operates up to two DC motors via simple UART control for direction, velocity, and torque. It also has a complete set of diagnostic and protection capabilities that supports robust and reliable operation, like short to ground protection, short to power supply protection and undervoltage detection. This Click board™ is suitable for driving DC brushed motors and targeted at the consumer and industrial market with end applications to low voltage equipment with up to 2A (2.4A) current per motor.
DC Motor 22 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
DC Motor 22 Click as its foundation uses the TMC7300, a low voltage driver optimized for DC motor control from Analog Devices. The TMC7300 features high power density using integrated power MOSFETs and a complete integrated DC motor control logic for speed control, torque limits, and torque-controlled operation. It is rated for an operating voltage range from 2V to 11V and covers a broad spectrum of embedded applications with up to 2A (2.4A peak) current per motor terminal. This advanced driver ensures efficient and reliable operation for cost-effective and highly competitive solutions.
As mentioned before, the TMC7300 operates via simple UART control, with the default baud rate of 115200bps for the data transfer, which allows the operation of two DC motors or a single motor with a double current. The motor is operated by an internal PWM generator, where the desired duty cycle is programmed via the UART interface. The PWM acts like a dedicated voltage source for the motor, providing complete control over motor velocity and direction by setting the PWM voltage for each motor. This interface also controls the motor torque limit for both motors by setting a common current limit, allowing overloading to be avoided during acceleration safely or when a motor is blocked.
There is an addition to this Click board™'s current sensing capability for channels A and B. Based on the populated sense resistors R4 and R5 and the MAX11645 analog-to-digital converter, the user can obtain information on the current value of the channels, processing this information via the I2C interface. In addition, it also uses several mikroBUS™ pins. The Enable feature through the EN pin routed to the PWM pin of the mikroBUS™ socket offers a switch operation to turn ON/OFF power delivery to the connected load, while the A0 and A1 pins routed to the AN and CS pins of the mikroBUS™ socket are used to select the UART interface address.
It also has a complete set of diagnostic and protection capabilities that supports robust and reliable operation, like short to ground protection, short to power supply protection, and undervoltage detection reported through the INT pin of the mikroBUS™ socket.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO 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 that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
Type
Brushed
Applications
Can be used for driving DC brushed motors and targeted at the consumer and industrial market with end applications to low voltage equipment
On-board modules
TMC7300 - low voltage driver optimized for DC motor control from Analog Devices
Key Features
Driver for one or two DC motors, UART based control over motor velocity and direction by setting PWM voltage for each motor, control motor torque limit for both motors, full protection and diagnostics, and more
Interface
I2C,UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on DC Motor 22 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
External Supply Voltage Range | 2 | - | 11 | V |
Maximum Output Current | - | - | 2 | A |
Operating Temperature Range | -40 | +25 | +120 | °C |
We provide a library for the DC Motor 22 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 DC Motor 22 Click driver.
Key functions
dcmotor22_set_motor_pwm
This function sets the PWM duty cycle of the selected motor.
dcmotor22_get_motor_current
This function reads the current consumption of the selected motor.
dcmotor22_reset_device
This function resets the device by toggling the EN pin state.
Example Description
This example demonstrates the use of DC Motor 22 Click board™ by controlling the speed of both motors over PWM duty cycle as well as displaying the motors current consumption.
void application_task ( void )
{
static int16_t pwm_duty = 0;
static int8_t pwm_duty_step = 50;
float current;
log_printf ( &logger, " Motor Arn" );
if ( DCMOTOR22_OK == dcmotor22_set_motor_pwm ( &dcmotor22, DCMOTOR22_MOTOR_A, pwm_duty ) )
{
log_printf ( &logger, " PWM duty: %drn", pwm_duty );
}
Delay_ms ( 2000 );
if ( DCMOTOR22_OK == dcmotor22_get_motor_current ( &dcmotor22, DCMOTOR22_MOTOR_A, ¤t ) )
{
log_printf ( &logger, " Current: %.3f Arnn", current );
}
Delay_ms ( 500 );
log_printf ( &logger, " Motor Brn" );
if ( DCMOTOR22_OK == dcmotor22_set_motor_pwm ( &dcmotor22, DCMOTOR22_MOTOR_B, pwm_duty ) )
{
log_printf ( &logger, " PWM duty: %drn", pwm_duty );
}
Delay_ms ( 2000 );
if ( DCMOTOR22_OK == dcmotor22_get_motor_current ( &dcmotor22, DCMOTOR22_MOTOR_B, ¤t ) )
{
log_printf ( &logger, " Current: %.3f Arnn", current );
}
Delay_ms ( 500 );
if ( ( ( pwm_duty + pwm_duty_step ) > DCMOTOR22_MAX_PWM ) || ( ( pwm_duty + pwm_duty_step ) < DCMOTOR22_MIN_PWM ) )
{
pwm_duty_step = -pwm_duty_step;
}
pwm_duty += pwm_duty_step;
}
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:
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.
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.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.