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
Step 1: Robot construction
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
Steps.zip4 MBStep 3: Electronics
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!
PongRobot.zip430 KBStep 4: Software
Arduino
Full program coming soon. Attached below is a testing application.
Drill Designer
Coming soon!
RobotTester.zip2 KB










































Visit Our Store »
Go Pro Today »



This looks like a great project. I think I will try to make one. Can you tell me how close the rollers are to each other, presumable they have to pinch the ball a little so the centres of the rollers must be slightly closer than the combined diameters of the roller plus ball?
You also mention the need to have the rollers going in opposite directions for extra spin! Is this really necessary?
Many thanks for your answers.
Hubert
Cheers
Hope you are doing fine.I have completed about 75% of this robot and need your advice/help in software code,I can operate individual components successfully but face very wierd problems when i combine everything. whether it is possible for you to share your operating code having remote interface for my reference ? My email Id is shail363@yahoo.com
Thank you very much in advance and have nice day.
Thank you very much
Hope you are doing fine.Apologies if i am bothering you. I would really apprecite your help for connecting Arduino and Sevor motor with ATX power supply.
1) How to power arduino with ATX power supply securely ?
Which wires from ATX should be connected?
(You have used power plug.Whether it is possible for you to provide link for the image of Power plug so that exactly I can understand)
2) How to connect 5 Servos with ATX power supply/Arduino ?
(what I understand is that Atx will supply power through power jack and can be accessed throught 5vin ? but not clear how to wire it
Whether it is possible for you to put simple hand made diagram showing wiring across Atx power ,Arduino and Servo motor ?
Once again Thank you in Advance
Cheers
shail363
As u said, molex connector has 2 inputs for 5 v(+tive and -tive)
So my real question is how do Iconnect 5 +tive lead from ser
vo and 1 + tive from arduino into 1 +tive molex hole.(same goes for brushed motorsh
https://www.sparkfun.com/products/11300
How do you control the spin (top/back/side) of the ball ?
Hope you are doing fine
First of all this is great Great Project done......
I came across your project when i was searching home made TT project .I am also TT player :)
I would really appreciate if you help me to understand Arduino alittle bit.I am newbie for Arduino.(I was inspired by your project though)
I was very simple question.I understand that you have created Sketch for Arduino and uploaded in it.Test it ,Works fine.....Proto type done.
How do you implement in practical life ? Suppose if you need to take this robot to club, whether this Robot will still work with Arduino board with same setup or you have to create your own Circuit Board ,mount all components and use it
Thank you in Advance
Regards
Shail363
Thank you very much for prompt reply.
My question is slightly different and is verrrry basic.It is related to ARDUINO BOARD itself.Apologies if that was not clear to you.I will try to make very clear.
Consider that your final sketch is ready and uploaded in ARDUINO BOARD and you take drills from SD Card.
Q1) Whether ACTUAL ARDUINO BOARD is installed in the robot that is shown in the video ? (i was thinking ARDUINO BOARD is only used for prototype and cannot be used independent of Computer.Corrrct me if I am wrong)
Q2) Whether ARDUINO BOARD will react to program stored in it wihout DEPENDING on COMPUTER ?
Q3) When progam is uploaded in Arduino and Power is Switchd off then whether same program is accesable when it is switched on ?
Regards
shail363
Wow... That great...
Controlling 4 Servos, 2 Brushless motors ,SD card, IR and LCD on just one Arduino Mega.After hooking up all these components,whether Arduino Board is capable of taking the load for continous usage without over heating?
For SD card and LCD have you used any shield ?
For how many hours continuoulsy you have operated it?
Whether Arduino board can handle daily practise of 2-3 hours?
Thanks in advance
Thats great.
If 4-5 Servos are operated togther.,whether they are not noisy ?
If yes then what alternative you will suggest for this ?
Cheers
Thank you very much for your reply.Hope you are doing fine.
I have decided to make this robot and would really appreciate your expert guidance in electronics part.
I was searching to buy Arduino mega 2560 .So i found Arduino mega 2560 R3 Whether I should go for r3? whether being R3 will create any issues ?
I am also planning to consider this robot to operate on Battery which will be chargebale and run for 2-4 hrs .Can u please suggest me which battery is suitable for this purpose ? (Effective in term s of cost and performace)
have nice day
Cheers
I'm not sure how you could pull it off with a battery since, as configured, this robot uses both the +5V and +12V rails of the ATX power supply (for the servos and the motors). Maybe you could find some high voltage servos that could handle 12V...
How r u doing ? Hope you had nice weekend.I need little help of yours and hope you don't mind bothering you .I have bought almost all of the items except 3.I searched alot for exact configuration for following 3 items but was not able to find.( especially Transistor and DPDT relay.)
1)Power supply Unit
2) Transistor
3) DPDT relay
I was just able to find closest match for Transistor .Can you please let me know whether this item is fit for purpose as there is slight difference in configuration.and whether these difference effect any performance or change in circuit?
My Transistor link : http://www.ebay.co.uk/itm/2N2222A-TRANSISTOR-NPN-TO-18-Pack-of-1-FREE-UK-POSTAGE-/221034462712?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item3376ae3df8
Your Transistor link for comparison: http://gb.mouser.com/Search/ProductDetail.aspx?R=2N2222virtualkey61000000virtualkey610-2N2222
If they are not fit for purpose , then Can you please help me in identifying these 3 items from "ebay.co.uk" as i Stay in Uk. I am using same motors as yours (http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=6246)
And for power supply unit you selected,there is just one output of 12 v @ 18 Amp.How 2 Brushless motors are controlled ? As Brushless motor will take max current of 13 amp and there are 2 motors?
What important I should look while selecting PSU ?
Thank you in Advance
Cheers
The brushless motors are nowhere near their max load, and the only time they are under any load at all is the brief period when the balls are in contact with the wheels for launching. I believe most computer power supplies over 300W should be ok with the load.
Hope you are doing fine and had very nice week end.
I am manufacturing parts for robot and its been a month now.I am lacking much behind.
I want your help in deciding battery pack as I am not going with ATX Power supply as my club may not allow me plug as it requiers test certificate.
Can you please advice which rechargeable battery pack will be good to run this robot for 3-4 hours.
Whether NIMH,LIpo or any other best one.My budget will be up to 50- 60 pounds
I am just considering following components for robot:
Infra red receiver: 1No
Brushless motors :2 nos 11.1v 13amp max
servo motor : 4.8 - 6v 4 nos
how much operating current will following component require :
Brushless motor =??? Amp
servo motor =??? Amp
How to decide how much current has to be supplied to Servo motor as specification does not mention any Amperes.
I have Arduino mega which supplies 40mamp current and Servo operates with load of 500 grams.
But i am not sure how much current should be passed to servo
If I am deciding to buy 12 v battery pack , whether I can use voltage regulator to reduce voltgae from 12v to 5v for servo motor.
But here should I be concerned about current that will be passed to servo oR sERVO itself has capability to take care of that
cheers
Shail363
One question: Can it mix top and underspin from ball to ball? So every other shot is an underspin ball for instance. I have a RoboPong 2050 and it is very good but I really miss being able to train changing spin.
By the way, how did you get these mad engineering skills...?
Regards
I've always been a tinkerer and enjoyed building stuff, and my wife is a mechanical engineer so she taught me how to use the 3D modeling app.
Which 3D app are you using?
Can you explain/clarify how you connect the controlling wire of ESC to the arduino ?
TIA.
Here are my questions:
1. Why you need to put a upper ball detent ring ? What will be result if you omit it?
2. In your design, you use piston to feed the ball, what is fastest rate of feed?
3. from my understanding, your ball feed servo determine the rate of how often the ball is throw, right ?
1) The upper ball detent ring is used to prevent the balls from falling forward when aiming the ball launch downwards (I find having the ball bounce on the far side of the table first works better for topspin balls).
2) Right now I have it set to a max of 1 ball every .6 seconds. I might be able to speed that up, but I didn't find it necessary. You can probably get a faster servo to speed that up as well.
3) Correct.
Thanks for quick response. I planning to build this robot. I still have questions,
How do you compare your robot with other Robo Pong in the market that uses single motor to launch the ball ?