AC Servo controller for X and Y axis

314 views
Skip to first unread message

Krzysztof Jakubowski

unread,
Sep 17, 2024, 8:33:41 AM9/17/24
to OpenPnP
Hello everyone,

I am starting this post to share my experience of connecting AC servo with OpenPnP. I will post the progress of my work here, maybe it will be useful to someone, I will be happy to share the sources.
I've already tested the servo, nothing major, STEP and DIR as with stepper motors.   Unfortunately, I have not found a ready-made PCB that will be able to set a high STEP Rate to fully use the servo's capabilities.
The servo manufacturer writes that at speeds higher than 200kHz, a differential connection should be used for STEP and DIR. I don't think any PCB offers this either. I tested it on a Smoothie Board and I actually managed to get it to a little over 150kHz. I also checked Duet 2 and it was a little better, but still not enough :P
So I decided to design a small simple, small board (only 66x69mm) ) with a powerful microcontroller (STM32H7) overclocked to 550MHz, two outputs (the head and its motors will be controlled from a separate PCB), differentials STEP/DIR and endstops. I was based on Mallow Super 5 Pro, the pins are compatible, so there should be no problems with the firmware. Below is a render of the board that I have already ordered, in the future, after assembly, I will share the results I managed to obtain.

Regards,
Krzysiek

PCB2.png

Mike Menci

unread,
Sep 17, 2024, 9:28:27 AM9/17/24
to ope...@googlegroups.com
Which servo unit brand /type will you be using ? 
I run Yashkawa servos on X and Y PnP axis … 
Mike 
Poslano iz mojega iPhona

Dne 17. sep. 2024 ob 14:33 je oseba Krzysztof Jakubowski <j.electron...@gmail.com> zapisala:

Hello everyone,
<PCB2.png>

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/017174f7-5497-4491-9539-da20c90d1e84n%40googlegroups.com.
<PCB2.png>

Mike Menci

unread,
Sep 17, 2024, 9:42:54 AM9/17/24
to ope...@googlegroups.com
And I use this gear ratio calculation  for Smoothiebord configuration file data;

Poslano iz mojega iPhona

Dne 17. sep. 2024 ob 15:28 je oseba Mike Menci <mike....@gmail.com> zapisala:

Which servo unit brand /type will you be using ? 

Krzysztof Jakubowski

unread,
Sep 17, 2024, 4:54:04 PM9/17/24
to OpenPnP
Now, I’m using chinese servo kits, it have 2500 pulses per revolution. I want to reach speed about 2-3m/s. Screwball move axis 20mm per revolution. For 1mm needs 125 pulses so equation is very simple for 2m/s is 2000x125=250khz, the same equation for 3m/s gives 375khz. 

Krzysztof Jakubowski

unread,
Sep 18, 2024, 3:24:08 AM9/18/24
to OpenPnP
Mike, I looked at your calculations and I see that you are getting a speed of 1.2m/s for the X axis and 1.4m/s for the Y axis. From my experience, you won't get much more out of Smoothie.
My machine has a massive cast iron frame, large linear carriages and a precision ball screws. Servo 400W in the x axis, 750W in the Y axis. It would be a pity not to use these possibilities and move at speeds of 1 m/s.
The ZdenkoStanec YouTube channel  2.5m/s pick place  shows a speed of 2.5m/s and this is what I would like to achieve.

SM

unread,
Sep 18, 2024, 3:50:36 AM9/18/24
to OpenPnP
With servos that only have a maximum speed of 3000-5000rpm, you can never reach 3m/s with 20mm pitch ballscrews (without a complex reduction gearbox)

Mike Menci

unread,
Sep 18, 2024, 4:06:18 AM9/18/24
to ope...@googlegroups.com
I use 100W servo on X /20mm pitch screw… 
And 200W on Y axis /10 pitch screw 
I am not looking for fast speeds 
I am happy with what I have … 

Poslano iz mojega iPhona

Dne 18. sep. 2024 ob 09:50 je oseba 'SM' via OpenPnP <ope...@googlegroups.com> zapisala:

With servos that only have a maximum speed of 3000-5000rpm, you can never reach 3m/s with 20mm pitch ballscrews (without a complex reduction gearbox)

Mike Menci

unread,
Sep 18, 2024, 4:12:03 AM9/18/24
to ope...@googlegroups.com

Krzysztof Jakubowski

unread,
Sep 18, 2024, 4:18:29 AM9/18/24
to OpenPnP
With servos that only have a maximum speed of 3000-5000rpm, you can never reach 3m/s with 20mm pitch ballscrews (without a complex reduction gearbox)
Damn... I guess you're right... I didn't include it in the calculations. 3000rpm gives 50rps, so theoretically in my case the limit is 1m/s. Thanks for this attention!

Krzysztof Jakubowski

unread,
Sep 18, 2024, 4:22:27 AM9/18/24
to OpenPnP
Mike, great machine! I only have one video of mine testing, I don't remember what the maximum speed was set, I know that the accelerations were very low. What accelerations have you set on your machine?
CSM84 Test Video

Mike Menci

unread,
Sep 18, 2024, 4:59:28 AM9/18/24
to ope...@googlegroups.com
Yaskawa has the software for running the drives - Google my YpuTube or try to read about ; Software used Yaskawa - Sigma Win+   
Poslano iz mojega iPhona

Dne 18. sep. 2024 ob 10:22 je oseba Krzysztof Jakubowski <j.electron...@gmail.com> zapisala:

Mike, great machine! I only have one video of mine testing, I don't remember what the maximum speed was set, I know that the accelerations were very low. What accelerations have you set on your machine?

Krzysztof Jakubowski

unread,
Sep 18, 2024, 5:10:10 AM9/18/24
to OpenPnP
OK, I understand that this software is for testing? Can you use it to control via OpenPnP, or do you use step/dir?

Mike Menci

unread,
Sep 18, 2024, 6:06:57 AM9/18/24
to ope...@googlegroups.com
I use it with PnP - USB cable to Yaskawa Drive see my other video on my YouTube channel ! 
Mike 
Poslano iz mojega iPhona

Dne 18. sep. 2024 ob 11:10 je oseba Krzysztof Jakubowski <j.electron...@gmail.com> zapisala:

OK, I understand that this software is for testing? Can you use it to control via OpenPnP, or do you use step/dir?

Mike Menci

unread,
Sep 18, 2024, 6:53:43 AM9/18/24
to ope...@googlegroups.com
You can see a part of testing at this YouTube : search for it ; 
image0.jpeg

Out from iPhone 📱 

Dne 18. sep. 2024 ob 12:06 je oseba Mike Menci <mike....@gmail.com> zapisala:

I use it with PnP - USB cable to Yaskawa Drive see my other video on my YouTube channel ! 

Developer Algo

unread,
Oct 4, 2024, 10:55:47 AM10/4/24
to OpenPnP

Which chinese servo unit brand /type are you using ? as the above question . any link to the brand 

Wayne Black

unread,
Oct 4, 2024, 12:47:10 PM10/4/24
to OpenPnP
Yaskawa are awesome motors/drives and not Chinese, but are Japanese. Thats not to say Chinese products cant be awesome. I use Yaskawa AC drives in my CNC, love them over the Clearpath DC drives I replaced them with. I also used Centroid Acorn for the controller.

Jonathan Crossley

unread,
Oct 20, 2024, 4:13:09 PM10/20/24
to OpenPnP
I was gifted a set of 3 stages with Yaskawa SGMAV-C2ADA21 (rated 3000RPM, MAX 6000RPM) motors direct drive to the 1205 ball screws. Unfortunately that gives me a top speed of 250mm/s (or 500mm/s @ 6000RPM) - sounds slow. Question is, are you using your Yaskawa motors at rated or max RPM and in reality how much is 500mm/s going to affect actual speed given acceleration and deceleration?

IMG20241015173521_sm.jpg

Mike Menci

unread,
Oct 20, 2024, 4:35:34 PM10/20/24
to OpenPnP
Hi, 
Your Ball Screws are 1205 witch is 5mm pitch - this is for PnP a bit small pitch (for X axis I use 20mm pitch ball screw )- you have (2x) 150W servo (but seams that this would be your Y axis?... (I have 100W servo for X /20 pitch + belt drive 1:2 gear and I am happy with speed...  But you could do the same - use larger belt pulleys on Motor with smaller on ball-screw - this will speed up your driving ... Correct ?

Where are your driver units - do you have those ? Which ones are they? 
I would first connect and test drives with motors and screw arrangement (as they are) with Sigma Win + Software from Yaskawa .....
Looking forward to hear some progress from you soon!  
Mike

Alexander

unread,
Oct 21, 2024, 12:51:15 AM10/21/24
to OpenPnP
Hello.
I am preparing for testing BLDC Motor 3 phase, 57 mm, 24V, 3000 rpm, Control Using dsPIC30F4012-30, STEP and DIR control. Feedback encoder, previously tested tape, optical, magnetic and rotary encoder. For good results, speed and accuracy need a fast processor for the machine.

воскресенье, 20 октября 2024 г. в 23:35:34 UTC+3, mike....@gmail.com:

Krzysztof Jakubowski

unread,
Oct 21, 2024, 6:36:35 AM10/21/24
to OpenPnP
As Mike wrote, 5mm per screw turn is a bit small for PnP. Most often it is 20, 25mm, I have even seen 70mm in some old constructions!!! I once talked to the manufacturer of such screws and he told me that there may be problems with fast turning of a screw with a small pitch. Each such screw has a parameter that determines its own resonance depending on the speed of rotation. He basically said that turning the screw with a small pitch quickly would wear it out much faster.

Alexander
I have converted many servos and, in fact, none of them based on a microcontroller gave satisfactory results. MCUs are simply too slow for fast motor positioning. You always had to come to terms with a long ramp, maximum speed and permissible error. However, all servos made on FPGA always worked perfectly! I'm curious what results you will get. Another issue is the power of the servo. If it is small, only a ball screw can be used to drive it; even wide belts create resonances that the PID struggles with.

Mike Menci

unread,
Oct 21, 2024, 7:03:49 AM10/21/24
to OpenPnP
A nice X axis would be to use this!   = 25mm pitch!

Alexander

unread,
Oct 21, 2024, 7:15:31 AM10/21/24
to OpenPnP

The drive was tested on another machine, design by vbesmens /made a copy of the machine/, there is a demonstration of the work on YouTube. Now I am preparing to test the kit. Encoder 2000 rpm, the frequency of the main processor is increased from 100 to 600 MHz.
With an increase in the number of pulses per 1 revolution, the engine speed dropped, so the processor was selected 600 MHz.

Position holding encoder 1000 rpm 11 microns, optical tape 360 ​​pulses per 1 inch 20-30 microns.
Belt 2GT, width 15 mm.
понедельник, 21 октября 2024 г. в 14:03:49 UTC+3, mike....@gmail.com:

bing luo

unread,
Oct 21, 2024, 11:52:06 AM10/21/24
to OpenPnP
When you use belt , the accuracy will decrease.    Why don't you use a motor to directly drive the ball screw?

Mike Menci

unread,
Oct 21, 2024, 1:06:08 PM10/21/24
to OpenPnP
The belt is very short 70T - 3mm pitch - 10mm bright with metal reinforcements to increase the speed of ball-screw - Smoothie board has only 120MHz processor..... 

Krzysztof Jakubowski

unread,
Oct 21, 2024, 3:20:41 PM10/21/24
to OpenPnP


Transferring the drive from the motor to the ball screw using a short belt is absolutely OK. An alternative is a clutch. But belts are often used in professional machines from manufacturers such as Asembleon and Yamaha. I've been through this topic and when it comes to maintaining accuracy, it is crucial to use gears made with high precision, e.g. a hole in the gear with an accuracy of 0.01 mm. Cheap aluminum sprockets are not suitable.

Alexander

unread,
Oct 22, 2024, 1:02:26 AM10/22/24
to OpenPnP
AC or DC servo motor uses an encoder. The difference is what type, where it is installed, the number of pulses mm / inch. Linear: optical tape printer, magnetic tape. Magnetic tape with a pole width of 1 mm (magnet width 2 mm) provides a resolution of 0.488 µm (1 / 2048 inch / pulse). Linear encoder is less demanding on the quality of the gear.

понедельник, 21 октября 2024 г. в 22:20:41 UTC+3, j.electron...@gmail.com:

Krzysztof Jakubowski

unread,
Oct 22, 2024, 3:12:23 AM10/22/24
to OpenPnP
Yep Alex it's true.  I have seen many professional machines and most often the encoder was on the motor shaft. From what I understand, PID works better if it directly controls the motor shaft, all indirect imperfections affect feedback, smoothness of movement and positioning accuracy.
I have seen the calibration process of a professional PnP. The encoder was on the motor shaft, connected to the ball screw using gears and a belt. As we know, every mechanical element has some imperfections (miscentricity of the hole in the gears, the pitch of the ball screw is not ideal along its entire length, etc.). In the next step, a special glass with a precisely placed grid of points was placed on the working space (if I remember correctly, every 1 cm). In the next step, the machine searched for further points and remembered their exact locations. Thanks to the pace, a compensation matrix is ​​created and the corrections are remembered on the entire work surface.

Mike Menci

unread,
Oct 22, 2024, 5:36:22 AM10/22/24
to OpenPnP
Correct - my Yaskawa motors have encoder with resolution    1048576 for getting accuracy of 0.01mm - see calculation above.

Mike Menci

unread,
Oct 22, 2024, 5:46:01 AM10/22/24
to OpenPnP
and no doubt - ball screws are as well used in combination with pulley and belts as seen as well in above image: AC Servo controller for X and Y axis – Google Chrome.png 
in my case: 
my Xaxis drive servo.png

Reply all
Reply to author
Forward
0 new messages