TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (91 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139267 times)
  2. FAT32 Library (71755 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47432 times)
  5. Network WiFi Library (43093 times)
  6. FT800 Library (42408 times)
  7. GSM click (29835 times)
  8. mikroSDK (28102 times)
  9. PID Library (26886 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

H-Bridge 8 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.16

mikroSDK Library: 2.0.0.0

Category: Brushed

Downloaded: 195 times

Not followed.

License: MIT license  

H-Bridge 8 Click is a compact add-on board that contains H-bridge current regulator. This board features the MP6519, a monolithic, step-down, current-source driver for applications that require accurate and fast current-response control from Monolithic Power Systems (MPS). It achieves excellent load and line regulation over a wide input supply range up to 28V. The four integrated MOSFET H-bridge control provide a fast dynamic load response and an ultra-high efficiency solution. Complete protection features include load open, load-short protection, over-current protection (OCP), over-temperature protection (OTP), and input over-voltage protection (OVP). This Click board™ is suitable as a current-regulator brushed DC motor/solenoid driver for various applications

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "H-Bridge 8 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "H-Bridge 8 Click" changes.

Do you want to report abuse regarding "H-Bridge 8 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


H-Bridge 8 Click

H-Bridge 8 Click is a compact add-on board that contains H-bridge current regulator. This board features the MP6519, a monolithic, step-down, current-source driver for applications that require accurate and fast current-response control from Monolithic Power Systems (MPS). It achieves excellent load and line regulation over a wide input supply range up to 28V. The four integrated MOSFET H-bridge control provide a fast dynamic load response and an ultra-high efficiency solution. Complete protection features include load open, load-short protection, over-current protection (OCP), over-temperature protection (OTP), and input over-voltage protection (OVP).

hbridge8_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Jul 2021.
  • Type : PWM type

Software Support

We provide a library for the HBridge8 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 HBridge8 Click driver.

Standard key functions :

  • hbridge8_cfg_setup Config Object Initialization function.

    void hbridge8_cfg_setup ( hbridge8_cfg_t *cfg );
  • hbridge8_init Initialization function.

    err_t hbridge8_init ( hbridge8_t *ctx, hbridge8_cfg_t *cfg );
  • hbridge8_default_cfg Click Default Configuration function.

    void hbridge8_default_cfg ( hbridge8_t *ctx );

Example key functions :

  • hbridge8_set_mode H-Bridge 8 set operating mode function.

    err_t hbridge8_set_mode ( hbridge8_t *ctx, uint8_t mode );
  • hbridge8_enable H-Bridge 8 set IC enable function.

    err_t hbridge8_enable ( hbridge8_t *ctx );
  • hbridge8_set_duty_cycle H-Bridge 8 sets PWM duty cycle.

    err_t hbridge8_set_duty_cycle ( hbridge8_t *ctx, float duty_cycle );

Example Description

This library contains an API for the H-Bridge 8 Click driver. This demo application shows the use of a H-Bridge 8 Click board™.

The demo application is composed of two sections :

Application Init

Initialization of PWM module and log UART. After driver initialization, the app set duty cycle, start PWM and set motor drive the forward.


void application_init ( void ) 
{
    log_cfg_t log_cfg;            /**< Logger config object. */
    hbridge8_cfg_t hbridge8_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_info( &logger, " Application Init " );

    // Click initialization.

    hbridge8_cfg_setup( &hbridge8_cfg );
    HBRIDGE8_MAP_MIKROBUS( hbridge8_cfg, MIKROBUS_1 );
    err_t init_flag  = hbridge8_init( &hbridge8, &hbridge8_cfg );
    if ( PWM_ERROR == init_flag )
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    hbridge8_default_cfg ( &hbridge8 );
    Delay_ms ( 100 );

    hbridge8_set_mode( &hbridge8, HBRIDGE8_MODE_FORWARD );
    log_printf( &logger, "\r\n>>> Forward\r\n\r\n" );
    hbridge8_set_duty_cycle ( &hbridge8, 0.1 );
    hbridge8_pwm_start( &hbridge8 );
    Delay_ms ( 100 );
}

Application Task

This is an example that shows the use of an H-Bridge 8 Click board™. In this example, the app drives the motor forward/reverse and switched the PWM signal back and forth from 3% duty cycle to 8% duty cycle every 3000 milliseconds and back. Results are being sent to the Usart Terminal where you can track their changes.


void application_task ( void ) 
{
    static int8_t duty_cnt = 3;
    static int8_t duty_inc = 1;
    float duty = duty_cnt / 100.0;

    hbridge8_set_duty_cycle ( &hbridge8, duty );
    log_printf( &logger, "> Duty: %d%%\r\n", ( uint16_t )( duty_cnt ) );

    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    if ( 8 == duty_cnt ) 
    {
        duty_inc = -1;
    }
    else if ( 3 == duty_cnt ) 
    {
        duty_inc = 1;
    }
    duty_cnt += duty_inc;
}

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.HBridge8

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.


ALSO FROM THIS AUTHOR

NTAG 5 Link Click

0

NTAG 5 Link Click is a compact add-on board that acts as a bridge between an NFC-enabled device and any I2C slave, such as a sensor or external memory. This board features the NTA5332, a highly integrated NFC IC which creates a secure standard-based link from the device to the cloud from NXP Semiconductors. Based on the NTAG 5 switch and operating at 13.56MHz, the NTA5332 represents an NFC Forum-compliant contactless tag that can be read and written by an NFC-enabled device at close range and by an ISO/IEC 15693-enabled industrial reader over a more extended range. It also incorporates an I2C interface with an I2C master features and AES mutual authentication, SRAM memory, and energy harvesting possibility, which means it can supply power to other components in the system.

[Learn More]

Air Flow Click

0

Air Flow Click is a compact add-on board that contains a flow-based 2-in-1 differential pressure sensor. This board features the LHDULTRAM012UB3, LHD ULTRA series micro-flow differential pressure sensor from TE Connectivity Measurement Specialties.

[Learn More]

FT click

5

FT Click is a compact smart transceiver add-on board that helps you add a Free Topology (FT) interface to any host board with the mikroBUS socket.

[Learn More]