SN754410 Quadruple Half-H Motor Driver

Purpose
While the Orangutan board we own has a 2-channel motor driver built-in, the Arduino Uno lacks motor support. An external driver is always required for the Uno and necessary for the Orangutan to accommodate a third motor. Drivers allow us to utilize high-currents that most microcontrollers simply can not put out their IO pins directly. In the LED Matrix project, we are utilizing special LED drivers to drive many LEDs at once.

Theory: The H bridge
The motor driver we are using is built off of a circuit called an H bridge. In the H bridge, MCU pins are used to control 4 transistors, which are basicly switches that open/close to allow/block current from flowing through. Notice that if we only turn on S1 and S4 the motor will spin in one direction, and if we only turn on S3 and S2 the motor will spin in the opposite direction. Turning on S1 and S3 or S2 and S4 will cause the motor to brake. In contrast, turning off all pins will cause the motor to "coast" or spin freely until it stop. One last note: turning on pins S1 and S2 at the same time is prohibited because this would cause a short circuit. Motor drivers will usually disallow this from happening, but it is important to keep in mind if you are building your own driver from scratch.



Wiring While this motor controller we're using has 16 pins, only a couple are actually used to control the individual motor. Several are used for powering the chip and for the motor's power source itself. Below is an image of a connected driver (not the same model, but pinouts are pretty standard across electronic components). Note that only the yellow and blue wires are connected to the MCU's IO pins. The rest of the wires are simply carrying power, some of which are just necessary due to the nature of breadboards. While it may look intimidating, it's actually very simple to wire.

Programming
Programming the motor control is also trivial - you turn on one IO pin and shut the other off for one rotation direction, then vice versa for the other direction.

Here's some simple example code for the Arduino Uno (I'm assuming that the motor driver input wires are connected to pins 7 and 5):

void setup{ //Set pins 7 and 5 to output mode pinMode(7,OUTPUT); pinMode(5,OUTPUT); } void loop{ //Move motor in one direction digitalWrite(7,HIGH); digitalWrite(5,LOW); delay(1000); //Reverse motor direction digitalWrite(7,LOW); digitalWrite(5,HIGH); delay(1000); }

Reference

 * Datasheet