Multi-Shot Cannon - Article By: Wesley Myers

Project Description

The goal of the project is to build a mechatronic device capable of shooting projectiles and striking static and dynamic targets.

We are shooting at targets located 10’ away from the cannon, in a 4’ wide by 3’ high area. There are three total targets, each 8” in diameter and covered with a different color of retro-reflective tape (red, green, or blue). The targets are located at a fixed height, with the bottom target being 1’ higher than the base on which the shooter will be placed. During performance tests (described in detail in a later section), each of the targets may either be stationary or moving with a maximum speed of 1 ft/sec. The targets will always be in the “field of play,” meaning they are always visible and able to be hit. Since the targets will need to stop and change directions periodically on the 4’ long track, the speed will not be constant. However, the motion will be predictable and simple tests should allow for easy adjustment of machine timing.

Solution with the CMUcam4

The CMUcam4 provides simple vision capabilities to small embedded systems in the form of an intelligent sensor. We used the CMUcam4 for on-board, real-time vision processing tasks - Figure 3.

The CMUcam4 is connected to the Arduino Mega via serial over a UART port. With this, we can send commands to the CMUcam4 and receive tracking data back. Figure 4 shows the Hardware Layout of our system. Figure 5 shows the state flow of our system. Figure 6 shows the overall subsystem flow of our system.

The strategy we used for this was very simple. We knew the relative y-coordinate positions of the targets relative to our position. We also knew the maximum and minimum x-coordinate positions of the targets relative to our position. So we constructed a window around the possible positions of each target as shown in Figure 2. What this did was eliminate any outside noise due to the lighting or other objects. What this also allowed was the ability to really target the red, green, and blue models against the black background. We could then accept a wide range of color values in light and darkness. Figure 1 is the view from the CMUcam4 of the target board.

The data we got back from the CMUcam4 was the (x,y) positions relative to the camera’s view. We then passed this data to a look up table to find the servo positions we needed to aim the shooter.

Figures

Figure 1 - View of Target Board Figure 2 - View of Target Board wtih Bounding Box Filtering
Figure 3 - System Overview
Figure 4 - Hardware Layout
Figure 5 - Overall State Machine
Figure 6 - Overall Subsystem Flow

Files

Below are the files related to this project.

  • TeamF_wmyers_ILR - These are my Individual Lab Reports from the class. These document my progress with the CMUcam4 and they also have a lot of the code I used in the early development stages.

CMUcamCompetitionCode.ino (11.7 kB) Wesley Myers, 06/19/2012 04:53 pm

TeamF_FinalReport.pdf (3.3 MB) Wesley Myers, 06/19/2012 04:58 pm

TeamF_wmyers_ILR10.pdf (2.3 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR01.pdf (4.3 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR02.pdf (5 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR03.pdf (7.4 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR04.pdf (5.5 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR05.pdf (4 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR06.pdf (201.6 kB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR07.pdf (11.6 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR08.pdf (3.7 MB) Wesley Myers, 06/19/2012 05:12 pm

TeamF_wmyers_ILR09.pdf (101.3 kB) Wesley Myers, 06/19/2012 05:12 pm

Real_small.jpg (18.2 kB) Kwabena Agyeman, 07/01/2012 06:46 pm

Real_large.jpg (78.3 kB) Kwabena Agyeman, 07/01/2012 06:46 pm

Render_small.jpg (18.3 kB) Kwabena Agyeman, 07/01/2012 06:53 pm

Render_large.jpg (50 kB) Kwabena Agyeman, 07/01/2012 06:53 pm

Target_raw.jpg (27.1 kB) Kwabena Agyeman, 07/01/2012 07:13 pm

Target_filered.jpg (22.1 kB) Kwabena Agyeman, 07/01/2012 07:13 pm

System_overview.png (172.9 kB) Kwabena Agyeman, 07/01/2012 07:37 pm

Hardware_layout.png (52.6 kB) Kwabena Agyeman, 07/01/2012 07:37 pm

State_machine.png (119.6 kB) Kwabena Agyeman, 07/01/2012 07:48 pm

Sytem_flow.png (84.8 kB) Kwabena Agyeman, 07/01/2012 07:48 pm