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

NameNetIDSection
Benjamin Gaobgao8ECE 110
Jason Guojkguo2ECE 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:

Hardware:


Other:


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]



Comments:

Looks good! I would just always be careful with the naming scheme or the intention of your device. I don't think it'll be an issue since we aren't buying you the nerf gun but it is hard to predict with the university sometimes...


I really like the block diagram you guys referenced, should make your life a bit easier. Also, you list using an Arduino but you don't include the model or if you already own it (I assume you do). This could put you slightly over budget.

I trust that won't really be an issue so I will approve your group as group #16

Posted by dbycul2 at Sep 28, 2021 00:20

Thanks for the input and approval, we can totally rename this project if something comes up.

About the Arduino, we're probably going to use a Mega 2560 that we already own. We're assuming that the rudimentary processing required to detect and track high temperatures in a 24x32 grid (as returned by the IR camera) should be simple enough to run on something of that caliber - does this seem accurate?

Also, our efforts to reverse engineer the debug outputs of a cheap laser tapemeasure for rangefinding have not been doing so great at the moment - should this reverse engineering spiral into an exceptionally difficult or practically impossible endeavor, could we get a budget increase for a dedicated serial laser rangefinder (such as the dfrobot unit we've listed)?



Posted by jkguo2 at Sep 28, 2021 00:57

Sorry for the late response but I think the Mega should be able to handle that.

As for the budget concerns, this is probably a James question. We have an unusually high amount of students this semester so we may have to be super strict on budget or we may have the room for some exceptions

Posted by dbycul2 at Oct 01, 2021 17:37