How does it work?
DC Motor 21 Click as its foundation uses the A3910, a dual half-bridge motor driver designed for low voltage power applications from Allegro Microsystems. This Click board™ is controlled via several GPIO pins of the mikroBUS™ socket and has a wide operating voltage range with an output current capacity of 500mA maximum. The integrated MOSFETs, which configures a half-bridge circuit inside the A3910, provide the possibility to drive dual DC motors but also allow to be used in the full-bridge configuration to drive a single bidirectional DC motor. Thanks to its plane features and benefits, this Click board™ is targeted at the consumer market with end applications to low voltage equipment.
Using an integrated MOS switch improves braking action for the motor, compared to implementation with a simple clamp diode. Besides, it also features built-in protection such as crossover current and thermal shutdown protection, alongside “Sleep” Standby mode with zero drain-current.
As mentioned in the product description, DC Motor 21 Click communicates with MCU using several GPIO pins. To turn ON the internal MOSFETs of the A3910, they need to be switched by the logic level, which is input to the control input pins: HN1, LN1, HN2, and LN2 pins routed to the AN, CS, PWM, and INT pins of the mikroBUS™ socket. Thereby, the Drive/Break/Coast/Sleep motor functions can be selected according to the state of its input control signals.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use 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 DC brushed motors and targeted at the consumer and industrial market with end applications to low voltage equipment
On-board modules
A3910 – dual half-bridge motor driver designed for low voltage power applications from Allegro Microsystems
Key Features
Low power consumption, full- and half-bridge configuration, low rds, Standby mode with zero drain-current, crossover and thermal shutdown protection, and more
Interface
GPIO
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on DC Motor 21 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 |
DC Motor 21 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Maximum Output Current | – | – | 500 | mA |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the DC Motor 21 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 21 Click driver.
Key functions
-
dcmotor21_set_out_1
This function sets the state of output 1. -
dcmotor21_set_out_2
This function sets the state of output 2.
Example Description
This example demonstrates the use of DC Motor 21 Click board™.
void application_task ( void )
{
dcmotor21_set_out_1 ( &dcmotor21, DCMOTOR21_OUT_LOW );
dcmotor21_set_out_2 ( &dcmotor21, DCMOTOR21_OUT_HIGH );
log_printf( &logger, " rn Driving the motor...rn" );
Delay_ms( 2000 );
dcmotor21_set_out_1 ( &dcmotor21, DCMOTOR21_OUT_HIGH );
dcmotor21_set_out_2 ( &dcmotor21, DCMOTOR21_OUT_LOW );
log_printf( &logger, " Switch direction.rn" );
Delay_ms( 2000 );
dcmotor21_set_out_1 ( &dcmotor21, DCMOTOR21_OUT_HIGH_Z );
dcmotor21_set_out_2 ( &dcmotor21, DCMOTOR21_OUT_HIGH_Z );
log_printf( &logger, " The motor is disconnected.rn" );
Delay_ms( 2000 );
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.DCMotor21
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.
mikroSDK
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.