Why
Within about ten minutes of our first golf cart working, my co-founder and I had both jumped out and were running around a field in front of it, with no way to stop it except chasing it down. An empty vehicle driving itself had a huge effect on people watching, so to keep giving those demos safely we needed a wireless way to stop it.
How it works
The cart used a National Instruments roboRIO (built for FIRST Robotics, which we both knew well) to interface with the vehicle and take commands from a Linux PC. Its watchdog only enables outputs while it keeps receiving a specific UDP packet, which we had already reverse-engineered so the PC could supply it.
So we put a router on the vehicle to create a local network, and had a handheld Wi-Fi unit send the packet to the PC, which relayed it to the roboRIO. I designed and built the enclosure around a Particle Core Wi-Fi microcontroller, a repackaged rechargeable USB battery, a couple of LEDs and a microswitch trigger.
Watchdog relay
- HandsetTrigger heldParticle Core over Wi-Fi
- NetworkRouter on the vehicleLocal network
- ComputerLinux PCRelays packets both ways
- ControllerNI roboRIOOutputs enabled only while its changing watchdog packet is answered
Fail-safe behaviour
- Holding the trigger enables the vehicle; releasing it applies full brake for two seconds, then disables the outputs.
- The packet is a response to a continuously changing packet from the roboRIO, so replaying an old one does nothing, and only the handset knows how to answer. Everything else just relays.
- If the handset’s software or switch fails, it can simply be powered off from the bottom, which stops transmission.



