Our power is supplied from two 7.2V NiMH rechargeable battery packs. We wanted to drive our motors from a 12V power supply. Similarly, we wanted to power our Arduino and sensors from a 5V power supply. As a result, we connected our batteries in series to provide 14.4V, and used a 12V and 5V regulator for the motors/arduino and sensors, respectively.Â
A major part of our strategy to maneuver the course was to use the walls to our advantage. We installed limit switches on the front left, front middle, and front right of our robot. We connected one end of each switch to a digital pin, and the other end to ground. We set the digital pins to input pullup, and when a switch was pressed (a wall was hit), the connection to ground would be complete and the digital pin would read low. This is how we detected when a wall was hit, and how we followed the walls all the way to the ball drop!
Since our robot was placed randomly in the start zone, we needed to be able to detect our orientation. To achieve this, we detected the IR signal from the beacon. The circuit we implemented consists of a trans-resistive circuit using a LTR-3208E photo-transistor that detects the signal and is fed through a LM399 Op-Amp to convert the IR signal to a readable voltage. We then cascade a high pass and low pass filter to filter out noise, such as the sun and other ambient light sources/signals. This creates a band-pass filter with lower cut-off frequency of 1kHz and upper cut-off of 7kHz, which allows our desired 3.333 kHz signal to pass. The signal is then passed through two stages of gain, for a complete gain of 20x. Lastly, the signal is fed to a peak detector that consists of a Schottky diode with forward voltage of 0.3V, to an RC circuit. The output is a near-DC signal of the peak voltage signal, which we then send to an Arduino Analog Pin. When our robot rotates, it can detect the current peak, and that's how we were able to orient ourselves.
To push past the MVP, we wanted to implement line sensing. We used the OPB704WZ line sensors that were available in lab, which consist of a IR Led and Phototransistor. Using the difference in light reflection from the white floor and black tape, we are able to detect when we are on a line. We incorporate an Op-Amp and a potentiometer for tuning, red LED to show when we are on a line, and send V_out to an analog Arduino pin. In total, we implemented 4 line sensors. Unfortunately, we didn't have time to fully implement this in our code for the competition, but it was still fun building the circuit and getting it to work!