<<< Go back

Squid Games Nerf Gun

Medium: IoT, and Web

Technologies: Django, OpenCV, Python, Raspberry Pi

Coming Up With The Idea

During the pandemic, I was kind of bored and I started watching the Netflix show called Squid Games,

Squid_Game_promotional_poster

I finished watching the show in about a day or two. And now had a new obsession. It seem like most people in America at the time were feeling the same way as well... So I thought I could feed my obsession and try to make something go viral when riding the trend of Squid Games popularity... But what exactly should I make? How can I really showcase my skills and learn a few more?

The first game looks pretty cool. That game also appears possible to build in real life (without actually hurting anyone). That game being Red light, Green light; with the Doll and the turrets that shoot you if you move on Red light.

So lets proceed with building the first game from Squid Games such that I can really showcase my skills. Breaking this down, There are two major parts to this project we need to solve for:

  1. How I am going to aiming a "Turret" and shooting it on command when it sees a target move.
Firing Turret

2. The next major part is how am I going to recognize which player is who, and detect if they have moved on red light. Resulting in the "turret" aiming at them and removing them from the game.

giphy

Screenshot 2024-03-23 at 8.53.30 PM

1. Making a (control-able) "Turret"

Okay, starting out I was trying to choose between building a paint ball based or a nerf gun based system for this turret device. After doing some research it seemed like that there is a bigger community of people build and modding nerf guns. So that seems like a good sign to go the direction of building the turret with a nerf gun.

Additionally, after searching youtube I found a youtube video of someone that was shooting a nerf gun similar to what I wanted to do:

I did not have the skills (yet) when it comes to 3D modeling, 3D printing, or using big DC motors... But, I have knowledge of electronics from studying computer engineering and some smaller electronics projects I have done in the past.

So I choose to stick with what I know best first, which is the electronics! Primarily, figuring out which Nerf gun to use and hacking into the gun so that I can fire it remotely.

Luckily, I stubbled into a Walmart and found the Nerf gun that would fit my needs. This Nerf Hyper Mach-100 Blaster is a fully automatic gun and can provide a high fire rate as well as store a lot of bullets in its hopper.

Nerf-Hyper-Mach-100-Fully-Motorized-Blaster-80-Nerf-Hyper-Rounds-Included-Ages-14_7be63ec7-a7d9-41fc-b364-da26759ebc2a.597bd2bef24d1cdbfc104c7856642b4b

Getting into the gun here:

Screenshot 2024-03-23 at 9.52.56 PM

First step it to locate the connections for the motors that spin the fly wheels to shoot the balls and the motor for the hoppers that feed the balls into the motors.

We can do this by running a continuity test using a multimeter.

and then use a bench power supply to see if we have found the correct connection leads. Additionally, if we do find the correct connections we can can also figure out how much voltage and amps each motor will need to be powered.

614kZSQiNgL._AC_UF894,1000_QL80_

After finding the correct connections, it is now time to figure out if we can run the motors off of wall power instead of a bench power supply.

There is one problem however, the motors will not stay running when I plug them into the wall power (shown in this video):

After I figure out how to power the gun. I connected the gun to a type of switch that can be control with a Raspberry PI; called a relay. Which allows me to close a connection by pulling the connection from the Raspberry PI to the relay to ground.

relay-5v-1-channel-4

This allows me to control the guns motors (turning them on/off) with the Raspberry PI when I want to shoot the gun! Awesome!

The next thing to do is figure out how to move the gun around but honestly looking back on it I was really not sure how to CAD this design for a holder.

I designed a holder in fusion 360 but this is really the first thing I have ever designed using any CAD software. Each iteration of the gun holder would take almost a whole roll of PLA filament to print out the iteration and take quite a few hours to print. It truly was lot of work for a beginner like me and I think I felt way over my head for my given ability at the moment.

IMG_3367

IMG_3404

Screenshot 2024-03-28 at 6.46.55 PM

So after a while I lost steam on designing the holder and moved on to other parts of the project.

2. Running Facial tracking and Motion Detection

First step would be grab the video stream and detect if there is a face the model should know is in the image.

Luckily, Python is very popular with the AI community and everything a python package in python. So there is already a package called face_recognition

68747470733a2f2f636c6f75642e67697468756275736572636f6e74656e742e636f6d2f6173736574732f3839363639322f32343433303339382f33366630653366302d313363622d313165372d383235382d3464306339636531653431392e676966

And we can stream the video from a web browser so I an do the AI processing on my computer instead of on device for more computing power.

For in the motion detection, I have not really figured that out yet. when working on this it was kind of too big of a block thinking about how to design the Pan & tilt assembly for the motors that brain could handle figuring out how to do the motion detection.

it should be like something in this guide: https://pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-opencv/

Results

Currently, I have it where I can shoot the nerf gun from a web browser as you can see here:

I would say this project is over and I still mainly need to figure out how to control the motors, do pan/tilt and motion detection. But once I get that I should have a first good prototype.