CNC Motion Control over Ethernet Cable! Leadshine, LinuxCNC & EtherCAT
Vložit
- čas přidán 26. 06. 2024
- Leadshine ELP-EC400F Drive www.leadshine.com/product-det...
Motor ELM1 Series (23bit magnetic encoder) www.leadshine.com/products/se...
Motor ELM2 Series (23bit optical encoder) www.leadshine.com/products/se...
More from me / marcoreps
Brymen Multimeters www.welectron.com/navi.php?k=...
Job listings at Welectron www.welectron.com/Jobs
New LattePanda 3 Delta www.dfrobot.com/product-2594....
EtherCAT Master on LinuxCNC instructions gist.github.com/Bouni/8b4532d...
Applied Science Laser diode range-finding • Laser diode self-mixin...
00:00 Intro
02:16 Hardware
05:53 First setup
08:39 Inertia ratio
10:27 Gains
11:37 Vibration Filter
12:47 EtherCAT
14:37 EtherCAT on LinuxCNC
21:17 Testing
22:38 23 bit resolution
24:24 Drive teardown
Stock footage provided by Videvo, downloaded from videvo.net
#CNC #ethercat #linuxcnc - Věda a technologie
MarcoReps ✅
AC Servos ✅
Open Source software and Linux repping ✅
Memes ✅
Teasing us with the probability of using those ac servos to make a 3D printer ✅
Thank you man, you're really doing a great job...
Having worked with EtherCat and Beckhoff equipment I can say that it's impressive how their communication protocols are literally identical to the original 80s implementation, just encapsulated into ethernet packets.
CAN works well, I'm glad they didn't try to roll their own version.
And they have done a lot on the RT side to get the peformance as good as they have.
Nothing wrong with that🤷🏻♂
The BACnet and Modbus IP implementations are built similarly; they're thin ethernet wrappers around the original protocols, which while easy to implement and understand for people who spent their whole lives working with BACnet or Modbus, does result in some pretty clunky and redundant protocols with duplicated or unnecessary address fields, checksumming, bad port handling and inconsistent implementation of typical ethernet or higher conventions.
If you wanted a well-designed clean implementation, you could strip out 80% of what industrial protocols like this do because ethernet/IP handles most of that functionality already. They leave it in though, because it's what they're used to.
@@siberx4 Yeah I did some work on it for a communication library and like 90% of the packet was communication overhead already handled by TCP/IP. The remaining 10% was "Send me variable XYZ".
The cool thing about that is that, with an EtherCAT gateway, I could use the same 2020s Python library to communicate with a PLC from the 80s that was designed for a ring network.
Yay excited to see some more spotlight on EtherCat! I got to work with it for a fun robotics project in my lab, driving some high torque and high precision harmonic drive actuators.
Never thought I’d hear VORON mentioned on one of your videos. I feel like my life is complete now. And yes, you should totally put some of these servos in a VORON and go bananas.
“HevORT” , “RatRig” , and “VZBot” are some other good printer designs along this line of thought to look into as well.
I could dig for links, but i have tried to subscribe to like *all of the channels making that content*, so look around and ask if you need help!
(Most of these Printers have huge Discord/Reddit Presence too)
(Edit: Typo) (Edit 2: Added VZBot)
Oh yes please
mr. reps so many videos recently love u thank u
About 6 years ago I made an opensource project ( the DieBieSlave ), an ethercat slave that connects a STM32 to a LAN9252 EtherCAT asic, the amount of attention and use that that project got over that time is amazing, from satellite dish uplink plants to exo skeletons ( Project MARCH ). EtherCAT is gaining more and more traction!
More EtherCAT Stuff *AND* it’s *Open Source*?!? Sounds amazing! I’ll definitely need to look into your work.
Is people like you we appreciate
Yet another excellent release. You’re outdoing yourself this month, Marco. Highly entertaining, enjoyable, and informative, and I’m here for all of it. Thank you for always giving us your best. It’s highly appreciated. Stay safe, and we’ll see you on the next one.
Yep I second that, I find everything you do videos on so interesting plus Marko's sense of humour is the best! 😅👏
@@TheZombieSaints Indeed!
I remember seeing ThisOldTony using ethercat when he did his last CNC conversion, definitely long overdue for such a technical channel.
Yeah, too bad he didn't convert all axis when he did it. I think he left the Z-axis as is, if memory serves me right.
I worked with EtherCAT on device development level using Beckhoff's ET1100 ASIC. It's an interesting protocol as bits are processed and interpreted on the fly as they are coming in, and are retransmitted only like 3 bits later.
Yeah, it's a pity that it isn't used more in the Hobbyist-space. Devices which implement EtherCAT are usually made for industrial use cases, that's at least what Beckhoff targets. That makes them way too expensive for hobby side projects.
@@thevayudev The reason you're seeing them here is because these companies are repurposing copycat precision parts that were mass produced into cheaper packages. I suspect in the next couple of years you're going to see people design home based multipurpose CNC tables that can drop any any tools you want. This isn't the first video I've seen like this, these parts are becoming more obtainable and you could connect them to simple router, plasma cutters, or 3D printer heads and do whatever you want with them. People around me are industrious so there are a few small businesses that are already putting them to work in my neighborhood, which is a very stretch from the traditional machine shops they were in.
@@snarkylive Okay, that does make a lot more sense, that's why none of these are original parts from Beckhoff Automation, those aren't really produced in that high volumes. It does sound like a bright(er) future for the low-budget space if other manufactures can mass produce these components while still being able to communicate with TwinCAT & other EtherCAT stuff. Still waiting for price cuts in the XPlanar/XTS space because those things look like a lot fun to play around with. I mean, couldn't you replace the rails of a CNC machine with XTS rails?
@@thevayudev XPlanar and XTS is definitely a newish thing on the market. Even their competitors (B&R, Bosch Rexroth, and many others) just launched these kinds of products in the last 4-5 years. I doubt we'll see price decrease until the next 5-10 years, especially with current chip issues.
As for XTS replacing CNC machine rails? Well, I think it can be done, but your material weight will be quite limited, especially if you have to stack another XTS on top of the other for X-Y plane.
6:27 You explained this at the end of the video without explicitly linking the two. The encoder maintains itself and gives a position when requested. The battery allows the encoder to continue to operate even when the system is de-energised. Therefore, the encoder will continue to monitor the rotation of the shaft and keep the current position in its volatile memory. When the system is energised, the servo drive will ask the encoder for current position.
If you keep releasing this many videos in quick succession, we're going to start getting use to it. 😁
Yeah, we're becoming spoiled brats.🤣🤣
Considering how little I actually understand of the electronics side it’s crazy how captivating and entertaining your uploads are..
Fantastic stuff. I've recently built my first CNC controller using those "hybrid" stepper/servos and running LinuxCNC. The repetition for each axis did get a bit tedious and makes the innards look way more complicated than they actually are. This type of quality component is a dream for me. Kudos to the LinuxCNC/EtherCAT interface devs for making this available.
What model of controller/motor did you get? And do you use linuxcnc as well, or something like grbl? I'm currently running open loop steppers with grbl, very basic setup but affordable at 200€ for all electronics. However, I'd like to upgrade that system to something more reliable.
the rules of the speed boat race competition specifically disallow servo drives, but that doesn't mean that you shouldn't build an absolutely _bonkers_ fast printer with these. Vez3d did one with odrive servos at one point, but he changed back to just high power steppers afterwards. I think he's up to printing in the 1200mm/sec range maximum?
currently at 2000mm/s, not the speedboat though.
Disallow? Jeez, why, as if there are many printers with servo drives out there.
@@VEC7ORlt I think its to encourage stepper driver development and prevent things like dropping thousands of dollars on industrial drives...
@@pmcquay1 This is stupid, should be the other way around - encourage development of servo drives, as steppers are boring and mundane and we need more and readily available servos, besides if you are participating in the speedboat challenge you already spent those thousands, coz your prusa or ender can do shit, its the vorons and the like.
@@VEC7ORlt It would be buy your way to victory with servos, which of course every industrial enterprise does. But for a hobbyist the cost is usually a serious barrier.
OMG, this is the most german explanation of etherCAT ever! I love it!
So many videos recently! Thanks Marco. EtherCAT definitely lands on the "if I ever build my own CNC" list.
Finally! A new LinuxCNC video!
A lot of people in the comments are missing the point Marco is making in the intro, he's an expert, he gets it, the state of comms for industrial equipment is an expensive mess of unnecessarily anachronistic technology due to laziness and complacency by the folks that still pay money for it and don't demand better.
Can’t wait to see the project that you will make with these!
This was a lot of fun to follow. Thanks for this video!
No nut November indeed. The occasional humor in your videos in between the extra-geeky stuff (which is why I'm here) is great. Love your vids
Thanks for the subtle humor. I love it :D
And we want to thank you for entertaining us. You are awesome.
CNC for some reason never got the memo that it's 2022, thanks for bringing this to everyone's attention!!!
Can’t wait to see what you are planning to do with these 😮
Congrats on the 200k!
Being blessed with so many videos recently, feels great!
I do a lot of security work with industrial control systems (some ISO/IEC 62443 stuff, but mostly technical research/consultancy) and EtherCAT is pretty ubiquitous there, in everything from turnstile gates to cereal manufacturing to ship engines. It's one of the better protocols in my opinion - does its job, does it well, has extremely low latency, and doesn't bog down the base protocol with needless complexity. It's fast and reliable enough to be placed in a safety-critical alarm path, which is something I don't say lightly. In marine environments it's common to find it running alongside UDP-encapsulated NMEA for sensors and navigation comms, which saves a ton of cost and complexity on cabling.
congrats on 200k at last marco!
This is neat, as a software engineer, it feels like the Right Thing for CNC machines. Doing a 3d printer with those space age controllers would be super fun, and a good tutorial.
I’ve sold etherCAT motion products in the industrial world, and as a fan of FOSS, it’s great to see it gaining traction and support from the FOSS community. Exciting to see what it will open up when more FOSS software will be able to support the hardware…
The limiting factor for precision of FDM printers is 100% the extruder and filament. If you think about it, anything involving semi-molten plastic is guaranteed to be way less precise than motion control, even if you're just using belts. Also, at higher extrusion rate the heating necessary goes up substantially.
Still, most speed 3d printers go with as light if an end effector as possible. It would be interesting to see what's possible if you go heavy (big servo E axis, big hotend) but with sturdy motion control...
edit: on second thought, I'm not sure how much a high powered E axis gets you, as your limiting factor is probably still the torque you can apply to the filament.
MirageC and Vez3D have been doing some really good quantitative looks into all this, definitely worth a look if you want some answers to those kinds of questions.
But yeah, *for the most part* (not including accelerations, movements etc) the main limit now is how fast you can heat up the filament and push it out.
Volcano/Supervolcano Hotends, novel Heatbreaks/Nozzles/Coatings for Things (DLC, PCD Nozzles, etc) are helping, but next generation stuff will be even more interesting, the Goliath Hotend, and to a certain degree more Open Source Pellet Extruders (although iirc those inherently have less precision?!
Absolute Legende!
This is absolutel AWESOME!
Nice to see fieldbus stuff on here
I was at the Beckhoff production factory and I am amazed at thier technology... been using Beckhoff for my entire career along with other automation technologies. EtherCat is the way for sure...
I hadn't seen a video in a while so I dropped by out of curiosity. I'm subbed with all notifications and I've not seen any of your new content in months. Double checked. Just thought I would pass that along... have a great weekend.
Ta Ta in Kannada, wow that got me out of no where, man you are a goat of electronics😀
Thanks, that was cool!
The upload frequency is making my spidey senses tingle
I wrote firmware and software for custom EtherCAT modules at my last employer. It was a pretty interesting protocol to work with.
Best Monday ever, i show up to two Marco videos!
I did a CNC conversion earlier this year using DMM Tech DYN4 servos and drives. They use those same IEEE-1394 connectors for the encoder, which are a pain in the ass to find parts for (the special locking style housing only seems to be available from AliExpress or similar), but I was able to terminate them with parts from Mouser (minus the housing). I think my next CNC build/conversion, will be looking to use EtherCAT or similar. The Mesa cards and support from Mesa themselves is great (I use LinuxCNC), but EtherCAT would be nice.
I've been working with some Nikon encoders that look to have a similar interface just judging by the scope shot at 24:00, they run at 2.5Mbps (switchable up to 4Mbps) and have 16bit data frames with 1 stop bit, no parity. Probably could implement it on a microcontroller that supported 16-bit UART (along with RS422/485 xcvrs), but I was able to do it on an STM32 using DMA to bit bang the query command and read back the data, then post-process it into actual position.
Agreed that the resolution and shaft sensitivity is insane!!!
Can't wait for one of the fastest benchy print on the internet
The tuning is why I like and use Yaskawa or Mitsubishi. They have real time auto tune and you dont hardly have to do anything to use them other than setting the stiffness setting. Once thats done they are ready to go, they figure out the optimal tuning as you use them.
I would love to see an over engineered 3d printer poweder by this setup! The Benchy Test has to be done :D
Very nice! Thanks 😁
I really like this solution. It's just elegant and makes building a cnc like building Legos and being smart, it's going to be much more forgiving on tolerances after some adjusting.
This is why you always design an RJ45 jack into pretty much any product, at least the engineering revs.
You can plumb pretty much anything to it, except maybe RF/HV and with the right parts you can do that too.
Inexpensive, robust, mature, and basically anything you want a thing to be when you want it.
If you are using "scientific" cameras (IDK how else to describe them, see Edmunds Optics or similar vendor site) you can sync and run your camera networks with test/monitoring events (over several bus types, one of which uses PoE over RJ45 on copper that run from 1-10Gbps), which is a bit of learning curve but makes collecting good data pretty plug and play once you have all the bits in your tool chest, and you can incrementally upgrade chunks, which is nice for you and vendors.
I really had to laugh when you showed off your old setup, and remember the oil pump EMI issue X)
Fast Benchy please. There is a lot more to that "sport" than kinematics so I think it would still be an interesting challenge.
Stepstepstepstepstep
Loved it
What a great ad this video is
I'd love to see those smaller servos put to work in an auto tool-changer
I love the dry delivery of reps' humor. At 24:18: "...wow check out the sensitivity of the shaft! Hey, it's no-nut-November after all".
I know your channel isn’t a cnc machine channel, but yours are by far are my favorite.
24:25 I bet the Reps scale is logarithmic as well
I've actually used Leadshine in an industrial setting, and was quite surprised to see them here. They're excellent for cost, compactness, and overall strength. The only downside I could say is that back when I last checked a little over a year ago their website and ordering process wasn't very hobbyist friendly
Most OEMs like that are likely wanting you to go through a VAR. Though that also means higher costs which in turn isn't hobbyist friendly.
I made an Ethercat master almost 9 years ago in C++. it was fun but hard :)
Nice soldering station collection
Can't wait to stick some on my ender 3!
This video Is a topic I am excited about!
Because of your video i contacted Leadshine - always looking for different form factors and at the moment, stock. Leadshine is a Chinese manufacturer with distributors around the world.
The negative big for me is that they don't have STO (safe torque off) - or at least they don't have it certified yet.
Safety is paramount! - I'm not touching any powerful servo without STO.
So much videos. its like Christmas!!!
We need that 3d printer! Though, the limits on hotend thermal performance also need to be addressed to have any chance of being able to make use of such ludicrous speed.
oooh, that's a pricey system - I have total servo envy! I'd love to upgrade my CNC mill to EtherCAT, but at the ghetto end of the price spectrum (somehow). :)
As far as hobby use, I think the issue with ethercat is typically the slave devices need a licence fee, this is usually tied to the IC / Asic that implements the Ethercat slave side of the communication, this can make the slave IC's expensive.
What I have seen with the duet boards is the use of Can-FD, but it's not as well developed by far and no-where near as advanced as what we're seeing with the above.
Well, the 10-20 bucks per IC/MCU usually doesn't break the bank of most projects so to speak. But it's one of the downsides of ethercat. For hobby use the whole Ethercat eco system including the usual go-to (twinCat) can be rather overwhelming if you don't have experience with PLCs. Also you better try to stay on the full open source side, especially with the master and if you can any further I/O, because getting actual beckhoff stuff will probably cost you an arm and a leg, unless you are a major industrial partner with >>50% discount. You do get a proper RT field bus (thanks to the DC architecture) with it though, so in applications where that matters it's a great system. I also liked what they showed this year with their modular robotics concept that uses EtherCAT, though I have yet to see the prices. But knowing them it will be pretty much impossible to use them in any price concious project, even in a low volume industrial setting.
@@ignispurgatorius5297 There's the Trinamic TMC8462A-BA which is a BGA part
It seems to be around only £20 or so it would be interesting if this could be integrated into the Moteus
(especially now that ODrive has gone closed source)
MIKROE sells an "EtherCAT" click which implements an LAN9252 ethercat ASIC configurable over SPI. MIKROE also sells a feather click development board which makes for a very easy custom ethercat node. I recommend starting with an adafruit feather, ethercat click, feather click shield, and the "EasyCAT" Arduino library. The library is technically for a deprecated ethercat Arduino shield but since they used the LAN9252 is basically plug and play with the MIKROE ethercat click. I'm using it now to trigger some rs232 commands from ethercat using the rs232 click.
Perfect for a wire EDM machine 😉
Twincat 3, thats what i used for bechoff gear when i worked with industrial automation...
Very, very cool stuff! Way over my head but I like it ;-) Seeing as you're very into motors, drives, and all that, maybe you could help answer something. Is there any sort of servo controller + motor combination which can do both continuous rotation, and absolute positioning? Thinking of a CNC lathe (way off in the future, mind you) and whether it's possible to do both spinny spinny and positioning of the spindle usign just the one drive motor.
To discover what processor that is, maybe you can use your thermal camera to image the heat pattern, and compare that to some other brands?
Worked in flight simulation industries. Used to calibrate this servo drives. Mostly Yaskawa brand for secondary Control loading system. For primary Control loading system there's much more expensive hardwares: MOOG
Ethercat is an excellent system. Once you use it, you keep it and don't look back
batteries for encoders are extremely important for robotic applications because you cannot home the robot if it is inside a fixture for example. The battery allows the robot to be controllable even after a power failure without moving the robot. All higher end industrial robots have batteries for the encoders
Was not expecting that no nut november joke, I almost fell out of my chair laughing
Beckhoff und EtherCAT on Open Source Level. I like it
Nice video! (as always, my wife looks at me when I'm laughing in tears behind the PC.. 'it's that funny German guy', so that's your work title around the family here).. Wouldn't these absolute motors also be aware of motion if the machine is powered off due to the UPS in the encoder cable?
Merci vielmals!
25:27 We can see MCU has builtin EtherCAT controller (so its can be AX58100, AX58400, LAN9255 or XMC4800) but it has external PHY (it rules out ASIX chips). Chip looks like BGA package and IIRC these Leadshine servodrives were available before 2020 - my guestimate is that Infineon XMC4800 is running the show
No Nut November. I see what you did there ;) You are a funny guy! Keep up the great work.
time to build the nastiest most precise voron ever built
Right when I was looking at some rebadged leadshine ac servos from stepper online
Sounds like “EverCAD” every time you say it. ;)
6:25 they usually are capable of remembering the position of the motor even if you turn them while they are powered off.
If it wasn't because of backlash it could be geared and be extremely scary. But also awesomely powerful xD
The First time seeing an Beckhoff Pc running someting other then a real time windows Operating System.
Since 2019 until now, have you faced any issues with your current setup in your machine?
I need Marco Reps voice for my GPS.
So how do those leadshine components compare to genuine Omron devices?
The purpose of the battery is so the encoder can keep its value correct even if the whole system is powered off and someone moves the motor.
The encoder probably uses either the SSI, BiSS, Hiperface, or EnDat interface
Probably EnDat ,it looks like th once yaskawa servos is using, I have been angling to get the data sheet of those encoders with no success, the pinout is not found anywhere.
Not sure if i missed that in the video but have you any idea how the price range for a 3 axis single motor setup from Leadshine would approximately is? ( ofc no need for 23bit :D )
Do you have any idea on the price range and delivery times of these leadshine servo/drive systems? Are they shipped from China? Is most of their range in stock or built to order? Thanks!
now where do you actually buy these leadshine servo drives
Speed boat challenge, please!!
If the manufacturer can't provide a datasheet for those encoders, expect pretty terrible linearity on those encoders. They may spit out 23 bits of counts, but at essentially random increments!
Marco, Use those motors for Solar Panel optimizing collection the way things are going your going to need that extra watt or 2. Just say'n.
Schtudio Schoftwär
Beste Aussprache auf CZcams 😂
Man, you been busy lately!