K40 laser with M2 board

I have a K40 laser with a M2 board. I want to use Lightburn to run this machine as it is the Best laser software that I have used. Is there a interface that will make this an option. I found this on ebay and was wondering if this is a valid option
Lightburn Software Licence G-Code Version Mini Gerbil Cohesion 3D Smoothieboard | eBay Software Licence G-Code Version Mini Gerbil Cohesion 3D Smoothieboard
Can I putchase this directly from Lightburn ?


Lightburn won’t work with the M2 board - you will need to replace it.

Don’t buy LB licenses from anywhere except LB, or from a laser vendor that gives you the option when buying a machine. That eBay seller is more expensive than buying direct from LB.

This is a plug-and-play alternative to the M2.

1 Like

A “Mini-Gerbil” Controller from AwesomeTech is also a good solution, it works very well with my K40 for over 2 years now. (about $ 95), and they do not overcharge for LightBurn either.


Thank you Benrd suggested this

Would rather run gerbil as I am familiar with it and use it for my diode laser

On a “standard” K40, switching the controller with a Mini-Gerbil board is very easy, plug and play I would say. It is important, in my opinion, to have an ammeter and that you stay below the 16mA - equivalent to approx. 55-60% in LightBurn. Lightburn you set up manually with Gerbil-STM, your measurements (320x230, with me) and left-top as the origin of your laser, and then you are ready. Default setup in Mini-Gerbil actually has all parameters in place, but after you make a copy of them, you can easily play and experiment with the values. Find the speeds that suit you best, not only go for the fastest but “listen” a bit if it sounds right. I can recommend reading the information regarding the K40 and Mini-Gerbil on the AwsomeTech website, which is understandable and relevant information.
And no, I have nothing to do with AwesomeTech, except that I have their Mini-Gerbil and am very happy with their fine service as well.

Good luck and report back if you need help.

1 Like

Thank you so much for your help

The cohesion3D runs smoothieware, which is more-or-less functionally equivalent to GRBL, but with a lot more features and superior motion control.

Bo, can you describe what you mean by “superior motion control”.
I also wonder how many extra features can be used to control a K40 with 2 axes.
(it’s not meant to be a competition start, it just interests me)

Smoothieware has advanced motion control where the planning acceleration forms a sine, rather than a sawtooth. They accelerate/decelerate more gently, giving a ‘smooth’ operation, hence the name.

It gives smooth, jerk-free motion and higher speeds, due to the advanced motion planning.

So, in layman’s terms, it starts off slower, builds speed longer, so higher speeds possible, and decelerates in a sine, giving you smoother, better motion. It has a 120MHz processor with a lot of RAM, so has longer look-ahead and thus, can motion-plan further out.

Grbl, by contrast has a very jerky acceleration - stop to full speed is linear. this makes for a lot of wasted energy and is hard on machinery.

Think of how a rally driver takes a series of slippery bends vs a teenager in an overpowered car :slight_smile: Or in my case, and experience, how an advanced motorcyclist moves through a set of bends. The novice driver tends to go full-throttle and hard braking to try and gain overall speed, whereas being gentle on the throttle and brakes results in faster progression, with less loss of traction, more safely, with less wear and tear on components.

It’s noticeable, by ear alone, how much smoother the smoothieboard is. You can get higher speeds without missing steps, where the same settings in grbl would result in a lot of stutter.

The features aren’t so much in the controlling of the two axes as they are in living with the machine - SD card for updating firmware on the fly without needing to re-flash the board. Onboard RAM to hold the current firmware, updated by having the right filename on the SD and powering on, after which a successful update will change the name from firmware.bin to firmware.cur

Altering configuration is done via a text file, config.txt. Configuration can be permanently changed on the fly. No need to connect to a PC and flash using an IDE, for example.

The command structure is more intuitive, in my opinion, to that of grbl. Easier to read, easier to effect changes. Which is great when it comes to tuning.

an example of a command structure in config.txt:

Laser module configuration

laser_module_enable true # Whether to activate the laser module at all. All configuration is
# ignored if false.
laser_module_pwm_pin 2.5 # this pin will be PWMed to control the laser. Only P2.0 - P2.5
# can be used since laser requires hardware PWM
#laser_module_maximum_power 0.8 # this is the maximum duty cycle that will be applied to the laser
#laser_module_minimum_power 0.0 # this duty cycle will be used for travel moves to keep the laser
# active without actually burning
#laser_module_pwm_period 20 # this sets the pwm frequency as the period in microseconds

As you can see, plain-english commands, with decent comments. And you can tune your output so you won’t ever overdrive your K40 if you don’t want to.

Not so useful for lasers is the sheer number of pins and the ability to change their function - for example, to invert a pin, put a ! in front of the definition.

You can ONLY get PWM on pins 2.0 to 2.5, 1.18, 1.20, 1.21, 1.23, 1.24, 1.26, 3.25 and 3.26 :slight_smile:

Any pin can perform any function - other than PWM, which is limited to those above. So very hackable.

Genuine boards come with great power options, including a bunch of powerful FETs to control things like hotends and heated beds on 3D printers.

And the most convenient option, for me, is ethernet on-board. Connect up the card to ethernet and the contents of the SD card becomes visible as a shared network disk, the web interface comes alive, and You have options like SFTP, telnet, http to talk to the device.

It also interfaces with things like pronterface, Plan 9 networking, etc. (Plan 9 from Bell Labs - Wikipedia) and supports composite USB Mass Storage + Serial interface to the host - very handy.

so, you can fire up the board, and set up a hot-drop-folder where you can drop Gcode and it will be available to the firmware, should you desire. Less so for lasers, but if you build a pick-and-place machine, for example, can be a great option.

For laser, just use the built-in webserver and send it your file. You can hack the web server to display your own custom pages, easily.

Overall, a very capable board, very hackable, lots of options for connectivity and control.

They have just released their kickstarter for Smoothie 2 - worth a look. https://www.kickstarter.com/projects/arthurwolf/smoothieboard-v2

Thomas Sanladerer has done a good review, obviously geared towards his environment of 3D printing, but goes over a lot of detail

Hello Bo,
Thanks for the fine explanation, I think you often come up with useful help and background knowledge.
I understand well that you are happy with your controller, it is probably in another league it is intended for, but maybe also a little overpowered for a K40.
Maybe there is someone here with a K40 and c3D who can give me an idea of where the speeds are when engraving a normal image, without feeling the machine knocks itself out of its good skin ?, let’s say 50X50 mm (many lines shift) with approx. 300 dpi and approx. 50% b / w coverage. It’s not the total time I’m interested in, it depends on so many factors, it’s the movement itself that should be soft and fast, I’m most interested in.

I haven’t used a C3D, I own mostly genuine Smoothieboards - 3XC and 5XC.

Oz developed the Cluster mode extensions for Cohesion a long time after I did my last machine upgrade, so I haven’t used it.

I rarely engrave - my business is nearly entirely cutting, and my K40s were used in my former tech hub, both as a basis for teaching how to build, configure and upgrade lasers and CNC routers, as well as teaching materials technology and general digital manufacturing.

When we moved from Asia I only brought one K40 with me, new in box, which has remained in its box :slight_smile:

The C3D forum is very informative and may prove useful.

As to the controller, it’s like anything in this tech arena, there will always be something better, but for my money it bridges the gap between 8-bit controllers and DSP controllers nicely.

Their Kickstarter offering start at €65, I think, for a complete unit with drivers, so not break-the-bank expensive.

I’ve probably got a couple of dozen controllers of various sorts from Arduino+shield to raspberry pi+hat to ESP32 to Smoothie and a bunch of RAMPS, some home-built (I’m an EE, by profession) and odds and ends of Chinese knock-off, but the one I always favour is the smoothie, despite the eye-watering cost of the 5XC

One other strong recommendation is the TinyG/G2Core.

It also has advanced sine-wave motion control and some cool features. The TinyG is more suited to CNC or cutting as the 8-bit ATMEL microcontroller is too slow for engraving, but the G2Core firmware using a 32-bit Arduino Due with their gShield or a hacked cncshield (hacked to make it work with 3.3v vs 5v - easy mod) makes a cool little controller

Thanks for the answer. I am not out to find a replacement for my Mini-Gerbil board I am as I said very satisfied, but “also the neighbor has beautiful daughters” :wink:.
I’m just interested in where other users have their limits with their machines, preferably something I can compare to my old K40. Cutting in plywood, acrylic and HDF is my main area of work and when I finally do some engraving it is not very much. I have the luxury of not having to make a living with my laser and can afford to drive more smoothly with my laser. I also think that’s why my K40 has not fallen apart yet and it does not sound as horrible as some I have seen on YT.

It’s a solid board.

You can have the best of both worlds… there’s an STM32 port of Smoothieware, although I haven’t checked to see how current it is: GitHub - clementleger/Smoothieware-STM32: [DEPRECATED] Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++

For the sake of a few hours dicking around, you can see for yourself.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.