Home Chapter 13 Maxuino/Arduino motor with the H-Bridge MAX MSP
Maxuino/Arduino motor with the H-Bridge MAX MSP

In this lesson you will use the Maxuino interface and Arduino UNO board and MAX MSP and Jitter to drive a motor. H-Bridges are wonderful electronic control boards that allow you ramp motors up and down in speed as well as reverse their direction dynamically. 

Code to control DC gearhead motor with Maxuino/Arduino UNO and a 1AMP H-Bridge. 

Englarged H-Bridge image from Sparkfun 

 Link to purchase H-Bridge Motor Driver 1A Dual TB6612FNG 

 Copyright Ken Rinaldo

 The H-bridge motor control board used in this demonstration was a prebuilt unit and can handle peak loads up to 1 Amp. The TB6612FNG motor driver controls up to 2 x DC motors at varying speeds based on PWM.

Two input signals (IN1 and IN2) can be used to control the motor in one of four function modes - CW, CCW, short-brake, and stop. The two motor outputs (A and B) can be separately controlled, the speed of each motor is controlled via a PWM input signal with a frequency up to 100kHz.

The STBY pin should be pulled high to take the motor out of standby mode.

For a more powerful H-Bridge to drive larger motors that require more Amps to drive this one is recommended and the lesson that follows is for how to solder one like it together, though keep in mind while the chipset is the L298 the pins may be different in the Sparkfun Product.

L2298 H-Bridge board with circuit board and parts.  

 L298 Motor H-Bridge available from Sparkfun


  • Motor supply: 6 to 35 VDC
  • Control Logic: Standard TTL Logic Level
  • Output Power: Up to 2 A each
  • Current Sense Outputs
  • Onboard Power Resistors Provided for Current Limit
  • Enable and Direction Control Pins
  • External Diode Bridge Provided for Output
  • Heatsink for IC
  • Power-On LED indicator
  • 4 Direction LED indicators
Here is a PDF for this product to see the particulars.