EPS32 King of the Blaster Foam Blaster Game Tracker
by ryanchakajodda in Circuits > Gadgets
579 Views, 2 Favorites, 0 Comments
EPS32 King of the Hill Tracker
Build this gadget to take your foam dart battles to the next level. Simply place the bucket in the middle of the field and play game modes like King of the Hill, Defuse, or Hot Pot. The device automatically tracks which team held the bucket the longest, planted or defended a spike, or maintained control of the point. It supports three different game modes, allows over-the-air firmware updates, displays scores on an LCD screen, uses LEDs to show actions, and runs on a USB battery pack.
Supplies
Supplies
- Electronics
- LCD 16x2 Display (1x)
- 8 Segment LED Stick (1x)
- ESP32 (1x) (suggested you get the dev kit board to reduce soldering)
- 330 Ohm resistor (Mine came from this kit)
- 7mm momentary push button (1x)
- Red Arcade Style Button (1x)
- Blue Arcade Style Button (1x)
- USB Battery pack
- Hardware
- Assorted M3 nuts and bolts
- Small Zip Tie
- Command Strip
- Super Glue
- 5 gallon bucket with lid
- Cables and Wires
- Wire for breadboard (breadboard wire is optional, but makes the connections easy)
- Assorted Wire Connectors (recommend WAGO, but wire nuts will work as well)
- USB Cable that connects to your ESP32.
- Other
- 3 inch by 3 inch clear acrylic panel (1x) (optional, if you want a nice cover on top)
Tools
- Wire cutters / Stripers
- Soldering Iron
- 3D Printer
- Electrical Meter (optional)
- Drill with 1 1/8 inch drill bit, and 1/8 inch drill bit
Print Parts
- Download the printable parts from the King of the Blaster printables website.
- Print all parts in PETG filament for outdoor durability.
- No supports are needed.
Prepare Bucket
- Use a marker to mark the center of the bucket.
- Trace the shape of to the center of the lid.
- Carefully cut the lid to fit the top case, put the top case into the hole.
- Use 1 1/8 inch drill bit to make holes for the buttons.
- Insert the buttons into the lid holes. Note, the red button should be on the left, with the hole for the LED on top.
- Use a small drill bit to drill holes into the lid in the four corners of the top case.
- Attach the top case to the lid using m3 screws and nuts.
Insert Buttons Wires and USB
- Attach one 7mm momentary push button into the side of the top case (see pictured small red button).
- Find the zip tie mount point, it has a small hole with a large hole next to it.
- Insert the USB cable through the hole next to the zip tie point in the top case.
- Loosely attach a zip tie to secure the USB cable (tighten this later).
- Attach wires to the buttons using a pair of red and black wire for each button.
- Pass the wires through the large holes on the sides of the top case.
Solder LED Wires
- Solder wires onto the LED strip.
- On the end of the DIN wire solder a 330 ohm resistor.
- On the other end of the resistor solder another length of wire.
- Cover the resistor and soldering with electrical tape.
Recommended colors are:
- GND - Green
- 5V - Red
- DI - Yellow
Mount LED to Case
- Put the LED in place as seen in the photo.
- Remove it and note where the upper edge is.
- Add Superglue on the upper edge of the LED.
- Mount the LED display as pictured to the top case.
- Wait for glue to dry.
Note: These photos are from v1 of the top case, but the procedure is the same.
Mount LCD Display to Case
- Attach wires to the LCD display.
- Use short M3 bolts to secure the LCD display to the top case. Note that the top of the LCD should be on the LED side. On my LCD, this was the side with the wire connections (see picture).
Recommended colors for wiring:
- GND - Green
- VCC - Red
- SDA - Brown
- SLA - White
Note: These photos are from v1 of the top case, but the procedure is the same.
Attach Wires to ESP32
Attach the wires to the ESP32. If you are using the ESP32 dev board, I recommend you use some electrical tape or hot glue to secure the wires so that they don't come loose in later steps.
Wire color recommendations:
- D27 - yellow (for the LED)
- D32 - purple (for the menu button)
- D25 - brown (for the red button)
- D26 - blue (for the blue button)
- D22 - white (for the LCD SCL)
- D21 - brown (for the LCD SDA)
- VIN - red for power
- GND - black (note you might have 2 GND ports, does not matter which you use)
Mount ESP32
- Insert the USB into your ESP32.
- Add command strip to ESP32.
- Mount ESP32 in top case above LED.
Note: These photos are from v1 of the top case, but the procedure is the same.
Attach Screen Cover
- Place one piece of acrylic panel over the screen and LED.
- Put super glue in the groves around the screen.
- Attach the black frame on top of the acrylic panel, lining up with the groves.
- Wait for glue to dry.
Connect Wires
- Attach the wires per the directions below, and the wiring diagram.
- Power on the device, and test that all buttons work, screen powers up, and LED lights.
- Use trouble shooting steps below to resolve any issues.
- Use m3 screws to secure the base to the top case.
Connections should be follows:
- LED
- GND to Ground on ESP23
- 5V to VIN on ESP23
- DI to "330 Ohm Resistor" to D27 on ESP23
- Menu Button
- One Pin to Ground on ESP23
- Second Pin to D32 on ESP23
- Red Button
- One Pin to Ground on ESP23
- Second Pin to D25 on ESP23
- Blue Button
- One Pin to Ground on ESP23
- Second Pin to D26 on ESP23
- LCD
- VCC to VIN on ESP23
- GND to Ground on ESP23
- SCL to D22 on ESP23
- SDA to D21 on ESP23
Troubleshooting ideas:
- Double check wiring diagram.
- Check that all connectors are fully connected, if using WAGO's a common issue is to have too short of an exposed wire in the connector. Try to strip a longer amount of wire, and reinsert into WAGO.
- Confirm none of the wires have come loose from the ESP32.
- If LED is not working, confirm the resistor has not come loose from the wire.
- If the red and blue button are backwards - swap the wires.
- If you are testing the device connected to USB power from a computer, try a regular USB power block.
- Note, low power will cause the LCD screen to not work correctly.
- Isolate the part that is not working, and use a meter to test connections.
- Note, after being idle the screen does turn off, to avoid burn in, just press any button to wake it up.
Load Firmware on ESP32
To load the software on to your device, the use this firmware loading website:
https://ryanch.github.io/kotb/
Attach Lid to Bucket
- Attach USB cable to battery pack, and put battery back in bucket.
- Place a heavy weight (such as a sand bag, or plastic bottle filled with dirt) in the bottom of the bucket to prevent tipping.
- Place the lid on the bucket.
Learning: Menu Mode
To enter menu mode press the menu button. To exit menu mode press the menu button. The menu button is located on the wire box.
While in menu mode:
- The red button moves the selection to other items. The selection is marked with <>.
- The button button clicks where the selection that is active.
- Selecting the ^ , and clicking on it will move to the next setting.
- Selecting + will increase a value.
- Selecting - will decrease a value.
Menu settings
Game Mode - This setting lets you select different game modes. See later steps for each game mode description.
Allow Both - This setting controls is both buttons can be pressed to score in a mode. Yes means both buttons can be pressed at same time.
Round Length - This setting controls how long a round will last.
Capture Mode - This setting controls how the buttons work in capture mode. Hold means that to score points the button must be held done. Tap means that after touching the button the team will continue to collect time until the other button is pressed.
Defuse Style - This setting controls what is required to defuse the spike in the spike mode. Easy means just holding the button will defuse. Complex means that random actions such as holding buttons, and tapping buttons are required.
Hot Time - This is how many seconds are required to hold the a team button down until that team wins. For example, 25 seconds means holding the blue button for 25 will cause the blue team to win.
Defuse Time - This setting is how long the button must be held to defuse the spike in Easy defuse style. In Complex style this is how long the player has to perform the tasks before they must restart defusing.
Plant - This is how many seconds holding the button is required to plant the spike.
Spike Time - This is how many seconds until a planted spike is required to win.
Delay Start - This is how the number of seconds of delay before a round starts after starting the round.
Reset Wifi - This is used if you want to pair with a new wifi end point. Currently wifi is only used to download updates on demand.
Device Update - This is used to check if there is an update to the firmware, and if so give you a chance to install the update using wifi.
Learning: Defuse Game Mode
In this game mode, one team is the attacker, and the other defender. Attacker wins if they plant a spike, and the defender does not defuse in time. The defender wins if they avoid a spike from being planted for the round duration.
- At game start press the red or blue button to determine who will be the attacker.
- To plant a spike, the attacker holds their color button.
- To defuse the spike, the defender holds their color button in Easy mode. In Complex mode, they will tap their button and then do what is asked.
- At the end of the game, press both buttons to start the next round.
Learning: King of the Hill Mode
In this game mode teams compete for who can control the bucket for the longest. The game ends when the round time has expired.
- Start the round by pressing both buttons.
- Press the red or blue button to start capturing.
- At the end of the game, the team with the longest time holding the bucket wins.
- The end game screen shows the time the bucket was held in 1000's of seconds for the purpose of breaking ties.
- At the end of the game, press both buttons to start the next round.
Learning: Hot Pot Mode
In this game mode, teams complete to get to the middle and hold the bucket for a short period of time to win and end the game.
- Start the round by pressing both buttons.
- Press the red or blue button to start capturing.
- Hold a button for the Hot Time setting seconds to win.
- At the end of the game, press both buttons to start the next round.
Learning: Optional WiFi Pairing
This is optional, but if you would like to download firmware over wifi you can pair with a wifi network.
- From the menu select Device Update, and choose to <update>.
- Open your phone and find the KOTB wifi.
- Your phone should show a webpage.
- Click on the configure WiFi button.
- Wait for the list of networks to load, this part is slow.
- Select your WiFi network from the list.
- Type your WiFi password.