I'm in the early stages of building my own ping pong robot. The idea is to drive 3 motors for shooting the balls (like this design: Butterfly Amicus Prime Table Tennis Robot (2018 Model)). I'll 3d print the 'head' with mounts for the motors, so they'll
Disclosure: I'm not an electronics engineer so I'm basing my ideas on stuff I've read online and my very basic electronics skills.
This project is a source of inspiration: http://www.instructables.com/id/Homemade-table-tennis-robot/
They use 2 motors - I want to implement 3 in order to be able to control side spin on the balls (so I need to control speed on each motor individually). They also use brushless motors and ESC's for control. I'm thinking of using normal brushed DC motors, as it seems to be the more economical solution.
I've found these motors: https://uk.rs-online.com/web/p/dc-motors/2389721/ , but must admit I find it difficult to figure out how to choose the right motors. Which speed and torque I need, I really don't know how to predict. I think it's something I need to test and hope for the best.
My initial idea was to drive 3 of these motors with two L298N motor drivers (https://uk.rs-online.com/web/p/motor-driver-ics/0636384/), but I've since read some negative stuff about these drivers. Especially in regards to the high voltage drop at high amps and problems with overheating. So now I'm not sure (the motors might be a bit to powerfull for these drivers anyway?). I could drive them with PWM with a simple mosfet if I understand it correctly, however I would optimally want to be able to reverse the motors for added spin.
To start with I hope someone can help me with:
Recommendations on motors to use for this project
Recommendations for how to control these motors, optimally both forward and reverse
The next step is to feed the balls to the 'shooter' which probably require another DC or maybe a stepper motor and possibly also pan and tilt the 'shooter' to vary the type of shots again adding motors to the mix.
I accept that you are not an electrical engineer, but you must have a lot of mechanical engineering experience to even consider such a beginning project. Please explain.
To control the motors, all you need is an H-bridge. For not too powerful motors you can get an integrated chip (like the L298 but then MOSFET based for much lower losses), or you can build one yourself using four MOSFETs. Not too hard to do, you can find schematics and all info you need about them easily on Google.
The hard part is the actual motor control.
For different spin, I suppose you'd have three motors at 60 degree angle. You'd have to accurately control the actual speed of each motor - the instructable has no mention of speed feedback. Without speed feedback and making sure the motors run at the speed you want (not "a little faster" or so) no chance to get he control you are asking for.
Paul_KD7HB:
I accept that you are not an electrical engineer, but you must have a lot of mechanical engineering experience to even consider such a beginning project. Please explain.
Paul
Hi Paul. I am a mechanical engineer and I've worked a lot with Arduino as well. Unsure what you want me to explain..
wvmarle:
To control the motors, all you need is an H-bridge. For not too powerful motors you can get an integrated chip (like the L298 but then MOSFET based for much lower losses), or you can build one yourself using four MOSFETs. Not too hard to do, you can find schematics and all info you need about them easily on Google.
The hard part is the actual motor control.
For different spin, I suppose you'd have three motors at 60 degree angle. You'd have to accurately control the actual speed of each motor - the instructable has no mention of speed feedback. Without speed feedback and making sure the motors run at the speed you want (not "a little faster" or so) no chance to get he control you are asking for.
Hi wvmarle! Thanks for the feedback.
Any concrete ideas for a mosfet based IC for motor control, that I can use with an Arduino without too much hassle? I find it quite difficult to figure out. I found this: https://dk.rs-online.com/web/p/motor-driver-icer/9062978/ , but dont know exactly how to figure out if it's a good match.
You are correct about the three motors at a 60 degree angle. I'm guessing the intructable relies on the ESC's to control the speed of the motors accurately enough. What kind of 'inaccuracy' would you expect from driving the motors without speed feedback? I think +/- eg. 10-15% is okay for this project?
I think adding speed feedback for the motors would add too much to the complexity of the project, unless you have some strategies for how to do it in a practical/not to difficult way?
Alternatively the varying or random spin and speed must be seen as a feature.
Yes, you could use such a driver but it's going to be 1000 times easier if you use one that's already mounted to a board.
My favourite go-to driver for any 2-wire DC motor is the Sparkfun Monster Moto. It is pretty much indestructible for motors with peak loads up to 30A. (Keep the nameplate rating of the motor under 10A but remember you can use a lot more voltage than the motor's nameplate.)
For this project, the mechanical aspects are going to dominate. I'm thinking small quadcopter motors are going to work really nicely with direct drive = no gears or pulleys. The quadcopter market has perfected accurate speed control of these motors so just buying off-the-shelf ESC units will give you excellent motor control with lots of power at very low cost. All you have to do is hook up an adequate power supply and run one wire (plus ground) to the Arduino. This eliminates the hassle of soldering onto the pins of the module you posted above.
I have been using Infineon TLE 5206 H-bridge chips (also available from RS). They are much more efficient than an L298 and have short-circuit protection. However you need one for each motor and each chip will need two PWM signals if you want bi-directional operation.
RS is an expensive place to buy things unless their wide range and convenience justify it. I suspect equivalent motors could be had for half that price elsewhere - which is important if you find that they are not really suitable
I’m just curious...
Although it adds tremendously to the complexity of both hardware and software, using three motors xyz angular positioning, will simply reproducethe skillls of a Thai ‘ping-pong bar girl’...
What about spatial xy positioning as well? If not, the balls will simply shoot from the same point in space st different angles.
To really simulate any sort of ping-pong player serve, you really need to emulate that server moving at the end of the table.
And this is of course - only serving (shooting). To receive & return shots is a totally different problem.
Thanks for the feedback. The Sparkfun Monster Moto looks great, but also a bit expensive. Especially because I would need 2 of them for driving 3 motors. I think you're right in regards to brushless quadcopter motors and ESC's, maybe it's the best solution. I often find it difficult to find many of these components at a reasonable price shipping to Denmark though.. I might try to use a couple of quite powerfull brushless motors and ESC's I once used in a hexacopter project..
Sounds like the TLE 5206 is a good choice to try something out. I've ordered the motors and drivers - gotta start somewhere. I agree that RS is too expensive - but I couldn't find a good alternative with shipment to Denmark at a reasonable price and delivery time. So fingers crossed!
You mention that the TLE 5206 has a short-circuit protection; is that the reason for not using any diodes in the schematic?
I'm planning on using an Arduino Uno or maybe a Nano to start with.. As far as I can see they both have 6 PWM outputs, so they should suffice right? I've also considered a Particle Photon as that could provide an easy way to control speed/spin over wifi from a computer or phone, with their online console..
I hope to achieve a bit more umpf and control than what I imagine ping-pong-bar-perfomers can manage, but I see your point. Most ping pong robots are stationary and only use angular control for varying the balls placement. However I have considered looking into having the robot move from side to side.. But I should probably limit my ambitions until I have something that can at least reliably shoot a ball from one end of the table to the other.
You could achieve most of that without any xyz positioning, simply using 3 driven ‘launcher’ traction tyres at ~120-degrees placed around the ball, perhaps slightly offset along their z-axis to add varying degrees of irregularity.
Using tight speed control at the moment the ball is dropped into the server ‘chute’ (by solenoid), they would be projected across quite a wide range of directions, spin and speeds. And served very rapidly with no repositioning required!
Ahh, of course. See this is where I really need to read up on some basics and maybe get a bit of help and feedback here.
So I made a simple schematic based on the example circuit from the TLE5206 data sheet. Would you mind giving me some feedback? Right now each of the drivers are set up exactly as in the example (except for EF which I left unused). With my limited knowledge of exactly how capacitors work and how they need to be positioned physically (e.g. distance to driver/input power) I'm not sure if I could just use 1 cap replacing C2, C3 and C4 ? And should this then be 300uF?
As I understand it C5, C6 and C7 can be small ceramic caps that should be placed as close to the IC as possible. However I might be wrong about that to.
Another question: If I use e.g. a 9V power supply, can this be used to supply both the motors and the Nano without problems? And should I add another cap close to the Nano in that case?
Design the project, then figure out the supply requirements as part of the build phase.
The instantaneous torque demand of the motors when a ball is fire will suck more current for that moment.
In almost every motorised project, you must keep the filtered DC separate between the motors and the logic.
For this project you have to keep the motors running and then just push a ball between them when it has to be fired. By the time the motors reach full speed they've done a few rotations, and the ball is long gone. They're not reaching full speed that fast!
mathies:
So I made a simple schematic based on the example circuit from the TLE5206 data sheet. Would you mind giving me some feedback?
I have the TLE5206 working for my own project. I am not sufficiently familiar with electronics to offer advice on schematics. I just copied the datasheet.
TBH, if I was building this for myself today, I’d be going the way I mentioned earlier.
Three brushless motors with ESC at 120 degrees on a slightly offset z-axis.
Do all the thinking in software.
I’d overrate the PS for the motors close to stall current.
That’s all!
Would you mind giving me some feedback? Right now each of the drivers are set up exactly as in the example (except for EF which I left unused). With my limited knowledge of exactly how capacitors work and how they need to be positioned physically (e.g. distance to driver/input power) I'm not sure if I could just use 1 cap replacing C2, C3 and C4 ? And should this then be 300uF?
As I understand it C5, C6 and C7 can be small ceramic caps that should be placed as close to the IC as possible. However I might be wrong about that to.
Added the schematic drawing inline.
The value of those capacitors is generally not critical - the datasheet will probably mention the 100 µF to be a minimum value, stabilising the power supply, while the 100 nF is a filtering cap.
The 100 µF is usually an electrolytic or tantalum cap - they're polarised, make sure you use parts that are rated at least 1.5 times the peak voltage you see.
The 100 nF is a ceramic type, and should be placed as close to GND/Vcc pins of the IC as possible. One for each IC.
The 100 µF should be much less critical in placement, as it is to help manage peak currents. Peak currents happen when you start up the motors, so best to have your code start them up one by one, with say a second in between (to allow one motor to get up to speed before switching on the next - just see how long your motors take). If you happen to have a bit bigger on hand, like 220 µF, that'll do just fine.
Do make sure the pins you selected are PWM enabled, as not all pins on the Arduino can do this.