element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
PYNQ Workshop
  • Challenges & Projects
  • Project14
  • PYNQ Workshop
  • More
  • Cancel
PYNQ Workshop
Blog Ping Pong trainer
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
PYNQ Workshop requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: yuricts
Date Created: 28 Jul 2020 7:07 PM
Views: 325
Likes: 6
Comments: 16
  • pynqworkshpch
  • pynq z2
  • pynqhero!
  • pynqrun
  • pynqhero
  • pynqstarter
Related
Recommended

Ping Pong trainer

yuricts
yuricts
28 Jul 2020

Introduction

 

First of all, this is a work in progress. This blog will be updated regularly. I did not post any of this yet since development is going slow. Partly due to the beginning of July being very hectic work-wise...

Anyhow, I would like to thank the sponsors of these PYNQ webinars, it has been very interesting, I learnt a lot. Please continue supporting these kind of webinars!

 

Current pandemic is not making it easy for any of us, near lockdown situations keep us at home. People seek things to do. I don't know if it is the same in your country, but here in Belgium it is becoming very hard to find ping pong tables, table tennis is a nice sport to practice at home, it keeps you fit which is important nowadays.

My kids love to play ping pong, but sometimes they get frustrated due to the difference in level between them.

 

It would be best to train them individually to crank up their levels.

 

This is why I got the idea of developing an advanced DIY ping pong trainer. You can buy these robots for around 1000 EUR. I think it should be possible to create one with high end features with stuff I have laying around here at home...

 

3D modeling

Basically what you need is a bucket with a tube on which you mount three BLDC motors that have wheels on them which will spin the ball and shoot it away.

 

In this project I am going to get my kids involved, the model you see above here has been designed by my oldest son. I have been organizing summer camps for children the last four years and I see this as a kind of extension to that... ;-)

 

Once he has his model finished we are going to 3D print it and connect the BLDC motors to it.

Since my kids already have some experience with python the PYNQ-Z2 is an ideal platform for this joint effort. At this point you might wonder why we need an fpga for this. But of course we are going to use image recognition to see where the ball ends up on the table and if the user is able to hit it. This way we try to estimate the level of the current player.

 

Some extra features we are thinking to integrate:

- a mobile application to control the training session

- topspin/backspin/...

- swivelling the output so the ball can change direction

- keeping track of the user's progress (if he/she properly returns the ball)

- adaptive training (user has a low level, easy exercises, user has a high level, more difficult exercises)

 

We are using ESCs to control the BLDC. The motors and controllers are sourced from a drone. Using an ESC controlling the BLDC is as easy like controlling a servo motor.

A camera is mounted on the trainer for object recognition. This is the part where I am going to use all of the things we learnt during the sessions by adamtaylorcengfiet, recogizing the ping pong ball and the user with his bat. Wavedrom will used to output some data of our controller.

Controlling using an Android application is something we still need to figure out, but we'll manage to find some way to do this.

 

The PYNQ platform will allow me to get the kids involved in this project, I wonder how they will pick up the process of learning... They're getting a deep dive into engineering ;-)

 

I you're triggered by this project, like and follow, we will be posting the proceedings in August.

 

[Update 29/07/2020]

 

We are going to use a BLDC from Avizar, the MC2834:

The first model is finished:

 

And already printing:

We are printing with ASA filament which is engineering grade and should be quite strong...

 

The ESC we are going to use appear to be no brand... That is, I don't want to cut open the package just yet... We'll try to get them working like this first.

 

Next thing:

The wheels that will be connected to the motors and should barely touch the ping pong balls to make them spin.

One option is to also print them, another option I was thinking of is to create a wooden disk and glue some ping pong rubber to them so we get a nice grip on the ball...

 

Printing has finished:

Motors assembled:

Experimenting with wheels...

 

After having a few days off, to go mountain climbing with the kids, I started enhancing the ping pong shooter.

Added a front cover to prevent being hurt if an o-ring (which will be mounted on the wheels, thanks for the tip dougw) slips off.

Also added a ball coupling, this allows the shooter to move by about 36 degrees left/right/up/down...

 

 

 

After 3 days, the print is ready, next step will be creating a box with a ping pong ball feeder.

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

After updating the discs, serious improvements where achieved for the speed of the ball... At low speed it even shoots away fast!

High speed made me worry of hurting someone...

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

Next to the feeder system, this will be a wooden box in which a servo with circular to linear motion pushes the balls in.

On top of this box one or two cameras will be mounted for the image processing. We will need a high framerate to deal with motion blur... I wonder how many frames per second would be needed to eliminate motion blur... Otherwise we will see trails instead of a single ball.

 

I'll be starting with the first experiments on image processing soon. Wondering if using two camera's would be useful, if anyone has any experience with stereo image processing, feel free to give me some advice...

 

So, what are we going to do with the PYNQ platform?

 

We have to recognize the ping pong ball and check if it has bounced on the table.

 

Doing some filtering we should be able to get the ball position and the table since the ball is plain white and the table has a white rectangular strip.

(some people have done research about this subject already, we might be able to adapt this to the PYNQ platform, still need to read up more on this...)

 

This rectangular strip might give us some clues on perspective and three dimensional positioning...

 

Using Python on the PYNQ platform should make the development a bit easier.

So, from the PYNQ Workshop we will be using the knowledge about the camera input and image processing.

 

[Updates will be posted regularly]

Anonymous

Top Comments

  • yuricts
    yuricts over 1 year ago in reply to dubbie +4

    I buy training ping pong balls in a local shop here...because others are more oval than round... Around 40 eurocents per ball. ITTF balls are really for competition.

    Try spinning some cheaper ping pong…

  • yuricts
    yuricts over 1 year ago +4

    The print is taking almost 3 days to finish (reducing infill was not really an option since we want some rigidity), it is quite a big thing, but I want to print the ball joint in one piece.

    It should be…

  • dougw
    dougw over 1 year ago +3

    Cool project....I want one...

  • yuricts
    yuricts over 1 year ago in reply to yuricts

    It works! I updated the blog...

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • yuricts
    yuricts over 1 year ago

    The print is taking almost 3 days to finish (reducing infill was not really an option since we want some rigidity), it is quite a big thing, but I want to print the ball joint in one piece.

    It should be finished by tonight...

    The biggest risk on failing is when it starts printing the ball joint... cross fingers...

     

    Yuri

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
  • dubbie
    dubbie over 1 year ago in reply to yuricts

    Yuri,

     

    I'll have to try looking for training ping pong balls next time I need some as that is a good price.

     

    Dubbie

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • yuricts
    yuricts over 1 year ago in reply to dubbie

    I buy training ping pong balls in a local shop here...because others are more oval than round... Around 40 eurocents per ball. ITTF balls are really for competition.

    Try spinning some cheaper ping pong balls and you'll see them wiggle.

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 1 year ago

    yuricts  its neet I would love to have one but no room for the table. LOL ok I just love your printer..

    • Cancel
    • Up +2 Down
    • Reply
    • More
    • Cancel
>
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube