How does it work?
H-Bridge 16 Click is based on the DRV8262, a dual H-Bridge motor driver from Texas Instruments. It has a high output current capability and supports up to 8A peak current as a dual H-Bridge driver. You can configure the interface of operation between PH/EN and PWM. The PH/EN mode allows the H-Bridge to be controlled with a speed and direction type of interface. The PWM interface allows the H-Bridge outputs to become Hi-Z. There are two potentiometers (REF2 and REF1), which are reference voltage inputs for bridges 2 and 1. They are used to set the current limit for bridges. The integrated sensing uses a current mirror to limit the output current.
The H-Bridge 16 Click uses the PCA9538A, a low-voltage 8-bit I/O port to control the IO pins of the motor driver. Over this I/PO port, you can set all four PWM inputs for both bridges. The Decay mode can be set between the slow decay for brake or high-side re-circulation and smart tune dynamic Decay mode. By setting the logic states on Mode2 of the motor driver, you can choose between the phase/enable and PWM interfaces. You can also determine the fault recovery method between the latch-off and auto-recovery. Finally, using the PCA9538A, you can monitor the fault indication of the motor driver.
H-Bridge 16 Click uses a standard 2-wire I2C interface of the PCA9538A to allow the host MCU to control the motor driver. You can reset the PCA9538A over the RST pin and read the interrupts of the motor driver through the I/O port over the INT pin. The I2C address can be selected over the ADDR SEL jumper. The host MCU can control the sleep mode of the motor driver directly over the SLP pin.
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. Also, this 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 the development of factory automation, medical equipment, robotics, TEC drivers, and more
On-board modules
DRV8262 – dual H-Bridge motor driver from Texas Instruments
Key Features
A dual H-Bridge motor driver, can drive one or two brushed DC motors, one stepper motor, and one or two thermoelectric coolers (TEC), high output current capability, programmable interface of operation, integrated current sense and regulation, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V,External
Pinout diagram
This table shows how the pinout on H-Bridge 16 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 |
JP3-JP4 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
VR1 | REF1 | – | Reference Voltage 1 potentiometer |
VR2 | REF2 | – | Reference Voltage 2 Potentiometer |
H-Bridge 16 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Power Supply | 4.5 | – | 65 | V |
Output Current Peak | – | – | 8 | A |
Software Support
We provide a library for the H-Bridge 16 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 H-Bridge 16 Click driver.
Key functions
-
hbridge16_set_pins
H-Bridge 16 set pins function. -
hbridge16_set_mode
H-Bridge 16 set mode function. -
hbridge16_set_out_state
H-Bridge 16 set output function.
Example Description
This example demonstrates the use of the H-Bridge 16 click board™ by driving the motor in both directions with braking and freewheeling.
void application_task ( void )
{
log_printf( &logger, " Motor in forward mode. rn" );
hbridge16_set_out_state( &hbridge16, HBRIDGE16_DRIVE_MOTOR_FORWARD );
Delay_ms( 5000 );
log_printf( &logger, " Motor brake is on rn" );
hbridge16_set_out_state( &hbridge16, HBRIDGE16_DRIVE_MOTOR_BRAKE );
Delay_ms( 2000 );
log_printf( &logger, " Motor in reverse mode. rn" );
hbridge16_set_out_state( &hbridge16, HBRIDGE16_DRIVE_MOTOR_REVERSE );
Delay_ms( 5000 );
log_printf( &logger, " Motor is coasting rn" );
hbridge16_set_out_state( &hbridge16, HBRIDGE16_DRIVE_MOTOR_FREEWHEEL );
Delay_ms( 2000 );
}
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.HBridge16
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. 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.