CE432 2022 Fall
Lab 8
Name: Braden Morrow Email: bdmorrow@fortlewis.edu
1. Lab 8 - Use an Encoder
2. Introduction The purpose of this tutorial was to use an encoder to control a stepper motor in preperation for our upcoming Two-Wheeled Robot project.
3. Results Task 1:
This task asked us to make the hardware connections to the
stepper motor and show a small example of it rotating. Figure 1 shows
the results from this task. The code for this task was provided in the
tutorial.
Figure 1. Controlling a Stepper Motor with Arduino
Task 2:
This task asked us to make the hardware connections to the
encoder and show a small example of it sending it's postion to the
Serial Monitor. Figure 2 shows the first results from this task. The
code for
this task was provided in the tutorial.
Figure 2. Reading an Encoder with Arduino
This task also asked us to
use the above example code to write a script that used the encoder to
precisely control the stepper motor. Figure 3 shows the results from
the second part of this task. The code for his task can be found in
Tutorial8 -> Task3.
Figure 3. Controlling a Stepper Motor with an Encoder
5. Discussion This
was a fast introduction to the encoder, but I think it will be really
useful once we start the Two-Wheeled Balancing Robot Project.