Table Top Cannon

Table Top Cannon

     This canon was made independently by myself in Computer Science 310: Robotics. The aim of this robot is to guard one's table. the robot sits on a table and, while active, is routinely scanning its environment and comparing distance values. Once there is a negative change in distance, the robot runs through a targeting method that it uses to determine if the change was a fluke, or real enough to be considered a threat to the table. If the latter is determined, the robot will register the sensor that found the distance, spin to face that direction, and approach using a recursive method that has it move forward a fractional amount and then check if it is either in range or off the table. If it is in range, it releases the electromagnetic cannon launching a projectile at the perceived threat (in these tests an Expo marker was used, and proved to be very effective). If the robot reaches the edge of the table but does not sense the threat within range, then it will turn around and move further back onto the table.

     The robot is equipped with 8 ultrasonic sensors (6 for scanning and 2 for edge detection), two continuous servos, and an electromagnetic solenoid. It is controlled by an Arduino Uno and uses three circuits (motors, computer/sensors, and cannon).

8 UltraSonic Sensors, 2 Continuous Servos, 1 Solonoid, and Elegoo Uno

Laser cut parts to create the body and computer housing

Assembled robot, stage one

Gluing the support rod to keep the robot from tipping (will have to add another)

Math!

A bunch of math to design the cannon mount

Having Fun

Very accurate graphic of projectile launch

Wheels are mounted on the body - a little tedious but seems stable

I began mounting the ultra sonic sensors on their posts - worked so nicely

all sensors of the main ring are attached, looks so cool

another view with all the sensors on the main ring

IMG_6532.MOV

Cannon is built and attached, this is a test launch - it works to my satisfaction! The next step is to 3D print a missile, oh, and do all the wiring and coding.

Found out that the motors needed their own power source

Installed a switch for the motors

Wired all the trigger pins to the same line on a breadboard, powered by Arduino

All sensors and motors attached to Arduino

Sensor Testing

 Sensor output, all sensors work!!

Targeting Tests

Targeting Checks work but only about 80% of the time

Ultimately I reduced the number of targeting checks and tweaked one so as to not generate a new distance value for all sensors during a check.

A transistor did not allow enough voltage for the electromagnetic cannon to work, I switched to a relay and it now works!

IMG_6903.MOV

Testing the robot's ability to spin, so that I can code the amount it needs to spin for in order to turn towards the target.



Robot testing, it targeted me and approached, yet was going too fast to stop in time and fell off the table (this is later fixed)

IMG_6940.mov
IMG_6943.MOV



In an early test of the robot, it successfully targeted and fired once in range

IMG_6945.MOV
IMG_6964.MOV