How does it work?
H-Bridge 11 Click is based on the MAX22200, an octal serial-controlled solenoid and motor driver from Analog Devices. The MAX22200 is rated for an operating voltage range from 4.5V to 36V, which can be brought externally through a VIN screw terminal. Each channel, market with OUTx, can be configured as a low-side or high-side driver and features a low-impedance with 200mΩ typical ON-resistance push-pull output stage with sink-and-source driving capability and up to 1A RMS driving current. Also, pairs of half-bridges can be paralleled to double the driving current or can be configured as full-bridges to drive up to four latched valves (bistable valves) or four brushed DC motors.
The MAX22200 features a two-level drive sequence for optimal control of solenoid valves such as voltage-drive (VDR) and current-drive regulation (CDR) (low-side driver only). In VDR mode, the MAX22200 outputs a PWM voltage with a programmable duty cycle through the SPI interface. The output current is proportional to the programmed duty cycle for a given supply voltage and solenoid resistor. In CDR mode, an internal integrated lossless current sensing (ICS) circuit senses the output current and compares it with a programmable reference current. The CDR loop modifies the PWM duty cycle so that the output current peak matches the programmed reference current. Reference current can be set using the IREF SEL jumper, providing the possibility of setting a current of 1A, 0.5A, or 0.25A depending on the position of the jumper and the set HFS bit (jumper at position 15k with HFS_bit=0 provides 1A, jumper at position 30k with HFS_bit=1 provides 0.25A).
This Click board™ communicates with MCU through a standard SPI interface, supporting clock speed up to 5MHz and the most common SPI mode, SPI Mode 0. It also can be enabled or disabled through the RST pin of the mikroBUS™ socket, hence, offering a switch operation to turn ON/OFF power delivery to the MAX22200. Depending on the content of the TRGnSPI bit in the configuration register of that specific channel, the driver channels can be activated/deactivated either using the SPI interface or through a logic input signal on unpopulated header pins TRIGA and TRIGB (0, 2, 4, 6 can be triggered by the logic input TRIGA, while 1, 3, 5, 7 can be triggered by using the logic input TRIGB). For a successful register write/read function, it is first necessary to set the CMD pin of the mikroBUS™ socket to an appropriate logic level: high for the write and low for the read command.
It also provides a fault status indication signal, routed to the FLT pin of the mikroBUS™ socket, alongside its red LED indicator marked as FAULT to indicate different fault conditions such as overcurrent protection, thermal shutdown, undervoltage lockout, open-load detection, and detection of plunger movement.
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 solenoid driver applications (valve control, relays control) in which low power consumption and a high level of integration are required
On-board modules
MAX22200 – serial-controlled solenoid and motor driver from Analog Devices
Key Features
Eight half-bridges up to +36V, high performance, programmable output current, two control methods, high flexibility, high-speed SPI interface, full set of protection and diagnostic features, and more
Interface
SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on H-Bridge 11 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 |
LD2 | FAULT | – | Fault LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | IREF SEL | Left | Current Regulation Reference Selection 15K/30K: Left position 15K, Right position 30K |
H-Bridge 11 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Power Supply | 4.5 | – | 36 | V |
Output Current | 0.25 | – | 1 | A |
Software Support
We provide a library for the H-Bridge 11 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.
Library Description
This library contains API for H-Bridge 11 Click driver.
Key functions
-
hbridge11_get_fault_pin
This function returns the fault pin logic state. -
hbridge11_read_flags
This function reads and clears the fault flags from the status register. -
hbridge11_set_motor_state
This function sets the operating state for the selected motor from the half-bridge pairs 0-1, 2-3, 4-5, or 6-7.
Example Description
This example demonstrates the use of the H-Bridge 11 Click board™ by driving the DC motors connected between OUT0-OUT1 and OUT2-OUT3 in both directions.
void application_task ( void )
{
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_0, HBRIDGE11_MOTOR_STATE_FORWARD );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_1, HBRIDGE11_MOTOR_STATE_FORWARD );
log_printf( &logger, "rn MOTOR 0: FORWARDrn" );
log_printf( &logger, " MOTOR 1: FORWARDrn" );
hbridge11_check_fault ( );
Delay_ms ( 3000 );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_0, HBRIDGE11_MOTOR_STATE_BRAKE );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_1, HBRIDGE11_MOTOR_STATE_BRAKE );
log_printf( &logger, "rn MOTOR 0: BRAKErn" );
log_printf( &logger, " MOTOR 1: BRAKErn" );
hbridge11_check_fault ( );
Delay_ms ( 3000 );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_0, HBRIDGE11_MOTOR_STATE_REVERSE );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_1, HBRIDGE11_MOTOR_STATE_REVERSE );
log_printf( &logger, "rn MOTOR 0: REVERSErn" );
log_printf( &logger, " MOTOR 1: REVERSErn" );
hbridge11_check_fault ( );
Delay_ms ( 3000 );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_0, HBRIDGE11_MOTOR_STATE_HI_Z );
hbridge11_set_motor_state ( &hbridge11, HBRIDGE11_MOTOR_SEL_1, HBRIDGE11_MOTOR_STATE_HI_Z );
log_printf( &logger, "rn MOTOR 0: DISCONNECTEDrn" );
log_printf( &logger, " MOTOR 1: DISCONNECTEDrn" );
hbridge11_check_fault ( );
Delay_ms ( 3000 );
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.HBridge11
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.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.