Instead of creating a simple video game kids could build in a drag and drop editor, we strove to build something greater that required advanced expertise in several specialized domains. Statistics, photo resistance and metal fabrication were chief among these.
However, the project and its build is fairly straightforward and any DIY thinker can certainly replicate our work.
There are two primary components of the system: Tank and Phaser
Here is an example of the tank in action:
The speed can be easily controlled within the app or software limited on the Arduino.
Hit DetectionDetecting simple spikes in activity isn't enough as this would lead to false positives inherent to the imprecise nature of a moving solar panel. The principle employed is that a hit should always be preceded by a period of relatively smooth (low standard deviation) light levels below the level in the activation period. The spike will then occur and will always generate a value increase above a threshold from the average of the data chunk before. This event will then be proceeded by a drop from activation and a low standard deviation. The data is recorded in a 40 element array and each time the event loop fires, it is processed and checked to see if it follows the above model pulling the middle 9 values to check for activation.
Phaser InternalsThe three main systems of the gun are the laser, ammo display and piezzo audio feedback. The laser is powered off an Arduino digital pin at 5v and displayed over the period of about 1/4 second. The ammo display employs a shift register for LED control and has fixed brightness. The piezzos are operated through digital pinouts using the tone function on Arduino to generate frequencies. The sounds were generated listening to classic sci-fi sounds and trying to algorithmically match and reproduce them.
Tank InternalsThe tank chassis used with motors can be purchased from Sparkfun (https://www.sparkfun.com/products/12090). Our project used the Adafruit motor shield to control the four motors and powered the motors off a 9V battery. Although both the Arduino and motors could share a battery. The are powered separately so the motor battery can be swapped without powering down the Arduino itself.
The FutureThe hit detection system could easily be employed on a drone.



_baVEVgguW1.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)



Comments