TABLE TENIS ROBOT

Created by [Advay Roongta] • Started on June 07, 2025

Robot that moves paddle along 1 axis to return table tennis ball

Note:

I haven't been working on this every single day, so for example the gap between July 21 and 23, I didn't do anything on this during the 22nd.

June 9th: Just researching and finalized a rough design, 2hrs

[So heres what I figured out so far about how it will work: Nema stepper motor with a keyed belt attachement for the timing belt. The motor will be stationary and the belt will go around the vslot with an idler (wheel) on the other side. Then theres gonna be a gantry (plate) with wheels that gets attched to the belt just by feeding it through the holes on the side and securing it with tape or bands. For ball tracking perhaps an ESP-EYE from Visioneer that goes on top of the gantry plate. Then it could work by recognizing the ball by color and making sure it is in a certain range of x values that will be in the middle, and if the ball is not in that ideal range it will move depending on how out of the range it is. The stuff I would have to do:
Firmware CAD: [ Mount for paddle to gantry
Mounts for table to v-slot
Mount for gantry to mcu
Mount for motor to vslot and idler ]

Timing Belt

Idler Pulley Plate

V-Slot NEMA 17 Linear Actuator

Total time spent: 2h

June 10th: Started code, time spent: 1hr

Its in python and so I just wrote the framework with OPenCV. Its only 20ish lines right now. Since i'm using the HoughCirlces function from OpenCV I had to meausure the minimun and maximun pixel radius of a table tennis ball. I took webcam photos from 7 ft and 1 ft away and measured it using this website called ImageJS.
image

June 13th: Implemented color trakcing with code,2.5hr

I made the ball only register if it was white in color, and this works a lot better, and cuts out most other noise. Before it would think that my fingers and nose and eyes were circles. I also messed around with the Hough transform parameters to give me the best results. It works much better at close and moderate distances, but not so much at farther distances. I am exploring other options such as an elliptical transform. I also wrote some code that only chooses the ball if it is moving from its current position, but the color tracking kind of makes that redundant since in the real case (me playing ping pong) there will only be 1 white ball.
image

June 15th: Ball tracking complete with mask, 2hr:

Since the hough transform wasnt working well for farther distances, I used a color mask to first filter out all colors except orange (which will now be the color of the ball). Then it locates the ball based on the contours and size, and finds the center by using a cv2 function that returns the center coords for the smallest cirlce that fits around the contour. TLDR; It works! ONTO THE CAD PROBABLY NOW
image

June 30: I'm ill

I've been traveling for the past 2 weeks and fell quite sick a few days ago.

July 21: Motor mount done, 4 hours (first CAD)

I made a mount from the vslot to the motor by using a threaded tnut that goes inside of the vslot extrusion, and then a screw that goes in there. The mount has a threaded hole for the screw, and a larger one for the motor, connected the two. I ran into a few issues about parts not working together such as the first few tnuts I found being too big. Through this proccess I also did a little bit of part sourcing, like finding the exact vslot I will buy when I get the grant :).
image
image
image


July 23: Fixed motor mount, added table mount: 3.5 hrs

So I first realized my motor mount was a bit flawed because it was only connected to the vslot at one point, which it not too stable, so I added another tnut and screw at the bottom. This fixed the issue, but then a few hours later I realized that having it at the bottom would block the belt from going around the vslot, which is vital, so I had to move it to the side. I also realized that the motor was quite high up, so I just lowered it down to make it centered with the vslot. I also today made the table mount to connect the whole thing to the table. I attached it to one side by using the same bottom platform for the motor, I just made a extrusion downwards and then a screw hole, there is also a screw hole on the top of the mount so they can connect with a screw. Tmrw I will do the idler mount and attach the other table mount.

image image

image

July 24: Added Idler mount, 1hr

Today I added the idler mount to the other side of the vslot. It works the same way as the motor mount, except it attaches to the idler by going inside it (since it has a hole) rather than around the circumfrence. Didn't do much today but yeah.

image

July 25: Attached other table mount, 1hr

So today I first attached the other table mount to the other side of the vslot where the idler is. I just made an extrusion down from my idler attachemetn and put a screw hole that can be conncted via a screw to the screw hole on the mount. this is the same way the other one works. I had to dimension the whole thing in a drawing to make sure that the two table mounts were lined up, and uh yeah. The nice thing about my table mount design is that because it uses screws, depending on the length of the screws, the mounts can be moved in parrallel to the table, meaning that no matter what happens, they will be able to fit on the table as long as they are the same height. This is because if the whole vslot system is 4.9 ft but the table is 5ft I can just move the mounts farther towards the screw head (if its facing away from the table) and the vslot system will get longer.

image image

July 27: MCU Mount, 1.5 hr

So today I made the mount for my mcu (which has a camera) to the grantry plate I chose. Because I have the mcu already at my house I was able to measure everything and make a simple but working mount that attaches onto the sides. The reason it wont go in the middle is because I dont want to obstuct the Micro USB Port and because the chip on the back of the board bumps out, and I didnt want to waste the fillament. This is sturdy enough by keeping the board straight and attachning from both sides. The reason I didnt make it go around the front of the board more is because it would then block the ports that I will need to connect to my motor. Also, in the gantry plate that i'm going to buy, the holes o the sides are big enough to fit the timing belt. I'm making good progress currently, the only part left to do is the paddle mount, which I think can be done in 1 day of locking in.

image


image

July 29, Paddle Mount+ Full assembly, 2hrs

OMFG I AM DONE. Today I worked on my paddle mount and did the complete CAD assembly. First I had to precisley measure my ping pong paddle's handle, which took way longer than it should have, because its not a normal oval or anything (as shown in the sketch picture) I also dont have callipers so I had to use a blue broken transperent half-ruler and constantly convert inches to mm. After that, because my paddle has a hole in it, I cadded a shaft in my mount to go inside the hole for additional grip. For attaching the mount to the gantry, I did it the same way I attached the mcu mount to the gantry, a plate with a screw hole. I had to make these twin bars connecting the plate with screw hole to the mount because they could not be directly jointed, due to the vslot being in the way. I made these bars pretty chunky because the paddle will wheigh a lot and it needs to be stable. For the complete assembly I just imported components and moved them in place. :)

image

image

image

July 30, Firmware, 0.5hr

Just did the firmware and wiring to make the motor move. Today will be the day I also submit, I have now have to do parts sourcing and CAD renders.

image

8/8, Color+Made paddle mount better. 0.5 hour

I added color to the project, and made the paddle mount have holders for pencils that I will connect to the paddle using VHB to make the connection stronger. I also made the mount thicker.

image

image