Grbl tests 2022

GRBL 1.1f and later are when the “laser mode” ($32=1) M4 dynamic power adjustment is introduced. This senses the speed of the laser head and reduces power as it slows for a change of direction or end of burn… and increases the power as it ramps up to speed. This eliminates/reduces the overburn in corners or line ends. – David

2 Likes

Nope… standalone only.

GRBL_ESP32 have already done a lot of configuration files for various applications including lowrider and mpcnc. Neither use shift registers as there are enough IO pins for 4 independent channels with associated miscellaneous functions (probe, mist, limit switches etc). Is 4 channels not enough? If more are needed then the solution employed by Bart is required but AFAIK Bart is looking to produce a single board that will fit all applications and I believe that is not the primary concern here. 4 channels is enough for auto squaring cnc/laser machines.

All that is needed is a commercial ESP32 based board with stepstick and external driver options from a reliable source…it shouldn’t be THAT hard! MKS Tinybee fits that description but it employs shift registers and the associated displays are carp for cnc or laser.

The answer is obviously to bait and switch like this
(show you a picture of a 5 channel board with the following specs of a 3 channel board)

Ho-hum.

The mpcnc board by Bart uses 5 channels. The are a bunch of clever trucks to make it work without a shift register. The enable and dir pins between the 5 drivers are connected for each axis. There is only one endstop pin per axis, and software for auto squaring tests each motor one at a time to measure each endstop (wired in parallel/series). It works, but it is right, and it wouldn’t work for a printer.

1 Like

…but why 5 channels? If you have dual Y and dual Z then I could understand it… but AFAIK none of Ryans products do.

I designed my own board, based on 3 channels because I did not consider auto squaring worth it (YMMV), using the lowrider config in GRBL_ESP32 but a 4 channel version would be easy to do. My 3 channel version is currently in my homebrew cnc with a homebrew pendant.

For a printer there are loads of extras that are needed and the best option would be go for one of the myriad of commercial offerings and run Marlin- even any of the 8 bit boards because they are more than adequate for the job, but for a laser or cnc machine those extras are, on the whole, not needed and if you made them yourself the manufacturer would never go out of production :smiley:

??

The MPCNC Primo uses 5 channels with auto-squaring, X, X, Y, Y, Z and the LowRider uses 5 channels as well. Specifically, dual Y and dual Z. Personally, I very much like having auto-squaring, and find having the machine space limits defined helpful. I have done several projects where being able to repeatedly find a specific machine coordinate set makes things go much easier.

For the Primo, 5 limit switches are also good to have, 4 for auto-squaring, and one for a touch plate to determine the Z zero point. For the LowRider, you need 6 switches (Assuming that you want to be able to home X) One for each motor to home, and a sixth for touch plate.

2 Likes

OK…thanks for that… I had forgotten the layout of those machines having moved on to the more conventional cnc designs. Tunnel vision. My mistake.

1 Like

That is one of the reasons I ordered this board. Is to find out how this will behave. Granted they can do 20MHz solo…but daisy chained??? I wonder. In theory (mental calculations only they should be able to update the outputs in less then 10µs but I need to see it by myself.

1 Like

You know, I have to apologize, I have not tested this yet and now is the time. In my defense, I had not tested GRBL since before you started this project, either. I really understand very little about the firmware and the Actual differences in how they work. I am learning, though. I mean this is my favorite thread right now, because I feel like I am learning.

Two questions for you.

1- Where do you stand with the laser stuff, raster speeds, ramping/accel power (grbl1.1f type stuff). I can do some tests if needed.

2- Looks like you are our inside the chips guy. Do you see something that stands out. Octopus is STM32 Would that be a good place to start?

4 Likes

I came across this the other day and it seems that if you can control all of the steppers over one IP interface, you wont have to worry about pin counts anymore. It’s very new, but it would be a promising solution I think.

1 Like

No apologies required. I develop µCNC because I just love doing it…made me learn tons of stuff about cnc and 3d printing as well as going out of my comfort zone and learn how to use new microcontrollers like the ARM.

Yes it does support the dynamic laser mode like grbl. Speed wise…I believe it can go faster then Grbl. But I base that believe in a simple gcode stress test I made. I would like more output feedback to back that up. It can be used exactly like Grbl.

In my opinion crosscheck the support list of grblHAL, Marlin and Klipper, this way you will be covered in the best possible way.

Recommend opting for a board with STM32F4. It’s not as powerful as an STM32F7 board but I believe is currently supported by all 3 firmware mentioned above.

Examples:
SKR Pro 1.2
MKS Nano v3
etc…

1 Like

I think something like a well designed stm32 based cnc board that fits mpcnc needs could be disruptive to the market TBH. ESP32 solutions are tops now, but the shift registers and to some extent the wireless features make it less efficient than it could be. All the btt products require some extra pcbs or whatever for advanced spindle controls like mach3 or rs485… and it seems the further we go in the future the harder it would be to ditch crap like thermocouple ic’s etc using printer boards on cnc. There’s certainly lots of room to streamline for modern hobby cnc IMHO. That said, I also understand the process of design/test/manufacture of such a board isn’t a small side task for most hobbyists.

edit: Not much a chip guy, but I have to agree regarding f4 vs f7… the popular uC’s and how they’re used in printing/cnc have seemed to shadow that of drones (with drones seemingly staying ahead a couple years). If that’s the case, it’s likely F7 will be broadly supported in the CNC world soon, but right now it’s all higher end ‘tool change’ printer boards.

TBH, even ramps/2560 is more than enough for normal cnc. It’s the laser/raster where issues crop up, and it seems to me some adaptation of Klipper would be the best way to stomp that problem out of existence. I don’t know much about Klipper and never used it myself, but it seems like when someone does manage to port that for laser raster, other efforts will become a waste of time.

1 Like

The ESP32 is dirty cheap for the power it packs. My only beef with it is that It’s tricky with a bunch of processes running simultaneous.

As I said (IMHO) the ESP32 would be better running as a web interface or Bluetooth connected to the serial port of the board…giving wireless capabilities to your board like an external module.

1 Like

Sorry I have not managed to keep up with your developments… would it be accurate to say your idea is similar to replacing say, an rpi or other sender, with esp32? Does the issue with simultaneous tasks become a problem when trying to offload planning to the esp (like klipper)?

The thing about the ESP32 is that you need (as far as I can tell) to use it with an RTOS. Using ISR directly must be very tight or else the watchdog will blow. Or else you need to queue a task in to execute the code of your ISR that then gets called by the task manager that is running a bunch of stuff…indirection, indirection…It works…but…hummm will it run on time???

It’s trippy. The ESP can act as your PC and send the commands via UART. You get a (PC or mobile device)->WiFi->ESP->board kind of connection. Even if the ESP or the WiFi goes berserk the board will hold the machine state.

Don’t get me wrong. I’m not saying it doesn’t work. It does. Bart does it on FluidNC. TerjeIO does it on grblHAL…I also do it both on ESP32 and ESP8266 (lol yes I can run µCNC solo inside an ESP8266). But is it the best solution??? I honestly don’t know…but I have my doubts. But I’m a noob in the ESP environment. I’m still scratching the surface. There will be different opinions on the matter.

1 Like

I stay way up above the iron in esp land. I don’t have the desire to do a lot of low level programming anymore.

The esp is extremely impressive though, especially for the cost.

CHLohr used to do some incredible feats with this little fast processor:

This is from 2016.

6 Likes

He said 2 interesting things:

One is that ESPRESSIF gave it to many IO drivers… :rofl: :rofl:. I may be wrong but they didn’t. PWM is software generated using the only available hardware timer it has. It has a system timer but they say in the datasheets it should not be used for time critical/precision stuff.

The other one is DMA. I did not look deep but I think this is the way FluidNC (and probably GrblHAL) does the I2C → 74HC595 thing. It sends the data to a buffer that is then managed by the DMA (this runs independent from the processor).

But again…It can run @160MHz. It can pack a punch for sure.

1 Like

Indeed - I would take a look at the list of hardware peripherals in the latest esp32 datasheet. The current esp32 series runs at 240mhz except for the 160mhz esp32-s that are used by esp32cam modules:

1 Like

You’re getting old… that’s the way it starts… :stuck_out_tongue_winking_eye:

2 Likes

Re: Ethersweep

Thanks for sharing this. The esp32 has an internal hal sensor that can be sampled by the ADC, or in other words it could function as part of a closed loop stepper motor control if the module was attached close enough to the motor. Imagine a small cluster of esp32’s operating synchronously to control an arbitrary number of motors. The only wiring needed would be Vmot, Vdd, Vss.

1 Like