The radio receiver and power regulator both have their own female headers for mounting to the board as well. I broke out some connections to male headers to allow temporary connections for the LED. The protoboard mostly serves as a power bus for the 7.4V and 5V lines to connect everything. I've attached the electrical diagram above so you can see how everything connects. The circuit connections are split between the protoboard and jumpers between the Edison and PWM board. Make sure they don't short to each other! These can just be shorted across the DPDT switch. These are attached to the trigger switch. Snip it at both ends to remove it from the circuit. Simply cut the wire leading to the switch and solder it to the board where the other wire from the switch was previously. At first I thought it might be useful to spin them up via a separate circuit, but in practice the gun shot just as far when both the drums and actuator were turned on simultaneously. This switch engages the accelerator drums. Since we won't have the case in place, we can just snip the wire after the switch and use this as the 6V+ lead. This is the main power wire from the battery case. We'll be controlling this electronically, so rather than physically closing the switches, we'll just solder them permanently. The gun has a lot of momentary safety switches to prevent the gun from running without being properly closed and triggers held. This amplifier, for driving the speaker from the RPi's underpowered audio jack.With the mechanisms separate from the case, we can now dive into modifying the actual circuit.This speaker, mounted to the inside of the enclosure. (Optional) Speaker, for making fun, Team-Fortress-inspired sentry gun noises.(Optional, but strongly recommended) Power LED, so I can tell when the damn thing is on.Wiring this directly into the positive output from the battery lead will power-down the entire system. (Optional) Laser sight, mounted to the barrel, for calibration, and eventual PID / Kalman filter integration.On the plus side, it prevents the center of gravity from moving as the tank empties over time. This removes some of the rotating mass from the gimbal setup, putting less strain on the servos, but moves the center of gravity forward, making the gun harder to balance in the beginning. I mounted the CO2 tank on one of the tripod legs, and used a hose to connect it to the actual gun. I used the SmartParts Ion, which you can get for pretty cheap on eBay. This battery is probably overkill for this project, but I liked it because it was the right dimensions to fit into the enclosure I chose, the right voltage to drive the regulator to 5V / 10A, and it has capacity and discharge rate to spare. Enclosure: I used this Pelican 1040 case, and mounted it to the front of the tripod platform using an L-bracket.SPT200 Pan & Tilt Kit (24-tooth spline).Raspberry PI 3, running Raspbian Stretch.Stereo cameras, for target distance estimation and auto-elevation correction.Add controls for windage and elevation.Use a PID loop or Kalman filter (or something else?) to aim, instead of direct-drive servo movement.Use laser pointer to auto-calibrate or autocorrect aiming / target leading.Given the coordinates in the video frame of the thing we want to hit, translate that into elevation / range angles in our field of fire, and move the servos to "aim".When the disable signal is in the frame, the gun is made safe, and will not fire except by manually pulling the trigger. Also look for the disable signal (stop sign, specific t-shirt logo, etc).A target is the largest contiguous "blob" of changed pixels from one frame to the next (motion-based tracking). Use OpenCV frame-to-frame comparison to determine if there is a target in the frame.Caveat Emptor, and pull requests are welcome. As of this writing (February-ish 2018), none of this is working yet. NOTE: This project is a work in progress. It can be easily modified to use airsoft or Nerf guns. "Shooty" (short for "Rooty Tooty Point-and-Shooty") is an autonomous paintball sentry platform, powered by OpenCV for Python3 on Raspberry Pi.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |