Source Code Back to Video

Real-Life Mario Kart - System Overview

Introduction
The goal of this project is to recreate Nintendo’s Mario Kart game in real life. This involves building a system to control the movements of a full sized go-kart as well as a wireless communication system. The end result is a go-kart system where each player can race around a track and pick up items that alter the behaviors of the go-karts. Special Thanks to Austin's Park for letting us modify their karts and track.
System Overview
The go-karts behave normally until an item is detected. RFID tags embedded into each item transmit signals to the readers located on each kart. The NI CompactRIO (cRIO) device processes these signals and outputs the signals to control the corresponding pneumatic valves and servo motors that control the movement of the go kart. Two pneumatic cylinders control the steering and one cylinder controls the brake. The governor, or speed limiter, is controlled with two servo motors.
The units for the items listed in the following sections refer to the amount needed per kart.

We used a lot of duct tape... We used a lot of duct tape...
System Diagram​
Steering Control

The pneumatic system for controlling the steering consists of:
2 cylinders
2 three-way normally closed valves
1 high-pressure air tank

Each cylinder is positioned so that the rod is connected to the wheel bracket. The movement of each cylinder is controlled by a valve. The valve normally exhausts so that the steering can be freely controlled by the go-kart driver. When the valve closes, the pressurized air passes through to the cylinder and the rod extends, locking the wheel in a rotated position.

Brake Control
The pneumatic system for braking consists of:
1 cylinder
1 three-way normally closed valve

1 high-pressure air tank (shared with the steering control)

The cylinder is positioned so that the rod is extended and connected to the back of the brake pedal. With the valve open, the air exhausts and the brake behaves normally. Once the valve closes, air passes to the cylinder and the rod retracts, pulling the brake pedal downward, forcing the kart to brake.

Governor Control
What was used:
2 servo motors

The go-karts that were used for this project had a governor that could be adjusted by simply pushing a pin in the back of the car. We attached two servo motors to allow us control over the governor. One servo was attached so that when it rotated, the pin was pushed in fully, allowing a full boost in speed. The other servo was attached so that when it rotated, the pin was pulled back completely, cutting off the gas.

Electronic Control
Our electronic control system consisted of:
NI cRIO-9014
NI 9401 DIO Module

NI 9403 DIO Module
 

NI CompactRIO (Compact Reconfigurable Input/Output) is a real-time controller that we programmed with LabVIEW. The CompactRIO device was responsible for processing signals received from the RFID reader, communicating with the central host computer, and outputting the appropriate signals to control the behavior of the go-karts. These signals are outputted through the NI 9403 module, which was used to send digital high and low signals to the pneumatic valves as well as PWM (Pulse Width Modulated) signals to the servo motors. We used FPGA code to control the NI 9403 module. 

Item Detection
What we used:
Wavetrend Serial Port Reader RX300
Wavetrend Personnel Tags TG501
To implement the item system, we turned to RFID (Radio Frequency Identification) technology. By implanting active tags in each of the items and connecting a reader to the serial port of each CompactRIO device, we were able to detect items as they came in the vicinity of each kart. We chose to use active rather than passive tags due to the increased range of detection. Active tags actively send out signals due to a built-in battery. This allows active tags to be detected within a range of at least several meters. Passive tags are unpowered and can only send out a signal when they are close enough to a reader to draw power from it. This gives a typical detection range of only a few inches. One unique feature of the system that we used was that the readers could detect not only the tag IDs but also the strengths of the signal from each tag. This allowed us to determine the distance from the tags to the readers.

Communication System
1 wireless router per kart
1 central wireless router

Each kart was outfitted with a wireless router that was connected to the CompactRIO controller. By having a central host router, all of the routers could be linked up to the same network. Therefore, each CompactRIO device could communicate wirelessly with the central computer. The central computer can access each CompactRIO device and allow manual control of the movements of each kart. To share information between each controller, we used Network-Published Shared Variables.

Software
There were two sets of LabVIEW code for this system. Each of the four CompactRIO devices was programmed with the same LabVIEW Real-Time code and the central computer (PC) has the other LabVIEW code set. The CompactRIO code is composed of two major sections. The first section is responsible for reading information detected by the RFID reader from the RFID tags, decoding this information, updating the database hosted by the central computer, and sending commands to the second section of code. The second section outputs the appropriate signals to control the movement of the karts based on the detected item. Check out the Software Overview.

Got a question? Ask us on Twitter or Facebook.

Why are you even looking down here?