DC Motor 15 Click Board
DC Motor 15 Click Board
The DC Motor 15 Click Board™ is a compact add-on board that contains a motor driver with current sense and regulation. This board features the DRV8874, an integrated motor driver with N-channel H-bridge, charge pump, current sensing, and adjustment from Texas Instruments. The current sensing and regulation feature eliminates the need for a large power shunt resistor, saving board area, and reducing system cost. The current-sense output allows an MCU to detect motor stalls or changes in load conditions. The DRV8874 can also regulate the motor current during Start-Up and high-load events without interaction from MCU. This Click Board™ is suitable for a brushed DC and servo motor and actuator drive, home appliances, handheld power tools, and many more.
The DC Motor 15 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.
Software Support
We provide a library for the DC Motor 15 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the DC Motor 15 Click Board™. The DC Motor 15 Click Board™ communicates with the target board through the RST, CS, PWM and INT pins on mikroBUS™. This library offers functions for setting or clearing of RST, CS and PWM pins, and check the state of the INT pin, also user can use functions that drive motor forward and in reverse or apply brake functions.
Key Functions
void dcmotor15_forward ( );
- Function is used to drive the motor forward.void dcmotor15_reverse ( );
- Function is used to drive the motor in reverse.void dcmotor15_brake ( );
- Function is used to brake the motor.
Example Description
The application is composed of three sections :
- System Initialization - Initializes LOG structure and sets RST, CS and PWM pins as output, and INT pin as input.
- Application Initialization - Initializes GPIO driver, powers up the device and starts log.
- Application Task - This example demonstrates the use of the DC Motor 15 Click Board™ by driving the connected motor forward for 5 seconds, than braking for 2 second, and driving it in reverse for 5 more seconds, braking again for 2 second afterwards.
void application_task ( ) { mikrobus_logWrite( "The motor turns forward!", _LOG_LINE ); dcmotor15_forward( ); Delay_ms( 5000 ); mikrobus_logWrite( "The motor brakes!", _LOG_LINE ); dcmotor15_brake( ); Delay_ms( 2000 ); mikrobus_logWrite( "The motor turns in reverse!", _LOG_LINE ); dcmotor15_reverse( ); Delay_ms( 5000 ); mikrobus_logWrite( "The motor brakes!", _LOG_LINE ); dcmotor15_brake( ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
Additional Notes and Information
Depending on the development board you are using, you may need a 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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The DC Motor 15 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.
DC Motor 15 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.