TF2 Sentry - Page Work in Progress


Description

For a fun project on my own to do, I decided it should be something that I can make using the STM series. I never got to learn it and figured it would be a good time, especially during the current lockdowns due to COVID-19. I decided to make the Engineer's sentry from Team Fortress 2. What I had in mind for it was to be able to scan infront of itself using a motor and some sensors, then respond with a flash representing a muzzle flash and play sounds through some speakers. It would also communicate with a PDA I'd make as an Android App.

Software and Hardware
The sentry will use ultrasonic sensors, a stepper motor, speakers, bluetooth. Of course it will all be controlled by the STM32F7. I used an STM32F7 Nucleo Board to prototype, but after prototyping was completed, I designed by own STM32F7 board, creating the schematics and PCB in KiCAD. For the software, it was all designed by me in C. For the smartphone application, it is done using Java and will communicate via bluetooth to the sentry, and visa versa.
The Design and Functionality
The sentry itself is made out of cardboard pieces I designed and cut out from leftover cardboard I have, along with PVC pipes, steel pipes. It will be held together using nuts and bolts, along with hot glue.
The functionality is as follows, which will be created in C and flashed onto the STM32F746ZG.
  1. There will be 3 ultrasonic sensors. One looking directly ahead (0 degrees), one looking to the left at a 45 degree angle, and one looking to the right a 45 degree angle. There will be a set distance of detection that I decide upon.
  2. When there is nothing detected, it will scan back and forth like in the game, playing audio.
  3. When an object is detected within X length of the sensor, the motor will rotate the sentry either 45 degrees to the left, 45 to the right, or stay put, depending on which ultrasonic sensor triggered the response.
  4. Once the motor does what is needed, a firing routine will go off. It will play an audio sound of it firing, and flash the amber LEDs. The bluetooth system will be told to tell the smartphone the sentry is firing.
  5. When finished firing, it will return to it's original position.
  6. When the sentry is "sapped", it will stop moving and not do anything until the sapper is removed, or if succesfully "destroyed", the sentry will be reset by bluetooth via the app.
  7. The Android Application written in Java will act how the PDA acts in the game. It monitors the health and ammo. The ammo meter will drop everytime the sentry is firing. The health will drop when a sapper is attached.
Functional Block Diagram
This is the functional block diagram I came up with to give a general understanding on how all the modules would be connected.
Functional Block Diagram
Below is a table of contents
  1. Page 1 - Description
  2. Page 2 - Power System
  3. Page 3 - Motor System
  4. Page 4 - Ultrasonic Sensor System
  5. Page 5 - Audio System
  6. Page 6 - LEDs
  7. Page 7 - Bluetooth System
  8. Page 8 - Smartphone Application
  9. Page 9 - Final Schematic and PCB Design
  10. Page 10 - Construction of the Sentry
Back to Projects