Hardware Reference
In-Depth Information
DC motor
Breadboard
Potentiometer
SN754410 H-Bridge IC
CODE AND DIGITAL CONTENT FOR THIS CHAPTER
Code downloads, videos, and other digital content for this chapter can be found
at www.exploringarduino.com/content/ch4 .
The wiley.com code downloads for this chapter are found at www.wiley.com/
go/exploringarduino on the Download Code tab. The code is in the chapter 04
download and individually named according to the names throughout the chapter.
You're now a master of observing information from the world around you.
But how can you control that world? Blinking LEDs and automatically adjust-
ing nightlights are a good start, but you can do so much more. Using assorted
types of motors and actuators, and with the help of transistors, you can use your
Arduino to generate physical action in the real world. By pairing motors with
your Arduino, you can drive robots, build mechanical arms, add an additional
degree of freedom to distance sensors, and much more.
In this chapter, you learn how to control inductive loads like direct current
(DC) motors, how to use transistors to switch high-current devices, and how
to interface with precision actuators (namely, servo motors). At the end of this
chapter, you build a sweeping distance sensor capable of identifying the loca-
tion of nearby obstacles. This sensor is perfect for mounting on a self-driving
robotic car, for example. Having completed this chapter, you'll have all the skills
you need to build a machine that you can really interact with!
NOTE Ifyouwanttolearnallaboutmotorsandtransistors,checkoutthisvideo:
www.jeremyblum.com/2011/01/31/arduino-tutorial-5-motors-and-
transistors/ .YoucanalsofindthisvideoontheWileywebsiteshownatthe
beginningofthischapter.
WARNING Inthischapter,youusea9Vbatterysothatyoucanpowermotors
thatrequiremorepowerthanwhattheArduinocanprovide.Thesevoltagesare
stillnothighenoughtoposeadangertoyou,butifhookedupimproperly,these
batteriescandamageyourelectronics.Asyoumakeyourwaythroughtheexer-
cisesinthischapter,followthediagramsandinstructionscarefully.Avoidshort
circuits(connectingpowerdirectlytoground),andwhileyou'llbesharingthe
groundlinebetweenpowersupplies,don'ttrytoconnecttwoseparatevoltage
sourcestoeachother.Forexample,don'ttrytohookboththe9Vsupplyandthe
Arduino's5Vsupplyintothesamesupplyrowonthebreadboard.
Search WWH ::




Custom Search