How does it work?
DC Motor 25 Click is based on the A3908, a fully integrated low-voltage motor driver for DC motors from Allegro Microsystems. This Click board™ provides all the input and output capabilities necessary to drive DC motors (OUT terminal), alongside monitor diagnostic functions. The A3908 is rated for an operating voltage range compatible with both mikroBUS™ power rails and output currents up to 500mA, programmable via an external I2C-configurable digital potentiometer, the AD5171 from Analog Devices. The A3908 also has complete protection capabilities like thermal shutdown, undervoltage lockout, and crossover current (shoot-through) protection, allowing robust and reliable operation.
Logic pins labeled IN1 and IN2, routed on the default positions of RST and PWM pins of the mikroBUS socket, are provided to control the motor direction of rotation, brake, and standby modes. When both pins are in a high logic state, the A3908 goes into high-side brake mode, which turns on both source drivers. There is no protection during braking, so care must be taken to ensure that the peak current does not exceed the absolute maximum current.
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 robotic actuators and pumps, battery-powered toys and games, low-noise instrumentation systems, and more
On-board modules
A3908 – bidirectional DC motor driver from Allegro Microsystems
Key Features
Adjustable output current up to 500mA, driver control via logic pins, additional operational modes, internal protection, wide operating voltage range, low power consumption, and more
Interface
GPIO,I2C
Feature
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 25 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 | Power Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
DC Motor 25 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Output Current | – | – | 500 | mA |
Software Support
We provide a library for the DC Motor 25 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 25 Click driver.
Key functions
-
dcmotor25_forward
DC Motor 25 set forward mode function. -
dcmotor25_reverse
DC Motor 25 set reverse mode function. -
dcmotor25_brake
DC Motor 25 set brake mode function.
Example Description
This example demonstrates the use of DC Motor 25 Click board™ by driving the DC motor in both directions every 3 seconds.
void application_task ( void )
{
log_printf ( &logger, " Forwardrn" );
dcmotor25_forward( &dcmotor25 );
Delay_ms ( 3000 );
log_printf ( &logger, " Brakern" );
dcmotor25_brake( &dcmotor25 );
Delay_ms ( 3000 );
log_printf ( &logger, " Reversern" );
dcmotor25_reverse( &dcmotor25 );
Delay_ms ( 3000 );
log_printf ( &logger, " Brakern" );
dcmotor25_brake( &dcmotor25 );
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.DCMotor25
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.