For the third week of our robosumo project, our main objective was to wire and program the HC-SR04 ultrasonic rangefinder. The HC-SR04 works in a similar manner to radar developed during WW2 by emitting an ultrasonic sound wave from its speaker and listening for the reflected signal. The Rangefinder can be used to determine the distance between the robot and the target by dividing by the speed of sound. However, we did not require this feature for tip the can, simply needing a binary yes or no answer on whether the can was in sight.
The use of the rangefinder was vital to the completion of the tip the can challenge as it allowed the robot to find the can and steer towards it. I was given the task of installing the rangefinder to the breadboard and connecting it to the arduino. This was surprisingly simple as it only required a 5V input and ground. The echo and trigger pins had to be connected to digital pins on the arduino with the trigger wire being programmed as an output. We discussed what we would need the coding to do and settled on the following.
When the can was not in direct line of sight for the robot, it would reverse one wheel, turning the robot on the spot until the can was seen. When the can was in sight, the robot would drive staight towards it until the switch was pressed. When pressed, the robot would reverse for one second then stay at rest for 10 seconds, validating the challenge.
While Billy focused on the coding, Ben and I began discussing the chassis design. We agreed to design something simple yet effective which did not waste any excess space or materials. Due to the fact that we would not be competing with another robot, we did not need to incorporate any attack or defense measures into our initial design. While other teams were going to be building their frames from plastic sheets, we agreed to use steel plate instead. This was because I have years of race car fabrication experience and constructing it out of waste steel would provide a simple, efficient and fast for us. We settled for a design of a base frame which would house the wheels, motors and switch with the battery pack and breadboard stacked above this. The final design was left to me to be tweaked given any space and material restraints.
