Experience the difference. Add brushed motor control and witness the transformation in your projects, amplifying their speed, precision, and overall potential!
A
A
Hardware Overview
How does it work?
DC Motor 17 Click is based on the TC78H660FTG, a dual H Bridge driver for one or two DC brushed motors incorporating a DMOS output transistor with low on-resistance from Toshiba Semiconductor. This driver is a PWM-controlled constant-current drive with supply voltages from 2.5 to 16V and 2A maximum output current. It features a built-in dual H-bridge, sense-resistor less current control architecture (advanced current detection system), and a VCC regulator for the internal circuit. Besides, it offers thermal shutdown, overcurrent detection, Undervoltage lockout error detections (with error detection flag function), and several selectable operational modes (Forward, Reverse, Stop, and Brake) controlled by four GPIO pins routed on the RST, AN, PWM, and INT pins of the mikroBUS™ socket. The TC78H660FTG possesses two operational modes, IN Input Mode and PHASE Input Mode, whose selection can be achieved via headers Control Mode pin labeled as MODE. PHASE Mode represents the default mode of this Click board™, and the Control Mode is set up by the input state of the MODE pin after releasing the SBY pin. This way, the MODE pin is used as the Enable signal
while the direction selection is realized via GPIO pins routed on the mikroBUS™ socket. The pin labeled as ERR represents the Error Detection Flag. When TC78H660FTG detects some errors, the ERR pin outputs a low level to the peripheral block. In Normal status, since the internal MOSFET is OFF, the logic level of the ERR pin is equal to the MODE control voltage from outside. When some event like thermal shutdown or overcurrent occurs, the ERR pin will become low (the internal MOSFET is ON). When the error detection is released by reasserting the external power supply or setting the device to Standby Mode, ERR pins show Normal Status. In the case of constant current control, the rate of Mixed Decay Mode, which determines the current ripple, is fixed at 37.5%. Peak current can be set by the voltage value of the VREF pin obtained by the MAX6100, a low-cost, low-dropout, micropower voltage reference IC from Analog Devices. This series-mode voltage reference draws only 90μA of supply current and can source 5mA and sink 2mA of load current. The current threshold point for the VREF pin of the TC78H660FTG, alongside MAX6100, can be set manually using an onboard trimmer labeled VR1.
As mentioned in the product description, DC Motor 17 Click communicates with MCU using several GPIO pins. Also, this Click board™ has a Standby pin labeled as SBY routed to the CS pin of the mikroBUS™ socket used to switch to Standby mode by toggling the pin. When the SBY pin is low, TC78H660FTG stops supplying the power to the logic circuit. The difference in DC Motor modes between IN and PHASE Input Modes needs to be especially emphasized. In addition to motor modes such as Forward, Reverse, Stop, and Standby, only IN Input Mode has another additional, Short Brake Mode. More information on the Motor Mode Selection can be found in the attached datasheet. 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. Additionally, there is a possibility for motor-driver power supply selection via jumper labeled as VM SEL to supply TC78H660FTG from an external input terminal in the range from 2.5 to 16V or with voltage levels used from mikroBUS™ power supply pins.
Features overview
Development board
EasyAVR v7 is the seventh generation of AVR development boards specially designed for the needs of rapid development of embedded applications. It supports a wide range of 16-bit AVR microcontrollers from Microchip and has a broad set of unique functions, such as a powerful onboard mikroProg programmer and In-Circuit debugger over USB. The development board is well organized and designed so that the end-user has all the necessary elements in one place, such as switches, buttons, indicators, connectors, and others. With four different connectors for each port, EasyAVR v7 allows you to connect accessory boards, sensors, and custom electronics more
efficiently than ever. Each part of the EasyAVR v7 development board contains the components necessary for the most efficient operation of the same board. An integrated mikroProg, a fast USB 2.0 programmer with mikroICD hardware In-Circuit Debugger, offers many valuable programming/debugging options and seamless integration with the Mikroe software environment. Besides it also includes a clean and regulated power supply block for the development board. It can use a wide range of external power sources, including an external 12V power supply, 7-12V AC or 9-15V DC via DC connector/screw terminals, and a power source via the USB Type-B (USB-B)
connector. Communication options such as USB-UART and RS-232 are also included, alongside the well-established mikroBUS™ standard, three display options (7-segment, graphical, and character-based LCD), and several different DIP sockets which cover a wide range of 16-bit AVR MCUs. EasyAVR v7 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Architecture
AVR
MCU Memory (KB)
64
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
4096
You complete me!
Accessories
DC Gear Motor - 430RPM (3-6V) represents an all-in-one combination of a motor and gearbox, where the addition of gear leads to a reduction of motor speed while increasing the torque output. This gear motor has a spur gearbox, making it a highly reliable solution for applications with lower torque and speed requirements. The most critical parameters for gear motors are speed, torque, and efficiency, which are, in this case, 520RPM with no load and 430RPM at maximum efficiency, alongside a current of 60mA and a torque of 50g.cm. Rated for a 3-6V operational voltage range and clockwise/counterclockwise rotation direction, this motor represents an excellent solution for many functions initially performed by brushed DC motors in robotics, medical equipment, electric door locks, and much more.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for DC Motor 17 Click driver.
Key functions:
dcmotor17_stop
- DC Motor 17 stop motor functiondcmotor17_forward
- DC Motor 17 forward functiondcmotor17_reverse
- DC Motor 17 reverse function
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief DC Motor 17 Click Example.
*
* # Description
* The library covers all the necessary functions to control DC Motor 17 Click board.
* Library performs a standard GPIO interface communication.
* DC Motor 17 Click board is a dual H Bridge driver IC for one or two DC brushed
* motors which incorporates DMOS with low on-resistance in output transistors.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes GPIO driver, set default configuration and start to write log.
*
* ## Application Task
* This is an example that demonstrates the use of the DC Motor 17 click board.
* This example demonstrates the use of DC Motor 17 click,
* we first control motion A by driving it forward motion for 5 seconds,
* than applying short brakes it for 2 second, then driving it in reverse for 5 seconds
* and stop the motor for 2 seconds.
* In the second part of the example, we control motion B by the same principle.
* Results are being sent to the Usart Terminal where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "dcmotor17.h"
static dcmotor17_t dcmotor17; /**< DC Motor 17 Click driver object. */
static log_t logger; /**< Logger object. */
void application_init ( void ) {
log_cfg_t log_cfg; /**< Logger config object. */
dcmotor17_cfg_t dcmotor17_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " DC Motor 17 click \r\n" );
log_printf( &logger, "----------------------------\r\n" );
log_info( &logger, " Application Init " );
// Click initialization.
dcmotor17_cfg_setup( &dcmotor17_cfg );
DCMOTOR17_MAP_MIKROBUS( dcmotor17_cfg, MIKROBUS_1 );
if ( dcmotor17_init( &dcmotor17, &dcmotor17_cfg ) == DIGITAL_OUT_UNSUPPORTED_PIN ) {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
dcmotor17_default_cfg ( &dcmotor17 );
log_info( &logger, " Application Task " );
}
void application_task ( void ) {
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Motor A \r\n" );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Start the motor forward. \r\n" );
dcmotor17_forward( &dcmotor17, DCMOTOR17_SEL_OUT_A );
Delay_ms( 5000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Stop the motor. \r\n" );
dcmotor17_stop( &dcmotor17, DCMOTOR17_SEL_OUT_A );
Delay_ms( 2000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Start the motor reverse. \r\n" );
dcmotor17_reverse( &dcmotor17, DCMOTOR17_SEL_OUT_A );
Delay_ms( 5000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Stop the motor. \r\n" );
dcmotor17_stop( &dcmotor17, DCMOTOR17_SEL_OUT_A );
Delay_ms( 2000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Motor B \r\n" );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Start the motor forward. \r\n" );
dcmotor17_forward( &dcmotor17, DCMOTOR17_SEL_OUT_B );
Delay_ms( 5000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Stop the motor. \r\n" );
dcmotor17_stop( &dcmotor17, DCMOTOR17_SEL_OUT_B );
Delay_ms( 2000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Start the motor reverse. \r\n" );
dcmotor17_reverse( &dcmotor17, DCMOTOR17_SEL_OUT_B );
Delay_ms( 5000 );
log_printf( &logger, "----------------------------\r\n" );
log_printf( &logger, " Stop the motor. \r\n" );
dcmotor17_stop( &dcmotor17, DCMOTOR17_SEL_OUT_B );
Delay_ms( 2000 );
}
void main ( void ) {
application_init( );
for ( ; ; ) {
application_task( );
}
}
// ------------------------------------------------------------------------ END