linuxcnc-esp32 Software Stepping over Ethernet Using ESP32

More
27 Nov 2021 23:37 #227790 by eng
I did the initial tests and everything runs fine, would you have in your udp.comp file the control to enable the spindle pwm?

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

More
01 Dec 2021 18:39 #228142 by jzolee
My machine has an on / off spindle, so no pwm output is programmed. If I have time, I'll do pwm output later.

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

More
03 Dec 2021 22:42 #228321 by epineh
Hi all, just read through this thread and it sounds very interesting.
I am in the finishing stages of a wood router and was going to use grbl to control it.
I would be happy to beta test with that machine using Linuxcnc and an ESP32.
The hardware requirements seem straightforward, but it seems there are 3 software implementations currently, Deotti, and dlhenke on Github, and jzolee's posted code.
I am not a coding guy so I would like to use the version with some kind of support or at least guidance, not to mention one that is actively being worked on. Any suggestions as to the "best" version to use with this in mind would be appreciated.

Russell.
 

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

More
04 Dec 2021 03:13 #228332 by eng
I'm doing the bench tests and so far I haven't had any problems, to tell the truth the only problem was interference in the cables of the w5500 but I put aluminum foil and it solved the problem 100%, I'll soon put it on a real machine and do the tests, I'm using this version. LinuxCNC 2.8.2 Debian 10 Buster PREEMPT-RT ISO
The following user(s) said Thank You: jzolee

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

More
05 Dec 2021 09:44 - 05 Dec 2021 09:53 #228379 by jzolee
I modified the ethernet library for faster spi transfer. Thus, I was able to exchange UDP data below 500 microseconds. For this, I already needed aluminum foil shielding on the spi wires as suggested by eng. I attach my entire platformio folder.


   

 

File Attachment:

File Name: HAL2UDP_20211205.zip
File Size:74 KB
Attachments:
Last edit: 05 Dec 2021 09:53 by jzolee.

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

More
05 Dec 2021 10:17 #228380 by epineh
Hi jzolee, I had a quick look at your code and it looks like you have 3 axis of step and direction along with 3 outputs and 8 inputs ?
That is really cool, that would cover almost all hobby level machines and a few more serious machines.
I will order a couple of W5500 PCB's and give it a try.
I have used PlatformIO to successfully program the esp32 with grbl so I think I can work out that part.
I'm sure I'll have some stupid questions before too long but for now awesome work and I hope I can contribute by testing on hardware.

Russell.

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

More
05 Dec 2021 11:10 #228382 by epineh
Quick question, would it be possible to have I2C communications from the esp32 for general IO? that way the esp32 could do the fast step/dir pulse generation and the I2C bus could handle the rest.
This could possibly free up the esp 32 resources to provide faster pulse rates (100KHz would be nice) and also more axis.

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

More
05 Dec 2021 12:47 #228383 by jzolee
Hi epineh, currently the program handles 3 axis step + dir signals and 3 outputs and 4 inputs (that's all I needed). Either can be easily increase.

If needed, it could handle up to 4 axes, however, the max pulse rate would be reduced to about 30 khz.
This is because even during the shortest pulse, the processor must be able to calculate the length of the next pulse on all axes.

The handling of IOs does not affect this, as it is handled by another core:

CORE0: IO handling + UDP communication

CORE1: only step and dir handling

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

More
05 Dec 2021 19:43 #228403 by Cncninja
Is there a pinout and what esp32 are you using ? there are so many out there. Thanks

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

More
06 Dec 2021 06:41 #228419 by jzolee
Hi Cncninja, I have this module built in:

 
Attachments:

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

Time to create page: 0.171 seconds
Powered by Kunena Forum