dcmotor22 2.0.0.0
|
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 TRINAMIC Motion Control. 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.
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.
This library contains API for DC Motor 22 Click driver.
dcmotor22_cfg_setup
Config Object Initialization function. dcmotor22_init
Initialization function. dcmotor22_default_cfg
Click Default Configuration function. 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. 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.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Controls the motor speed by changing the PWM duty cycle every 5 seconds, and displays
the motors current consumption. The duty cycle ranges from -100% to +100%. Each step will be logged on the USB UART where you can track the program flow.
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.