So I bought a cheap 40w laser....

I'm really hoping to get my panel cut at lunch today and then fire this bad boy up on real power in the machine tonight. Fingers crossed for sure!

Good luck, have a look in the bottom of the laser and check for open holes. Mine had several, you dont want to catch your kitchen table on fire...or so I assume. Some thin sheet metal will fix it right up if so.


Some guy in the desert
Good luck, have a look in the bottom of the laser and check for open holes. Mine had several, you dont want to catch your kitchen table on fire...or so I assume. Some thin sheet metal will fix it right up if so.

Yeah, there are a ton of holes I plan on filling in. And just to clarify...I'm looking to get the motion platform up and going tonight. The actual laser...I'm still a few days away from trying to fire it again ;) Want to make sure I've got motion and my safety switches all working before I start to deal with that.


Some guy in the desert
Well, I had some lovely PVC chips for lunch :sick:

This is what happens when I figure I may as well use the small shopvac because I don't want to risk blowing the breaker running the big one and the 660 at the same time. (My shop has only 1 15amp breaker, and there's also a computer and room AC in there...power is at a premium!)

The small vac did well...until I knocked it over 1 minute into the cut because of how short the hose was. Then it lost it's suction. Didn't want to risk turning on the big one so let it run the last 4 minutes with no vac. At least this doesn't make as big of a mess as cutting MDF without a vac.

Peeled it off, hit the edges with a sanding block just to remove any stubborn chips and mounted it up. Not bad! And I still have time left to eat some actual food.

20181023_133550.jpg want to see everything installed? Well, I think I can do most of this one handed while eating with the other.....


There...happy? I'm not. The LCD isn't really functional - and not just because it's not wired in yet. Nope, it doesn't have standoffs on it yet, and even if it did the hole for the encoder is too small so it can't poke through enough and you can't actually press the knob to select anything when the knob itself is installed. Need to look at options on fixing that tonight.

I also have to do something about this:


Need to wire the ampmeter and laser switch. The LCD is really just waiting for the smoothie to be installed.

But this means it's looking very good for me being willing to put power to the smoothie later tonight!


Eternal Student
I imagine it could also vary depending on the power supply (how it does PWM internally)

Any decent power supply should supply a solid DC voltage with maybe a small ripple near max load. The internal PWM is filtered and regulated so you shouldn't see any pulses at all on the output.
Any decent power supply should supply a solid DC voltage with maybe a small ripple near max load. The internal PWM is filtered and regulated so you shouldn't see any pulses at all on the output.
When we refrence the pwm we are actually referring to an input pin that the laser power supply uses to determine the output power sent to the laser tube. In order to allow nearly infinite software based control of the lasers output power it is necessary to have a controller capable of supplying that input with varying voltage. That is achieved via least I am pretty sure what happens behind the scenes.....pretty sure :)


Eternal Student
When we refrence the pwm we are actually referring to an input pin that the laser power supply uses to determine the output power sent to the laser tube. In order to allow nearly infinite software based control of the lasers output power it is necessary to have a controller capable of supplying that input with varying voltage. That is achieved via least I am pretty sure what happens behind the scenes.....pretty sure :)

I think he was talking about the systems power supply and it's internal regulation and how it may be a factor in how the lasers control PWM could be optimized. I should have left more of the quote intact :)


Some guy in the desert
Yes. What I was referring to is how the power supply works internally. PWM happens at multiple points.

Even on a stock K40 with the analog meter and knob there's PWM going on - it just happens entirely within the power supply. Basically lasers don't have "power levels" you can't give it half voltage and get a weaker beam. They're either on or off. So to get power levels out of the laser the power supply does PWM internally to control how often the laser tube is powered. Some investigations into the K40 supplies have found that this happens at a rather odd rate - I can't remember exactly what it is off the top of my head and don't have time to look it up right now...but it's something fractional like 200.4 instead of 200. No one is quite sure if this is a mistake or if it was done on purpose for some reason but it's certainly odd.

So the smoothieboard does PWM on the power pin to send a voltage between 0 and 5v and then internally the power supply does PWM at a different period to control the actual laser tube.

But...not all power supplies are the same and some may use a slightly different rate internally. And most setups aren't actually PWMing the power pin but instead have the power supply setup so that the power pin is either tied to 5v for full power all the time, or use an analog potentiometer to set the "full" power level. Then the PWM is done on the "fire" pin.

So what happens is the pin telling the laser to fire is going on and off hundreds of times per second to set the output power. But each time it goes "on" the power supply internally does it's own PWM to actually turn the laser itself on/off. So if the period used for the PWM on the input pin and the period used internally aren't compatible you can wind up in a situation where you're turning the fire pin on and off faster than the internal PWM and then you get nothing since it never has time to actually fire.

All that said...last night went fairly well. I got ethernet working on the least it gets an IP address and I can ping it and connect to it...but...I can't bring up the web interface yet. I tried installing the files for it on the sd as explained on one of the smoothie docs pages...but still get what's essentially a 404 error saying it can't find any files to serve. I suspect there may be an issue with the SD card in this board's painfully slow. When I took it out of the smoothie and put it into my card reader it still took over half an hour to copy the files for the web interface to the card and they aren't THAT big. Basically everything I do with the SD is painfully slow whether it's in the board or not. So ethernet is about 50% of the way towards working.

The LCD...still no love even with it in the machine. There's a jumper I think I may need to set....the docs are a bit unclear and seem to suggest it's jumpered with a trace from the factory but I'm not sure due to how it's worded. So need to look into that a bit closer.

However - I was able to setup my config file, power things up, and get the machine moving. I have a very short video of it I took on my way out the door this morning. The Y axis is homing in the wrong direction so I need to fix that in my config. But both endstops register correctly and I can move the gantry in all directions! It's obnoxiously loud which I hope is mostly due to the motion platform just sitting in the machine right now and not being bolted it's moving and vibrating which is making things sound way worse than they should...but it's not exactly a high quality motion platform to begin with so I don't expect it to be silent.

I'll try to get the vid up a major server upgrade I have to focus on for the rest of the morning right now (Just sneaking in a post while I wait on backups to finish!).
Nkce update on the progress. Once you get it tuned and bolted down it wont be silent, but it should be very smooth and musical like a 3d printer. With the stock board mine sounded awful, but with the Cohesion board it is like an entirely diffirent machine. You will likely have the same result. I can appreciate the excitment of seeing something move for the first time!


Some guy in the desert
Since I'm still waiting on some backups before my upgrade this morning....

Forgot to mention that I did upgrade the firmware on the smoothie. I determined that it was running a build from last summer so I grabbed the latest official CNC build and config file. I then when through the config line by line comparing to cohesions config file to determine which if any lines needed to be changed. It was a little tedious...but not too horrible. The changes were minimal, just some default rates and a few pins that needed to be inverted. Oh, and the changes for the laser module of course :D

Once I have it working reliably I'll share my config file for anyone else who's interested.

Starting to get excited about hooking up the exhaust fan (ugh, I still need to improve that) filling my water tank, and wiring the laser pins to give it a go soon. One other issue I ran into last night is that the wires I was going to use to hook in the ammeter turned out to be way too short so much for my estimation skills...high school me would be so disappointed (I took 2nd in metric estimation at state level in the science olympiad one year)! So I need to dig up some longer suitable wire. Everything I've found so far is either too light of a gauge or too short :(


Some guy in the desert
Alright, sorry I didn't get to post the video let's get that out of the way first. I give you - the first moves (well, first "real" moves with a real controller.)

Yeah, it's pretty rough sounding.

So last night I dug in on a few things. First I bolted the motion platform back down and made sure it was as square as I could get it to hopefully make this thing less noisy. Next I wired in my laser "missile switch" in series with my safety switch on the door (which I'm thinking more about moving since it's location makes it too easy to defeat - or worse accidentally defeat.) Then I decided to try and get the LCD panel working.

After a good bit of hair pulling and cursing at the smoothie docs (I'm not very impressed by their docs...the main author of their stuff brags about how much better their docs are than other 3d printing These are terrible, the Marlin docs are way better and even they aren't anything to brag about.) So here's the page on the LCD adapter board:

There's a lot of confusion over how to get 5v to the LCD. A big part of that is that both the smoothieboard and the GLCD adapter board both have places for 5v regulators...but you don't need the 5v regulator if you supply the smoothie board with 5v directly like I am. If you're not then you probably need one of the 5v regulators...which one? Good question, and apparently either will do but it's just confusing.

Since my adapter board came pre-assembled I pretty much skipped the assembly instructions....which was a mistake. As the last step in there mentions that some LCD's have their connectors "backwards". Ok, yes, technically they do. But...basically every one of these LCD's I've seen has them backwards and the adapters for them are build accordingly. Turns out the pre-assembled smoothie adapter is setup for the "correct" connectors and so were backwards for mine. Ugh. Now I have a few options here.....

1) Unsolder the connectors on the smoothie and resolder them the other way...but I don't want to unsolder 10 pin connectors...that's no fun.

2) Make new cables with one side reversed. Possible...but I get all confused trying to reverse connectors on these ribbon cables...I do have a lot of cable and connectors and need longer cables anyway so this is actually a decent option for me and the one I'll probably go with eventually.

3) But for now I'm going with #3. Shave the key off the connectors on one side of the cable so I can install them backwards. Quick, easy, and works for now.

So with the cables flipped my LCD works! Well...kind of. The contrast is terrible:


The photo makes it look a LOT better than it is in real life. I can barely read this thing. And it's almost should be white letters on a dark background. The contrast pot is on the front of the PCB blocked by my panel. So...took the board back off and powered things up with it unmounted so I could access the contrast pot.

Well, the photo above is the "after" of how "good" I was able to get it. Bleh. Also, the default suggested config seems to have the wrong number of encoder steps because one click of the knob moves things 2 steps. So I'll have to go in and tweak that config some.

A bit of google suggests that adding an additional resistor across the pot will help the contrast...but that it's also a common symptom of low current from the 5v supply. Well, I'm feeding good 5v and have a regulator installed on my current shouldn't be it. But as I type this I wonder if maybe the laser power supply's 5v is just crap. Over lunch I'll try disconnecting my 5v line and see if the built in regulator can do it's job better than external 5v. If not then I'll dig out my bin of resistors and try adding one to help.

Overall so far not impressed, this was WAY harder to get working than it was on my RAMPS board with Marlin....and it's still not nearly as usable and the menus aren't quite as attractive (though they do seem to be usefully built with good options...note I am running the CNC version of smoothieware so my screens are a bit different than if I was running a 3D printer which may have "prettier" screens.)

But...I can operate the machine from the LCD so let's give that a try now that the motion platform is bolted down!

Ok...that works...but...still pretty gnarly sounding.

And not exactly sure why. It seems louder when first starting to move and on really small maybe the acceleration or jerk is too high (not even sure if smoothie has a jerk setting...haven't looked at the options that close yet.) It also sounds like the current on the steppers may be too high...I'm at 1.5 in the settings which is what cohesion used...but that seems awfully high to me for such small steppers (at 24v instead of 12v no less) and with such a light motion I may try turning that down.

Mechanically it all seems to move easily enough...with no binding or slop. But it does seem kind of noisy even just pushing the gantry around...maybe it's just the design of the motion parts...they are really cheaply made....Maybe a bit more lube in a few key spots...we'll see which options help ;)

I still need to dig up some longer hookup wires for the laser ground, (and to clean up the wiring of the safety switches) but I'm pretty close to being able to hook up the laser and give this thing a real go. Though I may just wait a day...I gave in and ordered some more hookup wire from Amazon since I haven't had much time to dig through my parts bins looking for the wire I know I have somewhere. Either way sure looks like this weekend I'll be cutting/engraving one way or another.

I will finish this post with one more rant about smoothies docs in two examples:

Hmm...what's that G54 on the LCD? I don't remember ever using G54 before. I can't find an easy gcode reference in the smoothie docs but "smoothie g54" in google does return a doc page for the gcode command: A page with a note "TOTO, See linuxcnc docs in the meantime" and a this old tony video about using G54 with Mach3. Great. So apparently G54 is for work offsets - so that will be nice for CNC and laser work. But not details on smoothie's implementation? Lame.

Second example....setting up the "stop" button on the front of the GLCD as a kill button. The LCD instructions page: says "The button on the glcd and Viki2 can be wired as a Kill button by following This guide. In that case the
panel.back_button_pin should be commented out." Ok, that sounds good. But following the link brings up this page: Which only discussed how to wire up a kill button on the smoothieboard itself. Nothing at all about using the stop button on a LCD panel. (Note, the panel page was last edited 4 months ago...the kill button page was last edited 17 months ago. So it's not a case of the kill button page being out of date apparently. And looking at the edit history of the kill button page: It appears that there has never been anything about using the stop button on the LCD on that page.)

Good docs are hard, I get that. But reading the forums and other help resources for smoothie the lead dev sure likes to brag about how great their docs are and honestly I'm not seeing it.


Some guy in the desert
Just did a quick search on the current for the steppers....found this page which has the OEM datasheets for the motors commonly used in these machines:

Mine have different markings so probably aren't the same...but...the one motor there is rated at 1a and the other at 0.45a. Both considerably lower than the 1.5a configured in the cohesion sample config file. Don's blog (a great resource for these K40's) shows that he's running 1a on his config: Smoothie Configuration But looking at his linked config file he's actually running .5 and .6 amps. seems highly likely to me that a good part of the noise I'm experiencing is due to running the steppers at such high current (I know from past experience that things get a lot louder with steppers when you're running them at higher current than necessary.)

One more thing to look into.....


Some guy in the desert
Did a little fiddling with the config file over lunch.

Turned the current on the steppers down to .5 amps. It still worked...but seemed to possibly miss steps on small moves. Once it got going it was nice and quiet though. Turned it back up to 1 amp - quite a bit louder but still not as loud as 1.5a was and it still seems to move just as well as it did at 1.5a so I'll keep it there for now.

I also thought about my homing issue and realized the issue was that the Y motor was backwards. The config from cohesion keeps the endstops in the back left corner so Y is max but X is min. The origin of the machine is still in the lower left corner but it homes to the upper left. Right now I have the Y defined as 200mm but it's actually more like 450mm, I have X at 300mm but it's closer to I'll have to adjust those. It's homing and returning to origin correctly...just currently the origin is 200mm from the endstop so there's almost no usable area since that's where the exhaust duct interferes.

Oh, and I tried disconnecting the 5v line and just letting the built in 5v regulator handle the LCD - no different. I don't really need that 5v line connected at all. I may eliminate it and connect the 24v on the edge connector between the two "big mosfets" which I hadn't realized is also VBB in. That would eliminate one direction wires leave the board and help open up some mounting options for me. So I'll have to dig out some resistors to try tonight.


Some guy in the desert
Continued to struggle with the LCD last night. I did update the config - both to fix the step count on the knob (turns out the setting option itself isn't included in the default config file or suggested config listed in the docs - but is listed as a config option in the reference list of all options and does apparently work) as well as to set the size of the machine at 450x650mm - which I've confirmed it's able to reach the full area now.

I also used lightburn to generate some sample gcode (just a couple of squares and circles including one rectangle that's 600x400 to confirm I can handle that size of material) saved it to the SD and confirmed I could load and run it. Though the lously LCD display still made it kind of tricky...and it still sounds horrendous.

I dug out my bag of resistors and tried adding a few to the LCD. First I probed it with my multimeter to confirm the pins on mine seem to be setup the same as the samples. I will note that the 5v pin is a little low ~4.7v even though when I probed the pin on the LCD adapter board where it gets 5v from the smoothie I was seeing a full 5v. So maybe this is a voltage drop issue - the adapter board does have a diode and that could account for the voltage drop. Anyway , I started with a smallish 560ohm resistor and worked my way up to a 2.2k resistor but none of them made any bit of difference no matter how much I changed the contrast knob. So...something is still not right.

I think tonight I'm going to grab the LCD off my MPCNC or 3Dprinter and try one of them to see if it's the LCD itself or something about how the smoothie is powering or using it.

As for the sound of the machine. I'm still not happy at all with it. My phone ran out of space so I have to dump some old stuff before I can get a new video. I dropped the current back down to 0.8v and X and Y both seem happier...and somewhat quieter...but it still has some really loud rough spots...and oddly enough they seem to be mostion on the X not the Y. I expected the Y to have issues due to it's dual drive design.

The belts don't feel too tight or too loose, and the X carriage feels about right in how it rides on the rail. And at some speeds it's not bad. So it seems I'm hitting some kind of resonant frequency at certain speeds. It's also worst when both X and Y are moving at the same time, so maybe it is an alignment issue of some kind or a power issue. I do note that the LED lights in the printer dim when motion starts so the power supply seems to be having a hard time keeping up. Maybe I should try adding an external 24v supply for the steppers to take the load off the main power supply....


Some guy in the desert
Pretty sure the LCD issues are voltage related. I swapped the LCDs from the K40 and my 3dprinter. The one from my printer is usable on the k40, but still not as bright or readable as it is on the printer. The one from the k40 is brilliant on the 3d printer. So for now just swapping them has things usable...but the laser still isn't right.

The low voltage on the 5v line has me concerned. And I looked up the specs on the k40 power supply...the 24v line is only rated for 2a total draw. And with the current on the steppers both set to 1a that means there's no current left for the smoothie and LCD if the steppers max out their draw. Things are just too borderline.

So, I spent another $20 and ordered a 5a 24v power supply which should be here Sunday. Then I can use that to power the smoothie/steppers and should have more overhead which will hopefully stop the dimming of the lights and let everything run a bit better. Still not sure if the built in regulator on the smoothie will be ok then or if I'll want to run a separate external 5v...but it should at least eliminate a possible failure point.


Some guy in the desert
So the rest of my hookup wire in various gauges arrived Saturday so I took a bit of time to finally mount the smoothie:


It's not ideal. I still need to drill a small hole for the screw that locks the wiring compartment closed - but that's low priority since right now I open and close this all the time.


The two cables for the LCD are way too short. I have to dig out my connectors and wire to make some longer ones, for now I have to disconnect them every time I open the compartment. (Excuse my recycling bin in the background. Was busy the night before pickup this week and didn't get it out so things are overflowing a bit right now.)


The positioning of the connections isn't ideal. Someone talented enough might be able to reach in there with their fingers and get the SD out without opening the lid. I can barely connect the USB or Ethernet with the lid closed. But I can just leave those connected, and I plan on doing most of my interactions with the machine through ethernet. I just need to figure out why the web interface isn't working yet.

So, with the ammeter wired in and the safety switches wired I went ahead and ran a wire from the smoothie to PWM the laser fire pin. I jumpered the power level to 5v so just turning it on will fire it at full power. We should be ready to do some tests. Filled my bucket with water, homed the machine, put a sheet of cardboard in the bottom, and ran my job. It started moving but no laser and nothing on the ammeter....then I remembered I didn't turn on the laser safety switch :D

Once i did things went better:

It's way out of focus. But I expected that because the work is supposed to be a few inches higher. I just wanted to see if it would do anything at all at this point. I also haven't aligned or cleaned the mirrors (let alone installed the upgraded ones I have.) But circles are round, rectangles are square, and things are where I expected them. Power was reading 8ma, and it sounded like it was about the same point I found with the stock control that just barely gets the laser to fire.


I assume that falloff is due to the mirrors not being aligned yet (and me using areas well outside the original working area.)

I added the mounts from the stock work stage and rested the cardboard on them for a second test. No air assist, no exhaust fan on yet, still haven't aligned or focused anything. But work should be closer to the focal point:


That worked really well. Cut only the top layer but cut the top layer cleanly (the gap in the lower left circle was from me forgetting to arm the laser again....2 for 2 now on that.)

Haven't really focused yet but looks like I got it pretty close since that's a nice fine kerf (about equal to what I get with my diode laser when it's well focused)


For this stage in the game I'm really happy with that. Still need to get power levels dialed in (and would like to find a nice pot since I think it will be nice for keeping power levels consistent.

Will be fun to start figuring out good speeds/powers with this thing. That was 100mm/20% power in lightburn. Made a LOT of smoke - (more than I expected or get with my little laser)

New 24v supply should be here today which I think will help as well. Getting close to having a usable machine here!


Some guy in the desert
Didn't get much more done over the tied up with parenting duties and didn't have any real time for my own projects.

The new 24v power supply did arrive but I haven't had time to wire it in yet.

I also did a few little speed/power tests which had some perplexing results:


I just did a little grid of circles. The lower left started at the 100mm/sec @ 20% power setting that lightburn defaulted to out of the box. Then I did some adjustments. The next one over is 400/20 because that was the other default in lightburn. Then I started doing 10% more power on each so 100/30, 100/40, 100/50. Then repeated it at 400mm/sec with 400/30, 400/40, and 400/50. Finally I tried 100/10 just to see if it would do anything (and it did.)

The cuts were so small and quick it was hard to check current reading as they cut - but it looked like it maxed out around 15ma....and my tube is rated for 13-16ma working not a great idea to go much over 50% power on the current config. I'll have to adjust my max power setting to scale that more usably. The 10% cut did actually cut though which surprised me since at 20% it sounded like the laser was just barely able to lase and was only drawing about 8ma.


What surprises me though is the results. 400/20 was noticeably finer than 100/20...I expected that. But the 30/40/50 cuts didn't seem to do much better than the 100/20...and the 100/10 actually looks better than some of the lower power cuts ?!

It's hard to see in that photo...a backlit photo shows it better:

Except it's hard to catch the light well enough to show in a photo which ones actually cut well. Every single one of them has at least a few points where it went all the way through...but none of them actually went all the way through.

And again - this is without having aligned the mirrors or checked focus so kind of early to be drawing any conclusions.

I also ran it over some acrylic at 100/20 just for kicks:


Not bad...not a cut but not bad for an engrave.

The other thing I'm a little worried about is how the circles almost all have a small gap on the right. That's where the cut started/stopped:

Screen Shot 2018-10-28 at 7.50.33 AM.png

I assume that the issue is at these speeds/powers the laser isn't fully powering up before things start moving. Probably something I can adjust to tune that if I dig deep enough.

Next step is to improve the cooling setup and exhaust though. I picked up some ducting yesterday that should let me put together a better exhaust setup. My daughter is complaining about the smell of burnt cardboard already so I figure that's a high priority. And before I do any serious cutting of acrylic I really want good ventilation.


Just spent some time reading your thread..... looks like you have a good handle on the K40. As no doubt you know there are a lot of different versions that come out if China. Originally the machine was built to do rubber the standard controller software was never great. Come up with solid eating & a good package you would do well.

Not very electrically inclined myself but am fortunate to own a pair of large format Chinese so am familiar with the variety of there build practices and some times documentation. Good luck with finishing things off
& getting it running the way you want.


Some guy in the desert
The dust collector is an interesting idea...but a bit bigger than I have room for and more than I really want to spend. I'm leaning more towards a duct fan - just not sure if I need to go bigger or not. The register vent I picked up actually fits almost perfect - but it's a 4" output and the duct fans for 4" seem to max out around 190CFM. I found a 100CFM one for $20 that I ordered just to try - but I'm not sure if that's going to be enough airflow or not. But it's cheap enough to try and see how it does.

Instead of working on air assist, aligning the mirrors, checking that the lens is installed correctly (apparently it's very common for them to be upside down in these K40's), adjusting my bed for focus or any of the other things I know I need to do....I played around with doing a few test cuts last night :D

FT mini firewall in 1/8" ply:


Just took a wild guess at speeds/power....didn't even write down what I used - but it did better than I expected! With the lack of air assist it's a bit scorched...but would be totally usable.

I also tried a bit of foam board:


Again just a wild guess at speed and power but it worked rather well. WAY more undercutting than I'd like (Even if this was big enough to do full sheets I'd still prefer my needle cutter.) but for a first try at a wild guess for speed and power I'm pretty happy with that:


It's not that much worse than the undercutting from FT's kits...and I was shocked that it did this well in one pass I've heard quite a bit of talk from people with 40w lasers about needing multiple passes. I did try a few lower power multiple pass cuts but any lower on power and I wasn't able to keep the laser on reliably. I may still need to adjust my PWM a bit in smoothie.

Acrylic didn't go as well:


Need to speed it up, lower the power, and do multiple passes. This was melting more than vaporizing. Air assist should help here as well as there was a lot more smoke and flame than on paper or foam.

But overall I'm impressed:


Due to the undercutting the horn has no foam left - and the tail has a few gaps. But overall I'm shocked I'm able to get this good of result given how many things there are that should still be dialed in better!


Legendary member
I use two passes for fb not for lack of power, but it helps minimize undercutting.
Find out what cuts in two passes (that’s your cut) halve that and you should be close to score 50% cuts. Find the setting where your laser just fires and use that to mark (sometimes, I don’t really see the mark on the first pass.)
Just some suggestions.

Other than that it’s looking pretty good (for pre-dialed in testing!) (y)(y)