Anita machine is not happy

Anita machine ( Ah neet ah macheen) is not happy. I told her she would be an all powerful Raspberry Pi computer with a custom hat to run her CNC legs and 3D Print arms. She would be using the brains supplied by opensuse leap 15.1 ported to arm64 and she would be self contained and complete.

Stage 1: Design the Base for all the electronics (power supply, ventilation, RPI-3B+, Protoneer hat, DRV8825 drivers, Front panel with [10" HDMI display, power on/standby, tool power, lighting power, External USB, Secondary SD card slot, Joystick, and bubble level]).
This stage seemed to go real well. Re-purposing an old ATX power supply provides 35A at 5V, 15A at 3.3v, and 12A at 12v would have loved to swap the current specs of 5v and 12v but re-users can’t be choosers. Cabinet base 26" wide, 7" high and 33" deep.
It has leveling feet in case the table it rests on is not level. (reason for bubble level).

Stage 2: Design the X-YA-Z axis system and Table bed. Here I gave Anita polished Aluminum frame 25" x 26.5"x 3". Using OpenBuilds CNC and 3D Print material. The table is a fixed position type 17" x 17" with moving Y-axis gantry with dual motors. Working height is 12" and total height is 38". So far so good. Using CBeam for the rails, Vslot for the frame and gantry she is real sturdy.

Stage 3: Design Tools holders for Dremel, Laser cutter, Etchant Resist Pen, and 3DPrint head. Added plans for vacuum attachment for the Dremel, 120v Gantry power for tools that need it, Mounting for Filament reels and pathing for wires to be hidden out of harms way. The 3D Print head unplugs at the Gantry and automatically disables the 3D power at the driver when unplugged. Really looking good.

Stage 4: Find and download opensuse for arm64 (Raspberry Pi) , got it but don’t know if it will work because now we enter the problems phase.
Problem 1: Micro SD Card not recognized by opensuse (think the card is defective)
Problem 2: Download / Install Etcher to format SD CARD says no card to be found.
Problem 3: Protoneer for Pi 3B+ blocks GPIO pins needed for joystick, SDCard, Temp Sense, No problem just make PCB to move pins sideways.
Problem 4: Protoneer can not run 4 motors independently. You can run XYZ with 4th not present or you can run XYZ with 4th being a clone of 1 axis. So no 3D Print possible with this board. It is CNC only.
Create custom Driver board for Pi (5 axis: XYAZH, A=Y, H=3DPrint head), 5 DRV8825 drivers, 2 ILQ4 & 1 ILQ2 opto-isolators for the signals EN-CNC, EN-3DPrint, STEPx-ya-z-h, DIR x-ya-z-h, MCP3008 ADCx8 (joystickU/D, JoystickL/R, Joy-button, Temp-head, Temp-Bed, Proximity Sense,2 unused), xlimit, ylimit, zlimt, +3.3v, +5v, +12v, GND

Reality check: LinuxCNC, Octipi, and all other variants found to date are low speed serial c**p. Even Adunino realized it was not living up to expectations at 9600 Baud and switched from rediculously slow to just generally slow at 115200bps. I2C runs at 100kbps, 400kbps,1200kbps,and 3200kbps and SPI runs at 4800kbps. So when they talk of latency problems with system and security routines delaying data transfer, it isn’t the whole story. The tiny dual buffers of the Arduino UNO can’t hold much and has to parse 64 bytes to 128 bytes which take time to fetch at 115kbps (1.1ms). The RPI runs at 700MHz to 1.4GHz and can update any GPIO as fast as 0.00142us per instance.

So moving ahead what I think would be a an excellent plan is to convert Arduino Gcode processor to RPI Gcode processor, only instead of sending to Arduino pins, send to GPIO pins, Instead of getting Gcode from USB attached computer, get it from fake USB port and store local into buffers. But and there is always a but, I need to figure out how to take normal output from OctoPrint or LinuxCNC and redirect the to an imitation USB that reports to Octoprint etc what an Arduino would normally say. and instead just store and process the Gcode itself to GPIO.

Regards to all from Rick

After so many years of machines dedicated to single functions (CNC routing, laser cutting, 3D printing), I’ve noticed within the past year hobby efforts to build all-in-one machines like what is described here. It’s a simple and logical iteration in the evolution of fabrication by the masses that is becoming more affordable all the time, but can still be surprisingly difficult to execute.

I don’t have a listing of FOSS CNC software at my fingertips, but none of your listed are familiar. Believe if you look around further you’ll find others and likely more widely used than what you’ve listed. That’s besides the multitude of derivative versions provided by CNC machine manufacturers with their products which of course are often made to work with generic hardware.

Regarding your openSUSE related issues…
Your problems are surprisingly common (there are other similar postings) which IMO are based on obtaining images from unknown sources and without proper instructions how to set up.

The following link is to the original RPi and the relatively new RPi Zero HCL which will always provide links to the current recommended images and specific instructions how to burn the images to SDcard. I’ve found it’s critically necessary to use the described tool (xcat) and there are many accounts of people who have tried to use other utilities which don’t work or don’t result in a working Pi. For the other RPi models, simply append the appropriate number to the end (ie Pi3,Pi4)

https://en.opensuse.org/HCL:Raspberry_Pi

Of course, many of your complaints regarding communication speed only relates to the speed of the machine which by any measure is objectively slow no by any measure today… so slower and slowest is not only more pain, it’s also uneconomic. USB and GPIO pins (ie high speed I/O) are of course the solution but I’m surprised you haven’t found off the shelf RPi software, I’d have thought that was already widely available. Perhaps look for some translation software perhaps related to controlling servos which is widely available. After all, both involve managing stepping motors, only in a CNC machine the servos have their stops removed.

Will be interested to hear about your progress…
TSU

Yes this is a descriptive plan of what I’m up to. I have limited space and found need for 5 machines that the so called experts say is the way to go. So I looked at all 5 machines (CNC-router, CNC-drill, CNC-mill, 3DPrinter, 3DScanner) and apart from the singular tool per machine 4 of the five were almost identical except for the built in software for processing. Next came the horror stories of people whom had lost everything because their machines running unattended burst into flames because the Arduino at the core couldn’t take corrective actions. While I can agree in part with them saying that latency problems exist in a more pronounced sense with computers than with straight forward controllers, they tend to overlook the biggest latency problem of USB. There is considerable delay sending and receiving over USB plus the inherent slowness of USB and a still bigger downside of many devices sharing the USB channel. With an RPI at the center and controlling by GPIO the motors or an Arduino controller, we can have an all-one solution to make the files, develop the files and process the files. It can have remote monitoring and with the power of the RPI can take certain protective steps long before they can become critical.

**Just found a site explaining how make a virtual USB, so if I am right and it works, I can have software like OctiPi, LinuxCNC, and the like send the jobs and codes to the virtual USB controlled by Raspberry and it can then do all the decision making on add the safety monitoring.

Regarding your openSUSE related issues…
Your problems are surprisingly common (there are other similar postings) which IMO are based on obtaining images from unknown sources and without proper instructions how to set up.

Yes instructions as I have found are sketchy at best. I have used SD card writers in the past including with Etcher so I am pretty sure my SD card is toast. New set has been ordered.

… so slower and slowest is not only more pain, it’s also uneconomic. USB and GPIO pins (ie high speed I/O) are of course the solution but I’m surprised you haven’t found off the shelf RPi software, I’d have thought that was already widely available. Perhaps look for some translation software perhaps related to controlling servos which is widely available. After all, both involve managing stepping motors, only in a CNC machine the servos have their stops removed.

Will be interested to hear about your progress…
TSU

Yes there are all kinds of snippits to control motors and servos, and Arduino’s via serial buy why re-invent the wheel? Octipi runs on RPI and LinuxCNC runs on RPI, and repetier runs on RPI. They are all good except for one bad flaw, they all talk to the CNC or 3D Printer by USB, and they are also using the USB through the broadcom chip to establish remote connection so you can record video of the work being done and monitor the job remotely with a cell phone or PC. A regular PC would be taxed to handle that much traffic let alone a RPI trying to get the Arduino to behave and do the job. If the Ardunio is out of the picture or only processes op codes to motor actions via GPIO, then no interference with the job will occur, latency will end, and we have an all - in - one solution that can be upgraded at will.

Writing a series of books and will be including chapters on each build (CNC/3DPrint/3DScan) are just 3 of over 140 chapters in the series. Don’t have my website anymore so don’t have way to post pictures or files anymore. But I can send pdf’s & epubs.

As I mentioned,
If you’re short on documentation
I’d recommend looking at the ample and available documentation for radio control…
You’d need to verify the types of motors used but I can’t see any apparent difference…

A signal or series of signals are sent to the stepping motor that turns it to a specific position, whereupon the motor “locks” in place until new signals are received.
The recent development to be aware of is that a PWN(pulse width modulation) signal has been used for the longest time to signal the servo but with new popularity in racing, people are looking for faster signalling to reduce even slightest latency. I don’t remember for sure, but think it’s PID.

Anyway,
The following articles might provide a sampling of how RPi can be used to control a servo
https://rpi.science.uoit.ca/lab/servo/
https://tutorials-raspberrypi.com/raspberry-pi-servo-motor-control/

Note that practically everything is in python, so if your chosen CNC software is written in something else, you may need to find documentation related to that language.

For what you’re describing “using USB” (I’d recommend some other connection medium and protocol), you might find the following for setting up an RPi interesting… It’s somewhat similar to what you’re trying to create but of course is used to communicate a different set of commands (API)… Although in some cases the RPi replaces the usual Flight Controller (a SOC optimized for radio control, managing servos by sending signals to ESCs), the article describes using a MAVlink to communicate with the RPi which contains the database and software for planning, configuring and executing a pre-determined flight, thereby enhancing the capabilities not found in the Flight Controller.

https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

Bottom line,
IMO if your CNC software can be loaded on Linux (most FOSS can), then cut out the arduino, connect to motors using the links I provided and you’ll “just run”

TSU

Wow, sounds like an amazing machine you’re putting together there. I’m sure it’s taking both a physical and financial toll on you. I hope you get the payday that you deserve.