Project Name:

Cyberball: The Ultimate PVR Foosball

Project Description:


Foosball has been a popular form of entertainment for people of all ages. However, one constraint of the game is that it needs two people to play. It is not entertainment for an individual. Based on this issue, “Cyberball: PVR Foosball table” enables a player to play against an automated system, which consists of a high speed camera, three arrays of digital hall-effect sensors, two dedicated MCUs, and a set of servo motors.
The STM32 MCU leverages the data collected from hall-effect sensors to determine the location of the players on the rods. It then sends the location data to the Jetson Nano Developer Kit via UART protocol. The high speed camera captures the images of the foosball table and sends them to the Nano developer kit by USB protocol and Gstreamer pipeline with v4l2. Nano Developer Kit runs the Min-Max Location algorithm from the vision programming interface(VPI) to locate the ball, predict the trajectory using the extended Kalman filter, and make the decisions on moving rods, which the MCU processes into motor control signals. To achieve the detection purpose, the ball is colored uniquely. A sensitive pressure sensor is used to detect the goals.
The dynamics of the system contain two dimensions. For the rotational aspect, each rod has a high torque servo motor attached. These motors are continuously signaled on a constant frequency PWM, which allows the figures on the rods to maintain a swaying, kicking motion. For lateral movement, a structure of cables and pulleys transfers the angular momentum generated by a high speed servo motor to the linear motion of the rod. An MCU generates the PWM signal that activates the transistor channels between the servo and the DC source to make the servo rotate to the desired angle. This angular displacement pulls the cable attached to the rod, moving it horizontally.
An OLED display and a keypad connected to the STM32 act as the user interface where the users start/reset the game and view their goals. The OLED display communicates with the MCU with the SPI protocol and can be used to display the scores and user command options. The keypad (button array) communicates with the MCU through GPIO to send commands including start (power-on), re-start, and pause.
The power constraints are summarized as follows. The system needs a 6.8V DC for all 6 servo motors. MCUs and Jetson Nano will be powered by a 3.6V DC and a 5V=4A supply, respectively. The total power consumption is estimated to be 120W. The user simply plugs in the supplied 12V 30A AC/DC adapter. A set of buck converters and linear regulators will step down the main power source to voltages/currents required by the components.

Project Specific Design Requirements (PSDRs):

  1. PSDR #1 (Hardware): An ability for the microcontroller to read arrays of digital hall effect sensors to detect the position of the player bonded with magnet.
  2. PSDR #2 (Software): An ability for the single-board computer to locate the ball from the image capture pipeline, using computer vision.
  3. PSDR #3 (Software): An ability for the single-board computer to compute and predict the trajectory of the ball using the extended Kalman filter.
  4. PSDR #4 (Hardware): An ability for the microcontroller to generate PWM signals that control the servo motors, coupled with pulleys and cables, to control the lateral and rotary motion of the rods.
  5. PSDR #5 (Hardware): An ability for microcontroller to establish communication with the Jetson Nano via the UART protocol, and with the OLED display via the SPI protocol.
Resources Navigation