Retrofit small 5-axis mill - Ideas for EtherCAT drives

More
14 Feb 2024 02:39 #293289 by ndemarco
This is going to be long. Skip to the end for the question.

I bought a tiny 5-axis mill recently, sight unseen. I didn't know what to expect, but knew it would be a fun project regardless of what I got. What I got was a large crate with a lot of aluminum, ballscrews, and 2x harmonic drives. Of course, there is a spindle. It's a 1.2 kW 60,000 RPM IMT with ATC, accepting from 3 mm to 1/4 in collets, and a nice spindle drive.

The controls were B&R Automation - using their MAPP CNC modular approach. It's an extremely well designed group of components, but more PLC and factory automation than CNC machine. I didn't get the machine's deep unlock code. I fantasized about a code breaker - a 3D printer driven 'finger' and a Keyence color sensor to sense the absence of the "Wah, wah, wah" wrong code dialog to pound away on the touchscreen. I also downloaded B&R's Automation Studio and got familiar. I'm not a machine integrator, and would have zero support to recreate the machine. So, I've chosen to take the OpenCNC route instead. I'm choosing to go EtherCAT. I'm looking for advice on the controls.

Axes X, Y, Z are pretty conventional. The A & B are harmonic drives. A is kind of roll, and B is pitch, mounted to the A axis. This was a dental mill, so the workpiece is roughly the size of a human jaw. I'll make some changes to that. I'll add some risers to increase the rotational travel of the B axis (currently ~60 degrees).

The B&R controls include 5 NEMA 23 steppers with A/B/Z encoders on them. The encoders are unusual, in that their supplies are 24V.

My first thought was to go Leadshine - closed loop steppers. We planned out 2x 2-axis 2CS3E-D507 drives + 1 single axis CS33-D507. These are 7 A/phase drives and require power supplies. Unfortunately, the paired motors do not have Z-channel encoders. This is surprising, given the level of sophistication for the package. I'm sitting on the quote, and I'm seeking advice.

- Closed loop steppers (rtelligent, Leadshine) or open loop EtherCAT + encoders for position verification?
- Do I need a Z pulse? Can I get away with homing to a switch, or am I going to regret that?
 
Attachments:

Please Log in or Create an account to join the conversation.

More
14 Feb 2024 03:07 #293291 by scottlaird
Are the 24V encoders single-ended or differential? If I remember correctly, Leadshine's are 5V differential but some vendors use 24V single-ended. I picked up a handful of 5v/24v single-ended/differential encoder converters off of AliExpress a few years ago for cheap for connecting semi-incompatible motors to drivers. They seemed to work okay.

If I'm reading this right, you're saying that the steppers that you have now are A/B/Z, but Leadshine's steppers are only A/B, right? It looks like the 2CS3E has wires for A/B/Z encoders, but I'm not quite sure what it does with the Z. I don't see any obvious config settings for it.
The following user(s) said Thank You: ndemarco

Please Log in or Create an account to join the conversation.

More
14 Feb 2024 03:24 #293292 by rodw
For such a small mill with low cutting forces, It will not ever loose steps. There are many small mills that size that just run open loop steppers doing extremely precise work.
I would consider using Rtelligent ECT60 drives and the existing motors as a first step. Then if required, add the closed loop motors in the future which the ECT60 will support.
The following user(s) said Thank You: ndemarco

Please Log in or Create an account to join the conversation.

More
14 Feb 2024 09:57 #293316 by ndemarco
The encoder inputs are A B Z differential pairs.

Many of the homing methods in the user manual Appendix A use the  pulse to home precisely.

Please Log in or Create an account to join the conversation.

More
14 Feb 2024 23:55 #293357 by scottlaird
It looks like the Leadshine 1-channel EtherCAT steppers export the Z wire as the 31st digital in pin (0x60fd:00, bit 31). Odds are, the 2-axis models are the same. In theory you could handle it in software, but only when moving at slow speed. At anything over ~15 RPM you'd probably miss the marker between servo thread ticks.

You could probably do a fairly nice 2-phase homing this way -- home with a switch, then back up slowly until you find the Z marker, and now you're accurate to 1/4000th of a rotation or so. That'd be great if you wanted to make a bunch of very small items with very high repeatability. Like dentures or something :-).

In any case, I don't think you *need* the Z bit. Like Rod says, you probably don't really need an encoder at all, but it's nice to have. Since you have encoders already, it's probably worth getting closed-loop drives and the voltage shifter that you'd need to make it work.

I should mention that I don't think anyone has tried to get the 2-axis Leadshine drives to work yet with LinuxCNC. They shouldn't be *that* hard, but they're in flux right now. You could probably clone a 1-axis Leadshine generic XML config, adding 0x800 to each PDO address for the second axis. Or you could wait a bit (days? weeks?) and the CiA 402 driver should support it. I had a 6-channel EtherCAT stepper driver appear in the mail today (thanks DSS!), and I'm planning on ordering a 2CS3E-D507 once the lunar new year festivities are safely in the rear view mirror. So in a month or so, there's a pretty good chance that the Leadshine drives will just work out of the box.

Please Log in or Create an account to join the conversation.

More
15 Feb 2024 02:42 #293361 by ndemarco
The B&R encoders (on model 80MP... motors) are 256 line, 1000 PPR. I believe these are not high enough resolution for Leadshine closed loop steppers. Fortunately, plenty of the Ali vendors (Hanpose, StepperOnline) have 4000 PPR encoders with Z pulses on NEMA23 frame motors for cheap.

I'll gladly use your xml config file details. I'm new to LinuxCNC, and I'm enthusiastically overestimating my abilities.

Please Log in or Create an account to join the conversation.

More
15 Feb 2024 19:13 #293429 by scottlaird
I don't think there's a lower limit for incremental encoder resolution on most devices; it's generally just a configurable 16-bit setting on the drive. It usually defaults to 1000/4000, but 256/1024 would probably work, and I know that Leadshine sells 5000/20000 steppers now, although with a long lead time.

Hmm. Why would they produce closed-loop steppers with 100 encoder steps per stepper step? They'd be able to measure much finer moves than the stepper can usually make. Are they doing some sort of *wild* dynamic microstepping or something? At peak RPM, this'd be almost a 1 MHz encoder signal. How much CPU are they hiding in their newer stepper drives, anyway?

Please Log in or Create an account to join the conversation.

More
16 Feb 2024 10:29 #293495 by rodw
It might be worth mentioning that the encoder resolution on the rtelligent steppers is 800 pulse per rev (6.2 micons on a 5mm pitch ballscrew). I don't know why you think 1000 ppr (5 microns) is not enough. So what is the ballscrew pithch, it may be finer?

There are many other sources of error when you start making things. Temperature and tool wear to start with. Good luck!

Please Log in or Create an account to join the conversation.

More
17 Feb 2024 22:45 #293662 by mwc

How much CPU are they hiding in their newer stepper drives, anyway?


Most likely very little CPU power. It'll likely be a FPGA with a hardware encoder counter capable of multi-MHz counting. The actual processing will only be polling the hardware counter periodically to get the position, then run the required calculations on that position (and probably still done in the FPGA for maximum performance).

High count encoders have little practical benefit on steppers (or most servo systems for that matter), but too low can cause issues with low speed tuning/stability. Using too high won't have any significant effect on performance (as long as the drive can handle them), but they won't actually benefit the machine in anyway.
Personally, I wouldn't pay any extra for more than a 1000 line encoder, but I wouldn't worry if higher was the only option.

Please Log in or Create an account to join the conversation.

Time to create page: 0.288 seconds
Powered by Kunena Forum