hardware
Circuit Overview
The main components of our circuit are as follows:
|
microphone
Receiver Subcircuit
Our microphone module listens to all communication that is broadcast through an external computer speaker. The output from the microphone module is initially filtered by a bandpass filter with cutoff frequencies at 900Hz and 2600Hz, since the frequencies we expect to see are between 1000Hz and 2500Hz, as defined by the Communication Protocol. The filtered analog signal then passes through a Schmitt trigger centered at 2V in order to convert our signal into a clean square wave. This digital signal is received by the PIC and parsed in software as a 26-bit message.
speaker
Transmitter Subcircuit
Our speaker module broadcasts a 26-bit message that is picked up by an external computer microphone. We decided to use our microcontroller's DAC (digital-to-analog) module, so that we could convert our message into a square wave in software, rather than in hardware. The digital signal passes through a unity gain buffer as well as a bandpass filter between 900Hz and 2600Hz before it is received by the speaker module.
servo
Push-to-Talk
The PIC's PWM module allows us to control a small servo that presses the push-to-talk key just before we transmit our message and then releases the key as soon as we finish transmitting. Pictured to the left is one of our team member's servo setup, where the servo is taped directly to her keyboard, positioned above the * key, and held in place by an aluminum block. All three of us have similar setups that employ different keys and other heavy objects in order to reliably transmit our messages over Mumble.
Note that we used a separate 5V wall wart to supply power to the servo. We did not want noise generated by the servo to affect the signals in our main circuit. |
buttons & lights
Physical Inputs & Outputs
Each station uses serial terminal I/O to specify the station type, enter the submarine's initial position, and select an action at the start of every new turn. Our stations also have 3 physical inputs and 5 LED outputs.
For our physical input, we have a Rejoin Switch which controls whether the game will start in a normal fashion or in an emergency rejoin mode. When this switch is paired with our Reset Button, the game will restart as defined by the Rejoin Switch's status. In case our submarine misses a "NEXT TURN" packet from a previous station, the Forced Action Button allows us to manually move on to the next turn and input a new user action.
For our physical output, we have two LEDs that turn on while our station is actively receiving or transmitting a message. The other three LEDs indicate which of the station's 2-3 actions we had chosen for this turn.
For our physical input, we have a Rejoin Switch which controls whether the game will start in a normal fashion or in an emergency rejoin mode. When this switch is paired with our Reset Button, the game will restart as defined by the Rejoin Switch's status. In case our submarine misses a "NEXT TURN" packet from a previous station, the Forced Action Button allows us to manually move on to the next turn and input a new user action.
For our physical output, we have two LEDs that turn on while our station is actively receiving or transmitting a message. The other three LEDs indicate which of the station's 2-3 actions we had chosen for this turn.