- Posts: 88
- Thank you received: 104
linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
- wez
- Offline
- Premium Member
-
Less
More
2 years 9 months ago #292090
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Follow-up regarding my note on 3.3V IO on the ESP32.
IIRC it was confirmed by Espressif CEO that the pins are 5v compliant however their logic levels will be 3.3v. They had a note in the original datasheet but removed it since people were powering the units with 5v directly to the 3.3v rail of the MCU.
You can connect a 5v device to any input pin and it will be fine. I've done it for years with no ill effect.
Current sinking is what to watch out for, just like any MCU pin.
Inputs pins configured as an ADC/Analog input at 5v will not read their full scale and so would require level shifters.
IIRC it was confirmed by Espressif CEO that the pins are 5v compliant however their logic levels will be 3.3v. They had a note in the original datasheet but removed it since people were powering the units with 5v directly to the 3.3v rail of the MCU.
You can connect a 5v device to any input pin and it will be fine. I've done it for years with no ill effect.
Current sinking is what to watch out for, just like any MCU pin.
Inputs pins configured as an ADC/Analog input at 5v will not read their full scale and so would require level shifters.
The following user(s) said Thank You: aparecido
Please Log in or Create an account to join the conversation.
- wez
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 104
2 years 8 months ago - 2 years 8 months ago #292195
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Just published a new commit to my repo for hardware based ESP32 motion control.
Added SPI Ethernet W5500 support. Tested quite a bit and works flawlessly. The interrupt pin on the W5500 needs to be wired up for low latency reception of UDP packets unlike other implementations.
MKS-DLC32 ESP32 CNC board is now supported. Uses I2S output for Enable and Direction pins. See notes in Readme regarding this.
Refactored motor velocity commands and added debugging (disabled by default) and reduced jitter to ensure motors work in both velocity and position modes.
Changed readme.
ESP32-S2 and S3 support is next along with USB-C based device networking (these offer this hardware). Should hopefully become a truly plug & play LinuxCNC hardware based motion controller.
Added SPI Ethernet W5500 support. Tested quite a bit and works flawlessly. The interrupt pin on the W5500 needs to be wired up for low latency reception of UDP packets unlike other implementations.
MKS-DLC32 ESP32 CNC board is now supported. Uses I2S output for Enable and Direction pins. See notes in Readme regarding this.
Refactored motor velocity commands and added debugging (disabled by default) and reduced jitter to ensure motors work in both velocity and position modes.
Changed readme.
ESP32-S2 and S3 support is next along with USB-C based device networking (these offer this hardware). Should hopefully become a truly plug & play LinuxCNC hardware based motion controller.
Last edit: 2 years 8 months ago by wez.
The following user(s) said Thank You: tommylight, aparecido
Please Log in or Create an account to join the conversation.
- schoch
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 13
2 years 8 months ago #292221
by schoch
Replied by schoch on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Thanks for releasing the source!!!
Just thinking outloud... Since remora, LinuxCNC-RIO, and this all have custom components and protocols I wonder if it wouldn't make sense at some point to have a standard protocol and linuxCNC component they can all share and then the devs for each project just need to focus mostly on their MCU/FPGA specific code?
Just thinking outloud... Since remora, LinuxCNC-RIO, and this all have custom components and protocols I wonder if it wouldn't make sense at some point to have a standard protocol and linuxCNC component they can all share and then the devs for each project just need to focus mostly on their MCU/FPGA specific code?
The following user(s) said Thank You: aparecido
Please Log in or Create an account to join the conversation.
- wez
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 104
2 years 8 months ago #292239
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Thanks for the suggestion, ideas are good. I think it all depends on each use case and protocol timing requirements of each of them. Someone would have to asses all different controller types and requires intimate knowledge of each sources, edge cases & detailed testing. I'm not aware of anyone that has this knowledge, a collab would be great but kind of unsure if the benefits cost/time analysis would be worth it?
For ESP32 - I intend on implementing some basic CI for compiled firmware release management. Users can flash a generic compiled release (ESP32/S2/S3) which starts up in WiFi hotspot mode which provides a simple web config page where pin mappings and firmware features can be configured and saved to either NVS or SPIFFS - similar to the way Tasmota does it. Once Ethernet is configured (or USB) the web interface can be accessed via that or hotspot enabled again via serial port command.
Web config interface would have to ensure that only available pins for that board are configurable making setup as fool proof as possible. Peripherals like external GPIO muxes and drivers could be added easily too, again much like how Tasmota does it.
Serial port will have a basic CLI for enabling debugging and configuring certain aspects.
Anyone can have a multi-axis controller for low cost with no vendor specific board type lock in and I think there's going to be ESP32/S2/S3 for quite a while
For ESP32 - I intend on implementing some basic CI for compiled firmware release management. Users can flash a generic compiled release (ESP32/S2/S3) which starts up in WiFi hotspot mode which provides a simple web config page where pin mappings and firmware features can be configured and saved to either NVS or SPIFFS - similar to the way Tasmota does it. Once Ethernet is configured (or USB) the web interface can be accessed via that or hotspot enabled again via serial port command.
Web config interface would have to ensure that only available pins for that board are configurable making setup as fool proof as possible. Peripherals like external GPIO muxes and drivers could be added easily too, again much like how Tasmota does it.
Serial port will have a basic CLI for enabling debugging and configuring certain aspects.
Anyone can have a multi-axis controller for low cost with no vendor specific board type lock in and I think there's going to be ESP32/S2/S3 for quite a while
The following user(s) said Thank You: aparecido
Please Log in or Create an account to join the conversation.
- tommylight
- Offline
- Moderator
-
Less
More
- Posts: 22011
- Thank you received: 7491
2 years 8 months ago #292242
by tommylight
ESP32 is very good for a lot of stuff, so yes, it will most probably be around for quite some time.
I have built 12 channel RC receivers with them by just adding an ELRS RP1 or RP2 module or flight controllers by adding a 6050 accelerometer.
There is also FluidNC that does CNC control over the built in web browser.
Adding LinuxCNC for it is just the cherry on top.
Replied by tommylight on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
+1Someone would have to asses all different controller types and requires intimate knowledge of each sources, edge cases & detailed testing. I'm not aware of anyone that has this knowledge, a collab would be great but kind of unsure if the benefits cost/time analysis would be worth it?
ESP32 is very good for a lot of stuff, so yes, it will most probably be around for quite some time.
I have built 12 channel RC receivers with them by just adding an ELRS RP1 or RP2 module or flight controllers by adding a 6050 accelerometer.
There is also FluidNC that does CNC control over the built in web browser.
Adding LinuxCNC for it is just the cherry on top.
Please Log in or Create an account to join the conversation.
- wez
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 104
2 years 8 months ago #292249
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Glad to hear someone else has experience with the Espressif MCUs 
In my experience over the years they are rock solid. Just as long as you get familiar with their build system, versioning and how all peripherals work. Yes in their early days they had hardware revs errata but that's pretty much a given early on.
FluidNC is great and showcases ESP32 capabilities but it's still based on 3D printer tech (GRBL) with movement trajectory planning, no encoder feedback support and so forth. It's just not a real time motion controller with step control and feedback over an interface with low latency. LinuxCNC is just another beast entirely!
Paired with a decent custom PCB with all required IO an ESP32 would run a retrofitted industrial CNC machine without any issues - I am certain of that.
Espressif's dev support on Github is very good.
I've used them in products and they are rock solid and incredibly fast - it's very difficult to break them unless doing something really silly. People have differing opinions when comparing to STM and the likes and whilst they're a standard in the makers space but when it comes down to cost, availability and reliability balance - Espressif MCUs are hard to challenge, especially when you know them in depth.
Reducing the hardware barrier to entry for LinuxCNC and other robotics based motion control I think would be useful to makers.
Just having a ESPS2/S3 that you plug in via USB and visit a Web based wizard to configure your IO and it generates a HAL config would be so good.
Simple case of having a custom PCB carrier then.
Once I've integrated my USB networking work from another project on the S2/S3 (I already know UDP latency is not an issue) I think people may be pleasantly surprised at just how useful and easy it will be to get setup and running for little cost
In my experience over the years they are rock solid. Just as long as you get familiar with their build system, versioning and how all peripherals work. Yes in their early days they had hardware revs errata but that's pretty much a given early on.
FluidNC is great and showcases ESP32 capabilities but it's still based on 3D printer tech (GRBL) with movement trajectory planning, no encoder feedback support and so forth. It's just not a real time motion controller with step control and feedback over an interface with low latency. LinuxCNC is just another beast entirely!
Paired with a decent custom PCB with all required IO an ESP32 would run a retrofitted industrial CNC machine without any issues - I am certain of that.
Espressif's dev support on Github is very good.
I've used them in products and they are rock solid and incredibly fast - it's very difficult to break them unless doing something really silly. People have differing opinions when comparing to STM and the likes and whilst they're a standard in the makers space but when it comes down to cost, availability and reliability balance - Espressif MCUs are hard to challenge, especially when you know them in depth.
Reducing the hardware barrier to entry for LinuxCNC and other robotics based motion control I think would be useful to makers.
Just having a ESPS2/S3 that you plug in via USB and visit a Web based wizard to configure your IO and it generates a HAL config would be so good.
Simple case of having a custom PCB carrier then.
Once I've integrated my USB networking work from another project on the S2/S3 (I already know UDP latency is not an issue) I think people may be pleasantly surprised at just how useful and easy it will be to get setup and running for little cost
The following user(s) said Thank You: tommylight, aparecido
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds