Animatronic Turret (8-5-09)
This turret was built as practice for future animatronics projects. It is loosely based on the turrets from the video game, Portal. All the processing is done by an Atmel AVR ATmega168 on the Roboduino board. The microcontroller was coded through the Arduino development platform. The code can be downloaded below:
A Roboduino controls everything. To produce the audio, a Wave shield from Adafruit Industries was used. Two servos control the pan/tilt. A relay triggers the airsoft gun - a MOSFET would have been better, but I did not have access to any at that time. Tilt is sensed using a triple-axis accelerometer from Dimension Engineering, but only one axis is used. A photoresistor pointed directly at the ground detects whether or not the turret has been lifted up or not. A better solution would have been a microswitch, as in dark areas the photoresistor will always report that the turret is on the ground.
Object detection is made possible by a scanning servo with a Sharp IR rangefinder mounted on top. I used code based on the Stampy robot by the Society of Robots.
Looking back at this project, I realize there are many things I could improve.
- MOSFET gun triggering
- Separate microcontroller for audio processing
- Refined tracking code/new tracking system
- Electronics bay
- Stiffer material (PVC sheet is very soft)