Goodbye Moshi or How to Run Your Laser Printer on Arduino

32,456

192

54

About: I like to improve myself and things I find :) Learning new things every day is next to impossible but I still try - only a working brain can work. I have no special sector to cover, electronics, electrical s...

Update 19/04/2016:
MarlinKimbra is here!
This is one of the best firmwares based on Marlin I have seen for a long time, no feature is missing.
But for our purpose here it is just about being up to date and getting better results.
Please check the last step of this Ible as I will keep future updates there.


Update 11/04/2016: The new firmware is available now in my Ible about 8bit engraving.
This means the power level is now from 0 to 10000, giving a higher resolution for the power without compromising speed or other functions.
Engravings on fragile things like paper are now possible without burning holes.
All SD and display functions have been modified to suit the firmware, so you can move the head, do testburns at various power levels and even tweak most of the settings to be totally independant from a PC / laptop.
I tried my best to implement WiFi as well but could not get it working properly, so if you do want to transfer your Gcode files without swapping the SD use a WiFi enabled SD card instead.
Never tried it due to a lack of hardware but it should also work using Octoprint.

Update 27/02/2016:

True 8bit photo engraving is now possible, please check the addition here.

Update 26/02/2016:
I was able to change the Marlin code so that now a much higher resolution for the Laser PWM signal is possible.
Please beware that I also found a problem in the code.
The curent power settings are not deviced in 256 steps but limited to 100 - reflecting the original machines 0-100% settings!
I will do some tests on the weekend and if all good upload the modified firmware for everyone interested to test.
With that it should now be possible to do true 8bit engravings with a CO2 laser - something even Picengrave can't do at this stage.
I will also add links to the software used to used to generate the code the true greyscale engravings and how to modify the Gcode for proper placement on the machine. - Stay tuned!

When it comes to starting with CO2 lasers the beginner on a budget will be tempted to get one of the K40 clones from china.

As requests, problems and postings of general frustration about these machines flood the internet I though I jump in too.
Don't get me wrong, I did it on purpose as the price for the entire machine was about the same as just a 40W laser tube imported to Australia - and that is without a power supply...
I already started a topic in the forum on why not buy them but if you already did or still want to get one, this Ible might be helpful on your way.

What you will get in this Instructable:
All the info, sofware and tips you need to convert your budget laser cutter to run on an Arduino board - for far under 50$.
Also the satisfaction that you can now create all your things directly in Inkscape (or other vector programs).

What you need, tools, and such:
1. Patience...
If your machine is anything like mine you don't want to rush things as not everything is perfect in China.
2. A basic understanding of wiring some cables and some very soldering skills.
3. Basic toolset.
Flat and phillips head screwdriver, 7mm spanner (keep the set at hand, you never know...), pliers, side cutters, soldering iron, heat shrink tube or if in doubt electrical tape.
4. Arduino Mega with Ramps board, optional a display with encoder and SD support to have a stand alone solution.
5. Some old computer cables, connectors and such - I tried to keep the original cables the way they are, it is no problem not to use connectors and to solder directly.
The only thing I really suggest using connectors fo is on the pins for the ramps board, I used single LED pins from an old computer.
You can source the complete kits including Ramps and stepper drivers for around 30-40$ either through Ebay or your trusted local dealer.
6. Two 10kOhm resistors.

First to the specs:
40W CO2 laser - claimed power, so we can assume it is around 30W when you would measure it.
Unlike most of them I got mine with a digital power control and not the analog meter with potentiometer.
Rest is like any other chinese clone out there except the electronics...
Here can already make out if you might get some fun out of it or not.
Mine came with the totally outdated "Corel Laser draw", from 2013 and with a golden dongle.
Others have newer software and other dongle colors, indicating a newer control board.
The 2016 versions also support vector cutting and speed/power settings by line color definition (but they cost more and are very hard to find).
So unless you got the latest model you will most likely have it shipped with Moshi Draw, Corel Laser Draw (2013-2014) or in very rare cases with real software like you would find on high end machines - again for a much higher price.

Is this Ible interesting for me and does help my machine?
If you can only do engravings and cuts with raster images like BMP,JPG,TIF,PNG but not in any vector format then it can help you.
If your machine and software already come with full vector support and a print driver to use it with any software out there you might want to find other reading material.
Although some of the mods might be of interest to you anyway... ;)

I will start with some basics of the crippled stuff and how to improve your work a bit but the real deal starts at step 4 with the replacement of the controller board.

Can I use it for something else?
Of course you can!
As it is a "generic" approach this mod can also be used on your homemeade diode laser engraver.
You will need to modify the Marlin firmware to suit your needs though in terms of endstops, buil dimensions and such (easy!).

Info on the above images:
The pegasus was engraved on cheap, 3mm plywood - not a good choice LOL
My niece was engraved on plywood too but with the original Turnkey release and before the full 8 bit support was added.
And the old movie image with Billy the kid was engraved on Arakaria wood with the latest firmware mods.

Step 1: The Hardware Limitations of the Original Controller

If you don't have one of the latest controllers installed you won't have any DSP or true vector support.
Even if it looks in the software like you do, you might have notices that your dimensions come out wrong in a lot of cases.
This is due to the simple fact that the cutter can only handle raster images but no true vector images.
Moving the head line by line to "print" and engraving is easy enough as simply the image is transfered line by line and pixel by pixel.
Where there is a dot there will be a burn mark.
That of course is also the reason why you can't just take a nice color image and burn it on some wood.
The software will transfer it to a grayscale image and use some algorithm to determine at which level there should be a burn or no burn.
Usually the result is far from satifying...
When you create some simple cuts within the software it will really look like it is doing vector cuts, while in relality the software just uses the lines to move the head around.
Saving such a cut and analysing it with a Hex editor shows everything is saved within the cryptic file, like dimensions of the table and work area but also the stuff to cut - as a transparent PNG image - again raster format.
All this comes from a controller that is unable to move the axis like a CNC machine.
The later software versions can sometimes cover for this but never really satisfy in the long run.

Ok, the controller might be crap, what about the rest?
On my tube was no sticker, mark or so telling me the claimed power or other electrical data.
The Y-axis has a linear rod and bearing only on one side, might be enough for a small work area but the loose other end tends to cause vibrations.
The X-axis is made from a weird profile that gives really good stability and uses only simple rollers to hold the laser head in position - again for short distance it might be enough.
You see where I'm getting?? ;)
Enough but never really good enough, like using just bots and nuts, no washers, lock washers or lock nuts.
If someting is a no fit or not aligned properly force it into the right place as the customer might never see it...
Let's just say you really get what you paid for it.
This means identical looking machines costing twice as much as the china version might have started the same way.
The difference is that someone took the time to make them compliant with local safety and electrical standards.
Things like adding a switch for the lid, flow and temp control for the water, plug on the machine for the fan and pump...
Means someone spent a lot of work hours getting the machine right for you ;)

Step 2: Software Limitations of the Original Setup

As said if you can't define power or at least speed with different colors you might be frustrated every now and then.
The 2013, 2013 and 2014 software versions (to my knowledge) only support raster images.
To make things worse doing cuts from raster images might at first look like it is working fine but:
A vector line is a straight line, no matter what angle, a line on a raster image is always made from dots and quite often these dots overlap.
With a software being unable to put this into a clean and single movement you often see your head doing all sorts of movements except following the lines in the image.

Engraving seems to be the only thing really working with these machines but even there you need a lot of time and external programs to get really good results.
But if you manage to transfer a nice picture into a B/W bitmap that does not look to have too many totally black areas the result can be stunning.

Step 3: Ripping the Old Machine Apart, Well Sort Of...

At first I decided to take a lot of pictures for this step so every little detail is covered.
Then the reality hit me by letting me know that there are several variations of the hardware out there :(

So I will try too keep it really simple....
Disconnect power and USB!!!
The original controller has to go out, same for the laser power supply.
The controller is mounted with 4 screws - take them out including the spacers and washers - if you find washers...
The power supply is mounted with 4 screws towards the inside on the machine, in some cases it might be mounted to the floor instead.
There might be a short cable channel or just cable ties used to sort the wires, get all wires loose without disconnecting them so you take out the power supply and controller with all cables attached.
Important!!: Now take a permanent marker and mark all connectors and sockets so if you have to re-connect you will be able to know where and in which direction!!
Check your pic so you are certain you see all details you need!
Disconnect all cables from the controller, it should be one plug with 4 wires going to the power supply, two 4-wire connectors for the stepper motors and one 3-wire connector for the endstops.
Put the controller, dongle and software somewhere safe.
Slide out the power supply if not already done to get access to the control panel above.
If you have problems getting to the 4 nuts holding it use a small ratchet and 7mm socket instead - I tried for 30 minutes to break my fingers until I realised the ratchet was right next to me.
Once you have the panel out take another pic of the connectors there - just in case...
Disconnect the panel from the laser power supply.
Here you either have a flat ribbon cable or similar plugs like used on the stepper motors.

Check the images from my hardware for comaprison - I will refer to them later again for the wiring of the Arduino.


As you can see the vital wires are all clearly marked on the circuits boards to make it easier for us ;)

Step 4: Adding the Arduino

A huge thanks for doing all this hard work already goes to Dan Beaven who inspired my to try it myself.
Also without the work of Turnkey Tyranny we would not have a working firmware for our Arduinos or the Incscape G-code export plugin - great job!
Of course I also need to mention the great guys at the Lansing Makers Group who started all this pioneering work.
So don't be fooled to think I did all the hard work - thank those above for it!

To continue please prepare your RAMPS board so it can cater for 24V.
Check the Wiki page, in the power section you will find the location of the D1 and D2 diodes - D1 needs to be removed!
The two big, yellow plates are polyfuses and we need to short them with a lenght of wire so the board can handle the 24V properly if not done you might encounter random disconnections.
If you want to keep them for safety reasons please replace them with 30V types.

Now it is time to connect everything - I won't bother too much at this stage to make proper mounts an such as I still plan do some further mods to be covered in another Ible.

Please use the images from the last step as a reference, your internals might differ a bit but the basics are still the same, even if yours has a analog meter.
On the ramps board you need to check under the drivers if the jumpers are set correctly for 1/64 microstepping!
As it is the maximum these cheap drivers support you can put all 3 jumpers in there.
Dending on you skills and material at hand you will either use connectors or solder the wires without the right connectors directly - either I will only refer as "connecting" in this matter.
Check this nice diagram Dan Beaven made as a reference:

In my case there was no ribbon cable at all, just two identical connectors for the steppers, which caused me a bit of a headache at first.

To spare the headache use the above image a s a reference and do this:
The big cables between controller and PSU are the power supply, start with them and disregard the wire on the "LO" connction - you only need 5V, 24V and GND.
Only if your Laser power supply does not offer a PWM control you still need the power adjustment and the analog meter - plus make some minor changes in the firmware (documented).
Next connect the Laser fire and PWM signal wires - if your PSU is different check the circuit boards for the corresponding connections and use them.
Now do the stepper motors and if you have a ribbon cable for motor and endstops follow the above diagram, otherwise plug the motor in and prepare the endstop or cable to cater for pull up resistors.
If you are unsure about this step check this Wiki for the wiring details of the resistors.
Connect the endstops to ramps board, 5V and GND - it does not matter which 5V terminal or ground terminal is used here.
There is a chance your stepper motors will run in the wrong direction, if that happens simply put the connectors on in "reverse".
That should be the electronics for now, display with full motion control will be covered in the next Ible.

Step 5: Flashing the Firmware Onto the Arduino

Update 19/04/2016:
Please ignore the files here as there is another step added for the latest firmware.
Go there and download always the lastest release I offer.

Right now all should be mechancially good on your end, the electronics back in the machine and all wiring double checked.
Time to get the software part working...

I tried firmwares directly from Dan Beaven as well as other releases based on the Turnkey Tyranny mods but either they totally failed to compile or did not work together with my machine.
The solution was to modify the firmware to suit the needs of a direct conversion without display or additional controls.
You will need the Arduino 1.05 ISP with the corresponding libraries to compile the firmware.
I spared you this nightmare and packed all the software for this Ible into one archive.
So please download it from here (200mb).
Everything is in there, so unpack to a folder on your computer and leave the folder structure as it is.
Connect the Arduino with the PC but do not power up the laser cutter yet.
Start the Arduino IDE and open the "Marlin.ide" file - the Marlin releas is located in the folder "My Machine/Marlin".
From the IDE tool menu set the Arduino Mega 2560 256 Serial Buffer as the board to make use of my changes in regards to the increased buffer sizes, but that is totally optional, you can use the standard Mega 2560 as well.
Select the serial port as it shows up in your systems device manager - it must be a match.
Upload the sketch and be patient it can take a while.
There should be no errors in regards to missing libraries, dependcies or includes and I won't help out if you used you own Arduino ISP to get it all going.

If your Ardunio does not connect or Windows can't find any drivers you might have a clone that uses the 341 chipset, I included them in the Archive as well.
The standard drivers for the Arduino are included with the IDE if Windoes fails to find the right ones online when you plug the Arduino in.

Step 6: Firing Up the Machine

You are now at the point that turning on the machine should not cause any problems.
That means it is ready to use, well sort of...
Right now your new toy only knows how to communicate over USB and to accept G-Code commands through the serial connection.
Might not be as fancy as having dedicated printer drivers but our controller was well under the 50$ mark ;)

Does not look too nice right now but for the testing it was good enough, I suggest to screw the Arduino in place instead of placing it on isolating plastich sheets:

In the next stage this will be all cleaned up, a display and SD support added and if possible some tweaks in the firmware to get higher engraving speeds.
Note that only the drivers for the x- and y- axis are needed on the board, but I left them all on there for future upgrades and so I won't lose them.

Step 7: Getting the Software Running

To generate the right g-code for this mod you need Inkscape and the corresponding plugin by Turnkey Tyranny.
I did not include Inkscape in the downloaded archive to be flexible with updates, please download your 32 bit version here.

I don't know if the plugin works with outher releases, like for the Mac but I do know it won't work with the 64 bit release.
After installing Inkscape copy the plugin into Inkscapes extension folder as explained in detail in the included "Readme.md" - basically just copy the .inx and .py file into the Inkscape extension folder C:\Program Files\Inkscape\share\extensions .
Now you can start Inkscape and select the plugin from the Extension menu.
A good start is to use the supplied "cutting_surface.svg" from the designs folder (in the folder of the plugin), it has some nice examples to try included.


WARNING:
Before you do anything with laser power make sure you never forget to keep the power levels low!
Through the direct PWM control of the Arduino the laser will be working at 18mA when 72% power is reached - this is the limit for these 40W tubes, 50 or 60W tubes might be able to use 100% if you dare to try.

Basic usage:
I won't explain all fine details of the possible settings, that will leave you some playtime for later.
But I will provide you with what you need to get going without ripping your hair out.
Inkscape can do a lot of things when it comes to creating your 2D designs but for the purpose of using the design with the laser we need to stick to some rules.
Line art:
Everything you design must end up as a path!!
This means you you have to convert your objects into a path to be able to cut it.
You can combine the paths group by group (e.g. make each hole into a seperate path) or for the entire object.
Keep in mind that overlapping lines in your design will be cut twice, so make sure all is "one piece".
Raster images:
If Inkscape can import it you can use it.
But I do not recommend using the plugin directly on any image that was not prepared prioe for laser cutting.
Tried it a few times with grascale and color images but the result was not really satisfying to say the best.
But if you convert your image before importing it into your project into a nice looking BW bitmap it will be "engraved" very nice indeed.
Preparing for the laser:
As said, make sure your design is either a raster image or a combined path.
The plugin works with two possible option to set the job.
a) Only trought the popup menu settings.
b) By naming your layer according to how you want to cut / engrave it.
Examples on the naming are included in the cutting_surface.svg file.
The good thing here is that you can set independent settings for each part of the job, like engraving an image at low speed and low power and a frame cutting at high power and medium speed.
A very nice feature is the PPM setting.
Here you specify how many pulses per mm are fired.
Depending on the material this really does make the job easier or gives better results.
Take glass engravings.
With the old hardware the machine fired a constant beam wherever there was someting to fire at.
Now you can specify to only fire 10 pulses per mm and prevent glass chipping for a nicer finnish.
Stinky materials like polysterene hard sheets just melt with the constant beam while with pulses you can shoot through the material without too much excess heat.
Requires some tweaking and testing to get it right though.
One of the big downsides I found is how the actual g-code is generated.
There is simply no way to specify the job order for a complex task.
To be precise: The plugin will only make sure that raster engravings come first, everything after seems to be total random to me.
So it is possible that by default the machine will cut out the part before trying to add the holes in the already dropped part.
If you use a nice honeycomb frame for the build area it does not matter too much for clamped objects it is not so nice.
I was unable to find a fix for this and I still struggle with Python to adjust the plugin to cater for some user settings for the cutting order.
But like for everything on Instructables there is a workaround.
Export the jobs one by one through the plugin in the order you wish and combine the g-code manually with an editor.
In the top of each .g file you will find something like this:

G21 ; All units in mm
M80 ; Turn on Optional Peripherals Board at LMN
; Raster data will always precede vector data
; Default Cut Feedrate 3600 mm per minute
; Default Move Feedrate 2400 mm per minute
; Default Laser Intensity 0 percent G28 XY; home X and Y

M5 ;turn the laser off

;(************************************************************)
;(***** Layer: 60 [feed=120] *****)
;(***** Laser Power: 60 *****)
;(***** Feed Rate: 120.0 *****)
;(************************************************************)


This defines the start and the initial setting for the first job are listed.
At the end of the file you always see something like this:

M5 ;turn the laser off

G00 X0 Y0 F4000 ; home


Turns off the laser and sends the head in the home position.
To combine your g codes you cut the M5 and G00 commands out of the first job.
From the next job you cut the top part off including the M5 command before the listing of the job details.
Add the second job to the first.
For the last job you only cut off the top part - again till the the listing of the job including the M5 command.
Leave the end of this job alone and add it to the rest.
Save the file with a new name and use it for your machine.

Cutting / engraving your creations
Sadly there is g-code sender included in the plugin so we have to substitude a program from the 3D printing world.
I included Proterface in the big download but other solutions should work the same.
Please keep in mind that Pronterface only acts as g-code sender but will be unable to give anything else.
You can load the g-code, start the job, pause it and adjust the speed on the fly - that's it.
Unless you added a lifting table to your machine the z-homing will not work.
So you should not use the home all button as otherwise the Arduino will wait forever for something to hit the z-endstop.
If I ever manage to get the compiler working properly I will change the UI of pronterface a bit to remove functions that are not needed.


You can see the machine running on the first firmware I got running properly in this video:

If you got enough from the engraving skip to 5:40 to see the raster engraving and cutting done.

Speeds:

I am still finetuning the firmware settings but vector cuts should work fine with up to 2400mm/s depending on the line lengths and complexity.
Raster engravings can run a bit faster but sometimes there is still a glitch causing massive rattling noise from the stepper and lost steps - if that happens lower your spped and reduce the laser power accordingly.
Simple things and contours can be lasered in vectors at up to 3600mm/min.
But I suggest to use lower speeds when possible and to test really high speeds on some cardboard first to prevent wasting some expensive material if you lose a step or two.

Accuracy:
The parts come out to the specified dimensions, some materials might cause a bit more loss, especially if the focus of the laser is not set properly.
Repeating a job did not give me any negative results at normal speeds, all lines match up perfectly.
If the speed is too high, or the motor current too low there will be lost steps though.
As cutting speeds are quite low anyway I guess for the time being the speed restrictions set in the firmware should still be higher than what the mechanics are good for.

Step 8: Troubleshooting the Mechanics

If you really made it all the way here it means you either want to read it all or that something is not working as planned.
Before you continue confirm your driver boards are set to the correct stepping as the defined steps per mm are correctly defined in the firmware.
So any problems related to wrong dimensions should be gone once the stepping is jumpered correctly.

Loosing steps:
Although it should not happen it does not mean that it never will.
Assuming you did not lower the current for the motors too much the only thing left is the movement speed.
Trying to do a vector engraving of a really complex piece with 5000mm/min or more will just not work.
The algorithms in the firmware are optimised for 3D printing and have quite a bit of ballast we will never need and without documented changes I am unable to update all files to the latest Marlin RC.
This means you should keep your speed to sane levels.

Stepper motors won't work at all or stutter all the time:

If your stepping and the current setting on the driver boards is correct there is a chance that your EEPROM settings are messed up.
This happens quite easy if the Arduino was used for other projects before or simply by making a typo when manually sending commands to the machine.
To fix this open the example sketch in the EEPROM Library, replace the 512 for the memory size with 4096 and upload the sketch.
After that re-upload the Marlin firmware and your EEPROM should work as planned.

Axis won't move the right lenth:
This usually means the stepping on the driver boards is not a match for the motor stepping in the firmware.
Best solution is to set the jumpers on the Ramps board correctly or if the driver won't support the stepping to adjust the steps per mm in the firmware.
No complicated calculations needed, to go to the next lower stepping simply divide the steps per mm by two.

My cuttings and engravings burn through everything:
Keep in mind you no longer need to work with just a constant laser beam and that the laser is controlled differently now!
For cuts don't use the PPM control, for everything else do use it to get the best looking result.
The speed and power settings you are used to might no longer match now.

Step 9: Things Planned for the Next Upgrade

For the second Ible on this topic you can expect the following:
1. Adding a nice case and fan for the Arduino.
2. Adding a display with encoder and SD support.
3. Adding a new control panel for the display and some more switches to remove all these plugs for fan, pump, compressor and so on.
4. Adding a better air assist system.
5. Adding safety switches for the lid and water flow.
6. Adding a manual firing button for testing purposes if I can add this into the firmware otherwise hardwired to the laser power supply.

These mods mostly depend on my long overdue display and finding the time to do the electrical mods, so it might be just a matter of two or three wekks.

For the third Ible on this topic you can expect the following:
1. Adding a motorized table with control through Pronterface.
2. Maybe adding a red laser for extra guidance with the manual control throught the display controller.
3. Checking the options to add a custom rotary adapter for round objects.
4. Making a new exhaust and adding a stronger fan.
5. If possible adding firmware support for the water pump, compressor and safety features.
6. Adding a lens mount with adjustable focus if the motorized table should fail for some reason.

Timeframe for these mods to be announced once the second part was running to my satisfaction for a while.

Step 10: Firmware Mods

We now can cut in a proper way and also do raster engravings - but what about true 8bit engravings of greyscale images?
The above was done with a slightly modded firmware and the Gcode generated with Image2Gcode - the guys at vicious1.com did a great job with the tool.
But to get the best results from a CO2 cutter I had to make some slight changes.
If you are interested in quality engravings on your chinaware then check this Ible out - everything you need is there ;)

For the above image I had to do quite a few testruns as the target was a sheet of copy paper!
Size of the engraving is 65mm wide and 56mm high.
Engraving time: 26minutes.

Step 11: The Latest Firmware Is Here!

I teamed up with some great guys working on the MarlinKimbra firmware.
Thanks to their work I can now offer the latest Marlin release to work with the K40 Laser clones.
Full 8bit engraving support through the Inkscape plugin allowing photo engravings with ease.
All configured for your K40.
Please download the attached hex file if you want to just flash with XLoader or go to Github and download the source files.
For the source files you will need the lates ArduinoIDE as the release requires it.

The firmware is already completly configured for the modifications of this Instructable.
Only if you use single pin control for firing your laser you need to check the wiring diagram and make the change in configuration_laser.h.

#define LASER_CONTROL 2
needs to be changed to

#define LASER_CONTROL 1

Display and SD are working fine so full standalone operation is possible.
No WiFi support as yet directly in the firmware but you can use a WiFi enabled SD card to transfer the files and forget about swapping the card.
Octoprint should work too but due to a lack of hardware I can't check.


Here is a video showing the machine engraving a photo.
Sorry for the bad quality but it is a pain to get proper focus through the orange lid - have to replace it with a clear one.

Here is an imaged engraved at 7200mm/min, size is 240x180mm, material: paper.
Time to engrave: 62minutes

3 People Made This Project!

Recommendations

  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • Plastics Contest

    Plastics Contest
  • Optics Contest

    Optics Contest

54 Discussions

0
None
dregalia

5 months ago

@Downunder35m, Hey, wanted to say thank you for this great culmination of your vision and sluthing. I am looking at doing something similar, but I wanted to ask you about how you set the laser power... for instance, 0-10000 will work perfectly. Do you set it in the RPM of the GCode?
M3
G53 X13 Y12 F100 S1000
M5
(10% Laser @ 100ipm)

If that's all controllable thru the Marlin software, I can convert my Fusion 360 to work with this, or vice versa, and I could have the system I really want to have. Also, which site is the best to track this project from.. who's pioneering the Marlin branch?

Again, thanks for pulling this all together.

0
None
Milkierich

1 year ago

ok, complete idiot here, I work mostly with pictures.

Uploaded the firmware, after clearing the eeprom,

Checked and double checked my wiring,

Looking at the laser tube, the pwm is working a treat, but I cannot for the life of me get the x and y axes to move. I checked the servos by shorting pins and seem ok, however, both axes seem to run freely (push) when powered on (as if x and y on ramps not initialised? I am sure I am doing something stupid, so happy to take any ridicule but would greatly appreciate any help

1 reply
0
None
MilkierichMilkierich

Reply 1 year ago

figured it out, I am a moron and didn't plug the drivers in. Still, all seems ok now, just need to replace the end stops as I replaced ribbon cables with headers and it's now a bit tight!

0
None
Gerard1

1 year ago

Great Job :)
I also want to upgrade the 4030 laser :)
I will use your tutorials, but i also want to use a display to see the settings of the laser and what the laser is doing :)
Can you send / give me / us your latest firmware of the upgrade for the Arduino Mega in .PDE or .INO format ? or did i mis something ?

0
None
Downunder35m

1 year ago

Last but not least a little update on the stalled progress here:
I had to move house and am now quite limited on space and options until I find a suitable new home.
The landlord does not allow me to use the laser as he claims it is a fire risk and the fumes will cause the room to stink.
All
based on a subsection of the rental agreement stating that I need
approval from the landlord if using any kind of stationary machines :(
This gave me some time for other projects that are still in the developing phases but also to re-think the approach here.
I
mean we already showed that a cheap chinese laser can do much more than
advertised once converted with a "better" controller, but the hardware
is still '$%&*"....
One of the big downsides IMHO is the size of
the workspace with only the clamp for thicker things and the less than
vibration free x-axis system.
With currently over 150 likes I can only assume that more than a hand full of people tried this with their machine - and I Like it!
But let's talk options for a change:
By now you already realised the potential of your refurbished toy and might want to do even more.
An adjustable work table would be great or not?
Something that actually provides a proper enclosure so the fumes are all extracted instead of polluting your room might be nice too?
But how about all the above plus a much bigger area to work with? ;)
We are not afraid to modify our laser cutter and most of us are not afraid to use tools either, so let's combine those skills.
Think with me now and read again from here if you struggle to follow.
The actually work area is mounted to the frame holding the rest of the machine.
Making it a systems that is limited to the physical dimension of the rails inside.
Industrial systems work in a similar way but without the enclosure.
Thankfully the chinese copied the industrial system in the cheapest way possible instead of designing something based on a printer.
This means we can quite easy upscale working area up to the limit where the laser beam becomes too wide for the lens to handle due to thedistance from the source.
My current idea would require a custom mounting system for the tube and custom rails for the mirrors and lens.
The hobby CNC projects already showed that you don't always need expensive linear rails to achive good accuracy and also that you can make normal stepper motors run quite fast with a 32bit processor behind them.
The current firmware already allows for the implementation of a height adjustable table, even with automatic bed levelling if required.
But instead of lifting the work platform we could lift the entire frame.
And for really big work pieces we could simply place the laser directly onto it - flat surface permitting.
No more cutting by hand of these big sheets, just put the machine directly on it and do what you need without any waste to throw away.
Downside is that instead of having a unit with lid and exhaust van you need to build a suitable sized housing.
Here I was thinking of a big enclosure similar to sand blasting cabinets with these brush strips on the front and side to allow feeding bigger sheets without compromising on the fume side of things.
Once the cheap laser tube is burnt out such a system makes it quite easy to install a 100 or even 200W tube instead of the 40W one to actually work with some metals.

Let me know what you think, post your ideas or comments on this and let's work together to make a reall big laser cutter.


0
None
RobertS319

1 year ago

All sorted now, I found another preconfiled Hex of yours that works perfectly I must have been using an older version before, I cant find any faults what so ever, it just works!.

thank you.

On a side note though, is there any way of visualizing what a raster engrave will look like before i actually cut it? All the tools I've tried so far fail to display it, Vectors display fine just not rasters.

1 reply
0
None
Downunder35mRobertS319

Reply 1 year ago

I think you are not the only one struggling with the raster, so I will try to explain it in more detail:
Inkscape can't really create complex rasters, a solid filling at a specified level of gray is fine but a photo for example won't work.
For this you need to import the raster image into Inkscape.
Best way to do this is to prepare the image externally so the size is already correct - but you can change that in Inkscape at any time.
It makes sense to import or move the bitmap into a dedicated layer.
If done this way Inkscape will recognise the image as a raster and same for the laser plugin.
For true raster images the output is exactly what you have in the image - a burnt hole fore every single dark pixel.
For a grayscale image or photo the laser intensity will be adjusted according to the pixel value.
Here you need to play around a bit to get it right with the power settings as every machine and material is slightly different.
For exapmle on cardboard I use a power level of 1100 as a max and play with the speed to prevent actually burning off the material.
On glass I prefer to use raster images only at power levels around 1600 - 1800.

0
None
RobertS319

1 year ago

Hi, first I would like to say a huge thank you to the work that you
have done and put together for us to follow. I have now followed both of
your indestructible's and have the set up working almost perfectly. For
some reason however if I compile your latest source from https://github.com/Downunder35m/MarlinKimbra-K40

The K40 always burns at the same power setting, no matter what i set in the inkscape layer name.

Your
precompiled hex linked above works perfectly but I cant jog properly on
the LCD panel. This isn't really that much of an issue at the moment
but I can see it being a problem when and if I want to print from an
SDcard in the future. do you know what the changes made where, in the
precompiled hex and the latest github source?

many thanks

1 reply
0
None
Downunder35mRobertS319

Reply 1 year ago

The only thing I can think of that is different is the definition for the display controller.
With the jog it is always a pain in the ...., you might need to change the stepping and sensitivity for it.
If i remember correct it is set to just 1 by default.
Increasing the steps to 2 or 4 might help to avoid unwanted clicks to register and make it work properly.

0
None
bparker2

1 year ago

Hi The link for the file download is taking me to filefactory and I cant get to the file.

0
None
smc653

2 years ago

Pretty much made it. Two problems remain.

1. How do I export raster objects along with vector inside of Inkscape? I want to vector cut things and fill in some of the area but it seems only to export the vector outline

2. The laser cutter pauses while igniting the laser, the dwell time isn't always the correct amount of delay and leaves holes in thin material. Is there somewhere to control this, even if only in the firmware?

6 replies
0
None
Downunder35msmc653

Reply 2 years ago

1. You need to define what you want to do through the layer name.
This goes for the power level, speed and if required the ppm setting.
If you only get a vector outline instead of an engraving then usually the image properties are wrong.
It works best to import the picture or bitmap into Inkscape instead of trying to create it within Inkscape - Inkscape works only with vectors by default ;)
2. What do you mean by that? I never encountered a pause unless the object in question is far too detailed, e.g. vector works with line lenghts below 1mm.

0
None
smc653Downunder35m

Reply 2 years ago

1. When I try to export rasters it gives me the following error:

"Unable to generate raster for object flowRoot4133 as it does not have an x-y coordinate associated."

Inkscape seems inconsistent in when it's willing to try to export things as raster (I likely don't understand some deciding parameter yet), but when it does it throws that error. Is there something you're doing to avoid this?

2. The effect is shown in the attached picture, you can see the circles it burns at the start or end of each path. I have limited experience with cnc subtractive machining, but it looks similar to the burn patterns I've seen during plasma cutter startup/shutoff. I couldn't find any controls on pause/dwell after laser ignition in Marlin (didn't look line by line though), so perhaps it's simply processing time after reception of each new gcode command.

IMG_2852.JPG
0
None
Downunder35msmc653

Reply 2 years ago

1. Use the currect Inkscape version, if that is not the case:
Convert your image to grayscale and then import it directly into an active layer that you want to use for engraving.
The error you see originates from Inkscapes inability to know what to do with un-defined sections of a project.

2. If you want to do vector work with stuff not created in Inkscape it pays off to have the things in a compatible file format that you can import.
How do you name the layer for these tasks and what is the original/work size of the object?
There is a tiny delay with extensive vector stuff, same when you import something that is really big and downsize it to a few cm.
The dragon that comes with the extension is a good example for this.
Once you go to about 10cm or smaller the fine details are killing the performance.

0
None
smc653Downunder35m

Reply 2 years ago

Which version of Inkscape? I went looking for version/bit-count information and couldn't find specifics.

Everything I'm talking about is created in Inkscape, I'm not importing anything, I'm building stuff in Inkscape and it's still doing this. And the vectors are extensive, the files are not complicated.

0
None
Downunder35msmc653

Reply 2 years ago

Inkscape 0.91 should work fine.
One problem with Inkscape and designing there for laser work is that you need to mae sure your creations actually matching at the endpoints.
The next step would be to combine the paths before using the plugin to export it to the laser.
Otherwise you will end up with hundreds of single lines instead of a few objects.

0
None
smc653smc653

Reply 2 years ago

*not extensive.

Is there no way to edit posts?

0
None
dale6998

2 years ago

Hey, I was wondering, I have the power supply that has the K+ and K- as mentioned in another comment. I can get the supply to fire when using the pot, of course, but the PWM seems to have no effect. Is there any trade-offs to consider by changing to a single input to drive the laser as opposed to one input for enable and one input for PWM? My suspicion is that this input feeds a comparator that is tied to a triangle wave on it's other input, and that's how it's controlling the power...By feeding a ready made PWM signal into the wiper pin, this makes no sense in that sort of topology.

What should I do? I see there's a #define to set the number of inputs to one, but I'm not sure if that's all there is to it or if there's more to the story than that.

Thanks! Great work!

2 replies
0
None
Downunder35mdale6998

Reply 2 years ago

The power supply needs the "Laser ON" to actually activate the HV output.
The "Laser PWM" controls the actual power level.
That means if the power supply is for dual pin control then you can't switch it over to a single pin operation.
With the digital controller that mine had the PWM signal was always present as set on the display.
The testfire button was wired directly to the Laser ON pin.
So whatever value was set for the PWM was also used for the testfire.

0
None
dale6998Downunder35m

Reply 2 years ago

That sounds pretty good...I've wired the pot wiper back up to the pot wiper and left the PWM pin disconnected. Then I changed the #define LASER_CONTROL to 1. Now, I do see a variable output on the laser, but it's still very much linked to the bias set by the pot....this is probably less than ideal. What's your thoughts on bringing in a DAC with a PWM interface to stand between the wiper and the PWM output on the RAMPs board? I was thinking about something like the 2644F from Linear Tech. What do you think of that? I would have to change the duty cycle mapping in FW to get a reasonable voltage swing on the wiper terminal.