Initial Strategy |
Range Finders & Tape SensorsRange Finders:
We used two range finders (shown below), the HC-SR04 model to determine when the bot was parallel or not. These devices are of standard quality and come with a +/- 1 cm error with a maximum range of 400 cm. However, please take note of the fact that at distances of greater than 100 cm, we found the frequency of accurate measurements decreased significantly where 1 out of every 5 measurements would have an deviation from the correct value of about 50 cms. This is to say that if rangefinder 1 read 200 cm, rangefinder 1 would read 150 cm. We placed these range sensors on our bot in the orientation they are in for specific reasons. We needed these range sensors to determine whether the bot was at an angle. We placed two range sensors 4 inches away from each corner on the back face. If the device was at an angle, the two range sensors would read two different values and the difference of their values should be used as a threshold to determine if the robot is at an angle. If the two sensors were head on to an object or wall, the threshold different between the two sensors should be zero within +/- 2 cm. If the sensors were mounted to the front of the robot however, the first wall the sensors would detect would be the farther one about 200 cm away. This is where the inconsistencies of the range sensors come into play; if the distance is too far, the reading might be too off where the software would think the robot is at an angle when it isn't. By placing the range sensors on the back face of the bot, the sensors would be at a much closer distance and give a consistent reading every time. The sensors work by sending a pulse from the arduino output digital GPIO pin to the trigger pin of the range sensor. This is then transmitted outwards until it detects an object. When the signal is transmitted, the HC-SR04 sensor begins a timer. This timer is the time to the obstruction and back to the sensor. This timer expires when the echo pin detects the return wave to which either an arduino analog input or digital input is declared and the value is read into the software. In software, that time is then converted to a distance and integrated into the logic. Tape Sensors:
For the IR Tape sensors (shown below), we used the QRB1114 from fairchild to detect lines. We used a triangular formation of three sensors, one central and forward, and two right and left sensors placed a few inches behind the center detection one. These tape sensors were used to help implement a line following strategy. The tape sensors work by using an emitter to flash IR light onto the object of interest and the detector side detects that reflection as a voltage (analog signal). This can then be read into the arduino and used to determine a threshold for what constitutes as black (high) or low (any color not black). To see implementation details of this circuit, please refer to the following web page: http://hades.mech.northwestern.edu/index.php/Optoreflector This site provides a step by step tutorial on how to implement this circuit as well as various explanations on how IR tape sensors work. Motors + Motor Drivers |
In choosing the type of motor used in the feeder mechanism, we decided that we wanted a stepper motor because it would provide us control and precision, which was useful for our revolver design. Because the nerf balls were so lightweight, there was no need for high RPM or high torque so our primary decision factor was cost. This made selection easy as we chose what was available from lab 2. We chose the DRV8825 motor driver (shown below) to control the stepper motor as we used these two parts together in lab 2 and were familiar with them. See the datasheet here: https://www.pololu.com/product/2133 Selecting the motors for the flywheel was slightly more nuanced. In the case of the flywheels, we had a minimum launch distance we needed to meet. We had a lot of factors to consider: amount of ball compression, RPM, torque, launch angle required at different RPM speeds, etc. We developed an Excel model that took into account various factors to predict an RPM speed for known distances of travel. We calculated that on average, we would need around 2200 RPM for each flywheel to launch a ball into the towers successfully. With that in mind, we searched for the cheapest motors that would handle that RPM. We knew we would not require much torque because the nerf balls are super light and two points of contact would have a larger surface area with the ball, resulting in increased friction and compression, which helps launch the balls farther. We purchased the cheapest motors from the lab stockroom that met those specifications. Next, we made a circuit to drive those two motors. We selected the L293 driver board (shown below); it is similar to the L298 motor driver, but is only capable of supplying up to 1.2A, which sufficed because the flywheels do not draw much current due to the low torque needed for the flywheel motors.
Power Management |