ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play

More
28 Feb 2024 13:47 #294696 by smc.collins
I've not had the time to filly investigate, but using Texas instruments rtos with porting emc2 core, is the best way, they even have a massive code library to make this easier.

Then you can just us a pc for the head, or a tablet, over rs422 etc or smart serial etc or Ethernet.

I was able to compile emc2 core components on ti rtos relatively easily, i uust didn't have the knowledge of the code base to understand the more forward steps. I'd also use the ti real time MCUs, and would also setup all feedback etc to use generated hardware irq, this would fix a lot of potential issues with linix cnc IMHO.

It's probably less work then writing new firmware for a questionably available controller. TI has a long history and has massive software support tools that are free to use.

Check it out.

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

More
28 Feb 2024 18:18 - 28 Feb 2024 19:31 #294710 by wez
Questionably available controller? No disrespect, but please do your research beforehand. Espressif have sold billions of the ESP32s and have also been around a long time and, quire frankly, I've experienced supply issues with TI previously. Not with an Espressif component since they so ubiquitous and low cost in the what is now, the behemoth IOT market. Nearly every smart bulb uses an espressif MCU...

This is the primary reason for this project... To ensure something that is readily available and low cost for everyone. The hardware is more than capable and has more features than nearly all competitors, You will be surprised if you take a detailed look at their capabilities. The issue simply is that they've attracted a lot of inexperienced makers, no disrespect to them as people have to learn, but communities are absolutely littered with questions due to their cost effectiveness. It does have a negative effect as an experienced outsider judges the hardware based on those questions and really shouldn't. Keep an open mind and test them yourself!

Try finding a 2$ MCU IC that is 240mhz, dual core, has the peripherals, WiFi and a very well sized open source community surrounding it thats well documented with long term proven supply commitments....

PS: Thanks for jumping in to a topic that was seeking feedback around the ESP32/S2/S3 for the good of the community and LinuxCNC to offer your opinion on something completely unrelated whilst also being disrespectful and ill advised simultaneously!
 
Last edit: 28 Feb 2024 19:31 by wez.
The following user(s) said Thank You: tommylight, Mecanix

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

More
28 Feb 2024 20:31 #294722 by tommylight
Any timeline on when the ESP32-USB will be available (if at all), as i do have a lan adapter somewhere in the shop, but only one, and no idea if ti works for this, yet.
And, is there the possibility of using an ESP32 (USB or ETH) and another ESP32 as a wireless client?
While shooting from the hip, how much trouble is it to do the pendant for ESP8266?
Thank you.
-
None of the above is in any hurry, just counting ducks ESP's as i have to leave some for the flight controllers (ESP32 can do GPS also, while ESP8266 can not)

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

More
28 Feb 2024 20:47 - 28 Feb 2024 20:56 #294723 by wez
It'll likely be in the next couple of days as I want to get it out of the way without cutting corners plus it'll be good for feedback.

You don't need a USB lan adapter - the S2/S3 just plugs straight into your computer via USB. It acts like a USB network adapter, if that makes sense...

Smooth motion is now 99% sorted for most use-cases. The last 1% of effort being the really tough part. Will take time to solve any edge cases which, off the top of my head, right now given that I still have all the motion dev rationale in my head, I can't think of any (bold words!) but there always will be edge cases - just the nature of it.

I'm moving to a WebUI config management built into the firmware since my past projects have proven to work effortlessly and it has significant value for ease of adoption and config.

I think it'll be by the end of this week.
If you'd like a test pre-configured firmware release to tinker with on an S2 or S3 to see it for reals do let me know...

EDIT:
Sorry I didn't reply to your wireless question. ESP32 (not S2/S3) with native Ethernet or SPI Ethernet will support the wireless ESP-NOW feature (you'd have to develop whatever wireless device you need to integrate yourself though).
The S2 & S3 will have wireless capabilities, with USB, but there's a complex bug running USB and WiFi simultaneously under load that I discovered late last last night which will take some time to resolve. I have a good understanding of it so it's certainly solvable just won't be a quick fix.

EDIT2:
IIRC you mentioned previously you don't have an S2/S3 at the moment? If that's the case then you won't be able to use USB. The "standard" ESP32 needs either a native ethernet on board or SPI ethernet module. I personally don't recommend SPI Ethernet at all - it can create a negative experience.
See a latency comparison chart provided by BogdanTheGeek on my Github repo: 
github.com/wezhunter/ESP32_LinuxCNC_Moti...er_RealTime/issues/4
Last edit: 28 Feb 2024 20:56 by wez.
The following user(s) said Thank You: tommylight

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

More
28 Feb 2024 21:09 #294724 by tommylight
So i am probably in for a negative experience! :)
For now i only have 3 of ESP32 WROOM, and 2 of ESP 8266, i can also buy only 2 of 8266 more, that is it! I got the 8266 at 10 Euro a pop, so very good, i can not find anything else for over 3 years here.
In the mean time i will be venturing to get some S3 and some 32 and some Teensy 4.0 for this:

Nothing can do this, have 2 motors fail and still run and be controlled!
The following user(s) said Thank You: Clive S, wez

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

More
28 Feb 2024 21:18 - 28 Feb 2024 21:52 #294726 by wez
That's brilliant!

Can't recommend the S3 enough. S2 is good but single core. Teensy 4.0 is excellent too!

S3 *should* (once I've validated it) be able to run 6 axis quad encoder inputs.

Not saying LCNC can run PID on it yet, at least until its truly optimised (encoders can be very taxing) but it would be great to have high speed multi-axis actual servo positioning in LCNC.


EDIT:
I may end up just running the axis control loop PIDs on the ESP32 & S3 natively and pass the axis PID config params via the HAL.

LCNC still sees the realtime pos but doesn't act on it.

Whilst closed loop stepper servos are cheap and ubiquitous now - it's would still be good to have an MCU seeing the encoder data since it's then possible to know near instantly when something is off/wrong with positioning, rather than the not great simple "alarm occurred" output most of the low cost stepper servos have.
Last edit: 28 Feb 2024 21:52 by wez.

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

More
28 Feb 2024 21:52 #294729 by smc.collins
Yeah well, people continue to screw around with under powered micro controllers that can't actually do the thing that's needed, run EMC headless. ESP32 while a nice toy micro for small control tasks lack real resources to actually control machine tools. The micro costing $2 or 25$ is really irrelevant at the board level, If the total cost of the board is $50 " for something that can't actually run a headless EMC install, versus something that is headless and runs a fully featured version of EMC for $200, the cost difference is trivial in a machine costing thousands as a entry point. Even cheap hobby used hardware is thousands of dollars. I have no idea why this incessant need to reduce cost is so prevalent in this community. You want to increase Linuxcnc adoption and investment, make it easier to build a machine, not harder. CNC machines are not cheap, even cheap 3d printers are not cheap. The community does not need yet another slave style control card. We need a real controller running a headless EMC install, if that's a $10 arm MCU or a $2 mcu on a dedicated card for $25 or $200 then so be it. This isn't helping the community grow in a meaningful way, it's not really helping end users, unless of course the game is to impede entry into the area by making the hardware and software difficult to use.

As for snide remarks, maybe you should try reading your own tripe before criticizing someone else's commentary.
The following user(s) said Thank You: Tinine

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

More
28 Feb 2024 21:55 - 28 Feb 2024 21:58 #294730 by Mecanix

Try finding a 2$ MCU IC that is 240mhz, dual core, has the peripherals, WiFi and a very well sized open source community surrounding it thats well documented with long term proven supply commitments....
 

True that +1. I'd like to think that their SDK(s?) are far more active, globally (oss), not tied to export regulations, NDAs and other endless bureaucracy. Let alone the fact that they are neutral, in the sense that they ain't dictated nor operated by a cult of unstable butthurt political delusionals. Business is business for espressif - neutrality is paramount importance for product lines, accounts and suppliers going forward (lesson learnt for many).

On a separate note; be pleased to know that the official P4 availability rollout date is 1st June 2024. That's right, you heard it first (Source: Shao Yu, Account Manager | Espressif Systems, SG). Plan ahead, we look forward. 
Last edit: 28 Feb 2024 21:58 by Mecanix.
The following user(s) said Thank You: wez

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

More
28 Feb 2024 22:07 #294731 by wez
I don't disagree with the cost aspects, and running EMC headless would be nice but I don't think coming into another topic that's specifically discussing a certain MCU and its features and benefits vs cost and then mentioning another one and a different approach is respectful - I was not disrespectful to you nor anyone prior to that - you came here and questioned motives and efforts first and have just done so again.

Each to their own.

Take a look at Remora project - that's serving the community and project well. This should hopefully do the same.

If you want an all singing and dancing flagship commercial grade solution then go ahead and build it yourself - but it's not easy, you admitted yourself you don't have the time, it takes a level of commitment that I don't think most will do so.

How is it not helping end users? Have you read what I wrote at the start of the topic - easy to setup, decent performance, reliability, low cost?

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

More
28 Feb 2024 22:08 - 28 Feb 2024 22:17 #294732 by wez
Mecanix - that's awesome news - thank you for the info!!

Yep you're absolutely right their SDK and tools are very commonly adopted globally in so many projects now. My experiences too they do appear to operate without political influence, succinctly put: it's just business.
 
Last edit: 28 Feb 2024 22:17 by wez.
The following user(s) said Thank You: Mecanix

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

Time to create page: 0.142 seconds
Powered by Kunena Forum