Team BatCough
From Left: Erin Watson, Sami Shad, Mark Stauber, Xingxing Cai
Overview
Bat-Cough is a game where two users collaborate to try to help Batman reach his cough drops. Although not the most traditional form of training, if Batman does not practice getting his cough drops the people of Gotham City stand no chance at understanding anything he says. The game consists of four main stages: moving Batman forward, a keypad game, shaking the controller, and using the IR LED laser.
To begin the game, the Bat-ID must be activated and detected. The Bat-Cough Bat-ID transmitter is inside a bottle of cough drops with a hole for the IR LED, and must be aimed at the front of the game (labeled 'start') where a phototransistor detects the IR light. The phototransistor is used with an op-amp, high pass filter, and comparator in order to create an amplified digital signal corresponding to the Bat-ID Morse code signal. This signal is a digital input to the C32, and is used to detect the correct sequence of Morse code ("NA") to begin the game. During the course of building the training simulation, we realized that due to noise one of our PWM signals was getting copied over on a comparator output for the BAT-ID, and added a low pass filter to remove that noise. When the game begins, a 45 second game timer starts, and the passage of time throughout the game is indicated by the bat signal moving using a servo motor every second in a 160 degree arc.
Once the game has begun, the users are in the moving Batman stage of the game, as indicated by the LED indicator on the front panel. The cough drops that Batman is trying to attain are behind a door, and the first stage is to move him to the door. Each user has a controller consisting of a joystick potentiometer, an accelerometer, and an IR LED. For Batman to move forward, the users must collaborate and move both of their joysticks on the controllers forward. The joystick is a potentiometer with 5 volts across it, and is detected as an analog input. How far forward User Two presses his joystick determines the speed at which Batman moves. The Batman figure is mounted on a two-wheeled cart that is affixed to a chain driven by the DC motor. A limit switch is placed at the desired stopping point for Batman, just in front of the doors.
When the door has been reached, it must be opened using a collaborative keypad combination game. The two users must simultaneously press a sequence of keys in order to pass this stage, and each user controls 3 buttons on the front panel that include LEDs in them. One of the C32 controls the LEDs using an N channel MOSFET. The game is designed so that the users' respective buttons light up at the same time, and the users must have these buttons pressed down at the same time in order for it to be considered a correct press. The number of correct buttons pressed in a row in order to pass this stage of the game is determined by the length of time it took the users to pass the Batman Moving stage, with longer Batman moving stages leading to shorter required keypad sequences.
Once the keypad stage has been passed, the doors open using two servo motors, and a bottle of cough drops is revealed. The next stage of the game is to 'shake the bottle of cough drops' by shaking the controller, as indicated by the front panel LEDs. Each user's controller contains an accelerometer. These signals are then amplified using an op-amp and are read as analog inputs by each C32. Each user must shake his controller hard enough to make the signal go above a set threshold at some minimum frequency. When both users have done this, the game progresses to the next stage. Additionally, the analog signal from User One's accelerometer determines the PWM signal to an eccentric mass motor that is placed inside the pill bottle. The effect is that the pill bottle shakes according to how hard the user shakes his controller.
When the shaking stage has been won, red LEDs around a target turn on and Bane pops up using a servo (in an attempt to steal the cough drops from Batman). To win the game and defeat Bane, the users must shoot at the target using the IR LED on the front of each controller. There is a phototransistor in the center of the target, which has an op-amp, high pass filter, and comparator similar to the Bat-ID circuit. One of the C32's inputs is this signal, and when the LED is pointed at the target, a rise is detected. Upon shooting the target, the game is won and the panel LED and Batman pathway lights flash to indicate success. The servo motors then return to their initial positions, Batman moves backwards until he is in his initial position (detected using a limit switch), the panel LEDs begin lighting up in sequence to indicate waiting, and the Bat-Cough waiting audio begins.
To begin the game, the Bat-ID must be activated and detected. The Bat-Cough Bat-ID transmitter is inside a bottle of cough drops with a hole for the IR LED, and must be aimed at the front of the game (labeled 'start') where a phototransistor detects the IR light. The phototransistor is used with an op-amp, high pass filter, and comparator in order to create an amplified digital signal corresponding to the Bat-ID Morse code signal. This signal is a digital input to the C32, and is used to detect the correct sequence of Morse code ("NA") to begin the game. During the course of building the training simulation, we realized that due to noise one of our PWM signals was getting copied over on a comparator output for the BAT-ID, and added a low pass filter to remove that noise. When the game begins, a 45 second game timer starts, and the passage of time throughout the game is indicated by the bat signal moving using a servo motor every second in a 160 degree arc.
Once the game has begun, the users are in the moving Batman stage of the game, as indicated by the LED indicator on the front panel. The cough drops that Batman is trying to attain are behind a door, and the first stage is to move him to the door. Each user has a controller consisting of a joystick potentiometer, an accelerometer, and an IR LED. For Batman to move forward, the users must collaborate and move both of their joysticks on the controllers forward. The joystick is a potentiometer with 5 volts across it, and is detected as an analog input. How far forward User Two presses his joystick determines the speed at which Batman moves. The Batman figure is mounted on a two-wheeled cart that is affixed to a chain driven by the DC motor. A limit switch is placed at the desired stopping point for Batman, just in front of the doors.
When the door has been reached, it must be opened using a collaborative keypad combination game. The two users must simultaneously press a sequence of keys in order to pass this stage, and each user controls 3 buttons on the front panel that include LEDs in them. One of the C32 controls the LEDs using an N channel MOSFET. The game is designed so that the users' respective buttons light up at the same time, and the users must have these buttons pressed down at the same time in order for it to be considered a correct press. The number of correct buttons pressed in a row in order to pass this stage of the game is determined by the length of time it took the users to pass the Batman Moving stage, with longer Batman moving stages leading to shorter required keypad sequences.
Once the keypad stage has been passed, the doors open using two servo motors, and a bottle of cough drops is revealed. The next stage of the game is to 'shake the bottle of cough drops' by shaking the controller, as indicated by the front panel LEDs. Each user's controller contains an accelerometer. These signals are then amplified using an op-amp and are read as analog inputs by each C32. Each user must shake his controller hard enough to make the signal go above a set threshold at some minimum frequency. When both users have done this, the game progresses to the next stage. Additionally, the analog signal from User One's accelerometer determines the PWM signal to an eccentric mass motor that is placed inside the pill bottle. The effect is that the pill bottle shakes according to how hard the user shakes his controller.
When the shaking stage has been won, red LEDs around a target turn on and Bane pops up using a servo (in an attempt to steal the cough drops from Batman). To win the game and defeat Bane, the users must shoot at the target using the IR LED on the front of each controller. There is a phototransistor in the center of the target, which has an op-amp, high pass filter, and comparator similar to the Bat-ID circuit. One of the C32's inputs is this signal, and when the LED is pointed at the target, a rise is detected. Upon shooting the target, the game is won and the panel LED and Batman pathway lights flash to indicate success. The servo motors then return to their initial positions, Batman moves backwards until he is in his initial position (detected using a limit switch), the panel LEDs begin lighting up in sequence to indicate waiting, and the Bat-Cough waiting audio begins.