If you are looking for the Chapter 5 content for the 1st Edition of Exploring Arduino, please click here.
Driving Stepper and Servo Motors
Parts List
- Arduino Uno or Adafruit METRO 328
- USB cable (Type A to B for Uno, Type A to Micro-B for METRO)
- Half-size or full-size breadboard
- Assorted jumper wires
- Pushbuttons (×2)
- 1kΩ resistors (×4)
- 10kΩ trim potentiometer
- 5mm Blue LEDs (×4)
- 9V battery
- 9V battery clip
- L7805CV 5V voltage regulator
- 10μF 50V electrolytic capacitors (×2)
- TI L293D dual H-bridge motor driver
- 12V (>500mA) DC wall adapter
- Sharp GP2Y0A21YK0F IR distance sensor with JST cable
- Standard 5V servo motor
- NEMA-17 bipolar stepper motor
- Hot glue or tape
- Circular “clock face” (This can be a blank CD, or just paper.)
- Binder clip
- Popsicle stick
Code
Download Code (2nd Edition, Chapter 5)
(Also available on GitHub)
Useful Links
- L7805CV voltage regulator Datasheet (PDF)
- TI L293D H-Bridge Datasheet (PDF)
- Sharp GP2Y0A21YK0F Distance Sensor Datasheet (PDF)
- Arduino Servo library reference
- Interactive stepper motor animation
- Arduino Stepper library reference
- Arduino INPUT_PULLUP details
- Arduino millis() function reference
Videos
Watch a demo video of the “Sweeping IR Distance Sensor” project from this chapter:
Watch a demo video of the “One-Minute Stepper Chronograph” project from this chapter: