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

More
02 Mar 2024 23:48 #294961 by tommylight
Found the ethernet-SPI thingy in the shop, it is ENC28J60 one, but should work so i will report back whenever i get a chance to test it.
The following user(s) said Thank You: wez

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

More
03 Mar 2024 03:41 #294973 by wez
Thanks for the feedback folks.
I'm not hostile whatsoever to anyone.

My wording around "need" and the questioning around the max frequencies I think is perhaps being a little bit misunderstood. 

This project is aimed at stepper motors for the lower end of the market/smaller machines.

Similar to the Remora project but using abundantly available ICs and eventually custom boards however the difference with this project is that it uses native Ethernet and USB (SPI ethernet can introduce latencies and jitter). Remora uses STM32/PICO etc and a common off the shelf hardware is the NVEM (www.nvcnc.net/nvem.html). That's a multi-axis controller at 200khz total.
This is planned to be something comparable however with a WebUI for config and eventually closed-loop Encoder support for those applications.

In my own testing here using some cheap stepper servo drives on a /8 div I'm getting generally very good results and now cuts too. This is the primary reason why I am questioning who needs /16+ dividers. Nothing hostile, it's a genuine question to understand who needs it. Afterall, that's what this thread is about...

A bit of context: there's been several re-hashes of this type of project over the years but none have released a version publicly that uses the hardware peripherals on the ESP32 to obtain something that's usable, consistent and performs, all mostly done in software.

For the folks running larger high speed motors, there are somethings that can be done to obtain higher pulse frequencies (600khz+) per axis but they would require a custom PCB, still uses the ESP32, but that's in the future.

Hope it helps
 
The following user(s) said Thank You: spumco

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

More
03 Mar 2024 04:40 - 03 Mar 2024 06:41 #294976 by wez
Editing a post can be a bit of a pig and so, sorry for the bump....

An important extra tidbit - the 600khz (possibly 700khz) per axis doesn't include using multipliers - it is raw step pulses so provides much higher angular resolution & precision.

It doesn't use exiting libraries and its quite proprietary. A significant amount of tuning and testing remains to be done.

Focus is on getting an alpha version of this project released for multiple architectures so the foundations can be proven to all that are willing to test - which would be greatly appreciated.

Please remember, it's being developed in the spirit of open source.

EDIT:
Based the above work I've tweaked the current RMT peripheral for the S2 chip (so far) and have it at 300khz pulse rates total reliably as it stands currently.

Still some decel profiles left to tune so that upon direction change it stops as fast as possible without jerk.

Tested two physical axes running at 150khz simultaneously:

32x microstepping (1.8/200 stepper, 6400ppr) for a 5mm ballscrew (1280 scaling each) and seeing 7200mm/min / 283ipm~ feed rates.

No step losses after a torture test.

EDIT2:
Video 

Last edit: 03 Mar 2024 06:41 by wez.
The following user(s) said Thank You: viewsat, aparecido

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

More
03 Mar 2024 07:18 - 03 Mar 2024 07:56 #294983 by wez
Another update...

Here is a video of what the WebUI config will be like and its initial features.

Continues to be a work in progress but is mostly functional.
  • Hosted directly on the ESP32 Motion Controller
  • No external dependencies
  • WebSockets driven
  • *Near realtime data streaming (100ms)
  • JSON config import and export
  • Eventual example LinuxCNC HAL config generation. e.g input your axis scaling, ppr, velocities and it'll provide you with each axis config to place into your INI and HAL files. Same will apply with inputs and outputs.
  • It will, eventually have board specific available GPIO pin calculations so only ones that are available will be available for selection. Making nearly fool proof.
  • Config file is stored as a JSON file within the flash on ESP32 which can be exported/imported and edited easily as required

    Hopefully folks can understand a little bit more regarding my commitments about being "easy to adopt" :)


Last edit: 03 Mar 2024 07:56 by wez.
The following user(s) said Thank You: aparecido, cekaa

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

More
03 Mar 2024 07:28 #294984 by pippin88
Great work.

You mention jerk - LinuxCNC does not (yet) have a jerk limited motion planner - what do you mean when talking about jerk?
The following user(s) said Thank You: wez

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

More
03 Mar 2024 07:35 #294986 by wez
Not that sort of jerk... Apologies - I used a conflicting term with traj jerk and I should have known better.

It's meant from a pulse train generation perspective in hardware - ensuring the pulse train is smooth on decel all the way to a stop.

At 150khz per axis it jerks to a stop sometimes but not at 140khz (300khz total). It's to do with interrupt loading and I need to do additional tweaks to ensure it performs consistently

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

More
03 Mar 2024 09:09 #294992 by wez
So... lets say if a board had multiple ESP32-S2 ICs (one per axis) - not the stamp modules but raw ICs. No WiFi.

All of which are driven and fully synchronised by a single S3/P4 with usb or ethernet connected to LinuxCNC. (Bearing in mind they cost bugger all and loads available).

If I can achieve *reliable* 700khz~ pulse output for a single axis and coupled with custom ethernet frames on the master to really maximise performance.

In theory it'd be around 4.2Mhz for 6 axis....

Would that float peoples boats?

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

More
03 Mar 2024 09:20 #294995 by cornholio
Someone on cnczone would want more hahahaha


Man you really got some skills going on there ;)
The following user(s) said Thank You: tommylight, wez

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

More
03 Mar 2024 09:27 #294996 by wez
Hahaha yeah. More speeds pleaze! Thanks but there's always someone with more skills. Just do what I can. If I can give back to the community, then I will. Leads to better future things and all that malarky
The following user(s) said Thank You: tommylight

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

More
03 Mar 2024 10:54 #295002 by tommylight
200kHz for 10$ is magnificent, beats the cr@p out of parallel port! :)
For 10 MHz on all pins, use Mesa, 7i92 is still under 100$.
End of discussion!
Using multiple boards for more speed is OK as it does make financial sense.
So i am OK on all counts, great work and awesome results.
Having web settings is just icing on a cake, i dealt a lot with RC stuff lately and everything there is done wirelessly through a web interface, even firmware flashing, so once you get the hang of it, it is very comfortable.
-
Personally, i might never use this, but i am impressed at what has been managed so far, thank you.
Does not mean i will not play with it, i will, despite you shooting down my last hope with SPI-Eth! :)
Regards,
Tom.
The following user(s) said Thank You: wez

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

Time to create page: 0.128 seconds
Powered by Kunena Forum