- Hardware & Machines
- Computers and Hardware
- ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
24 Feb 2024 22:54 #294276
by Mecanix
Replied by Mecanix on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
I'll be in touch, I'll catch you via your g'hub eventually. Let me have the shanghai office leaking the high speed timers and parallel io counters in low level. Let's burn those P4 cores when they come out. "Optimization"...
Peace. Thumbs up for the initiative!
Peace. Thumbs up for the initiative!
The following user(s) said Thank You: wez
Please Log in or Create an account to join the conversation.
24 Feb 2024 23:01 #294277
by wez
Replied by wez on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Thanks, that's the intention. Always good to have options for LinuxCNC.
I won't be open sourcing the hardware designs as it'll be commercial interest but the software will remain open. Although, none of it is really rocket science, EMI compliant board layout is ultimately what would be protected.
Will try to ensure it's very cost effective.
Ease of use and setup will be a priority.
Have a working modern SMT line so can assemble them and maintain quality control and keep cost balances.
Plan to ship batches to regional centres if there's sufficient demand.
I won't be open sourcing the hardware designs as it'll be commercial interest but the software will remain open. Although, none of it is really rocket science, EMI compliant board layout is ultimately what would be protected.
Will try to ensure it's very cost effective.
Ease of use and setup will be a priority.
Have a working modern SMT line so can assemble them and maintain quality control and keep cost balances.
Plan to ship batches to regional centres if there's sufficient demand.
The following user(s) said Thank You: aparecido
Please Log in or Create an account to join the conversation.
24 Feb 2024 23:15 - 24 Feb 2024 23:20 #294279
by Mecanix
Replied by Mecanix on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
That's one of those - build it and they'll come!
I'm actually one of those who didn't want to dosh out the $500 entry cost to motion control a retrofit, not knowing it would even work to begin with. Add the fact that I'm half-a-world away from the providers (add in the +80% import tax + transport). And so settled for a cost efffective fpga maintained by a member here TOLP2 (Peter-van-Tol). Another of those God-like skillset member.
Bet there are countless others in similar situations. "Options", another infamous good sounding word!! You said it!
I'm actually one of those who didn't want to dosh out the $500 entry cost to motion control a retrofit, not knowing it would even work to begin with. Add the fact that I'm half-a-world away from the providers (add in the +80% import tax + transport). And so settled for a cost efffective fpga maintained by a member here TOLP2 (Peter-van-Tol). Another of those God-like skillset member.
Bet there are countless others in similar situations. "Options", another infamous good sounding word!! You said it!
Last edit: 24 Feb 2024 23:20 by Mecanix.
The following user(s) said Thank You: wez
Please Log in or Create an account to join the conversation.
25 Feb 2024 00:07 #294294
by wez
Replied by wez on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Yeah I believe so. Will have to see...
Interesting. That's two people confirming similar issues to what I've experienced with sourcing motion controllers and retrofits.
PS: RPI 5 runs LinuxCNC considerably better than RPI4. Very snappy.
Interesting. That's two people confirming similar issues to what I've experienced with sourcing motion controllers and retrofits.
PS: RPI 5 runs LinuxCNC considerably better than RPI4. Very snappy.
Please Log in or Create an account to join the conversation.
25 Feb 2024 01:32 #294312
by cornholio
Replied by cornholio on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Ethernet or using gpio only, really upset about SPI not going yet. And spidev being not suitable, works fine during a “static” halrun session but fails once added to a thread.
So until then my RPi5 and nvme adapter sit in a box on a shelf.
So my FPGA board will use EPP to a x86 and if & when the RPi5 has a working hostmot2 drive I’ll change firmware and go that way. The small saving will be great for my location.
I’m still curious as to how the USB real-time thing works. Has there been recent developments in getting USB operating in real-time. I know some projects that buffered the data but would seem it not suitable for threading and rigid tapping.
Reading the code wouldn’t work for myself as I’m a bit of a knuckle dragging Luddite
So until then my RPi5 and nvme adapter sit in a box on a shelf.
So my FPGA board will use EPP to a x86 and if & when the RPi5 has a working hostmot2 drive I’ll change firmware and go that way. The small saving will be great for my location.
I’m still curious as to how the USB real-time thing works. Has there been recent developments in getting USB operating in real-time. I know some projects that buffered the data but would seem it not suitable for threading and rigid tapping.
Reading the code wouldn’t work for myself as I’m a bit of a knuckle dragging Luddite
Please Log in or Create an account to join the conversation.
25 Feb 2024 01:35 - 25 Feb 2024 01:37 #294313
by cornholio
Replied by cornholio on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Oh yeah the RPi5 is kinda of similar to a low end modern x86 system with regards to responsiveness.
I was surprised in the speed to which it could build a kernel and Linuxcnc. Even when using an SD card. Not enough spare beers tokens yet to buy an drive to go with my adapter.
I was surprised in the speed to which it could build a kernel and Linuxcnc. Even when using an SD card. Not enough spare beers tokens yet to buy an drive to go with my adapter.
Last edit: 25 Feb 2024 01:37 by cornholio.
The following user(s) said Thank You: wez
Please Log in or Create an account to join the conversation.
25 Feb 2024 01:47 - 25 Feb 2024 01:54 #294317
by wez
Replied by wez on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Yea I think RPI5 may have been rushed to market a tiny bit, but the foundation has always been a progressive development style for its software, which is completely understandable.
Re: USB RNDIS/ECM networking.
It uses the S2/S3 built-in USB PHY hardware peripheral much like the native Ethernet RMII PHY on the older ESP32.
The networking stack (LWIP) is pretty much the same as Ethernet so the same optimisations can be applied resulting in low latency and jitter.
The only difference this time are two things:
1) the idea of using it with knowledge of USB stack, descriptors and drivers and pursuing it enough to get desired results (risk vs time sink)
2) someone digging deep into S2/S3 LWIP stack in the esp-idf and wrote a driver and made sure it actually works. Me, ha.
It's always been possible but requires compatible hardware (MCU peripherals) and software engineering. Just look at Mach 3 USB control boards as an example which operate in a similar fashion USB HID etc but are closed firmware sources mostly.
EDIT: Just for clarity, I don't mean a "driver" on the PC/Host - I mean one for the esp-idf usb stack running on the MCU itself. esp-idf USB networking has always been sort of half-baked, e.g not fully implementing host based access to its networking stack (wifi bridging mode only)
Re: USB RNDIS/ECM networking.
It uses the S2/S3 built-in USB PHY hardware peripheral much like the native Ethernet RMII PHY on the older ESP32.
The networking stack (LWIP) is pretty much the same as Ethernet so the same optimisations can be applied resulting in low latency and jitter.
The only difference this time are two things:
1) the idea of using it with knowledge of USB stack, descriptors and drivers and pursuing it enough to get desired results (risk vs time sink)
2) someone digging deep into S2/S3 LWIP stack in the esp-idf and wrote a driver and made sure it actually works. Me, ha.
It's always been possible but requires compatible hardware (MCU peripherals) and software engineering. Just look at Mach 3 USB control boards as an example which operate in a similar fashion USB HID etc but are closed firmware sources mostly.
EDIT: Just for clarity, I don't mean a "driver" on the PC/Host - I mean one for the esp-idf usb stack running on the MCU itself. esp-idf USB networking has always been sort of half-baked, e.g not fully implementing host based access to its networking stack (wifi bridging mode only)
Last edit: 25 Feb 2024 01:54 by wez.
Please Log in or Create an account to join the conversation.
25 Feb 2024 03:39 #294326
by cornholio
Replied by cornholio on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
So at the PC end is the physical connection via a USB port or an Ethernet port ?
If the physical connection at the PC is USB how are you getting the USB subsystem working in a real time environment.
With Mach3 and USB I was lead to believe that almost all the heavy lifting was performed via the USB board. Some also mentioned that threading was not possible.
If the physical connection at the PC is USB how are you getting the USB subsystem working in a real time environment.
With Mach3 and USB I was lead to believe that almost all the heavy lifting was performed via the USB board. Some also mentioned that threading was not possible.
Please Log in or Create an account to join the conversation.
25 Feb 2024 03:45 #294328
by cornholio
Replied by cornholio on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Had a quick look and since I last had a play with Mach3 around 2014/15 apparently threading with a smoothstepper board is possible.
Please Log in or Create an account to join the conversation.
25 Feb 2024 03:51 #294329
by wez
Replied by wez on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
It can be either USB or Ethernet. ESP32 will be Ethernet. ESP32 S2/S3 will be USB.
The MCU does all the heavy lifting with "threading" - really though it uses a mixture of FreeRTOS (to do the threading), hardware interrupts, hardware timers, RMT hardware peripheral for step generation and since it has 2 cpu cores - one is dedicated to all realtime tasks like network packet handling.
Encoder inputs uses the hardware PCNT (pulse counter) peripheral coupled with some special handling to ensure it can handle high counts
Hope it helps
The MCU does all the heavy lifting with "threading" - really though it uses a mixture of FreeRTOS (to do the threading), hardware interrupts, hardware timers, RMT hardware peripheral for step generation and since it has 2 cpu cores - one is dedicated to all realtime tasks like network packet handling.
Encoder inputs uses the hardware PCNT (pulse counter) peripheral coupled with some special handling to ensure it can handle high counts
Hope it helps
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Time to create page: 0.249 seconds