This is a quick review and guide to the JMC JAND4002-20B + 60JASM504230K-17BC servo drive and motor, found here on Aliexpress. Doing a quick writeup because it's a bit of a frustrating one to set up, and the more I dig into the details the more I regret buying it. I am in no way an expert on servo's, so please dont take this as gospel - if you think I've missed anything in the article or want to add to the discussion in any way, then please comment at the bottom.
The model numbers above are the 400W version, a cheap servo system with a "17 bit encoder" that is new to the market. Listed currently on aliexpress for £142.65, or about $195, there are is also a 750W model available for £163 / $224, part numbers JAND7502-20B + 80JASM507230K-17BC. While this article deals with the 400W JMC servo, I am sure my experience and conclusions can be generalised to other cheap Chinese servo manufacturers, especially those claiming "17 bit" or better.
Short conclusion: At best a functional servo system, but I would not recommend it unless you're tight for money and loose on time. There is no auto-tune, instead you get confusion over which parameters do what, buggy setup, and some of the features are less than useless. Oh, and the claimed encoder resolution of 17 bit is beyond dubious, real repeatable accuracy is probably inferior to a stepper motor. Don't count on any support from JMC either - sometimes they'll answer a question, but more often they'll just ignore you..... that said, if you want more detail, read on!
First a note on the encoder then. When I asked JMC what technology they used for it, they ignored the question, but looking on aliexpress at different encoders and their pricing, I am quite sure it is magnetic. I could buy a "17 bit magnetic encoder" for around £18/$25 - whereas true optical encoders are considerably more expensive. So next question, what is the real accuracy of such a magnetic encoder? When first researching this I came across posts by Teknik, a US based servo manufacturer who make the Clearpath servos, and they have very definite opinions on this subject, stating that magnetic encoders cannot realistically exceed 0.1deg resolution and have an inherent processing lag - see this link for a full write up from one of their engineers (scroll down to username "teknik servo"). Checking the Delta site, another more upmarket servo manufacturer, they employ both optical and magnetic encoders, but only specify a magnetic resolution of 16bit, and they use these encoders principally to give an absolute position. For higher real accuracy, they employ optical. Same with DMM, they have their own magnetic encoders which max out at 16bit, and looking at a picture of them here we can see an array of 8 sensors around the central magnet. Yet still, looking deeper they only claim an accuracy of 0.1deg. The cheap "17 bit" encoders on aliexpress instead use a single central chip to do the job. What is this chip? Without opening my servo I'm not sure - the Aliexpress sellers dont spec it, and pictures are low res without enough detail to read the inscriptions. I cannot find any 17 bit rotary encoder IC's on RS or otherwise, almost all the chips I could find were at max 16 bit. I did find one that claimed up to 18 bit programmable absolute output, and looking over the data sheet I found the maximum "integral non-linearity" (i.e. accumulated error) is listed as +/- 0.1deg with an optimally placed magnet, if the magnet is not perfectly positioned this reduced to +/- 0.2deg. This confirms the statements from Teknik and equates to a shockingly bad real accuracy of 1800 or 900 PPR (pulse per revolution) respectively - 17 bits is supposed to be 131,072 PPR. When looking up other more common 16 bit encoder IC's, the situation is even worst . Compare this to a stepper motor running at, say, 1/32 microsteps - which steppers should be able to reliably hit, albeit with reduced holding force for each lower microstep resolution (i.e. torque at a full step position is much higher than at a 1/32 microstep position). A simple 2 pole stepper has 200 full steps, which at 32 microsteps gives a repeatable accuracy of 6400PPR. All that said, I think we can say with high certainty that the true accuracy of the encoders JMC use is nowhere near 17 bit, and is probably lower than a basic stepper motor. That's not to say servos dont have benefits, such as high speed, or ability to actively respond to external forces, but in terms of pure accuracy....yikes....
Inertia and Torque to Inertia Ratio
Torque being maximum rotational force, and inertia being the resistance to movement, the torque to inertia ratio tells us how quickly a servo motor can accelerate. Another consideration which people tend to focus on, is the maximum load to motor inertia ratio, often stated in the region of 5:1 for stepper motors, up to 100:1 for well tuned modern servo motors. This ratio then implies that in the case of very large loads, a larger motor inertia is preferable - and many servo manufactures will offer different lines of motors in the same family for this reason, with low inertia or medium inertia rotors to suit. Specifically, instability is cause by "compliance" - that is, springiness in the system causing a lag in the movement of the load compared to the motor. But for most users - especially hobbyists - this is not so relevant. When you do the calculations, load inertia is typically nowhere near pushing these limits. To work an example, JMC's 400W servo has a rotor inertia of 0.438x10(-4)Kg-m² (yes I cannot figure out how to get a superscript -4) - which, if servo manufacturers were to use a more reasonable unit system (seriously what the absolute hell) would be 438g-cm². If you were to run a screw with 8mm lead, then using the formula mass*(lead/2*pi)² to calculate linear inertia through a reducing system like the screw, then you'd need a load of 250Kg just to get 1:1 ratio. Most servos should be comfortable with 5:1, so a load of 1.25 metric tonnes, or 1.38 imperial tons. This is a little simplistic as for large tables, with large ball screws, the inertia of the screw itself can be dominant - but you get the idea. All that said, for users who are not trying to control very heavy tables, low inertia variants are better, as it means faster acceleration and more snappy performance. So, what sort of servo is this one? Well, if you look at JMC's product page, you will see that in the part number breakdown it does list low, medium and high inertia variants - unfortunately if you look at the motor itself, the code given does not match this description, as the L/M/H code is missing. Thanks, JMC, thorough as always. So I guess we have to work it out for ourselves.
OK, JMC's 400W servo has a stated max torque of 3.8Nm and a rotor inertia 438g-cm² (assume these unit from now on). Lets divide the latter by the former, to give a ratio of 115. Compare to, say, a Delta B3 400W servo, which has peak torque of 4.45 (17% higher than the JMC) and inertia of 264 (40% lower), giving a ratio of 59, around twice as good. Or for a comparable torque there is the US made Clearpath servos (more on these later), their 2331S version has very similar figures to the Delta with a peak torque of 4.4 and inertia of 256, ratio of 58. Alternatively, the Yaskawa SGM7J servos are their medium inertia variant, the 400W version has peak torque of 4.46, inertia 409, ratio 109. If we want to compare instead to stepper motors, a personal favourite of mine are Lichuan 3 phase closed loop steppers, such as this one, it has a peak torque of 3 and inertia of 700, giving a ratio of 233 - twice that of the JMC servo.
So, from the above analysis, we can clearly say this is a medium inertia motor. I would speculate that either they are unable to produce a low inertia variant, or the maximum load to motor inertia ratio (unstated in the specs) is not very good, or they decided to simplify and produce a single variant that while not optimal for most users, will work better with higher load systems. My guess would be all three.
Mostly for people who have bought this motor, or want to get a feel for the process. Also noting bugs I came across on the way.
Connecting to PC is done with a USB to RS232 like the below - note this is not just a physical pass through, there is a chip in there, so a USB to micro USB cable will not work. Connect the USB to your PC, and you'll then want a female RS232 solder adapter and an old micro usb cable you can chop and solder into place. Wiring is not too hard, the manual lays it out, although there is no +5v in a RS 232 connection so you only need to wire in GND, TX232 and RX232. You can buy both these cables on aliexpress if you want to save time. Once plugged in to the CN5 port on the front, JMC have software that you can use to the change settings without manually tapping them in with the front panel. You'll need to ask them to email it to you. This software does have monitoring and oscilloscope style screens, but I did not find them particularly useful, since I could not get one of the most important functions to work - that is, being able to track position instruction vs position feedback. You get velocity instruction and velocity feedback, also position tracking error, and some other monitoring settings I didn't find much use for. Note also that you cannot always see the entire screen for the scope - on my laptop a section at the bottom was clipped off, and it was only when I ran the software on my desktop to write this article that I discovered the extra settings that were off screen. I cannot find any way to fix this on my laptop, so there is clearly a minimum resolution required to see everything. A pretty stupid bug. Without disconnecting my desktop monitor and trying to plug it into the laptop, I'm not sure how I can get around this.
The connection to the servo drive for IO is a type of 50 pin SCSI that is common to many servo manufacturers such as Yaskawa. You might want to buy a breakout board like below, not cheap but I found it extremely helpful. Not just for testing, as after I was done I soldered the plug for permanent connections, and found the pins to be numerous and a confusing - rows are listed odd and even numbers, with 4 rows, so I think the top row went 25, 27, 29 etc, and the row below 26, 28, 30 etc (this is from memory, check yourself!!). This board was very useful to double check I had the right numbers in the right places. It had a part number of JR-50TSC if you need to search for it.
Enable circuit runs on 24V, there is no 5v option. This can be wired in internally with the 24v out (pin 17) as shown on page 23 of the manual, so you connect pins 17 and 11 (common 24V) . Or you can connect an external 24v source to pin 11 if you prefer, not a big deal either way as it's just for powering optocouplers. Once the 24v circuit is powered, pin 9 to ground then acts as enable, pass it through a mosfet or relay to get 5v control. I'm just using stp/dir commands, for pins connect +5v (external) to 43 (pul+) and 38 (dir+). Standard pul- signal then goes to 41, and dir- to 37. Pretty simple in the end. Mine came default programmed for stp/dir so it worked straight away. And even before wiring anything, you can check the motor is good with the no load jog test (page 51).
I should add that there are "high speed" stp/dir pins, but their specs are not given in the manual, beyond stating they are 3.3-5v. When I asked JMC for clarification on when you should use each, and what their limitations are, they didn't respond except to tell me to use the low speed pins. I tried to ask a couple of times, but they ignored me. From the logic circuit I see the low speed goes into an optocoupler, so perhaps they are better shielded - I went with them, though I dont know what their upper speed limit is....
Tuning (or trying to...)
As stated, there is no auto-tune, you will have to rely on ineffective presents or manually tune it yourself.
My setup was, initially, to have the servo powering a rotary axis via a belt. First thing to do is have the motor measure the rotor/load inertia ratio, use the front panel to get to AF_J-L and follow instructions on page 117. Next, there is an automatic adjustment mode for stiffness (p01-02), simplest is to set it to 3 which means you only need to set p01-03 to adjust system stiffness. Unfortunately I immediately found that the belt in my system had a resonant frequency, which was causing significant vibration as soon as I increased stiffness to anything other than "incredibly floppy". OK, whatever, I decided to set PID manually and see what happens. First problem, the manual states p02-00 and 01 are velocity control gain, at least in one list, in another list their are stated as position gain, and the software also tells me they are position gain. Which is it?! I still dont know - contacted JMC to ask (twice), but they didn't bother to reply. Great. Since velocity gain is the first setting you are supposed to adjust, and it's the first setting on the list of adjustable gain settings, and followed by other velocity settings, I decided to just start with it. Is this correct?! I have no idea. Actually I now suspect it is position, as there are no other position gain settings in the list.... Whatever, so, increasing stiffness, I noticed the resonance was coming back, but hey it's OK because the manual states there are ways to eliminate specific frequency resonances, right? There is an automatic notch filter you can set, which should find resonant frequencies and eliminate them for you. The software monitor was actually able to see and pin this frequency, something like 488hz, but turning on the automatic notch filter did nothing. So I tried to manually set the notch filter - and it did reduce resonance a little, but it also made the system unstable, to the point that I had to drastically decrease stiffness just to filter out this resonant frequency. After unsuccessfully adjusting it for half an hour I tried other settings to eliminate the resonance, but the only effect was to make the system less stable.
Fed up, I decided to eliminate the belt and go with direct drive. This worked to eliminate the major resonance, but after tweaking all the other PID settings to the stiffest they could manage, another resonance crept in when turning the axis at around 40rpm, higher at 970hz. Not a serious issue, but I decided to try the notch filter again anyway. And again, even when it was set to a "depth" of 99 and a "width" of 1 - the minimum possible settings - it didn't get rid of the hum, it only made the axis rapidly unstable. If I set the values to be larger, the resonance actually become louder! I.... have no idea.... Another setting is the torque command low pass filter, which you have to calculate from a formula they give you (rearranging it first for the value you actually want......), but again, same effect, hum stayed or got louder but it decreased stability. As such I consider these "features" to be entirely useless. I'm currently in the process of trying to fit a plum coupling, which I hope will have a small damping effect on this resonance, since there doesn't seem to be any other way to eliminate it.
Another thing I discovered, I think it was p02-10, speed proportion gain. I increased it until the system became unstable, and then tried to decrease it again - all using the software on my PC to download settings. However, it didn't matter how much I then decreased the setting, the system remained unstable. I discovered I had to redownload ALL settings from PC to servo drive to effectively reset it and use the servo again. Another stupid bug then.
Conclusion and Alternatives
Yes, this servo is cheap, and if you just want a motor with low requirements then go for it. However if you are looking to upgrade from a stepper, and have serious accuracy requirements, then I suggest you spend more.
An easy drop on replacement for steppers are the Clearpath servos, made in the USA by Teknik. These are great products, but something of a mixed bag. Starting with their good points, they use real optical encoders, with 12,800 PPR, and a max input command resolution of 6,400stp/rev, giving a step size on e.g. an 8mm leadscrew of 1.25microns (0.05 thou) - good enough for most, and as we have discussed, optical is clearly preferable to magnetic when it comes to encoders. There is a lower input resolution option, although this is just a software nerf, it uses the same encoder. Accuracy is listed as 0.03deg. which on the same 8mm lead screw comes out to 0.67microns / 0.026 thou, clearly better than many machines can hold. They are DC and integrated, which means you only need to send DC power and control signals to the motor, giving you much easier wiring and setup, however it also means you need a DC supply. In terms of support, I once reached out to Teknik to ask some questions about their product, and the difference between them and JMC was night and day, they couldn't have been more helpful. There is also auto-tuning, which looks extremely easy to use, and the control algorithms are an improvement on the standard PID - Teknik clearly know what they are doing. Downside, the torque curves (torque vs speed chart) of their standard priced models are quite dreadful for a servo - they were made as drop in replacement upgrades for steppers, and as such I presume they were designed for low speed, high power density. Of course if you dont need high speed, this isn't a problem. Also the 12,800 line encoders, while fine for many applications, are still a long way from those used by some other servo companies, where you can find AC servo's with up to 24 bit real optical encoders at a similar cost, or cheaper than the Clearpath when you count the addition of a DC supply. 24 bit gives an incredible 16,777,216 lines, compared to 12,800, which doesn't just means more accuracy, it also means smoother movement and better command control, although again this may be overkill for many people. In terms of torque, their torque to inertia ratio is very good, as high as pretty much any other servo system you will find, but if you want high torque you have to sacrifice max speed. For instance, I'll talk about Delta servos in a second, their B3 range 400W 24bit servo gives 4.45Nm / 637 oz-in of torque, flat up to 3300rpm, decreasing after that to a max speed of 6000rpm, and costing just $368. The comparable max torque motor from Clearpath is the 2331S model, which hits 620oz-in but can only manage 2520rpm, with a near linear drop off of torque against RPM, and costs $370 for the "enhanced" 6400 stp/rev input version. To get higher rpm in additional to this torque level you need to spend $655, which gets you to 4150rpm, though again torque decreases almost linearly up to that point, and the encoder is still only 12,800 lines. You need to move up to their AC servos to see higher encoder counts, still only 64,000 lines and they start at $928, which gives you massive peak torque but low RPM.
Ultimately, Clearpath servo's were introduced to the market in 2013, at which point they were killer products offering excellent value and high power densities. However the market has moved at a breakneck pace since then, and today Clearpaths have to compete with not only much cheaper steppers powered by high quality digital drives at almost throwaway prices, but also AC servo's with comparable or better specs and massively more IO functionality at comparable prices. Don't get me wrong, I intend to use a Clearpath on the Z axis of my next build, there is definitely a case to be made for buying them - especially if you live in the US and want an easy set up, simple wiring, low speed high power, drop in stp/dir servo. But perhaps they could benefit from an update and an upgrade.
OK, onto the AC servos then, if you dont mind having separate servo drives with chunky encoder cables and more time spent on setup / wiring, and want more functionality, higher speeds / torque and higher accuracy, then fasttobuy are often referenced as a good source - unfortunately the one time I bought from them, the servo didnt ship for over 3 weeks and they didnt answer messages asking what the hell was going on, but after I threatened to get PayPal buyer protection on them they finally responded and were actually quite helpful on answering questions on setup ("sorry we were on Chinese New Year holiday... for 3 weeks..."). But there are not too many other options to buy Delta servos. Delta are based in Taiwan but manufacture in China and have an excellent reputation. A little more money will get you Panasonic servos, or a Delta A2 series with full closed loop against external linear encoders. DMM are another name that is often brought up when it comes to consumer grade steppers, a Canadian company that again manufacture in China, but they use 16 bit magnetic encoders with a stated accuracy of just 0.1deg. While I expect them to outperform JMC, I would not recommend their product for this reason.
If you've read this far, I'd love to hear your thoughts - have you used this or other Chinese servos? What was your experience? Do you have a preferred brand outside of China? Let me and other people know below!
(Random aside: Delta servos stp dir pins 39 and 43 are listed as 2.8 - 3.6v - however a Delta engineer confirmed through FastToBuy that they are in fact 5v tolerant. I am sure this will be useful for someone!)