How does it work?
H Bridge 12 Click is based on the DRV8823, a four-bridge serial interface motor driver from Texas Instruments. Internally, the motor driver consists of four NMOS H-Bridges, a micro-stepping indexer, and various fault-protecting features. The motor driver is fully protected against overcurrent, overtemperature, undervoltage, and comes in a thermally-enhanced package. It can control motors that operate in an 8V to 32V voltage range, with up to 1.5A of current per winding. For this, it uses an internal charge pump for the gate drives. Eight current levels set through the serial interface allow micro-stepping with bipolar stepper motors.
H Bridge 12 Click uses a simple 3-Wire SPI serial interface to communicate with the host MCU. In addition, this Click board™ uses some other pins from the mikroBUS™ socket, such as the RST pin for the device reset. The motor driver outputs can be disabled with the STB’s pin LOW logic state while resetting the serial interface. Another neat feature is sleep, which can be activated with logic LOW on the SLP pin of the mikroBUS™ socket. There are two precision potentiometers labeled VREFA and VREFC. The VREFA supplies the referent voltage for setting the current trip threshold for bridges A and B, while the VREFC supplies the referent voltage for setting the current trip threshold for bridges C and D.
H Bridge 12 Click comes with screw terminals for connecting an external motor power supply, labeled with ground and VM. The motors can be connected to 8 terminals appropriately labeled for every single motor output channel. The motor driver supports Brushed DC, Brushless DC, and Stepper motors.
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 the development of printers, scanners, office automation, factory automation, and more
On-board modules
DRV8823 – a 4-bridge serial interface motor driver from Texas Instruments
Key Features
Four half-bridges for broad operating supply voltage range, up to 1.5A of current per winding, protection features, additional current-set threshold potentiometers, low power consumption, internal charge pump for gate drivers, and more
Interface
SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on H-Bridge 12 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 |
P1 | VREFA | – | Current trip threshold potentiometer for A/B channels |
P2 | VREFC | – | Current trip threshold potentiometer for C/D channels |
H-Bridge 12 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Supply Voltage Range | 8 | – | 32 | V |
Maximum Output Current | – | – | 1.5 | A |
Software Support
We provide a library for the H-Bridge 12 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 12 Click driver.
Key functions
-
hbridge12_write_config
H-Bridge 12 write settings function. -
hbridge12_set_current_scale
H-Bridge 12 set current scale function. -
hbridge12_turn_clockwise
H-Bridge 12 turn motor clockwise function.
Example Description
This example demonstrates the use of the H-Bridge 12 Click board™ by driving the motor connected to OUT A and OUT B, in both directions with braking and freewheeling.
void application_task ( void )
{
log_printf( &logger, " Turning motor counterclockwise rn" );
hbridge12_turn_counterclockwise( &hbridge12, HBRIDGE12_AB_BRIDGE_SEL );
Delay_ms( 5000 );
log_printf( &logger, " Turning motor brake on rn" );
hbridge12_turn_brake_on( &hbridge12, HBRIDGE12_AB_BRIDGE_SEL );
Delay_ms( 5000 );
log_printf( &logger, " Turning motor clockwise rn" );
hbridge12_turn_clockwise( &hbridge12, HBRIDGE12_AB_BRIDGE_SEL );
Delay_ms( 5000 );
log_printf( &logger, " Motor freewheeling rn" );
hbridge12_freewheeling_on( &hbridge12, HBRIDGE12_AB_BRIDGE_SEL );
Delay_ms( 5000 );
}
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.HBridge12
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.