ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play

More
02 Mar 2024 04:13 #294882 by wez
The important part - position repeatability and look for step losses at high speeds.
Essentially the test is to zero the X axis where it starts from then move randomly to different positions using absolute machine co-ords and then back to X0. Switches to relative positioning after that with much the same.


So far so good. A couple of things to improve which are listed on the video description but all things considered and the speeds, I don't think it's half bad...


The following user(s) said Thank You: aparecido, Mecanix

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

More
02 Mar 2024 07:56 #294886 by michalb
Hi, i think I2S output, may be good solution for more axis on higher frequency. I have i 3d printer with TinyBee (ESP32) board and this working very well. I2S Should give nice buffering. I don't test it but maybe I2S may working as input. This mean 32 fast Input and output. But this is not implemented in FastAccelStepper.
The following user(s) said Thank You: wez

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

More
02 Mar 2024 08:12 - 02 Mar 2024 08:15 #294888 by wez
Thanks for the suggestion. I've had a few people recommend this and I've done quite a bit of analysis around it.

I2S is great and certainly usable, and as probably already know is used in other projects. However realistically speaking, Espressif don't "officially" support the I2S peripheral as a stepper driver, strictly speaking. Only for their RMT.

RMT can be extremely fast, with minimal interrupt load.
With additional tuning, which I plan on digging into eventually at some point, it will likely go high than 200khz total. That's if it's actually needed.

Performance testing of RMT has proven to be excellent, BUT more importantly - reliable - never missing a single step at all speeds on 6 axes - which is ever so important to this project.
I'm not saying that I2S would if it were adapted to this use-case, but its best to stick with something that's proven specifically for this case.

Adjusting the existing libs that's used elsewhere (FluidNC etc) will require a reasonable amount of work (testing included) to not utilize trajectory planning in addition to adjusting accel/decel profiles as well as passing speed, position, velocity feedback to the host with near zero latency which for this use-case is absolutely essential.

I hope you have seen my earlier video showing the speeds and smoothness at 80khz?

Really though - how many people need an 80khz step pulse on single axis??
I truthfully can't think of any but certainly open to reasons why, and so if there are please provide them!

200khz total for 6 axis - all 6 motors moving simultaneously at 33khz, really?

Thanks
Last edit: 02 Mar 2024 08:15 by wez.
The following user(s) said Thank You: aparecido

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

More
02 Mar 2024 09:25 #294889 by michalb
I've seen all your videos. It looks promising. At the moment I'm using 4 axes at 50kHz div 8 microstepping. I prefer div 16, but I'm using Paralelport, so at 100khz, the Paralel port works, but the PC is not responsible. You're right, 4 axes 50kHz will be suitable for more than 99% of Hobby machines.
The following user(s) said Thank You: wez

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

More
02 Mar 2024 10:24 - 02 Mar 2024 10:46 #294890 by wez
Thanks!
IMHO I'd be pleasantly surprised if you really require /16 on your Z axis or possibly even A axis?
Please don't forget its not just 50khz per axis. It's shared 200khz - so two axes could be set at 75khz and two at 25khz or any other variation.

This will eventually grow into a solution that can be used for retrofit larger machines, whilst others are entitled to their opinions, I just know it will, especially once encoders and custom frames are implemented.

Coupled with EMI resistant boards in addition to a supervisory controller feature-set (dual sync controllers) it should make for a very compelling solution. In addition to onboard retrospective crash dump analysis, plenty of watchdogs. The last two are included in the next release.
Last edit: 02 Mar 2024 10:46 by wez.
The following user(s) said Thank You: aparecido

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

More
02 Mar 2024 11:51 #294906 by michalb
On /8 steppers and machine was ringing and vibrate. I have changed driver to Leadshine to solve this, they have smoothness option which work very well and on low speed steppers are quiet and don't resonate. I have fastest only X and Y so 75kHz for XY and 25kHZ for Z and A may work for me.
The following user(s) said Thank You: Mecanix, wez

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

More
02 Mar 2024 16:22 #294919 by schoch

Yeah well, people continue to screw around with under powered micro controllers that can't actually do the thing that's needed, run EMC headless.

 This isn't helping the community grow in a meaningful way, it's not really helping end users, unless of course the game is to impede entry into the area by making the hardware and software difficult to use.

 

He is releasing code, it works, it is well thought out.  Why don't you go work on your idea (headless EMC on cheap MCU) and actually produce something with released code before claiming that shipping code hurts an open source community.   That is a toxic and elite attitude.  Please don't expect everyone in a community shares your goals.


 
The following user(s) said Thank You: meister, wez

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

More
02 Mar 2024 16:27 #294920 by schoch
back on topic, for folks interested in esp32 RNDIS/ECM/NCM i was hacking around with the USB UDP capability and this fork has some examples of setting up a UDP server and bridging ESPNOW. I believe Wez's code should be much better and tuned but if you were wondering about this here's something to poke at.

github.com/jschoch/esp_tinyusb_test/tree/nowbridge

This could also be used to talk directly to linuxcnc via a hal component that had a UDP listener on it. This could run in it's own thread and make a wireless physical HID fairly easy to do .
The following user(s) said Thank You: tommylight, meister, wez

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

More
02 Mar 2024 21:31 #294952 by spumco
First - thank you for continuing to develop new stuff.  I may never use it, but the efforts are appreciated all 'round.

Really though - how many people need an 80khz step pulse on single axis??
I truthfully can't think of any but certainly open to reasons why, and so if there are please provide them!


Just thought I'd chime in on this one.

My lathe spindle motor is also a C-axis.  Max RPM is 5000, motor encoder is 4096-lines (16384 post quad).  I'm now using PWM, but when it was set to step/dir the drive input was configured 1:1  (1 pulse in per encoder count).

At 5000rpm I think that works out to ~950khz.  (drive is good to 2Mhz input).  Why do I need such fine resolution?  Because C-axis positioning requires it for decent angular resolution.  Same reason the spindle encoder is 10k lines (40k post-quad).  A 4th axis with reducer would need mush less resolution at the motor, but my spindle ratio is about 1.5:1.

Similar situation on the X/Z/V axes and sub-spindle motor.  Drives are good for 500khz input, so I programmed them such that max rapids (and max sub RPM) are about 450khz.  Same reason - finer per-step resolution as I have 1um scales and (in theory) 700ipm rapids.

So max outputs:
Main spindle - 950khz
Sub & 3 axes - 1800khz (450 x 4)

So I need up to 2.7Mhz total if everything is at full-boogie.

Is my use-case typical?  No, of course not.  But having very high pulse frequency capability means finer resolution (and perhaps smoother motion) is possible.

Thanks again.
The following user(s) said Thank You: wez

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

More
02 Mar 2024 23:22 #294958 by cakeslob
Yeah, no need to question, or be hostile towards someone who wants a high steprate. If it works for you, thats great. If it doesnt, maybe this isnt the right project for you. This is the max stepgen speed, deal with it.

Dont take it personally, dont question their motives, or if they really NEED it. Many people probably dont, but the scope of the project isnt to question people on their needs/wants. You dont want to try and sell it to someone if it doesnt really fit their usecase. Then you will just have 2 unhappy people.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.121 seconds
Powered by Kunena Forum