logo

autonomous weapon turret

Software/Hardware Design

The following diagram gives a detailed overview of the AWT's subsystems and their interfaces.

System Diagram

Figure 1: A system level diagram.

Software

User Interface

The home screen, discussed more in the User Interface section, gives the user the ability to perform several functions. The title bar of the window displays which mode the system is in, as well as the status of the mode lock. In the main video pane, one can view real-time video from the stationary webcam. Objects that have been identified as moving will have ellipses drawn around them, with a unique ID.

Image Processing

Using the OpenCV computer vision library, an image processing pipeline was setup to detect and track moving targets. When the AWT software is started, a thread is spawned to start creating a background model from the stationary webcam. With each camera frame, the background model is updated using a method based on Bayes decision making. Then, if the system is in AUTO (autonomous) mode, the pipeline will continue by comparing the current camera frame with the background model. If any pixels in the current frame are sufficiently different from their modeled counterparts, then those pixels will be identified as moving. Groups of moving pixels are then identified as blobs. Each blob is tracked using a Kalman filter. The coordinates of the largest blob’s (the one occupying the most pixels) centroid are then calculated. From those, a linear velocity estimation function returns coordinates that predict where the object will be in the next frame. Those coordinates are then translated to PWM widths and send to the serial port along with a fire signal. The following diagram explains the sequence.

Image Processing Pipeline

Figure 2: Image processing pipeline.

Hardware

Pan and Tilt

The pan-and-tilt has two degrees of freedom, with 180 degrees of rotation in each axis. Two Hitec high-torque servo motors were used to control the device. The following figure is a diagram of the pan-and-tilt system used in the AWT weapon subsystem.

Pan and Tilt System

Figure 3: Pan and tilt system.

Weapon

In the diagram below, the main pressure line is controlled by a 24V solenoid valve. The pressure lines for the air cylinder are both connected to a two-way solenoid valve. When one line is pressurized, the bolt closes, and when the other line is pressurized, the bolt opens. 68 caliber rubber balls are fed into the reload chamber via an attached hopper. The complete firing sequence is as follows:

  1. “Fire” signal is sent to the microcontroller from the PC
  2. The microcontroller opens the solenoid valve for the main pressure line
  3. The pressure chamber builds up pressure until its threshold, and the ball moves out of the weapon—gaining acceleration through the barrel
  4. The microcontroller sends a signal to the two-way solenoid valve to open the bolt
  5. A ball drops into the reload chamber from the hopper
  6. The microcontroller sends a signal to the two-way solenoid valve to close the bolt, sealing the pressure chamber
The operating pressure of the weapon is 60 PSI.

Weapon

Figure 4: Weapon system.

Hardware Circuitry

Below is a schematic of the AWT hardware circuitry. The pan-and-tilt servo motors are controlled by 5V pulse-width-modulated signals from the micro-controller. The two solenoid valves (one for firing and one for cocking) are controlled by applying 5V pulses from the micro-controller to their respective power MOSFETs.

Schematic

Figure 5: Schematic of the hardware circuitry.