Project Folder: (contains photos, videos, etc.)
https://drive.google.com/drive/folders/1OMXxVj7zSbHe-uN2ycG7BZKDADaW4vFY?usp=sharing
Project Final Report:
https://docs.google.com/document/d/10NtwzIfGD6iVrDZc2-OgO1z4QxUahLaoioyPXBOWAg8/edit?usp=sharing
Project Final Video Presentation:
https://drive.google.com/file/d/1u__n8gxt-AhmOxFfkSow-XHBImpNzBeq/view?usp=sharing
Name | NetID | Section |
---|---|---|
Benjamin Gao | bgao8 | ECE 110 |
Jason Guo | jkguo2 | ECE 120 |
Project Proposal:
Statement of Purpose
Our project is to create a fully automatic Nerf Gun turret which utilizes an Infrared Camera and Laser Rangefinder to automatically acquire, track, lead, and hit a moving target. This project requires creating and interpreting a sensor fusion using the IR Camera and Rangefinder in addition to creating custom circuitry for controlling at least one stepper motor and 2 servos, with provisions for an additional motor for automatically loading the Nerf Gun. Motion tracking and leading a target by factoring in movement direction/speed, projectile speed, and flight time are the main software challenges we hope to tackle, and we aim to create a unipolar stepper motor driver from scratch.
Background Research
We wanted to create a project with an algorithm to recognize blobs of heat on an IR camera, and to rangefind with a laser/track targets. because we also have an interest in the hardware side of things (not just plugging parts into an Arduino and writing code), we decided that we want to do some basic research into creating a stepper motor controller for the horizontal transversing of the turret. This is an extremely similar project to ones done in the past, but includes many different aspects from different project, such as motor controllers and target recognition/tracking through an IR camera. Although both of us have worked on mechanical projects like this in the past, we haven't written complicated software involving any complex calculations or created circuits from basic components (like a motor controller).
Block Diagram / Flow Chart
Software block diagram:
Hardware Block Diagram:
System Overview
Software:
The turret turns side to side until it finds a hot spot in the thermal camera. It considers this hot spot to be a target and then it tracks it for a few moments. As the turret tracks, it saves distance and angular velocity data. The microcontroller then plots the target's movement, predicts its future location. computes the trajectory required to hit this future location, orients itself to shoot along this trajectory, shoots, and then resets.
Hardware:
The Arduino board is at the center of the circuit, and controls each component, while the 12V power supply feeds power to high current components (like the linear motor, stepper motor, and servos). The stepper motor is used for horizontal movement, and the servos are used for vertical movement and trigger actuation. The linear motor is used to pull back the slide on the nerf gun. The IR camera and laser rangefinder are used to search for and track targets.
Parts
Control System and I/O:
- Adafruit MLX90640 IR Thermal Camera - 55 Degree FOV
- https://www.adafruit.com/product/4407 ($65, Adafruit)
Hardware:
- Unipolar stepper motor (turret horizontal drive)
Other:
- 555 Timer IC x2 or 3 for spares (about $1)
- https://www.newark.com/texas-instruments/ne555p/timer-single-precision-dip8-0/dp/17AH9212?gclid=Cj0KCQjw1ouKBhC5ARIsAHXNMI-rK8iiibAicfPXppflC8gH_BvfKIX-UeJoLcyHJgFLH2WeGz5bh9gaAobiEALw_wcB&mckv=sycAQPVwf_dc|pcrid|506882751582|plid||kword||match||slid||product|17AH9212|pgrid|122273150391|ptaid|pla-1199378040224|&CMP=KNC-GUSA-GEN-Shopping-VeryLow-Semis ($0.5) REMOVED
- https://www.sparkfun.com/products/16473
- https://www.newark.com/texas-instruments/ne555p/timer-single-precision-dip8-0/dp/17AH9212?gclid=Cj0KCQjw1ouKBhC5ARIsAHXNMI-rK8iiibAicfPXppflC8gH_BvfKIX-UeJoLcyHJgFLH2WeGz5bh9gaAobiEALw_wcB&mckv=sycAQPVwf_dc|pcrid|506882751582|plid||kword||match||slid||product|17AH9212|pgrid|122273150391|ptaid|pla-1199378040224|&CMP=KNC-GUSA-GEN-Shopping-VeryLow-Semis ($0.5) REMOVED
- CD4017 Johnson Decade Counter (10 Decoded Outputs) x2 or 3 for spares (about $1)
- Various electrical components (resistors, capacitors, transistors, diodes) (self provided or found at lab)
Total Cost:
65+22+2 = $89
Possible Challenges
- The motor driver is likely most complicated part of the project, and we might have to end up following a guide.
- Rangefinding is difficult within the given budget.
- We are currently trying to interpret the output of a hacked laser tape measure to get rangefinding data. Ideally this works.
- We could buy a serial-compatible rangefinder, but this would be far outside the budget, $70 at dfrobot: https://www.dfrobot.com/product-2108.html
- We do not think that a cheaper lidar has the range to effectively support the tracking and lead algorithm.
- the nerf gun that we are currently planning to use has a muzzle velocity in excess of 40m/s; within the range of a 12m time-of-flight sensor, lead will be pointless anyways.
- The IR camera lacks the resolution to effectively discern the size of an object, so it cannot be used for rangefinding.
- Using a camera and machine learning image processing to track and rangefind targets would change the scope of the project altogether.
References
[1]"Stepper Motor Driver Circuit", Electronics Hub, 2017. [Online]. Available: https://www.electronicshub.org/stepper-motor-driver-circuit/. [Accessed: 13- Sep- 2021]
Attachments:
Untitled Diagram.drawio.png (image/png)
241960813_227252272702456_4148757716221841676_n.jpg (image/jpeg)