![]() |
Zap'Em Blast'Em Robots
robots that play laser tag!
|
The circuit design was developed using Fusion 360, and the custom PCB manages all core aspects of game control. Debugging and firmware development were facilitated using an ST-Link programmer, with UART communication enabling real-time testing and output monitoring.
The PCB includes integrated circuitry for multi-voltage power regulation (6V, 5V, and 3.3V rails), dual H-bridge motor driver support, and a wide array of GPIO and analog interfaces connected to an STM32F411CEU microcontroller.
In total, 39 wire-to-board crimp connections were required to interface all peripheral components, utilizing nearly every available pin on the microcontroller.
Laser control
To control our lasers, we use a PFET along with an open-drain GPIO. This allows us to use a single MOSFET and a single pin to drive our laser. The selection of our MOSFET for this purpose was critical. It needed to have a source voltage that was also compatible as the gate voltage. We connect source and gate through a 10 kOHm resistor. When our pin is in open mode, our source voltage goes to our gate which closes the switch. When our pin is drain mode, our gate voltage is pulled to ground within our microcontroller which opens the MOSFET switch, turning our laser on. When our board was delivered, our lasers did not work as planned. This ended being due to an incorrect schematic symbol and pcb footprint. The ones provided on digikey were for a NFET which meant that our pins were all rotated by one. Luckily, this meant, with some careful heatgun work, that we could rotate our MOSFET by 120 degrees to get it working again.
Future iterations of the PCB may involve more deliberate pin assignments, particularly for the audio interface to improve performance and simplify routing. Additionally, a larger microcontroller may be necessary to accommodate expanded functionality, as the current implementation pushed the limits of both available I/O pins and onboard memory. The inclusion of audio files—stored in flash or handled through runtime buffers—nearly exhausted the system’s RAM, highlighting the need for increased memory capacity in subsequent designs.