May 2014 19
23 show details of the gear system. In Figures 24 and 25,
we see the motor and controller board removed from the
bottom of the servomotor. Figure 26 shows the bottom
and top of the printed circuit board (PCB) that contains
components used to control the position of the
servomotor shaft. Figure 27 shows the variable resistor
(potentiometer) that is connected by the gears to the
motor and the external shaft used by the horns. The
potentiometer turns when the shaft turns, and the
resistance varies with the degree of the turn. This
resistance is measured by the controller on the PCB and is
used to control the angular position of the shaft.
Lab 3: Connecting
and Testing the
1 USB cable
1 Arduino proto shield
1 Three-pin header
1 Mini servomotor
Estimated time for this lab:
Check off when complete:
; Place the long legs of the three-pin header into the mini servo connector
as shown in Figure 28.
; Plug the three-pin header into the breadboard as shown in Figure 29.
These pins are short so you’ll need to exercise care to keep the header
plugged into the breadboard.
; Connect a jumper wire from the position of the mini servo yellow wire to
pin 9 on the Arduino header as shown in Figures 30, 31, and 32.
; Connect a jumper wire from the position of the mini servo orange wire to
the 5V pin on the Arduino header as shown in Figures 30, 31, and 32.
; Connect a jumper wire from the position of the mini servo black wire to the
GND pin on the Arduino header as shown in Figures 30, 31, and 32.
; Open the Arduino IDE
and select the
; Upload the sketch.
; The servo should begin to sweep back and forth 180°.
; FIGURE 28:
; FIGURE 29:
; FIGURE 30: Servo wired to Arduino.
; FIGURE 31: Servo
; FIGURE 32: