MikroElektronika H-Bridge 2 Click Element

The H-bridge 2 click element is used to control the channels of a dual H-bridge. This element is for using the MikroElektronika H-Bridge 2 Click board. This click board can be used to drive a DC motor. In addition, this board contains an external MOFSET that can be used as an auxiliary switch for another component or small motor.

The MikroElektronika page for this click board can be found here.

The H-bridge 2 click is a sensor element that can be imported into the Element Toolbox through the Add Element Add Element button located in the toolbox from the Embedded tab.

Properties

The following properties can be changed for the H-bridge 2 click element:

Name

The name of the element.

PWM Driver Instance

The PWM driver instance number to use.

GPIO Driver Instance

The GPIO driver instance number to use.

GIN Pin

The GPIO pin that controls the gate of the external MOFSET.

Direction Pin

The GPIO pin that controls the direction of motor rotation.

Enable Pin

The GPIO pin that enables or disables the board.

Speed Control Pin

The GPIO pin that controls the speed of the motor via PWM.

Initial Speed (%)

Initial speed of the motor from 0-100%.

Initial Direction

Initial direction of the motor.

Triggers

The following triggers are available to execute events from within the H-bridge 2 click element:

Triggered

Execute an event when the source element connected to the H-bridge 2 click triggers.

Started

Execute an event when the motor is started.

Stopped

Execute an event when the motor is stopped.

Speed Set

Execute an event when the motor speed changes.

GIN Set High

Execute an event when the MOFSET is disabled (no current flowing).

GIN Set Low

Execute an event when the MOFSET is enabled (current flowing between S1 and S2).

Direction Set

Execute an event when the motor direction changes.

Abilities

The following abilities are available for the H-bridge 2 click element when its source element triggers:

Trigger

Trigger the element(s) that follow the H-bridge 2 click element.

Start

Start the motor.

Stop

Stop the motor.

Set Speed

Set the speed of the motor from 0-100%.

Set GIN High

Disable MOFSET.

Set GIN Low

Enable MOFSET (current flows).

Set Direction Forward

Set the direction of the motor to forward.

Set Direction Backward

Set the direction of the motor to backward.

Toggle Direction

Toggle direction between forward and backward.