Levitating a Ping Pong Ball – Obliterating All Obstacles

Welcome back to the Digilent Blog!

I’m happy to say that this is the final stop on my journey towards levitating a ping pong ball. I started out with some first steps and then a more serious attempt, both of which had their own obstacles to overcome. But I have now successfully overcome all of the troubles that I encountered. Admittedly, (and sadly), I didn’t actually go Super Saiyan, but I’m pretty sure I was close.

For this final iteration, I ended up using a few different things: a PmodACL2 to measure the static acceleration, a WF32 to read the acceleration values and control the fan speed, and a PWM controllable DC fan. The PmodACL2 ended up being ideal as a user input for the height control, because people are able to hold it in their hand and rotate the Pmod back and forth to see a visible change in how high the ping pong ball is floating. The accelerometer can also be set back down without any damage to the overall setup or generating errors since it is either rotated or not rotated.

Controlling the height of a ping pong ball with Digilent's PmodACL2 and WF32.
Controlling the height of a ping pong ball with Digilent’s PmodACL2 and WF32.

I choose the PWM controllable fan for multiple reasons: it ran at 5V so I could easily power it from the microcontroller and allows for PWM control so that the fan speed can easily be adjusted from a digital signal to levitate the ping pong ball at different heights. At 0.9 Watts and 7.4 CFM (cubic feet per minute), it ran at a low enough power to be easily run from a small external power supply, but with enough “oomph” to levitate the ball the full 4 foot length of the tube. It was also small enough physically to have the column of air that it produces nicely take up the whole space inside of the tube, ensuring both that there is not any wasted air flow going around the sides of the tube, and ensuring that it is not too small (which would mean that the air has to expand to fill the tube, losing a lot of its speed and energy).

Digilent’s WF32 is the brain behind the operation; with plenty of I/O and an on-board Wi-Fi chip, the height control project can be easily expanded to simply be able to control the height of the ping pong ball remotely or implement side projects such as working with LabVIEW through NI’s LabVIEW MakerHub LINX.

You can check out how the final project is put altogether at Instructables, or if you simply can’t wait that long, check out the picture and short video of it in action on Digilent’s Twitter and Instagram. This project will also be demo’d at booth 308 during the ECExpo 2016 at ECEDHA—feel free to check it out if you’re in the San Diego area!




Be the 1st to vote.

About James Colvin

The biggest thing that I enjoy is learning new things. Especially things involving some type of technology; computer components, fun gadgets, games, coding techniques, etc. I love spending time with my wife and our two sons and hanging out with our friends. During my normal work day, I manage the Digilent Forum and the North American Support team.

View all posts by James Colvin →

3 Comments on “Levitating a Ping Pong Ball – Obliterating All Obstacles”

  1. Hi, I’m planning to do a project like your for a class of Control Systems that I’m enrolled.

    Where can I have more information about your implementation? Have you done any kind of transfer function for your system?

    Matheus Silva.

    1. Hi Matheus,

      I’ll upload my code to the post so that you can see it, but this is an open loop system with no feedback, so I didn’t use any fancy transfer functions (at least not ones suitable for a Control Systems class). What I did was read the acceleration value from the accelerometer and then scale the acceleration data to a duty cycle for the fan (between 0 and 100%).

      James Colvin

Leave a Reply

Your email address will not be published. Required fields are marked *