- Hardware & Machines
- Computers and Hardware
- linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
20 Oct 2023 13:02 #283353
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Update of our work, gcncE-2 100khz and gcncE-3 120Khz.
Please Log in or Create an account to join the conversation.
20 Oct 2023 13:11 #283354
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
gcncE-2 can work with 200Khz, but I kept it at 100Khz because I didn't see the need for that frequency as it would be more than enough for the vast majority of applications.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
22 Oct 2023 17:25 #283518
by Bari
Replied by Bari on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
So you made some hardware that you are open sourcing? Where is the source? Maybe I missed the link.
Please Log in or Create an account to join the conversation.
05 Dec 2023 04:21 - 05 Dec 2023 04:26 #287238
by beauxnez
Replied by beauxnez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
hello, I would like to test the assembly of github.com/jzolee/HAL2UDP on my pcFrom what I've read it works pretty well?
I don't really understand, should I copy the .hal and .ini file instead of the one created by my machine? the udp .comp file where should I copy it?
I don't really understand, should I copy the .hal and .ini file instead of the one created by my machine? the udp .comp file where should I copy it?
Last edit: 05 Dec 2023 04:26 by beauxnez.
Please Log in or Create an account to join the conversation.
23 Jan 2024 21:31 #291470
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Hi all,
I've been exploring a reliable means to use the ESP32 and a native ethernet RMII PHY (LAN8720 etc) so no SPI based ethernet module with realtime UDP LiunxCNC.
Using the built in RMT hardware peripheral, interrupts, a bit of UDP socket tweaking I can confirm that it's capable of driving up-to 8 steppers/stepper servos with a total of 200khz using the built-in pins. Any output GPIO pin that's not allocated to bootstrap can used as a step pin.
Options of using I2C/I2S levelshifters or GPIO muxes for the EN and DIR pins is possible too for a multi axis machine.
WiFi can be used for any OTA/FW updates. Integration with external peripherals is possible since both the servo gen and network stack have been optimised to run on a single core leaving one spare to do pretty much what you like with.
Additionally it's possible (enough interrupts and IRAM available) to receive up-to 4 servo pulses on interrupt pins.
Is anyone interested in the code if I release it as open source?
I've been exploring a reliable means to use the ESP32 and a native ethernet RMII PHY (LAN8720 etc) so no SPI based ethernet module with realtime UDP LiunxCNC.
Using the built in RMT hardware peripheral, interrupts, a bit of UDP socket tweaking I can confirm that it's capable of driving up-to 8 steppers/stepper servos with a total of 200khz using the built-in pins. Any output GPIO pin that's not allocated to bootstrap can used as a step pin.
Options of using I2C/I2S levelshifters or GPIO muxes for the EN and DIR pins is possible too for a multi axis machine.
WiFi can be used for any OTA/FW updates. Integration with external peripherals is possible since both the servo gen and network stack have been optimised to run on a single core leaving one spare to do pretty much what you like with.
Additionally it's possible (enough interrupts and IRAM available) to receive up-to 4 servo pulses on interrupt pins.
Is anyone interested in the code if I release it as open source?
Please Log in or Create an account to join the conversation.
26 Jan 2024 16:38 #291666
by schoch
Replied by schoch on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Yes! Please release your code, github or other!!!
Please Log in or Create an account to join the conversation.
26 Jan 2024 17:12 #291667
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
I'm finishing up the last few bits, some basic documentation and final testing. Should be released in the next day or so.
Additionally making it functional with the W5500 SPI module so if anyone has an existing SPI ethernet setup they can use it too.
It would be nice to have a ultra low cost multi-axis stepper solution that runs fast, in hardware, for LinuxCNC, even if purely for testing or tinkering since WT32-ETH01 modules can be purchased for $15 and connected to external stepper drivers without issue (yes 3.3v STEP,DIR and EN works, not ideal but does work)
A custom board that has a I2C GPIO mux and a single interrupt driven interrupt pin connected to the ESP32 for both inputs and outputs would be straightforward to add and greatly expands the ESP32 limited pins available.
Additional ideas - adding a 2nd ESP32 that handles Bluetooth connectivity for bespoke MPG pendants or wireless peripherals - all it would have to do is pass a basic I2C struct packet to the ethernet connected one which provides comms back to LinuxCNC HAL.
Modbus/RS485 VFD native spindle integration are possibilities too - as well as the existing PWM/Analog control.
I love Remora but I wanted a cheaper solution with hardware can be more accessible and/or available.
Caution must be taken when using Arduino libraries that they do not run on the core dedicated to ethernet & servo gen tasks.
Additionally making it functional with the W5500 SPI module so if anyone has an existing SPI ethernet setup they can use it too.
It would be nice to have a ultra low cost multi-axis stepper solution that runs fast, in hardware, for LinuxCNC, even if purely for testing or tinkering since WT32-ETH01 modules can be purchased for $15 and connected to external stepper drivers without issue (yes 3.3v STEP,DIR and EN works, not ideal but does work)
A custom board that has a I2C GPIO mux and a single interrupt driven interrupt pin connected to the ESP32 for both inputs and outputs would be straightforward to add and greatly expands the ESP32 limited pins available.
Additional ideas - adding a 2nd ESP32 that handles Bluetooth connectivity for bespoke MPG pendants or wireless peripherals - all it would have to do is pass a basic I2C struct packet to the ethernet connected one which provides comms back to LinuxCNC HAL.
Modbus/RS485 VFD native spindle integration are possibilities too - as well as the existing PWM/Analog control.
I love Remora but I wanted a cheaper solution with hardware can be more accessible and/or available.
Caution must be taken when using Arduino libraries that they do not run on the core dedicated to ethernet & servo gen tasks.
Please Log in or Create an account to join the conversation.
26 Jan 2024 20:05 #291679
by schoch
Replied by schoch on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
You should use i2s, grbl esp32 branch or the fluidnc by bart dring has code you could borrow (with credit), it is very fast and works well for steppers and IO expansion.
Please Log in or Create an account to join the conversation.
26 Jan 2024 20:14 #291681
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Already done. I2S working fine for GPIO on the MKS-DLC32 board but with W5500 SPI. WT32-ETH01 working fine with native IO.
RMT peripheral is being used for the step gen
RMT peripheral is being used for the step gen
Please Log in or Create an account to join the conversation.
28 Jan 2024 07:34 - 28 Jan 2024 07:35 #291785
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Here's a video...
Description explains the setup
Description explains the setup
Last edit: 28 Jan 2024 07:35 by wez.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Time to create page: 0.101 seconds