The entire circuit of the BARNACOAL is composed of a PIC32, an XBEE, 2 servo motors, and 2 motor thrusters. The MPLAB SNAP featured in the circuit diagram is primarily used to program the PIC32 and is not used for the operation of the game. The circuit of the BARNACOAL involving the PIC32, the servo motors as well as XBee is powered by the power distribution board provided by the SPDL. The 5v received by the servo motors and the 3.3V received by the PIC32 is powered by this power distribution board. The thruster motors is powered through 7.2V NiMH batteries provided found in the project kit.
The PIC 32 circuit corresponds to the circuit that controls the actuation of the dumping and pairing servos, the actuation of the right and left thrusters, as well as transmitting and receiving messages through the XBee radio module
The XBee radio module is used to transmit 10-byte long messages to the SPECTACOAL and receive 13-byte long messages from the SPECTACOAL. The RX line connected to the PIC32 is used to receive message bytes from the BARNACOAL. The TX line connected to the PIC32 is used to transmit message bytes from the BARNACOAL. Each byte received increments a counter in software until the byte number threshold of 13 is met. Once this threshold is met, this signifies the end of a message.
The pairing servo circuit is the circuit that corresponds to the servo that indicates when a SPECTACOAL has connected to the BARNACOAL. The motor is only raised to a 90 degree high position when a SPECTACOAL has successfully paired to the BARNACOAL and is at a 0-degree low position when a SPECTACOAL has yet to be paired successfully to the BARNACOAL.
The Dumping servo circuit is the circuit that corresponds to the servo that allows for all of the balls loaded on the BARNACOAL to be deposited. The servo will be at a constant 90-Degree high position until it receives a message from the SPECTACOAL to lower the rotating wall. The motor will stay down until it receives a second message indicating that the rotating wall should be raised again.
The BARNACOAL thruster motors require the use of a electronic speed controller (ESC) to regulate the three-phase current applied to the thrusters. There is a PWM control signal for each thruster that connects directly to the PIC32.