Close
0%
0%

Khaosgun

a wifi or ai controlled sentry nerf gun

Similar projects worth following
1. squirrels kept eating the tomatoes in my backyard
2. people are always trying to advertise to my door
3. I saw colin furze's airsoft "security" system

The solution? A heavily modified nerf rival gun (blaster, for all of the lawyers and pedantic nerf fans out there) that uses a raspberry pi to:
- stream POV video to a web server
- allow remote shooting, controlled through that server
- automatically shoot when people or squirrels are seen in range
- take POV photos and video from a button on the gun, and host those videos on the server
Additionally, I've replaced the 6 huge D batteries with a rechargeable battery, so I can power the pi off of the battery without having to sell my kidneys to buy batteries. I decided to use 9.6v makita drill batteries because they fit well, I already had the charger, and they're not lipo so they don't burst into flame when you look at them wrong.

To do this project, I had to learn:

  • python, from being able to barely hobble along
  • AI from scratch
  • How websites work - I had to write all the front end stuff (js, css, html) and a few back end scripts.  I also had to learn the basics of ajax and what it means for computation to be server-side versus client-side

In addition to that, I also inadvertently ended up learning:

  • lots of background nerf knowledge (turns out there's a huge community of professional nerf modders)
  • different types of batteries, how they work, what's needed to use them, etc.
  • basic electronics: had to create custom voltage regulator and had to plan out my circuit (all the switches make it a bit confuzzling to think about)
  • lots of rpi and general unix stuff - I got a lot better at navigating through my project from the terminal (because the pi runs headless)

Technical specs/features:

  • rechargeable battery
  • can automatically shoot when human or squirrel is in range (you choose human or squirrel) (classifier still isn't great)
  • hosts a web server that:
    • stores all photos/images
    • streams POV video
    • hosts a website with buttons to control the gun
  • can take POV photos/videos with a button on the gun
  • can act as just a normal nerf gun, with or without camera functionality
  • hopper thing to hold a lot more rounds (still doesn't work great - lots of jamming.  "forced ammo conservation")
  • battery level display

  • todo

    ReidDye01/13/2022 at 02:47 0 comments

    I'm shelving this project for now, because it's been successful enough and any improvement would take a lot of time and effort.  I've gotten the AI to work on both humans and squirrels (but only have video of humans, which I'm not going to post here).  For now, I'm just using YOLOv3 running on my laptop to do the heavy lifting, and it just uses the webpage to fire.  It's 100% sketchy and bodgey, but it works.  I've tried to develop a CNN that can do it onboard the pi to remove the need for an internet connection, but it turns out that's hard.  I don't have much experience with tensorflow lite, and couldn't figure out the installation on the pi zero w.  Additionally, the zero w only has one core, so running darknet yolo with the NNPACK option won't improve anything, unlike on the full-sized PIs.  

    The one clear solution is more computing power. I think that the easiest way to do this would be the Intel Modivius NCS.  Others have used this to do amazing things with the same pi zero w, so I think it'll work.  It would somewhat compromise on the aesthetics of the project, and would make me more hesitant to leave the gun alone outside somewhere, but it wouldn't be too bad because it can just plug into the existing USB port on the side of the gun.  Anyways, that is a pretty significant monetary and time investment, and I'm happy enough with this project as it is now.  

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates