linuxcnc-esp32 Software Stepping over Ethernet Using ESP32

More
02 Feb 2024 23:01 #292258 by tommylight
While we're at it, due to time constrains still pending, the above mentioned ELRS (Express LRS) Remote Control stuff with CRSF (CrossFire) can do latency of 1-2mS between TX sending a signal and RX outputting it, so when i get a chance i will have to wire some scopes and do some tests.
Although i have no idea what to use it for on machines, but that is some damn good latency for wireless, and RC stuff is pretty cheap for those who can actually find them.
On big machines having a panel with start/stop/pause/resume buttons is usable for sure, so a pendant would work OK, but pendants are pretty much the same price to buy as this would be to build.
The following user(s) said Thank You: wez

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

More
02 Feb 2024 23:14 #292262 by wez
Very interesting, useful hardware to be aware of, I will certainly take a look at in when I get a spare moment.

If you wanted some custom wireless integration for a control panel or MPG, let's say, then it wouldn't be too much work to extend the ESP32UDP project to include a wireless device and have it communicate back to LinuxCNC via the HAL driver.

ESP32 have ESP-NOW which is a dedicated wireless bidir link via wifi but wifi in either Station or AP mode can run at the same time (and easy to use Arduino libs).
Effectively you could have a wireless control panel powered by ESP32 which wirelessly connects to the ESP32 motion controller directly which is streaming data back to LinuxCNC for commands and status
The following user(s) said Thank You: tommylight

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

More
06 Feb 2024 07:46 #292632 by wez
Following up on this...

I've added bi-directional ESP-NOW wireless communications to the latest version of the project which will be published soon.
It will have a boilerplate struct for data to be passed back and forth in either direction.

Consists of:
1x LinuxCNC Ethernet connected ESP32 motion controller with 6 axis configured
1x Standalone ESP32 connecting wirelessly to the above motion controller via mac address (secure broadcast is on the to-do list so its fully automated)

Results:
Streaming all 6 axis position, velocity, IO status continuously in 100ms intervals with no issues observed during testing of 6 axis moving continuously on the controller. Ran for 12 hours without a single crash.

Sending a command from the remote device to the controller works fine too.
Sending that up to the HAL via UDP would be trivial. All depends on data types and what it is that needs sending.

Wireless client Disconnect/Reconnect has been addressed - retries on failure every 5 seconds to ensure connection is always present.


Useful for anyone wishing to build a wireless control panel, LCD/DRO status, MPG pendant or even a wireless VFD control (modbus/analog) to help remove any VFD control noise. In addition to the extra GPIO that comes with having another ESP32 for non-time-critical control aspects.

Nice to see it works
The following user(s) said Thank You: tommylight, aparecido

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

More
06 Feb 2024 11:04 #292641 by wez
Motion Controller repo with ESP-NOW server wireless features has been committed.
Example client is here: github.com/wezhunter/ESP32_LinuxCNC_Wireless_Client
See the readme for more information.

Will run on any ESP32/S2/S3, I've used a Wemos D1 Mini32 for the example however adding a new board via platformio.ini is well documented elsewhere.

 
The following user(s) said Thank You: tommylight, aparecido, Trihwangyudi1990

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

More
08 Feb 2024 02:48 #292816 by Trihwangyudi1990

Motion Controller repo with ESP-NOW server wireless features has been committed.
Example client is here: github.com/wezhunter/ESP32_LinuxCNC_Wireless_Client
See the readme for more information.

Will run on any ESP32/S2/S3, I've used a Wemos D1 Mini32 for the example however adding a new board via platformio.ini is well documented elsewhere.  

 

so its will controll all motion or send gcode wirelesly? or its will control such as pendant or others
great project, with minimalis budget like me   will change for sure from old chinese bob to this... 

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

More
08 Feb 2024 03:00 #292817 by wez
The wireless ESP32>ESP32 feature can be used for *almost* anything you like.

One caveat - as long as whatever you want to transfer between ESP32 modules doesn't have to be a continuous data stream with an update rate of less than 100ms for prolonged periods.
Otherwise this could have an undesired impact on the motion control aspects on the ESP32 that is connect to LinuxCNC

If you wanted a wireless GCODE sender or a pendant that sends motion commands to LinuxCNC the integration work concept would be as follows:

ESP32 Client:
1) Sends a struct of new machine position whenever something changes (e.g a switch/knob/virtual keyboard - anything)
2) Receives current position and updates stored value for use in whatever hardware is connected to Client (already implemented)

ESP32 Motion Controller:
1) Receives new commanded position from Client and sends to LinuxCNC HAL via a new UDP struct (this to ensure LinuxCNC has master control over position (soft limits, job executing etc)
2) LinuxCNC HAL UDP driver receives new commanded position and moves to new position if its okay to do so

A wireless GCode sender would essentially be a similar implementation but instead of machine position struct - pass a char array - there's an example in the client project showing how a char array is serialised. Off top of my head - unsure how the GCode would be sent from the HAL driver to LinuxCNC however, but I'm sure there'd be a way somehow...
The following user(s) said Thank You: aparecido

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

More
13 Feb 2024 01:36 - 13 Feb 2024 01:38 #293180 by schoch
very cool software, thanks Wez!!!




will be working on getting pots, and buttons working.

not sure how to embed video...
Last edit: 13 Feb 2024 01:38 by schoch. Reason: vid

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

More
13 Feb 2024 01:49 - 13 Feb 2024 01:51 #293184 by wez
You're welcome! Don't forget about the motion control aspects too :)

For anyone new visiting this - this is where the discussion took place with this: github.com/wezhunter/ESP32_LinuxCNC_Wireless_Client/issues/3
Last edit: 13 Feb 2024 01:51 by wez.
The following user(s) said Thank You: aparecido

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

More
18 Feb 2024 02:53 - 18 Feb 2024 02:57 #293663 by wez
A new firmware release of this has been added which adds board agnostic firmware builds and a serial command line to configure both Controller and Client modes.

You can now simply download and flash a firmware build directly in order to get up and running.

See the releases section of the repo: 
github.com/wezhunter/ESP32_LinuxCNC_Moti...ses/tag/v20240218.01

A guide to configuring a board using the console command line is here:
github.com/wezhunter/ESP32_LinuxCNC_Moti...in/SerialCommands.md

New feature overview in this release are here:
github.com/wezhunter/ESP32_LinuxCNC_Moti...-refactor---feb-2024
Last edit: 18 Feb 2024 02:57 by wez.
The following user(s) said Thank You: aparecido

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

More
21 Feb 2024 04:12 #293891 by wez
Whoever may be following the development of this...

You might be interested in my comments here:
github.com/wezhunter/ESP32_LinuxCNC_Moti...uecomment-1955855354
The following user(s) said Thank You: hairy, aaronstone, cekaa

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

Time to create page: 0.172 seconds
Powered by Kunena Forum