Robot Building for Beginners, Third Edition

(Marvins-Underground-K-12) #1

CHAPTER 27 ■ ENCORE


Like a six-pack of beer, simpler logic chips contain multiple copies of the same function in a single package.
For the 7404 inverter chip, it has a six-pack of inverters: 6 inputs + 6 outputs + 2 power pins = 14 pins.


Beyond the Golden Age of Logic Chips


As microcontrollers and programmable logic array chips became less expensive and more powerful, most
of the more complex functions (counter chips, math chips, single bits of memory, and so on) became
obsolete. Besides the obvious economic incentive, you can program complex relationships inside of a single
microcontroller chip instead of wiring together a board full of logic chips.
Some logic chips still have their place in modern electronics. Inverters, AND, OR, latches, transceivers,
de/multiplexers, de/coders, parallel to serial, and serial to parallel chips can do a lot in robots. They’re
cheap, wonderful for experiments, great for learning digital electronics, and helpful companions to
microcontrollers.


Microcontrollers


Without a doubt, the biggest advancement in robotics is the microcontroller. Microcontrollers contain
memory and storage space, just like tiny computers. Programs are written on a PC and then downloaded to
the robot usually via a USB cable to a programmer board.
If you’re dreaming of building a smart robot one day, the microcontroller is a necessity.


Capabilities of Microcontrollers


Although there are sets of special-purpose pins on the microcontroller chip, the remaining pins can provide
whatever functions you desire. Blinking an LED is as simple as writing a program that says, “turn on pin 4,
wait, turn off pin 4, wait, and repeat.”
In Chapter 26 , the line-following robot is greatly improved by replacing the comparator with a
microcontroller. For example, each light sensor is evaluated individually to perform smooth turns (when the
line is slightly off center), hard turns (when the line is under a far sensor), or to go straight ahead (when all
sensors have approximately the same value).
With a microcontroller, motors can be enabled individually or at the same time. With sensors watching
the wheels, the microcontroller could insert brief pauses in motor power to slow down when the battery is
fresh or a turn is sharp.
With a set of switches in the front and sides of the robot, the microcontroller could stop and back up
when a switch is pressed by a collision. The capabilities and creative options provided by a microcontroller
make it a must-have part in modern robotics.


Figure 27-1. Logic inverter chip

Free download pdf