Shakila Praveen Rathnayake

shakilar.com
~/ projects / pid-aerodynamic-levitation
Control Systems View Code

Ping Pong Ball Levitation PID Control

A PID-controlled aerodynamic system that levitates a ping pong ball at a precise height using ultrasonic feedback and a blower fan.

ArduinoC++MATLABSimulinkPython

Overview

This project implements a PID control system to levitate a ping pong ball within a vertical tube. By regulating the airflow from a DC blower fan based on real-time position feedback from an ultrasonic sensor, the system achieves stable levitation at a user-defined setpoint.

Key Features

Hardware Setup

The system consists of:

Methodology

Control Strategy

The controller was developed in three stages:

  1. Manual Tuning: Initial P-I-D values were approximated experimentally to achieve semi-stable levitation.
  2. System Identification: Real-world input/output data was collected and imported into MATLAB to generate a transfer function for the “plant”.
  3. Simulation & Refinement: Simulink models (both continuous and discrete) were used to fine-tune the PID gains for optimal stability and response time.
Back to projects