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

More
2 years 7 months ago #295010 by wez
Thanks!

Yeah they are truly amazing when you get to know them. Incredibly flexible.

Highest uptime I've had is 1686 days running an electricity monitor, WiFi up and down and all that.

Key part to reliability with them (as with most things) is firmware and board design/EMI. There's so much - not-so-great - quality out there but it's the IOT/tinkerer space so understandable.

Yeah I've have a go with the Linux side of things, really cool idea, it'd just be so much work getting all the peripherals to function at high speed, even then it'd need a split architecture like I mentioned to get anything "comparable" to an FPGA. Better just to write specifically optimised firmware natively for pulse gen and dev custom ethernet frames.

I do firmly believe RMT 700kHz for single axis pulse output is possible given what I know so far - it's a decent amount of work but reckon it will pay off in the long run... maybe!
The following user(s) said Thank You: tommylight

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

More
2 years 7 months ago - 2 years 7 months ago #295028 by wez
Off topic....
Hmmmm a brief scan of emc... theoretically porting it over to an ESP32-P4 may be possible. Piping sockets via eth for UI etc Might be worth it to help with all RT kernel shenanigans. Even if just supports EtherCAT. Near instant power on, rock solid, no jitter. May even be possible to do a decent res HDMi out and render an LVGL UI... Keep it modular

EDIT:
So Linux kernel 5.0 supports RISC-V. The current linux S3 support is via a RiscV VM on the Xtensa cores. ESP32-P4 in all likely hood will end up with an MMU or a VM that provides one much like the S3 but native Risc-V, With enough SRAM, stripping out components, reduce memory footprint and possibly a lot of kernel hackery I reckon it wouldn't be as difficult as one would imagine. Native PHY ethernet support is the main one. Jiggery pokery with some pipes, if needed. Lots of oversimplification but it'd be possible eventually...

Come on Espressif... release your qemu patches for the P4!

Also possible to run uClinux with nommu on RiscV natively which the P4 will likely run nicely. Stack overflow mgmt be a challenge but not impossible. Being able to easily add 64mb of osram on the p4 just like the s3. Yeah, it'll happen someday. Headless emc2. Perhaps even with stepper RMT peripheral support running too as well as possibly EtherCAT 
Last edit: 2 years 7 months ago by wez.

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

More
2 years 7 months ago #295031 by Cant do this anymore bye all
Keep you eyes on the prize, don't get too distracted.

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

More
2 years 7 months ago - 2 years 7 months ago #295032 by wez
Haha I'm not, just a note. This gets done first and as good as can be :)
"Just because you can, doesn't mean that you should..." springs to mind
Last edit: 2 years 7 months ago by wez.

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

More
2 years 7 months ago #295111 by wez
Hey folks,
Another bump and update.

May be barking up the wrong tree here but here goes...

A consistent 500kHz pulse gen output on a single axis, including accurate pulse tracking, using a mix of Espressif IDF and registers via RMT has now been proven.

There remains quite a few improvements which can likely squeeze another 30% or so out of it. There may be more as efforts continue.

R&D was performed on a ESP32-S2 (less IRAM, single core) mainly to prove that it is possible on the smaller architecture. The S3 dual core will, in all likely hood, improve it further. P4 possibly more, but impossible to say currently. P4 may be capable of two to three axis at those rates, or a single axis but much higher.

Based on my math and current dev, as it stands: Encoder support at a max 60k~ quad and an axis PID controller (configured and monitored via LCNC) is reasonable with a bit of room to spare on the S3 or ESP32 (dual core).

Given the cost, reliability and abundancy of these ICs and time spent discovering an optimal solution; I will not be releasing this specific aspect as open source due to the impact and commercial interests surrounding it. I hope that people understand this.

A high step rate, precise, multi-axis solution (6 axis) that is robust via a custom EMI complaint PCB with multiple ICs including easy firmware management is all relatively easily achievable. 3.3-60v configurable PWM outputs, VFD control (rs485/modbus) and wireless probes are all features that can and will be included. Envisage two versions of PCB - one with integrated stepper drivers and multi-type encoders, just add motors & another that supports external drivers and multi-type encoders but can be disabled if not required.

As it stands currently, that's approximately 3Mhz of 6 axis pulse rates and closed loop encoders if one ICs per axis is used.

Native low latency & jitter via a single Ethernet connection to LCNC (ESP32) is already proven (master IC). Possible upgrade to P4 later subject to thorough testing.

Espressif offer (and have deployed previously) firmware security, signing and secure bootloaders to protect the end product.

Would anyone be interested in sponsoring/investing in this type of product in order to continue further development and testing of the hardware?

Can explore kickstarter/crowdsupply if needed but I believe having a reasonably priced, globally available controller for LinuxCNC (as well as other motion control applications) that would be suitable for the *majority* of machines that's also seamless to setup would be useful.

I still intend on releasing the current multi-axis multi-architecture of 200-300khz source which includes Ethernet & USB support.

This separate solution is aimed at the larger high precision machines to support retrofit application and will be tested to ensure it's suitable for micron level precision machining without AC servos.

Thanks all
The following user(s) said Thank You: tommylight

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

More
2 years 7 months ago - 2 years 7 months ago #295130 by wez
1Mhz controlled pulse output has been achieved on a single RMT channel. DMA backed. There's a load of work to get it into a maintainable state as it uses latest frameworks & APIs but it is possible.
Last edit: 2 years 7 months ago by wez.
The following user(s) said Thank You: spumco

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

Time to create page: 0.468 seconds
Powered by Kunena Forum