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 button located in the toolbox from the Embedded tab.
The following properties can be changed for the H-bridge 2 click element:
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.
The GPIO pin that controls the gate of the external MOFSET.
The GPIO pin that controls the direction of motor rotation.
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 of the motor.
The following triggers are available to execute events from within the H-bridge 2 click element:
Execute an event when the source element connected to the H-bridge 2 click triggers.
Execute an event when the motor is started.
Execute an event when the motor is stopped.
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).
Execute an event when the motor direction changes.
The following abilities are available for the H-bridge 2 click element when its source element triggers:
Trigger the element(s) that follow the H-bridge 2 click element.
Start the motor.
Stop the motor.
Set the speed of the motor from 0-100%.
Set GIN High
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 between forward and backward.