Replacement controller for K40 clones with more options

Discuss laser machine here freely.

Moderator: baker

Post Reply
Downunder35m
Posts: 13
Joined: Mon Apr 11, 2016 11:38 am

Replacement controller for K40 clones with more options

Post by Downunder35m »

When I got my cheap laser I was already expecting problems with the software, after all the net is full of complaints...
So the first task for me was to find (cheap) replacement for the bad Moshi controller - in my case a real oldie running a 2013 version of "Corel" Laser Draw.
I don't want to write the whole story about it all eveloved again here, so if you have one of these K40 and want to try something different check my Instructable about it.

What is new after changing over to Arduino Mega2560 / Ramps?
1. SD support
2. Full display support with encoder
3. Full support for vector cuts and 8bit photo engravings
4. Full support for 2.5D engravings by engraving height maps
5. No more dongle :)
6. Use of Inkscape with a corresponding plugin, so you can create in Corel and simply export as SVG for processing through Inkscape - sorry no driver
7. Support of layer naming for laser settings including, power, pulse frequency and pulse lenght
8. Full standalone support if a SD card is used - create your work where you like and place the machine where it suits

All is based on the Turnkey Tyranny firmware and Inkscape plugin.
Changes have been to incorporate new power settings and the support for true 8bit engravings.
All settings have been fully configured to suit all K40 clones with a power supply that uses a laser on and a seperate laser PWM connection, analog or digital does not matter.
If you need support for single pin operation of the laser let me know in the comments of the Instructable or here and I will change the pin assignment accordingly to provide a firmware for these power supplies.
KennethLop
Posts: 3
Joined: Mon Mar 14, 2016 6:59 am

Re: Replacement controller for K40 clones with more options

Post by KennethLop »

This is a great project. :roll:
Downunder35m
Posts: 13
Joined: Mon Apr 11, 2016 11:38 am

Re: Replacement controller for K40 clones with more options

Post by Downunder35m »

Currently I am in the last stages of getting it all working for the K40 on a new firmware with more options.
Initial tests are very promising showing good engraving results at up to 4800mm/min.
In a few days I should be able to present a final version that includes the adjustments to display stuff as well.
With the new firmware it should also be possible to integrate diode lasers into any existing printer or CNC system.
Hardware support for many controller boards as well as sensors not only for bed and extruder but also water cooling and control over pumps and other stuff.
I am just using a cheap Arduino Mega but with a more powerful CPU and proper hardware engraving speeds of 12000mm/min or more should be no problem.
Did not do much vector works with the new firmware but it seems that especially smaller details now laser much better and without pauses that could cause holes to burn into the material.
Once my tests are concluded and all is working for my needs I will upload the firmware for everyone to enjoy.
Downunder35m
Posts: 13
Joined: Mon Apr 11, 2016 11:38 am

Re: Replacement controller for K40 clones with more options

Post by Downunder35m »

I guess the testing is completed to my satisfaction.
Both vector and 8bit raster engravings work fine.
I will keep the firmware updated together with the main branch if there are any significant changes that concern the use on a K40.
Finally a working laser cutter on the budget :)
Downunder35m
Posts: 13
Joined: Mon Apr 11, 2016 11:38 am

Re: Replacement controller for K40 clones with more options

Post by Downunder35m »

Time for another update I guess ;)

The firmware is performing quite stable @ up to 4200mm/min for 8bit engravings at 508DPI.
If the resolution is at the standard 270DPI I can get close to 5000mm/min and to around 6000mm/min if I don't care about some pinhole burns at the sides of the engraving.
When the display and SD is activated the top speed goes down to around 4000mm/min above that and you get pinholes or sometimes black lines in the engraving.
After all these speeds are slightly higher than what the 16MHz CPU can offer without cheating a bit.
Right now I try to find the right export resolution to give best possible results without blowing the file size up too much.
There might be an option to avoid the pinholes completely by modifying the buffers a bit and by reducing the base64 paket size - but that needs further investigation.
It only makes sense to increase the resolution to what is actually visible and optimizing buffers, timings and base64 calculations only makes sense if the Arduino is able to process the data in time to gain more speed.
Biggest proble for our engravings is the fact that the movement buffer is not optimised for linear moves that do 180° turns.
Perfect solution would be to always keep 3 image lines in the serial buffer.
One line is engraved while the planner does the calculations for the next line based on linear movement and the 180° turn.
Problem is that bigger engravings would need too many base64 segments per line to keep three lines in the buffer.
But maybe a future Marlin release will address these issues better than I can considering more and people now use lasers running Marlin.
Post Reply