Sam, You are my hero when it comes to this sort of thing. I wanted to link one of your RPI youtube videos but for some reason Youtube wasn't helping with my searches.
I too have written CNC software, way back, Z80 Assembler for a laser cutter as a demo that the machine was capable of what the end customer wanted. At that point emc1 was just getting started. And my ELS, with reasonable threading using a 1PPR spindle sensor, has been stable for many years and I will support it as long as I possibly can. And of course it's open source. Although it's been on the back burner for a while, since April 2020, I used a MicroChip Automotive Networking Board that takes a PIM module (PIC32) and created and interface board to translate 3.3V signals to 5V and put them onto the correct pins of a PIC18F4685. This photo is too large to attach so here's a link. http://www.autoartisans.com/ELS/AdaptorBoard-7.jpg I then created a project and new init code for a PIC32 instead of the PIC18 and with actually very little effort had the 8 bit code running on the 32 bit processor including the micro-stepping 3A 50V stepper motor driver. The plan, when I get to it and stop breaking touch probes on my mill, is a small add on board that plugs into the 40 pin PIC18 socket. The board will also have an extra 8 pin connector for a differential quadrature encoder and a bit of extra I/O for 0-10V output for spindle VFD. But the basic ELS behaviour won't change that much. But with a 32 bit processor the potential of creating a better trajectory planner so that an operator can hand turn the lathe spindle back and forth and have the Z axis track might be something I will attempt. With that experience behind me I'd love to see someone do it quickly on a different 32 bit processor. At the moment I'm also playing with a dspic33ch128mp508_pim mounted on an Explorer 16 motherboard. It's a dual core 16 bit processor and I've taken the basic demo application and modified it to read a quadrature encoder. When I select the S3 button it shows encoder displacement in degrees to the nearest 100th and velocity in steps every 50mS. dsPIC33CH128MP508 Demo PIM Version 0.02a S3:Main only S6:Main+Second >q Counter = 0 Control = 0x8000 IOControl = 0x00000004 Status = 0x0002 Position Counter = 0 Velocity Counter = 0 Position Hold = 0 >? q : Show QEI Register values rx(=x) : Report or Set memory location using hex address=data v : Print Version and Build info >v dsPIC33CH128MP508 Demo PIM Version 0.02a I also have a TI Launchpad with dual core and QEI support. It's also 16 bit but has some pretty impressive math capabilities for doing real time trajectory planning. But each of these projects all suffer from the same issue (as would an ESP32 module). One still has to build a board, assemble it, test it and mount it into a box. The Beagle with a cape and Pi4 with a MESA are just so much easier. Even just the adaptor board for my ELS and the software was a few months of hobby time spent. Doing a full trajectory planner is a huge undertaking. John > -----Original Message----- > From: Sam Sokolik [mailto:samco...@gmail.com] > Sent: August 5, 2023 5:51 PM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] Beaglebone black latency > > I agree.. It is so easy isn't it? Just use a ESP32! > > I tried to write a machine controller when I was in my 20's... This was > before I found turbocnc (which sucked) and linuxcnc. (emc1) > > I also helped test the trajectory planner improvements made when Rob > added > n-segment read-ahead. It took months to make something viable that also > worked as an actual cnc (tool offsets, velocity/acc constraints, cnc > stuff...) > > Someone that comes in and says - you can easily use x and y to make a great > cnc controller are quite naive... The grbl controller that every one touts > as a great solution is so basic it is scary.. works great for a basic 3 > axis mill - but that is it. > > I have actually been using a rpi4 and mesa to run an actual mill to machine > actual stuff. It works very well - no issues... > > It does some amazing stuff like... (and is an actual cnc controller that > takes actual gcode..) Am I getting my point across? > > https://www.youtube.com/shorts/23bEsKMNJH0 > > sam > > > > On Sat, Aug 5, 2023 at 7:30�PM John Dammeyer <jo...@autoartisans.com> > wrote: > > > Chris, > > I must admit I had a bit of a chuckle when I read your answer. It's so > > easy to just do this or use that or add these and then you are good to go. > > > > If it's that easy I expect you'll have that tablet with the wifi > > connection to the ESP32 and be executing G-Code by the end of August > right? > > > > Other than wiring up motors and all the mechanicals, which has to be done > > for any CNC installation the time to get the CNC running was even less time > > than from now until the end of August for me. And I likely would have > been > > using this were it not for the inverted ESTOP. > > https://youtu.be/9GF709ZfLRQ > > Instead I went the PC route and did a dual boot between LinuxCNC and > > WIN-XP for MACH3. After that I bought the MESA 7i92H after also mucking > > around with my USB SmoothStepper (MACH3) from my CNC router. I > decided > > Linux had a better future than WIN-XP so although I still run MACH3 on the > > CNC router the mill has LinuxCNC. > > > > On the workbench I muck around with a Pi4 and MESA 7i92H. Go onto you > > tube and search Raspberry Pi and LinuxCNC and there are lots. > > Again one like this is much faster to set up than your suggestion and not > > any more expensive. > > https://youtu.be/qL530kJUmII > > > > I do look forward to your progress on that novel idea of a tablet, ESP32, > > RTOS and all the code to deal with trajectory planning. > > Keep us informed. Maybe some videos of the intermediate steps. > > Especially since as you imply it's so easy to go that route. > > > > It would be interesting if you could do it for less than > > https://youtu.be/X-DY6iL6NcI > > > > John > > > > > > > -----Original Message----- > > > From: Chris Albertson [mailto:albertson.ch...@gmail.com] > > > Sent: August 5, 2023 4:02 PM > > > To: Enhanced Machine Controller (EMC) > > > Subject: Re: [Emc-users] Beaglebone black latency > > > > > > Why start with a BBB/Pi4 and then add a screen and so on. > > > > > > A better starting place would be a low-cost Android tablet. Perhaps > > like this > > > one. For $120 you get the CPU (that runs Linux), a touch screen and > > WiFi. > > > What is needed is a way to connect it to a machine tool. > > > https://www.bestbuy.com/site/samsung-galaxy-tab-a7-lite-8-7-32gb- > with- > > > wi-fi-dark-gray/6464584.p?skuId=6464584? > > > Samsung Galaxy Tab A7 Lite 8.7" 32GB with Wi-Fi Dark Gray SM- > > > T220NZAAXAR > > > bestbuy.com > > > > > > I would use something like a small 32-bit micro controller to do the > > real-time > > > pulses and switch monitoring. If you would choose an ESP32 then the > > > interface to the tablet is wireless. But you could use USB as both > > devices > > > have USB built-in. USB has a built-in asocronus mode where data moves > in > > > strict real-time. But this might not be needed if 100% of the RT loops > > are > > > onthe microcontroller. > > > > > > The ESP32 is a dual-CPU, 32-bit device with more then enough computer > > > power to run a CNC controller. I would 100%, for sure run an RTOS > > > (FreeRTOS or Mbed) on the ESP32. The tablet is just the user interface > > and > > > ?MPG?. > > > > > > I am currently using ESP32 to generate PWM control for a 12-axis robot > > and > > > I?m getting sub microsecond pulse accuracy which is more then my > > > application needs. It is very fast and written 100% in Python. > > > > > > If the user already had an Android tablet or wanted to buy a used tablet > > you > > > really could under cut the cost of a $500 Chinese device. > > > > > > LCNC was written to take advantage of ?cheap? community hardware. > This > > > is when a basic 16-bit PC would sell for ?only? about $3,500. Today?s > > > commodity hardware is called a ?cell phone? and they are MUCH more > > > powerful then the old PC was. > > > > > > > > > > > > > > > > > > > On Aug 5, 2023, at 3:23 PM, John Dammeyer > <jo...@autoartisans.com> > > > wrote: > > > > > > > > Me too. A closer look at the fine print and selecting the correct > > button > > > shows the actual CNC controller is $513 or $541 for 3 or 4 axis > > respectively. > > > The MPG is priced separately at $96. > > > > > > > > And this is why a BBB with a cape that included a Break Out Board with > > a > > > few relays etc. for under $100 would be quite the bargain. The question > > is > > > then what sort of display would be good. And you still need some sort of > > > MPG to go with it for also about $100. > > > > > > > > For $94 I can get, from amazon.ca a 7inch HDMI LCD (H) 1024x600 > > Monitor > > > IPS Screen Capacitive Touch Display Supports Raspberry Pi Jetson Nano > > > BeagleBone Black Banana Pi & Microsoft XBOX360, Sony PS4,Nintendo > Switch > > > > > > > > And therein lies the problem. Creating something similar to the $500 > > > Chinese CNC controllers with touch screen will ultimately cost in the > > same > > > $500 range. But unless the MachineKit or LinuxCNC version is stable > > with a > > > target life similar to the life of the machine tool no one will spend > > the energy > > > and time to make that. > > > > > > > > The market isn't big enough to justify the work required. Which is > > why so > > > many of the Beagle Capes are no longer available. Next week there's an > > new > > > ESP32 with more bells and whistles. Won't do what the Beagle does but > > ... > > > > > > > > John > > > > > > > > > > > >> -----Original Message----- > > > >> From: Martin Dobbins [mailto:tu...@hotmail.com] > > > >> Sent: August 5, 2023 11:44 AM > > > >> To: Enhanced Machine Controller (EMC) > > > >> Subject: Re: [Emc-users] Beaglebone black latency > > > >> > > > >> It makes me wonder which operating system they put on that Chinese > > > >> controller, and what motion control system. > > > >> > > > >> Martin > > > >> > > > >> ________________________________ > > > >> From: John Dammeyer > > > >> Sent: Friday, August 4, 2023 7:41 PM > > > >> To: 'Enhanced Machine Controller (EMC)' <emc- > > > >> us...@lists.sourceforge.net> > > > >> Subject: Re: [Emc-users] Beaglebone black latency > > > >> > > > >> My biggest issue with the Xylotex BBB Cape for CNC was that the logic > > for > > > >> ESTOP was inverted. ESTOP was a N/O switch so if a wire was broken > > you > > > >> wouldn't find out until you tried to save a body part from being > > injured > > > with > > > >> the ESTOP. > > > > > > > > > > > > > > > > _______________________________________________ > > > > Emc-users mailing list > > > > Emc-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > > > _______________________________________________ > > > Emc-users mailing list > > > Emc-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users