Arduino Robot Bonanza by Gordon McComb

Arduino Robot Bonanza by Gordon McComb

Author:Gordon McComb [McComb, Gordon]
Language: eng
Format: epub
Tags: -
Publisher: McGraw-Hill Education
Published: 2013-04-02T21:00:00+00:00


In most cases the DC motors you use will be attached to a gearbox, which reduces the speed of the motor to something more usable for your robot. This gearing down also makes the output of the motor much more powerful.

Suffice it to say you can’t connect one directly to an Arduino, as the Arduino cannot supply enough current to properly operate the motor. There are three primary methods for interfacing a DC motor to the Arduino: relay, transistor or driver, or H-bridge.

A relay is an electrically operated switch. The Arduino controls the relay, which in turn is connected to the motor. Despite their age and electromechanical construction, relays are still useful in robotics, and they’re easy to use. Clever use of relays allows you to turn motors on and off, and change their direction.

A transistor can be used as an off/on switch. Like the relay, the Arduino operates the transistor, which in turn controls the motor. A single transistor can only turn a motor on and off. To reverse the direction of the motor you need at least two transistors, though the most common approach uses four. See H-bridge, next. (Transistor-driving circuits may also be used for many other forms of output interfacing, such as connecting the Arduino to a large speaker or operating a solenoid.)

An H-bridge is a combination of four transistors—the name comes from the H shape of the connections when the transistors are drawn on paper. H-bridges are all-electronic devices that can control the operation and direction of motors. You can build an H-bridge using separate transistors, but a better and easier approach is to use a self-contained H-bridge module. The design of H-bridges is complex, and modules greatly simplify the electronics, while avoiding common pitfalls of homebrew circuits.

See Figure 8-14 for an example of connecting the one motor to the popular L293D H-bridge module. Shown is only one motor attached; the L293D supports two motors. To run the motor and change directions you apply LOW or HIGH signals from the Arduino to the Input 1 and Input 2 signals of the L293 H-bridge module.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.