Why won't this Gcode work?

Hi -

I am experimenting by using the 8200 with a blue laser to expose photosensitive PCBs. The principle works well, but I am having a problem with one particular aspect.

I am controlling the laser via the cooling fan (which has the added advantage of cooling the spot where the laser is operating!). When the fan is on, the laser is on, and I can control this with M106/M107 commands - or, at least, I should be able to.

What actually happens is that, although the procedure looks to work perfectly, the fan/laser doesn’t actually switch off while moving from one object to another. I thought that this might just be a question of timing, so I introduced some G4 commands after switching off the fan/laser before moving to the next object. When I do this, the fan/laser doesn’t come on at all! An example gcode file is shown here:

[code]G21 ; set units to millimeters
G90 ; use absolute coordinates

M107 ; ensure laser is off

G1 X30 Y30 F7800.000
M106
G1 X40 F3000.000
G1 Y40
G1 X30
G1 Y30
M107
G4 S0.500
G1 X50 F7800.000
M106
G1 X60 F2000.000
G1 Y40
G1 X50
G1 Y30
M107
G4 S0.500
G1 X70 F7800.000
M106
G1 X80 F1000.000
G1 Y40
G1 X70
G1 Y30
M107
G4 S0.500
G1 X90 F7800.000
M106
G1 X100 F500.000
G1 Y40
G1 X90
G1 Y30
M107 ; laser off
G4 S0.500

G28 X0 ; home X axis
M84 ; disable motors

[/code]

So I am somewhat stuck at the moment. There are two possible solutions: one is to find out what the correct commands are so that I can turn the fan/laser on, draw an object, turn the fan/laser off, pause if necessary and then move to the start of the next object. The second is to forget about using the fan to control the laser (even though, when controlled manually, it works perfectly) and modify the 8200 controller in some way to give me access to a different control for the laser. Obviously I have been reluctant to do the latter.

Just in case you are wondering, the laser is not connected directly to the fan wiring; the fan controls a MOSFET which switches the laser power from a separate power supply.

Does anyone have any bright ideas how I can solve this problem? If I can, I may have a novel way of creating excellent quality PCBs with fine detail without all the hassle of laser-printed masks (that are never dense enough) transfer film (that never quite transfers as it should) and more messy chemicals than I really want to play with!

Phil

Were you able to figure this one out?

With my limited knowledge, it should work, however, isn’t the fan output PWM?

I’m trying a similar thing, not having the best of luck yet. I am working with limited funds, have pieces and parts of a K8200. My endeavor is to remove and save the extruder for a future project and to replace with a laser diode module. Will not be using bed heater or extruder heater, so I will be needing to modify Marlin’s config to not use them and that’s where my trouble begins. Preliminary testing doesn’t go far, as it’s still looking for the temperature from the thermistors that I have removed and I can’t get past Temperature errors. I see where I need to change them in the config, just lacking a little confidence to just do it. Lol.

Anyways, my diode laser module I’m working with is a J-Tech Photonics part, and I’ve seen on their site (someone please correct me if wrong or I’m remembering it wrong) that the fan output is PWM, and takes S values to power the laser. The S value runs from 0 (laser completely off) to 255 (laser at full power). So maybe try “M106 S127” for a mid-power setting?

If you are just doing pure B&W line drawings for PCB work, then all your M106 commands would need just the same “S” setting. If you wanted to do grayscale with shadings, your “S” setting would vary. If you are interested in that, you might check out PICEngrave or T2Laser. (I can find links for those if you need them).

The folks over at benboxlaser.us have a pretty good knowledge of all the PWM stuff however I think their lasers use M3 and M5 with the S settings.

Cory