Welcome! Log In Create A New Profile

Advanced

Upgrading a CO2 Laser with the Think3DPrint3D Duet controller

Posted by Radian 
Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
June 13, 2015 03:38PM
I've been posting in the Ormerod forums about the conversion I'm doing on a cheapo Chinese Ebay Laser engraver. The Duet controller used in the Ormerod 3D printer is what got me started but it seems more appropriate to post details of the build in here. The reason I wanted a Duet controlling the Laser is that, thanks to the hard work of guys like dc42 and zombiepantslol, it has become a dream to use for 3D printing. The web control interface and improvements to just about every aspect of the firmware over the last year or so made the control system I had installed in the Laser pale in comparison (and that was after I ditched the Chinese junk that it came with fro some Pololu stepper drivers and LinuxCNC).

Hardware
The XY motors and endstop detectors were OK(ish) so I began by simply re-plugging them into the Duet XY connectors. The Y endstop was an opto-interrupter originally powered from 5V but it checked out OK at 3.3V making it compatible. The cable carrying both X motor and XY endstop connections is a flat flexible type and it works quite well as its own drag-chain so I de-soldered the socket from the original control PCB and wired it off to some 0.1" header sockets to plug into Duet. The X motor already had a 0.1" header so that plugged straight on.



The real key to getting it all working with the 3D printing hardware/firmware proved to be the M571 G-code command that enables Fan 0 on extruder moves (thanks to dc42 for pointing this out). Wiring this output to the Laser Enable input on the Laser PSU therefore neatly transforms the laying of filament into Laser path cutting. The only wrinkle (hardware wise) is that, while the Fan 0 Mosfet output is open-drain, there's a pull-up to the 12V~24V supply via a LED hanging on it. To block this I just soldered a series diode in the wire with the cathode to Fan 0 O/P.



The Laser tube PSU is often different in each version of the laser (generic naming K40 I, II ,III etx,) and mine looks like this:


I've seen lots of different suggestions for how these are interfaced, some of which contradicted the way mine was originally wired, so I did a bit of circuit tracing (great care is needed inside these things as they have very high voltages on capacitors which must be discharged before venturing in). I found that both P and L terminals are active low (contrary to some documents showing P as high, L as low). Both ground down the LED in an opto-isolator so again, while people suggest they can be modulated by PWM - yes they can, but only at low frequency (<1KHz to be practical). One is already connected to the Font-panel Laser Enable button (I labelled it La) while the other (Lb) is free to be connected to the Fan 0 O/P on Duet. The connection is duplicated on the empty 4-way block as well.

At the moment I'm not controlling the Laser power via Duet other than on/off as I'm only interested in cutting (not engraving). As I understand it, controlling power using PWM rather than using the analogue input (normally connected to the wiper of a front-panel pot) does have advantages as the laser can deliver a higher peak of power in the first instances of it striking. I hope to investigate this at some point.

One other thing worth noting is that the 5V is derived from a 7805 TO220 heatsinked to the case. So while I've seen people say don't pull more than 20mA from this terminal, I suspect it can deliver plenty more. I have a small stand-alone PIC chip running off this to act as a monostable (could have been a 555) to deliver a 10ms pulse when the test button is pressed. I find this useful for delivering a calibrated pulse that can be compared at different foci, materials etc. It conveniently plugs straight into the 4-way connector where all the signals needed are present (apart from the push-button which is now wired to the PIC).

Workflow
Swapping the standard 3D printing extrusion function for a cutting action means being able to use a workflow familiar to most 3D printer users. In my case this means creating .STL files representing 2D paths only (e.g. using 2D primitives with a small extrusion height in OpenSCAD) and setting a matching nozzle size in Slic3r to produce G-codes limited to a single layer.



Other sources of G-code generation for 3D prints should be equally applicable in addition to the more conventional 2D CAD/CAM tools. While it certainly isn't how the authors of the apps I'm using intended them to be used, it works just great for me and cuts down on the number of apps I need to be familiar with. It also makes projects that involve both 3D printed and Laser cut parts much more integrated - i.e. easily modeled in OpenSCAD as one design, with conditional modules enabled for output to the two different tools.






RS Components Reprap Ormerod No. 481
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
June 15, 2015 11:01PM
Fantastic Work Radian

You can get PWM out of the FAN 0 FET. For example if you set the fan speed using M106 SNNN from 0-255.

Cheers

Tony
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
June 24, 2015 12:27AM
For engraving it would be more prefarable (less command-spammy) to set the output power with the move command itself (like Smoothie does it with a S parameter).
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
June 26, 2015 02:40PM
Quote
T3P3
Fantastic Work Radian

You can get PWM out of the FAN 0 FET. For example if you set the fan speed using M106 SNNN from 0-255.

Cheers

Tony

Thanks for the idea Tony. Unfortunately M106 doesn't seem to play well with M571 which is needed to enable the laser for cutting (extrusion) moves using G-code generated for 3D printers. If I was using a more conventional G-code generator (Cam Bam or Inkscape for example) there'd probably be a way round this.

Mikk36 - I thought the S parameter was a flag to check if an endstop was hit during the G1 move for all versions of RepRap firmware?


RS Components Reprap Ormerod No. 481
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 23, 2015 02:04AM
Using a vector program like inkscape is the way forward I think. I have used quite a few CNC machines professionally (CNC router, 3D printer, lasercutter) and by far the easiest to use is the lasercutter that can behave like a windows printer: press print (or ctrl-P), update some settings and send it off to the machine. With one of the gcode producing plugins it should be not that hard to emulate: either evil mad scientist watercolorbot, eggbot, or makerbot's ancient unicorn plugins all produce gcode. You would still need a way to set laser power, but you can do that in the dialog you run to control the laser.
On the firmware side I think you need a way to control the laser. It is probably best to hijack the E coordinate for that, as it already is moving in sync with the other axes, so it is not that hard to implement ppi or ppm (pulses per inch/mm). One thing cheap lasers usually get wrong is the 'corner power': the laser power stays constant and removes more material in the corner when decelerating/accelerating.
But how far did you get with this project?
(PS dear forum: I'm not a bot, thank you)
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 23, 2015 07:10AM
Quote
Jelle
On the firmware side I think you need a way to control the laser. It is probably best to hijack the E coordinate for that, as it already is moving in sync with the other axes, so it is not that hard to implement ppi or ppm (pulses per inch/mm). One thing cheap lasers usually get wrong is the 'corner power': the laser power stays constant and removes more material in the corner when decelerating/accelerating.
But how far did you get with this project?
Hi Jelle, thanks for the pointers to those Gcode generators. The firmware for the duet controller syncs the fan output to extrusion moves so I'm already covered. As for power control, I didn't expect it to work so well as it does with a fixed (no PWM) power level. The kinematics of the duet firmware seems to maintain a constant velocity regardless of head travel - as far as I can tell by lasering card at low power and carefully inspecting the results.

I've been regularly using this setup to cut 6mm plywood and acrylic with very pleasing results. I tend to set the current using the HV PSU control voltage input to around 10ma for acrylic and 15ma for ply and cut at 10mm/sec.

It would be nice to encode the power level in the CAD design so I could both cut and engrave in the same job but for now I produce two outputs from the design and run the engraving pass at low power before running the second pass to make the cuts.


RS Components Reprap Ormerod No. 481
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 23, 2015 10:38AM
If your machine is light and small, the acceleration can be high so you don't need evenly distributed power output. There may be a lot to improve with k40 machines before you will notice it. With thicker material(pmma) you might notice a wave-like pattern in the cut: the cut at the bottom is actually lagging behind the top. This is where you need a lower acceleration and a coordinated power output.
You setup with a simple pot to adjust the power has something going for it too: usually you can see if you are cutting through or not, so manual power or speed adjustment can help there. But it also fsck up repeatability if you spread settings over different parts of the the toolchain: you just forgot to set the speed/power for this new material and your second/next piece is ruined.
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
July 31, 2017 02:18PM
guys sorry for bringing this old thread up but i am interesting of replacing my cheap chinese board with a duet . But i could use some help.

What i understood is that i have to connect the positive on the PWM Fan0 to the LB on the Laser PSU, isn't it ?

What about the negative header on the Fan ? Should i connect it to the negative on the laser psu ?

Beyond 24v from psu to duet 0.8.5 do i have to make any more connections ? On the first photo what is this plugged into the headers for the thermistors?


RePrapPro Mendel 3
Duet 0.6 firmware 1.19
RePrapPro Mendel 3
Duet 0.8.5 firmware 1.19
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 03, 2017 02:18PM
As I understand it, it's the negative pin on the fan output that you connect to LB through a diode (cathode to fan output, anode to LB ). Also you have to common the grounds of the Duet and laser power supply.

Disclaimer: I don't have one of those lasers, so I am going on what Radian wrote.

Edited 1 time(s). Last edit at 08/03/2017 02:18PM by dc42.

Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet [www.duet3d.com].
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 04, 2017 03:15AM
Quote
dc42
Disclaimer: I don't have one of those lasers, so I am going on what Radian wrote.

you help a lot David . Thanks a lot . i was thinking that i had to connect the positive one. Thanks again .


RePrapPro Mendel 3
Duet 0.6 firmware 1.19
RePrapPro Mendel 3
Duet 0.8.5 firmware 1.19
Re: Upgrading a CO2 Laser with the Think3DPrint3D Duet controller
August 04, 2017 03:40AM
Hi all, I can confirm David's reply. The "Fan negative" is the connection that is switched to 0V by a mosfet on the Duet PCB. Ignore the "Fan positive" which has a permanent 12V supply on it.
As for the thermistor headers, those devices were 10K thermistors I just plugged in to keep the firmware reasonably happy that there were no faults with the temperature monitoring.
I meant to extend them out to monitor the temperature of the Laser tube and PSU but didn't get around to it. A couple of 10K resistors would also do.
This setup is still in use on the odd occasions I use the cutter. I'd like to hear how you get on with yours Gaou!


RS Components Reprap Ormerod No. 481
Sorry, only registered users may post in this forum.

Click here to login