Skip to content

Purdue ECE Senior Design. A Player vs. Robot foosball table consists of ball tracking, trajectory computation, and motion control. We plan to use 4 microcontrollers to perform the tasks and an OLED display to interact with the user.

License

Stamic-kk/CyberBall-Showdown-The-Ultimate-PVR-Foosball

Repository files navigation

CyberBall-Showdown-The-Ultimate-PVR-Foosball

Purdue ECE Senior Design. A Player vs. Robot foosball table consists of ball tracking, trajectory computation, and motion control. A Jetson Nano serves as the central computation core, and a STM32F091 MCU is charge of all measurements and motion controls.
See our website for any progress: https://engineering.purdue.edu/477grp9/

Description

Project Name: Cyberball: The Ultimate PVR Foosball

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.

File Organization

CAD

Fusion 3D file for packaging design.

CyberBall - Configuration Code deployed on STM32F091 MCU (via Software Peripheral)

inc - include headers
src - source files
CyberBallConfig.cfg - run/debug configuration

PCB - Kicad PCB design files

Librarys - Customized PCB layouts
Hall_effect_sensors - Rod Position measurement board (x3)
Power_Supply - Power supply board (commerical regulator modules needed)
Senior Design - Main function board
User_Interface - User Interface board with a screen on it.

nanoBrain - central control system runing on Jetson Nano.

cppSolution - CMAKE project for the workflow running on Jetson Nano\

include - include headers
src - source files
uKal - helper submodule for the Kalman filter\

Notes

IMPORTANT: The VDD and GND pin are reversed on the pinout of connection for servos on the power supply board.

  • VDD labled on the board should connect to GND pin on the servo.
  • GND labled on the board should connect to VDD pin on the servo.
  • No changes should be made for PWM control signals.

Note: disabled nvgetty for uart

About

Purdue ECE Senior Design. A Player vs. Robot foosball table consists of ball tracking, trajectory computation, and motion control. We plan to use 4 microcontrollers to perform the tasks and an OLED display to interact with the user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published