How to connect laser fire pin of K40 CO2 laser to Duet board.
I have recently started modification of a Chinese K40 CO2 laser engraver/cutter. The stock board is very limited regarding software compatibility and I would like to replace it. (This is a hobby project.)
The go to board by default is a Cohesion3D board, but currently it is not available in Europe and shipping and import duties make the board quite expensive. This board is a drop in replacement for the stock board.
I would like to investigate if it is possible to replace the board by a Duet board. I have been working with the boards for about a month and I really like them. And I have access to both the version 2 and 3 boards for testing. (But the Duet 2 is preferred due to the price.) After that I will look into compatibility with Lightburn and Laserweb software as these are the 2 preferred software choices.
Connecting the stepper motors and sensors is something that I have done before, so I don't think there will be any problem there. But I am having some questions about how to connect the laser power supply.
I have attached a picture of the power supply that is being used in most of these lasers. From this power supply only the 4 most right connections are connected to the stock board. 2 of these connections supply power to the board (24v and 5v), we wont be needing them since I will be using a proper Meanwell power supply for the Duet. The 2 lines that are left are L, (this is the laser fire) and ground.
The cohesion3d board seems to work by manually configuring the max power via a potentiometer connected to the Laser PWM (IN) 'this is not a real PWM' but just voltage control. And the board is controlling the intensity of the laser by user PWM on the laser fire line. (L)
The laser is triggered when it goes to 0v. Am I correct to assume that I can connect the E0- pin from E0 heater, set it to negated in software and use that to control the laser. And do I need to connect the ground from the laser power supply to the board? Since I will be using different power supplies for laser and board. (They wil both be grounded to the same 230v.)
I am a programmer by nature, so my electrical knowledge is basic. I would very much appreciate some advise on this. If I made any errors in my assumptions above feel free to correct me.
Attached a photo of the power supply, Thanks!
jay_s_uk last edited by
I have done something similar with my laser, although I have not yet converted it to a duet. Currently it is running an MKS Sbase.
The laser fire goes to the negative side of a heater connection. Pretty much all setups I've seen retain the potentiometer (I've upgraded mine to a more accurate one) to set the maximum voltage and then use PWM to control the actual laser intensity. Not sure you could move away from that or even whether you'd get any added benefit from it. I've set mine once and have never adjusted it.
You probably would need to tie the grounds together. I currently run the Sbase off the laser power supply and have not had any issue with skipping steps etc. I would suggest doing the same until you're sure you need the extra PSU.
Lightburn should be compatible in GRBL or smoothie mode.
j.dewit last edited by
Thanks for the reply.
I think there is no added benefit to remove the potentiometer, I do have ordered a precision one, since the current one doesn't give me accurate adjustments.
The reason for the added power supply is that the 24v on the default power supply seems to be of a low quality and not designed to run stepper drivers. A least that is what a lot of resources tell me. The Cohesion3D board is even supplied with it's own power supply for this reason.
I think for the Cohesion3D they also connect the grounds. But I don't know if they isolated this on their board.
I have installed a Duet Ethernet board and just had my first successful burn.
Connected the heater ground pin to the laser fire pin. And connected the ground of the laser power supply to a ground pin of the Duet.
PWM control seems to work (getting different colors of burn), but I have to figure out the correct frequency.
The smoothieboards use pwm per period in microseconds. And not sure if this is the same as Hz.
Some more updates on this project.
Tested lightburn software it does detect the duet board as a GRBL board (connected on USB), and some control options work. Homing for example does not work since a $H is sent. Was not getting great results, the cuts were off. And there is not a lot of configuration options, just select a profile and see if it works.
Got some engravings but some were off center. I will have to test more, with different kind of profiles.
After that I tested laserweb software, the software itself is a bit slower, and sometimes crashes. But it has a lot of configuration options, and the Duet is recognized and works.
The gcode generated from laserweb works great, and I am getting good results. But running the gcode via USB was not that stable.
I think I prefer running the job from the Duet interface, the board itself should complete the job. This is the same way as my 3d printers work. However none of the laser software seems to be build for this.
I will do some more testing by uploading to the duet.
The main problem is that when creating the gcode, you don't know the position of the piece of wood. But I think I could make a workable solution by positioning the laser at the correct position from duet web interface. And when starting the job, I can use that position as origin by using gcodes. But I will have to test that.
In laserweb there are a lot op options to insert custom gcode, so customization is great. If it would have a button to upload the job to the duet and start the job, then that would be perfect.
jay_s_uk last edited by
any chance you could post your config?