phorton1 / Arduino-esp32_cnc3018

A FluidNC based implementation of a controller for a cheap cnc3028 machine
Other
8 stars 1 forks source link

No link to donate to creator #2

Open SoLongSidekick opened 1 month ago

SoLongSidekick commented 1 month ago

Ok there might be one there I didn't look to be honest because I wanted to offer my thanks in addition.

Dude. You've saved me so much time and money with this. I have a 3020 I got on Amazon knowing full well the laughable "offline controller" those things come with would be a joke. My unit is primarily a PCB production unit so heightmaps are the only "advanced" feature I need so this thing is perfect for me. I'd love to donate $5 or hopefully more than that - whatever is currently in my account. Lol #poorbitchproblems.

I just wanted to confirm that this is perfectly capable of producing/using heightmaps before I jumped headfirst into the project. And I know it's kind of stupid overkill, but if I decide to add the M5 FluidDial do you see any complications I would run into? I'm reading into the CYD pendant (a similar pendant project) and I'm realizing the final form of your controller is totally a pendant that runs Fluidnc itself with no need for a seperate controller board. Although you'd still need stepper drivers though, so I guess you'd still need some kind of master board. But your firmware inside a pendant that has a screen and better encoder like the CYD, paired with what would essentially be just a stepper driver board would be rad!

Also, god and satan both bless you for your amazingly clear documentation. I'm taking an extremely slow (ie just read the page so far lol) jab at Clock3 as it looks super cool.

phorton1 commented 1 month ago

Hey there,

I am not looking for $$$. I do this purely as a gift, since I've been retired for a long time. I post all this stuff solely in the hope that it will help somebody.

I have over 70 repos on github and you are the first person who has ever suggested that they might try to actually build one of my things :-)

Please bear with me. This will probably be a somewhat long reply.

It has been several years since I re-built and updated the firmware for the cnc3018. But I use the machine all the time, particularly to make PCBs.

REGARDING YOUR QUESTION AND MY REPOS:

Yes, the "heightmap" works (I call it the "mesh", but it is a heightmap), and is pretty crucial to being able to make nice PCBs as the machine and the blank boards can be be off by 1/2mm or more from point to point causing the isolation routing to fail.

Building the software, and then a circuit board, will not be an easy task. It will really be like 4-5 separate sub-projects. The one that you can try without spending any $$$ is to merely see if you can build the software

From there you're on easy street LOL! A few initial notes:

Now days I can (apart from design work) "print" a PCB, including the lasered solder mask, in 3-4 hours, depending on the complexity and quality I am trying to achieve. The design, of course, takes a lot longer, and involves the sofware, repos, documentation, the whole 9 yards, etc. Another 4 hours to solder it up, and I can usually test a PCB the day after I design it.

That's it for the "few initial notes".


REALLY BUILDING THE SOFTWARE

I know you don't want to hear this, but I think you need to understand that even just building the software is not likely to be a trivial task.

The FluidNC library is exceedingly complicated. My fork of it is very specific, from a very specific date in time, and it would be nearly impossible to merge it back with the current mainline FluidNC github repo. So, either use all of my code, or go somewhere else for your solution! I wont support or talk about in-betweens or mix and match approaches.

On top of that my own code (cnc3018, FluidNC_UI, FluidUI_Extensions) is fairly complicated and heavily dependent on the version of FluidNC I have in my repo.

Having said that, for this email I built the firmware on my development machine this morning, and it compiled as currently checked into to github. I did not upload it to my cnc3018 machine or test it this morning. It would likely work as expected.

However, if YOU try it quickly with whatever garden variety Arduino IDE and ESP32 boards you have installed on your development machine, I suspect the build will fail miserably. I have been doing a lot of work with ESP32's and the Arduino IDE. I have discovered that everybody and their brother makes incompatible changes to libraries all the time, from big companies like Esperif systems, down to individual guys who published libraries (i.e. ESP32SSDP) 5 years ago and then completely rewrote it at some point. I put a lot of effort into taking snapshots and forks of repos, and knowing exactly what version of libraries I am using.

I will not attempt to support other versions. Not that I haven't tried. For example, I have another whole series of IOT projects that I am working on. I had a student I was teaching Arduino stuff. He installed the Arduino IDE 2.0, current ESP32 boards from Arduino, and my Arduino-libraries-myIOT library failed to compile (much less work). I spent some time looking into why he could not build my source code and it turned into a major rats nest. I was also interested in moving to the "more current" Arduino ESP32 boards (they are upto something like verison 4 in the IDE board manager) and figured I could just upgrade everything to Arduino 2.0 and the latest and greatest of everything.

However, not only are the current libraries source-level incompatible, like effing Esperif changing identifiers, object models, and so on, but as the libraries have drifted (over the fairly short timespan of 4 years), the core functionality has changed enough so that I could barely get the myIOT stuff working, and not working well, under current Arduino IDE and ESP32 board libraries. For example, the Wifi memory usage fairly dramatically increased, the orders of events WiFi changed, and overall the reliability appears to have fallen while the complexity, due to the vast number of different kinds of ESP32 boards has grown dramatically. If I had to/have to re-do it with current libraries, I would need to basically start over and rebuild it piece by piece until it works. Plus my fork of the FluidNC library itself is exceedingly finicky and complicated code.

I believe the same issue exists with the ESP32 and the cnc3018/FluidNC libraries. It is even worse in that case because the main FluidNC repo itself is a huge, complicated moving target, and as I said, it would be nearly impossible remerge it with my source base, at the same time dealing with Arduino 2.0, at the same time as dealing with ESP32 libraries and drift, much less the other libraries that FluidNC and my code use.

I won't even try. I am onto other things.

THEREFORE

If you really want to build this, I suggest that you either have, or make a fresh installation of, the old Arduino ID VERSION 1.8.13 and have or install the old ESP32 Boards version 2.0.18 within it, and run a few test programs before you even proceed. THEN install EXACTLY the versions of the dependent libraries below before trying to build my cnc3018. This email is more correct than the documentation in my repos, but there may be useful documentation lurking in the many pages I have posted there. As of this morning, these are my repos that you need:

These are dependent libraries that I have forked into my github site, but not modified, for sanity. You would use the current "tip" of these repos (master branch):

And finally, These are the specific version of libraries you would need to install with the Arduino IDE Library Manager that are also needed to build the project:

Its a long, but not impossibly long, list of dependencies.


SUMMARY

I am not trying to scare you. In fact I really DO HOPE you try to build it and have success!!

The point of this reply is to make sure you have the version info you need if you actually want to try to build cnc3018, along with some idea of the process of getting from a bare store bought CNC machine to a working ESP32 based FluidNC machine with an LCD and mesh levelling using my code.

I cannot guarantee that I will respond to all future messages in this level of depth. I probably wont reply to general "what-if" questions, but if demonstrate some effort, in other words, if you really try to build it, and you need help, I am pretty likely to reply.

In any case, thanks for reading this, and thanks for checking out my other repos.

And once again, thanks for the offer of a donation, but what's more important to me is that folks maybe learn something, or make something, from all of my hard work.

Best Wishes!