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

More
26 Feb 2024 14:04 #294520 by meister
looks good !

Do you have enough IO pins?

for example in extreme cases for 5 axes with 5 encoders + a spindle encoder and all that with hardware support ?

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

More
26 Feb 2024 14:09 #294522 by wez
On the S3 theres just enough IO for all 6 axis + encoders as long as it uses the new USB interface. Custom board will solve via IO expanders for DIR+EN pins for non-S3 MCUs

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

More
26 Feb 2024 14:14 #294523 by meister
i think io expanders (via I2C) for dir is not a good idea,
but what about shift-registers ? These can be controlled very quickly via SPI

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

More
26 Feb 2024 14:24 #294526 by wez
Please remember this is in active development and not for actual machine use yet. Please see the Github repo Issues for a list of items that need solving. Thanks

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

More
28 Feb 2024 03:17 - 28 Feb 2024 03:19 #294657 by wez
Things are now starting to fall into place with this project.

For those that are interested...

I'll share detailed results in due course on a page in my Github repo which goes into detail on some important aspects to provide clarity on why this is possible and how it's done since there's some misunderstandings. 

It'll include the following:
  • The firmware/offloaded stepper generator aspects and why that's important to understanding how this is different to mesa/parallel ports (Remora is a similar principal)
  • Why the "udp-thread" for commands doesn't need to run as fast as you might believe and test results indicating why
  • Proof of follower error rates for a 75khz pulse generator for a single axis (in metric) - TLDR; for a 1600ppr drive scaled at 320 units (e.g 5mm ballscrew) FERROR is consistently below 1.8 units at max speed in metric mode, almost a flat line. No hacks or workarounds in firmware to mask it. Same results via both USB and Ethernet. Can be improved further with more work.
    Multi-axis motion has similar results (200khz combined total) which is great to see
    Further improvements on the radar to reduce further. 
    I believe that is very good considering the involved speeds for a stepper driven system. Be interested to know others thoughts regarding this?
  • Detailed comparisons of Native Ethernet and USB performances and any limitations
  • ESP32, ESP32-S2 vs ESP32-S3 differences and what features will be supported across each 
  • Round trip packet and time-to-first pulse generation in 1.1ms~ works on USB (MCU to host) and 0.9ms on Ethernet
  • How input pins and sensors connected to the MCU are handled keeping latency as low as possible
  • How smooth motion pulses are generated with low delay
  • How high velocity "position mode" functions and how errors are handled to ensure LCNC is always aware of any step gen issues
  • How axis encoder to host feedback is going to be handled in future (ESP32 + ESP32-S3 only)

Unrelated to this software project but based on the development and findings around it I intend on developing a multi-axis integrated stepper servo drive controller (60VDC 5A per axis) and a DC motor drive controller (80VDC 20A) with all drive related configuration done in software. No dips or jumpers.

Includes multi-type encoder support, drive current sensing, sensorless homing and motion integrated. Lots of IO.
Galvanic isolation as required. Modular driver components in the event one is damaged.
Based on the Trinamic TMC4671.

One board will support both lathe and milling machines which includes VFD control - rs458/modbus or PWM and encoder+indexing.
It will be in prep for the ESP32-P4 release (+ESP32-S3 for dedicated ESP-NOW features) for a reasonable cost including support.

Multi-axis AC servo drive would be nice but it's heavily patented and very complex - who knows maybe in the future?

I'm interesting to hear others opinions and ideas...
Last edit: 28 Feb 2024 03:19 by wez.
The following user(s) said Thank You: tommylight

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

More
28 Feb 2024 04:36 #294660 by wez
Latest video demonstrating a sensible 40khz pulse rate and follower error values (metric setup) in real-time. S2 via USB after most optimisations being completed.

High speed smooth pulse train generation can be seen on the external scope too.

The following user(s) said Thank You: Mecanix

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

More
28 Feb 2024 08:22 #294675 by meister
> Multi-axis motion has similar results (200khz combined total) which is great to see

what do you mean with 'combined total' ?

4 * 50Khz / Axis ???

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

More
28 Feb 2024 08:27 #294676 by wez
It's essentially shared between all enabled axes but no limit per single axis so a single one can use the full 200khz if it needs it. Which is why you should plan your motor setup and speeds correctly.
I do believe it's possible to eek out more than 200khz via some hacks to the RMT peripheral handling but it's not going to be easy and will likely take weeks which I don't currently have time to do. Feel free to have a go at it if you're not happy.

I believe Remora project is limited to 200khz approx too, just so you're aware.

It should be more than enough for the vast majority of users

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

More
28 Feb 2024 10:21 #294683 by Mecanix

It should be more than enough for the vast majority of users

Ofc the majority wants a lightspeed optical PHY bit-bangin a 256bits mask in parallel. That's what the aliens uses for their buttprobe interface!

Impressive already. 40kerzies are more than enough for most retrofit, you're right. 
The following user(s) said Thank You: tommylight, wez

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

More
28 Feb 2024 10:30 - 28 Feb 2024 10:32 #294685 by wez
PMSL
Calling it now... There will be about 10 knock off boards running this firmware on Ali in the near future
Last edit: 28 Feb 2024 10:32 by wez.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.088 seconds
Powered by Kunena Forum