CSCI 345: Lab 7
Motors
Due:
10PM
on
Monday,
April 13th
In this lab, you should learn:
- How to control different kinds of motors
- How to teach yourself to use a new kind of input device
To complete this lab, you will need:
- A computer.
- An arduino.
- A USB cable to connect your arduino to your computer.
- A 6V motor
- A PN2222 Transistor
- A 1N4001 diode.
- A servo motor.
- A 10Ωk potentiometer.
- 100 µF capacitor - OPTIONAL
- L293D IC chip.
- Button.
- 5V Stepper motor.
- A 270Ω resistor.
- A breadboard.
- Wires.
Part 0 - Github
Click here to create your github repo for this lab.
Part 1 - DC Motor
First, follow this guide to use control a DC motor with your arduino.
You will submit your assignment by posting a
comment on the piazza thread for lab 7. Your post
should include a link to the a video of you demoing
your program, and a link to a github repository that
contains your arduino code.
Part 2 - Servo Motor
Follow
this guide to control a servo motor with your arduino.Part 3 - DC Motor but backwards
Follow this
tutorial to set up your DC motor so it can run
both forwards and backwards. Part 4 - Stepper Motor
Follow this
tutorial to set up your DC motor so it can run
both forwards and backwards. Part 5 - Pick an input
Choose an input device that we have not yet used in a lab.
Find a tutorial on how to use that input device, and follow the
tutorial to set it
up. Adafruit
is a good place to look for tutorials, as
is sparkfun
and instructables.
Your kit also came with a CD that contains guides for all of the parts
it came with. Lastly, googling "arduino" and the name of your input
device will probably turn up something.
Part 6 - Put it together and get creative
Take whatever input device you chose, and use it to control one of
the motors. You may use any other output device that
you wish for this project (LEDs, buzzer, etc). Handin
C. Taylor