grbl-HAL testing

Thought this may be of interest. I have spent the last few months researching alternates to grlb-LPC for faster engraving. We have a “laser lathe” where we can achieve very high surface speeds since our motion is continuous and we do not decelerate/scan back and for throughout the job. My best candidate so far has been grbl-HAL running on a Teensy 4.1

grbl-LPC and smoothie clustering limited us to about 15,000 mm/m with out worse case test file. with grbl-HAL we are so far seeing a stable 50,000 mm/m and starting to get to the point where the laser pulsing is starting to be the limiting factor.

We are sending the gcode with the recommended generically named gcode sender beta8 but would love to get some ability for Lightburn to connect.

1 Like

Hey Infamous_panda,

I purchased the same board from Phil and the Teensy 4.1 but could not find the firmware for laser use the pre-compiled mill ones, could you share your firmware also your pinout to control the CO2 laser i guessing the PWM pin? thanks so much

CNCninja

Does the board not show up in LightBurn if you just manually create a GRBL device profile?

I’ll dig it up the info. Mine is custom compiled for my specific use.

thanks that would be great

Might be a few days. The setup is in my studio

Got Lightburn up and running on my machine. I did not use a precompiled file rather I compiled via Arduino. Laser is connected to the pwm pin. This connects to the TH connector on my power supply NOT the TL as this caused my laser to fire at full power the when it was powered up.

Firmware linked below.

https://drive.google.com/file/d/1-_uqHv3bNY3Z7TW_lRW2WS3Ai4Rkx-ib/view?usp=sharing

Hi, I am Phil, the guy that designed and sells the grblHAL board Jonas and Chris are using. Happy to answer any questions - especially about custom builds.

I was able to connect LB to a grblHAL board by going into devices, Create Manually and selecting GRBL (not LPC or M3). Then selected USB (only option, will be posting a question about that later) and it just works.

The key to getting higher speed is a custom build that increases the motion planning buffer to 1024. The Teensy 4.1 used on the breakout board has a huge amount of RAM, unlike some of the other processors that various GRBL ports run on. I will be doing a short blog post on how to set this up soon and will post a link here when I am done.

1 Like

Hi everbody! I also purchased an Teensy 4.1 and i am trying to put that board on a custom diode laser plotter ( a little bit overkill…). I compiled my version of grblHAL and plan to use it either on a eleksmaker board or an arduino Uno shield. for that an adapter will be made so that the correct pins match on the Teensy4.1 and the shield. I have upload the firmware to the board and connected Ligthburn to it. When i compiled the firmware i make sure that the machines doesn´t lock when connected, but besides that it stays locked. When i insert $X on the console to unlock an error:50 appears. Anyone has any idea of what that is?

please let me know when you get to this, thanks

You will need to change some Grbl settings to get rid of the alarms. Two resources that will help you through it:

By the way, sorry for the late response. I must not have notification turned on.

I went through both links but did not see where to increase the buffer size for fast laser use.

Thanks

Thanks for the reply. No worries about the time to respond. You have been doing a great work with this board by what i can see , and you have been sharing a lot of information. I did manage to solve the error issue with the board by modifying the $14 setting. I do have another thing to ask you. The teensy is a replacement for an arduino nano. I have connected the GND above th RX pin to the GND on the shield, the Step X to the matching pin of the nano on the shield and the same for Direction X and Enable X. I power up the shield and the motor stays locked even when i send the unlock command. However when i send a move command, the motor unlocks but it doesn’t move, locking again after a few seconds. Do i have to make any more connections from the teensy to the shield or is this another issue? Motor connections are fine. I tested the movement with the arduino nano by only connecting the four mentioned pins from the nano to the shield. Sorry if this sounds a weird or simple thing to resolve, but this is not exactly my thing.

could you give me access

It’s hard to say without knowing your breakout board but I would look at inverting the enable pins ($4).

Yes. The issue was with $4. It now moves. Really appreciated your help on this. Regarding the shield for teensy, do you plan on making some simpler/smaller shields? I have been looking at it but that setup really is way overkill for an simple diode laser machine.

Should be available. but I think you would be better suited with Phil’s premade files.

I’ve been looking at the possibility of one that takes stepsticks, maybe 4 axis. But the price won’t be much lower, there are some fixed costs involved. Total cost with stepsticks would be, of course.

Honestly, looking at the potencial of this board, i would pay the value even if it’s similiar to the one that you already have. I think that it is a reasonable price. Also, could you provide the link for the modification of the 2 lines of code regarding the buffer ? I know that i have read about that, but i can’t find it.

I think it is just one. It is in planner.h at line 29. Change it to
#define BLOCK_BUFFER_SIZE 1024

InfamousPanda may have some other changes, though.

Of course you will need to fuss with the various grbl settings to get to that kind of speed. Max speed and acceleration on each axis. Your stepper motors and mechanical setup will be a limiting factor.

No problems with the settings of the speed. Did change the #define BLOCK_BUFFER_SIZE value to 1024 but i am still getting the same strange behaviour. I remenber that it was 2 lines of code. Have been searching but still can’t find where i read that. EDITED: Forget this issue. I forgot to put the grbl settings in “laser mode”. My bad…