ECE 4180 Final Project: Water Balloon Launcher
By: Ashley Hrebik and Michael Hennessy
Overview
This is a game developed on an ARM Microcontroller (LPC 1768). We used a XBOX 360 Kinect, a touch keypad, a servo motor powered by an external power source, two LEDs, a speaker, an amplifier and a MicroSD card reader.
The goal of this embedded system is to detect a person and automatically launch a water balloon at that person. The mechanical system is created from PVC pipe which holds the water balloon slingshot in position. On the electronic side, an mbed controls the functionality of the servo motor and unlocking and locking features. The launcher can be disabled by entering a password on the touch keypad. When the system is ready to receive a password, the green LED will illuminate. If it is not illuminated, the user can press any key until the green LED is on. When a correct password is entered, the red LED will illuminate, and the launcher will not fire. When the launcher is not disabled, the Xbox Kinect will detect when a person is in range. This will enable a sound to occur and the servo motor will move to launch the water balloon. After launched the user can reset the system for another water balloon.
The code for this game was written in C++ using the mbed cloud complier. We also used C++ code in Visual Studio to program the Kinect. We made use of the Skeleton API to detect a person. We used CreateFile and WriteFile to communicate with the mbed micro controller over a Serial Com port.
Connections
mbed | Touch Keypad | Pullups |
---|---|---|
Gnd | Gnd | |
p9 | SDA | 4.7K |
p10 | SCL | 4.7K |
p26 | IRQ | |
Vout(3.3V) | Vcc |
Table 1: mbed to Touch Keypad connections
mbed | Servo | External DC Supply |
---|---|---|
Gnd | Gnd(black) | Gnd |
power(red) | +4.8V to 6V | |
p21 or any PWM | PWM signal input(white,yellow,orange) |
Table 2: mbed to Servo Motor with External DC Supply
mbed | MicroSD |
---|---|
P8 (DigitalOut) | CS |
P5 (SPI mosi) | DI |
Vout | VCC |
P7 (SPI sclk) | SCK |
Gnd | GND |
P6 (SPI miso) | DO |
CD | CD |
Table 3: mbed to MicroSD connections
mbed | TPA2005D1 | Speaker |
---|---|---|
gnd pwr | - (gnd), in - | |
Vout (3.3V) or 5V | pwr + | |
P18 (D/A) | in + | |
out + | + | |
out - | - | |
Any DigitalOut px(optional) | S (low for shutdown) |
Table 4: mbed to audio amp to speaker connections
mbed | PC | Kinect |
---|---|---|
USB | USB | |
Mini USB | USB |
Table 5: mbed to Kinect through PC
Figure 1. Setup Closeup on mbed
Figure 2. Full Electronic System
Figure 3. Closeup of Launcher Setup
Figure 4. Full System
Demo
Code
Import programFinal_project_water_balloon_launcher
Water Balloon Launcher
Visual Studio Code for Kinect
Please log in to post comments.