The Leader PIC32 operates as the brain of the robot, running the top level HSMs and sending/receiving commands to each of the follower PICs via SPI. It is responsible for controlling the ON/OFF button, the corresponding ON/OFF LED, the sudden death game mode button and corresponding LED, the "in progress LED" that displays time elapsed since game start, the IR phototransistor for beacon detection, as well as 3 tape sensors mounted on the underside of the chassis
The Drivetrain PIC32 is responsible for controlling both drivetrain motors (left and right) that drive the motor shafts and allow the robot to move and rotate, the encoders that generated speed and directional information, as well as limit switches on the blade arms and beacon detection turret. Input capture was used to determine the RPM and directionality of each wheel during robot movement, which informed our control law about how to accordingly adjust the robot's movement. A limit switch was used on one of the blades to detect the wall behind trees, in order to leave the blades enough room to actuate and intake acorns. A second limit switch was mounted onto the beacon turret in order to stop drivetrain movement when hitting a tree. The drivetrain PIC communicated back and forth with the leader PIC via SPI, sending acknowledge bits when drivetrain commands were received.
The peripheral PIC32 is responsible for receiving commands for, as well as driving all the auxiliary sensors on the robot. The peripheral PIC is responsible for operating the DC motor that drives the spring-loaded cam shaft to actuate the robot's push plate, the yard indication servo, the ultrasonic sensor for detecting distance to trees, a pair of phototransistor-emitter distance sensors for detecting acorns in the robot's bay, the limit switch for pre-loading the spring/cam-shaft assembly before pushing the acorns, and both servos for actuating the blades that pull in acorns.
Three FS90R continuous rotation servo motors were used total - two for the blades to pull in acorns, as well as one for yard indication.
Two drivetrain motors were used, each attached to a TLE-5206 single H-bridge driver. No flyback diodes were used, as the driver boards had them integrated.
A high torque DC motor with 96 kg-cm of torque and max 34 RPM was used to drive a snail cam that actuated our spring-loaded acorn launcher system from full tension to release. This motor used the same TLE-5206 H-bridge driver as the drivetrain motors.
Two IR sensors and corresponding signal conditioning circuits were used - one for acorn detection and another for detecting beacon frequencies at each tree. The circuit consisted of one passive high pass and passive low pass filter, with resistor and capacitor values chosen from the lowest and highest beacon frequencies. The signal was run through an MCP6294 unity gain buffer at every step, and finally converted into a digital signal with an MCP6546 comparator. See beacon IR sensor (top) and acorn IR sensor (bottom) for differences in R and C values.
Unity gain buffer shown (left) and additional capacitors (right)
Two buttons were used - one for activating gameplay and another for activating sudden death mode.
The HC-SR04 ultrasonic distance sensor was used to continually gauge the robot's distance to the tree, and adjust speed accordingly for different states.
3 LEDs were used - one for ON/OFF, one to indicate activation of sudden death LEDs, and one to indicate time elapsed since beginning of gameplay. The ON/OFF and sudden death buttons were placed in parallel with a 200 ohm resistor, and the ON/OFF LED was placed in series with a 200 ohm resistor.
Two distance sensors were used - one to detect the presence of acorns in the robot's bay, and another to detect the distance from trees during movement.
Two limit switches were initially used - one on each of the blades, to indicate when the robot had hit a tree. However, we realized we ultimately only needed one and moved the second limit switch to the beacon turret. The limit switch pin is placed in series with a 1k current limiting resistor, and time constant is reduced with a 10k resistor and 0.1uF capacitor in series.
The Acorn IR Emitter uses an N-type mosfet to generate enough current to drive the IR emitter on the robot, which generates IR pulses that are received by a phototransistor for acorn detection.
Three tape sensors mounted in a triangular formation were used to implement tape following for the robot. Readings from two of the three sensors meant an angular deviation, from which the robot would adjust its drivetrain movement accordingly.