Homemade Table Tennis Robot for ~$230

61,180

74

75

Intro: Homemade Table Tennis Robot for ~$230

Overview
After looking around at a bunch of table tennis robots out there to help me practice, I decided to make it a fun project with my wife to build one of our own with a feature-set that was similar to or better than what was already out there. It's been a long on-and-off development cycle, but it's finally to the point of being usable. It utilizes a dual-wheel ball thrower with vertical, horizontal, and rotational servos. It is currently controlled by an Arduino Mega 2560 microcontroller, but I have plans to change that to a Teensy 2.0. Drills are created on a PC using a simple Java application and then saved to an SD card. The Arduino displays available drills on an LCD interface and a standard TV remote is used to select the drill and start/stop it. Power is provided by a standard ATX computer power supply (both 5V and 12V).

I had originally started this project with the intention of making everything hand-made using off-the-shelf parts from the local Home Depot/Lowes, but it quickly became apparent that anything made would not be easy to reproduce so that was idea was scrapped. We then went the route of home fabrication with a 3D printer and purchased a Reprap Prusa Mendel from Makergear to help make any parts that we modeled on the computer. This has been absolutely essential to making this design work :-) So, there will be some parts obtained at a local Home Depot/Lowes and some purchased online. All-in-all, the total Bill of Materials comes to about $230 without shipping. BoM is attached below (as both a PDF and XLSX).

Summary of construction
I will break this out into three main components: frame/ball path (including PVC and custom parts), electronics, and software. To complete this project you will require basic hand tools, a wood saw, a drill, measuring tape, stapler and staple gun, a 3D printer (or printing service), soldering iron, multimeter, and a PC with a USB port (and an SD card reader/writer if you want to use customized drills). While not necessary, I found it much easier to utilize a custom PCB to mount all the electronic components (LCD/SD/resistors/servo leads/etc) - to do so, you'll either need a laser printer and chemicals to do etching, a CNC mill for PCB milling, or utilize a PCB creation service.

Some notes
1) The larger the throwing wheel, the slower it needs to spin since as the wheel gets larger, the linear speed at the outside diameter will increase while the angular speed remains the same. This being said, a larger wheel allows for better granularity of speed as well as quieter operation (lower motor RPM). The downside is that the throwing head needs to be a bit larger.
2) If you throw a ball with absolutely no spin (in table tennis this is a dead ball, in other sports it may be known as a knuckle ball) it will fly very erratically and be incredibly inconsistent. Rather than throw deadspin balls, I found it was better to throw a _very_ light backspin ball so it would fly consistently and be almost dead once it hit the table.
3) With the speed controllers I have selected, if the motor is spinning and is stopped for any reason (too much load, reversed without stopping first, someone held the motor, etc) they will not spin the motor again until they are brought back to neutral (0) throttle. I think this is a safety feature to prevent overloading of the speed controller if the motor is stuck or dead.
4) Due to the nature of FDM (fused deposition modeling - a method of 3D printing), the parts can sometimes be weak along the printed axis. As an example, let's say you printed a cup as if it were placed vertically on a table. If you were to pull the top and bottom in opposite directions, they would come apart quite easily along a layer seam. With this in mind, it can be beneficial to lightly coat certain stress points with plastic cement (hobby glue) to help increase strength. Such places to coat would be hinge tabs, screw holes, etc.

Video overview

Topspin test


Backspin test


Step 1: Robot Construction

The main frame assembly is simply some 2x4, 1x2, plywood, and brackets/screws, so it's pretty simple to put together. Here are some generic notes about the assembly:
1) The pieces of 1x2 that the ball trays attach to are slanted downwards at about a 2-3 degree angle to help the balls roll towards the opening.
2) The pieces of 1x2 that mount the agitator servo only have a single screw per piece so that they can pivot upwards in case of some stubborn balls. There is a screw going into the main frame piece just beneath the 1x2 to prevent the 1x2 from drooping too far down.
 
I have attached the stl files (and reference images) for the printed parts as a zip to this step. Other than that, please follow the detailed images for assembling the robot! Feel free to ask any questions if you need clarification.

Step 2: Assembly Diagrams

On this step I have all of the assembly images. I also attached a zip of the PDF files which can be zoomed in a bit more if needed. Please let me know if you need clarification anywhere!

Step 3: Electronics

Power
At the heart of the electronics is ATX power supply. We will be using two voltages from this power supply: 5V and 12V. A standard ATX has several molex connectors (usually the whitish 4-pin connectors) that have both the 12V (yellow) and 5V (red) feeds. The 12V feed is used to power the Arduino and the main ball throwing motors, and the 5V feed is used to power the servos. A note on getting an ATX power supply to actually power on: computers tell the power supply to operate by connecting the green wire in the large 20(or 24)-pin connector to ground - you can do the same with a paperclip by bridging the green wire to a black wire.

Microcontroller
At the moment I am using an Arduino Mega 2560 to control the robot, but I have plans to port that over to a Teensy 2.0 since it is considerably cheaper, has a smaller footprint, and I can still use the Arduino IDE.

Servos
There are five servos used in this robot. Two high-torque servos are used for the ball feed/vertical positioning, and three moderately torqued servos are used for rotation/horizontal positioning/ball agitation. The servo for ball agitation needs to be modified to be a continuous rotation servo: http://www.acroname.com/robotics/info/ideas/continuous/continuous.html  Alternatively, you can just purchase a servo that is already continuous rotation (such as a Parallax 900-00008), but they cost a bit more.

Motors
The motors that I chose are hexTronik DT700 brushless outrunner motors. I went with brushless motors because of longevity requirements, and as a bonus these are quieter and more efficient than most brushed motors. The speed controllers are HobbyKing SS Series 25-30A brushless ESC and are controllable via the standard Arduino servo library. Finally, since these speed controllers are not reversible, I have two DPDT relays (TE Connectivity RTE24005F) to reverse the motors for excellent spin :-)

Miscellaneous
These items are nice to have, but not strictly necessary to get a ball-flingin' robot :-) The LCD is a standard 16x2 character that is well used in the Arduino community. The SD card is pretty well standardized, and I chose a pre-assembled module so I didn't need to purchase any additional resistors/mounts/etc. The IR sensor is great to control the robot remotely with a standard TV remote - you don't need to program it, just press any three buttons when the robot is powering up to let it know what you want to use for up/down/enter! Finally, the custom PCB is not really necessary, but it sure makes assembly easier!


Construction!
Most of the effort here is in connecting the devices to the Arduino for operation, so it's easier to show you the layout that I generated in CADSoft Eagle. I have also attached the Eagle project file if you wish to make the board yourself and/or get more clarification on where things are connected. The large areas of blue are ground planes. Again, I'd like to note that this is for the Arduino Mega 2560 and I will eventually modify this for the Teensy 2.0. As for other connections that need to be made that are not displayed here:

1) 12V output from power supply goes to Arduino power input (I used a power plug from Radio Shack) and to the speed controllers.
2) 5V output from power supply goes to 5V input on board (for servo use). It is important that you do not try to use the Arduino 5V output to power the servos as it cannot handle the load the servos will require.
3) Brushless motors and speed controllers have three leads. One lead from the speed controller goes directly to the motor. The other two go to the input for the relay - we do this so we can reverse the direction of the motor. See image below for more information. We control the relay with the circuit shown on the board (see here) - the 5V along the top side of the board near the 1N4004 goes to the relay input and the two empty holes just below the 1N4004 go to the relay ground. There are two motors, so we need two relays and two control circuits (note the two transistors/resistors/diodes on the board). For more info on DPDT relays, please read the Wikipedia article for lots of info :-)
4) The LCD that I used was the same one used by Adafruit. A potentiometer is required to adjust contrast on this particular model, but I placed that close to the LCD so I only needed 8 wires (CAT5 ethernet cabling) to connect the Arduino to the LCD.
5) The SD card module that I used already had resistors in place, and you can even use a MicroSD module if you wish. However, if you have a plain old SD slot that you want to use, please be sure to use the proper wiring/circuitry to prevent damage to the SD card!

Step 4: Software

The software section will be split into two parts: the Arduino/Teensy software and the Java application to design the drills to be stored on the SD card. I still have a bit of work to do for the all-in-one control software (conversion to Teensy), so for the time being I will post the Arduino code that I have for testing the robot. It's pretty simplistic, but it works! :-)

Arduino
Full program coming soon. Attached below is a testing application.

Drill Designer
Coming soon!

5 People Made This Project!

Recommendations

  • Optics Contest

    Optics Contest
  • Electronics Tips & Tricks Challenge

    Electronics Tips & Tricks Challenge
  • Audio Contest 2018

    Audio Contest 2018

75 Discussions

0
None
thiagolr

4 years ago on Introduction

Hi, can you please share the Autodesk Inventor files? I need to do some small modifications on the printed parts! Thanks!

4 replies
0
None
thiagolrjosephmalkom

Reply 3 years ago

No, he didn't send it to me! =(

I finally started to work on this project, I have all the printed parts, motors and servos, but I still need the wood/pvc parts.

0
None
CommandoS

10 months ago

guys, may I know the torque and the RPM of the hextronix brushless motor? I felt odd after some calculations I got 1.5m/s of the ball velocity using a 23mm radius friction wheel. Sorry if I'm being rude but I need to know urgently how fast the ball is for my FYP project

0
None
muffadalis

10 months ago

Hello,

I am trying the make this project and I am not able to get some part, either they are discontined or not available and being in New Zealand some sites dont ship here. Below is the list of the part that i am not able to find and anyone suggest replacements?

http://banebots.com/pc/WHB-HS4-244/T40P-243BG-HS4
https://hobbyking.com/en_us/hobbyking-ss-series-25-30a-esc-card-programmable.html
https://hobbyking.com/en_us/ball-and-roller-link-3-9x2x16mm-10pcs.html
https://hobbyking.com/en_us/futaba-servo-arm-set.html

https://www.mcmaster.com/#7959K24 - not available in NZ

Thanks.

1 reply
0
None
bbogdanmirceamuffadalis

Reply 10 months ago

Hello, I had the same problems as you .

Check my remix on thingiverse and let me know if you can find what I used .

For the motors I used RS-540, for ESC Turnigy 20 A, for the ball and roller you can print something . For the servo arm same I designed my own .

0
None
bbogdanmircea

1 year ago

Hello, is this project still actual, or there is a better one made or new revisions to the files ? I saw it 4 years ago first time but I didn't have a 3D Printer, now I have the printer and I would like to build it but I want to know if it is still worth it !

0
None
ashton1o

1 year ago

Very cool I'm starting table Tennis can anyone give me any tips about a good ball robot I'm 12 so my mom would say no on this project but it's a little to much.

0
None
loire49

1 year ago

Hi,

Thank for this very good robot specification.

I would like build this robot. But the page for the wheels that is in Excel file doesn't exist anymore.
Can you tell me what wheel you have used ?

Thank ;-)

0
None
josephmalkom

2 years ago

yes , rods are missing in the design - go to frys they sell the joint and the rod really cheap - what ever you do dont buy from hobbyking - they are really low quality

0
None
thiagolr

2 years ago

Does anyone know the "tie rod" specification besides its length? Can you please give me the link where you bought it? Or a more specific name/type/kind?

3 replies
0
None
thiagolrthiagolr

Reply 2 years ago

Can anyone help me out with this specification? This is the only thing missing, currently the robot is working without the vertical/horizontal control.

0
None
JosephM28

3 years ago

not that I am against Singapore or China - it will also take few weeks for item to arrive even though they fasly declare they have a warehouse in US now

0
None
JosephM28

3 years ago

not that I am against Singapore or China - it will also take few weeks for item to arrive even though they fasly declare they have a warehouse in US now