- 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 #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.
- wez
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 104
2 years 9 months ago - 2 years 9 months ago #291785
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Here's a video...
Description explains the setup
[url][/url]
Description explains the setup
[url][/url]
Last edit: 2 years 9 months ago by wez.
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 9 months ago #291806
by schoch
Replied by schoch on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Hope to see this on github soon! Looking forward to trying it out.
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 9 months ago #291839
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
4 Axis demo that I threw together using hardware step gen RMT peripheral, not hardware timers,
This is at 8 Microsteps so 1600 pulses per revolution for all drivers. Can easily be increased but 8x is enough for my use case.
Each axis Scale is set to 320 for 8mm ball leadscrew. All configurable within the HAL as normal.
Low frequency rattling noise at lower speeds are the motors hitting each other on the desk as they are unsecured - they are smooth at all speeds with no pulse jitter.
[url][/url]
This is at 8 Microsteps so 1600 pulses per revolution for all drivers. Can easily be increased but 8x is enough for my use case.
Each axis Scale is set to 320 for 8mm ball leadscrew. All configurable within the HAL as normal.
Low frequency rattling noise at lower speeds are the motors hitting each other on the desk as they are unsecured - they are smooth at all speeds with no pulse jitter.
[url][/url]
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 9 months ago - 2 years 9 months ago #291925
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
More latency and throughput tweaks. The result is 80khz per motor simultaneously without issue.
Processing 1500 packets per second to ensure f-error is less than 2.0 at high speeds (2800k rpm~) across all axes.
High accelerations and optimised direction pin delays for high speed switching of directions as can see in the video.
Each motors velocity command is highly dynamic and calculated in real time to ensure smooth movements, including position.
One test board has been running a job generating high speed pulses for 4 axes continuously for 24 hours without a board crash or follower error so it's proving to be stable.
Hardware based high speed encoder inputs will be next.
Processing 1500 packets per second to ensure f-error is less than 2.0 at high speeds (2800k rpm~) across all axes.
High accelerations and optimised direction pin delays for high speed switching of directions as can see in the video.
Each motors velocity command is highly dynamic and calculated in real time to ensure smooth movements, including position.
One test board has been running a job generating high speed pulses for 4 axes continuously for 24 hours without a board crash or follower error so it's proving to be stable.
Hardware based high speed encoder inputs will be next.
Last edit: 2 years 9 months ago by wez.
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 9 months ago - 2 years 9 months ago #292055
by wez
Replied by wez on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
As promised, confirmed as working with 6 Axes on ESP32 at full 200khz.
24 hour torture and stability testing has been done.
Please read the readme carefully.
Be warned - the ESP32 GPIO is only technically 3.3v compliant so you may need level shifters depending on your application or use-case.
Although, that said, external Stepper motor or closed loop stepper servo drivers usually sink so little current across their EN,Step and DIR pins it isn't a major cause for concern - at least based on my testing here but your milage may vary. You have been warned at least.
Designing a low cost custom PCB with a $5 ESP32 WROOM or WROVER stamp and a LAN8720 Phy would be straightforward - there are plenty of reference designs out there. See Olimex github for a good example.
Just be sure to wire up your GPIOs and any level shifters or isolators accordingly.
Using a WT32-ETH01 module and a custom carrier board would work fine - just be aware of the IO limitations and map out your step and dir pins properly to ensure the RMT peripheral works (test it before designing your board).
Extending the firmware to use a I2S or I2C GPIO mux for other inputs and outputs would be recommended. There are plenty of ESP32 Arduino libs for this.
The software foundation is in place at least.
Adding hardware based high speed Servo Encoder pulse feedback via the Pulse Counter Peripheral hardware is also possible and can use existing Arduino ESP32 libraries for this. The stepper generator does not use the Pulse Counter Peripheral for this reason and future potential.
The firmware has been purposefully based on Arduino libraries and not native esp-idf to make it easier for everyone to extend/adapt to their own use-case. It's been designed and optimised heavily to be as extensible as possible by leaving a CPU core spare to do other tasks.
Project is based on the original HAL2UDP concept by Juhász Zoltán. Thanks goes to him and anyone else who helped contribute to the original project.
github.com/wezhunter/ESP32_LinuxCNC_MotionController_RealTime
Have fun
24 hour torture and stability testing has been done.
Please read the readme carefully.
Be warned - the ESP32 GPIO is only technically 3.3v compliant so you may need level shifters depending on your application or use-case.
Although, that said, external Stepper motor or closed loop stepper servo drivers usually sink so little current across their EN,Step and DIR pins it isn't a major cause for concern - at least based on my testing here but your milage may vary. You have been warned at least.
Designing a low cost custom PCB with a $5 ESP32 WROOM or WROVER stamp and a LAN8720 Phy would be straightforward - there are plenty of reference designs out there. See Olimex github for a good example.
Just be sure to wire up your GPIOs and any level shifters or isolators accordingly.
Using a WT32-ETH01 module and a custom carrier board would work fine - just be aware of the IO limitations and map out your step and dir pins properly to ensure the RMT peripheral works (test it before designing your board).
Extending the firmware to use a I2S or I2C GPIO mux for other inputs and outputs would be recommended. There are plenty of ESP32 Arduino libs for this.
The software foundation is in place at least.
Adding hardware based high speed Servo Encoder pulse feedback via the Pulse Counter Peripheral hardware is also possible and can use existing Arduino ESP32 libraries for this. The stepper generator does not use the Pulse Counter Peripheral for this reason and future potential.
The firmware has been purposefully based on Arduino libraries and not native esp-idf to make it easier for everyone to extend/adapt to their own use-case. It's been designed and optimised heavily to be as extensible as possible by leaving a CPU core spare to do other tasks.
Project is based on the original HAL2UDP concept by Juhász Zoltán. Thanks goes to him and anyone else who helped contribute to the original project.
github.com/wezhunter/ESP32_LinuxCNC_MotionController_RealTime
Have fun
Last edit: 2 years 9 months ago by wez.
The following user(s) said Thank You: tommylight, aparecido, Cant do this anymore bye all
Please Log in or Create an account to join the conversation.
Time to create page: 0.264 seconds