sambuls / MarlinOnTrinus

All files needed to port Marlin to the Trinus 3D printer
29 stars 7 forks source link

Laser Module #4

Open ingmaniac opened 5 years ago

ingmaniac commented 5 years ago

I think i have the laser pins sorted. 12V is directly taken from the boards Power connection as so the negativ pin. 5V TTL Pin is connected to the Atmega2560 Pin 79 (PJ7) that should be the corresponding Marlin Pin 74. Don't have time to try this by now but it should be correct.

wildseyed commented 5 years ago

I don't think pin 74 is it. The G code command M42 P74 S255 should be able to turn that pin on, but has no effect. How did you arrive at that number? Maybe I can retrace your steps.

ingmaniac commented 5 years ago

You have to activate that pin in marlin first. And set it to Soft PWM. I measured the pin on the Atmega chip and converted the Pin Number of the Atmega(PIN 79 - PJ7) to the Pin number of Marlin(PIN 74). Maybe i can test it on the weekend.

ingmaniac commented 5 years ago

Laser is working!

As simple as add:

// Laser

define FAN1_PIN 74

To your pins_trinus.h file then you can turn on laser with: M106 P1 S255

And off with: M106 P1 S0

Enjoy!

zxshoe commented 5 years ago

This is so awesome @ingmaniac ! Thank you so much for figuring this out. Can't wait to test it. Love my Trinus but the lack of Marlin support has been a major bugger since I don't really like the additional layers of complexity and services that comes with Octoprint etc.

Boavartii commented 4 years ago

That is awesome. The codes work just like you said.

What software do you use for processing for engraving? I have been looking at T2 Laser for about an hour, and I cannot see how to change the command from the default M03 to be M106.

wildseyed commented 4 years ago

If you are trying to use slicing software to laser engrave, you need software with flexibility to do things like "execute g-code before extrude" or execute g-code after non-printing move". With these options you can insert the M106 commands to turn the laser on and off. You can probably do something in Fusion 360 too. I have not used my laser since I migrate to Marlin, so I'm not familiar with what the popular stuff everyone is using. I would start looking on some of the cheap laser engraver forums out there. Chances are those machines are running Marlin too.