provide an introduction to basic programming in Arduino and
the use of ultrasonics (US) sensors.
Secondly, the servo motors were mounted, followed by a servo
demo. Lastly, the US sensors were
mounted,
followed by a US demo.
The parts needed to build the robot were gathered as
shown below. The servo mounts were examined
to verify that no burrs were left from the 3D printing process.
This was to avoid an uneven mounture
of the servos.
Then, the two servos were attached to the frame using in total
eight 3/4" long screws and
nuts. Next using a screwdriver, the caster wheel was taken apart
and the three hex standoffs were attached
with 4-40 3/8" screws to the caster's base. Once attached, the
dustcap was inserted through the standoffs.
From there, the standoffs screws ends were inserted and fastened
into the frame's curvy part end.
The wheel tires were assembled to the wheels, and each set was
mounted onto a servo motor by squeezing
the wheel onto the gear. Once the hardware assembled, the
robot's power source was added by fastening
the AA battery holder and 9V battery to the frame using pieces
of Velcro; completing the robot frame (Fig 1).
Then, the taped arduino nano every was placed on the breadborad
ravine. Finally, this set was positioned on the
frame.
In our projects, the servo motors are used to control
the rotational and linear speed of the robot. In this section
of the lab, the digital pins D5 and D6 of the nano were
respectively connected to the signal ports of the servos
to allow the arduino to control the servos.the 4.5 V battery
supply was connected to the VCC wires of the servos.
All ground wires were connected together on the breadboard. In
this demo, we tested our servo motors by making the
robot effectuate the moves described below.
We used timing to complete the demo. For instance, the time
taken by the
servos to complete the forward displacements
and turns were recorded. These were used accordingly via delays
in our
code to coordinate the robot movements.
This part consisted of navigating the robot through a
maze. In this process, three ultrasonic sensors
were respectively mounted on the left, right and front sides of
the robot frame (Fig 2). These additional components were used
to measure the distance to the maze's walls by measuring the
time between emission and reception of the US sounds waves.
On the nano, pins D3, D4, D7 and D8 were respectively used as a
shared trigger and echo pins for the sensors. In completing
the demo, we tested the ultrasonic sensors by displaying the
distances measured from the wall on the serial monitor. It is
worth mentioning that we built off our implementation from the
US code provided in lecture.