Laser PWM integration

This topic contains 6 replies, has 4 voices, and was last updated by  dkj4linux 3 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #91082


    Hello ,

    has anyone for this firmware (Marlin-MPCNC_Ramps_T8_16T_LCD_32step_DualEndstop) a laser with PWM control integrated on a ramp board, and can tell me how I need to plug in the laser and what needs to be changed in the firmware I don’t get that You read something different everywhere, how do you control the laser then with which commands how to regulate the intensity … Or can someone’s firmware you upload where with the laser integration …


    Thank you very much …



    Start here and if you still have some questions let me/us know.





    I’ve read it before, but I don’t get it … My laser has 3 cables. +-PWM, belongs + to the + of D9 (fan control) and-to ground of aux 2 … And PWM to Pin 44 at the Ramps Board .. Did I get it so right ..?


    Or must + at Pin 44,-at Ground of Aux2, and PWM at d9 … + or-…. I don’t understand this guidance … A cable plan would be helpful here:-)



    Every laser is different, you should put up some pictures or a link. To me it sounds like the 12V and TTL share a ground. I can not be certain and the lasers are fragile so a second opinion is probably needed.




    I have now + and-laid at fan exit D9 … PWM to pin 44 and ground to ground with the 4 wire cable. In the firmware, I changed the pin from D9 to 44 … I mean that’s all right now … i can now control the strength with M601 Sxx … I hope that’s so right connected now …


    But my grayscale pictures are still completely black … But my gcode sends different M106 Sxx values … Is the Max 255 set in the software Too much that it is too strong?



    Hi Jorgen,


    I just got that same laser in today. Have you had much luck with the varying power to do the picture? If so, do you main sharing what you did? I’m using the dual endstop firmware as well





    I can’t tell from the pictures just what lasers you guys have. I have used Banggood and Eleksmaker lasers of the 3.5 watt and 2.5 watt varieties, respectively, and the Banggood lasers have had separate connectors for 12v power and TTL modulation while the Eleksmaker lasers have had 3-pin connectors… +12v, gnd, and TTL/PWM; i.e. +12v power and TTL/PWM, with a shared ground. Here, the red and black wires are a CONSTANT (not PWM) 12v + and – power, respectively, and the yellow wire is +5v TTL/PWM modulation signal from pin 44 on the controller.


    Just this evening, I’ve used a 2.5 watt Eleksmaker to test another air-assist scheme… but used the last “shades of gray” gcode file from the “Laser engraving – not really getting great results” thread ( I’m using a MKS Gen L v1.0 board which indeed seems to be very compatible with the Mega/RAMPS combos I’ve used in the past. There’s even a replica of the AUX2 pin block containing pin 44, to which the D9 fan output has been remapped for +5v TTL modulation of the laser.

    Anyway, here the machine in action…

    While lacking a bit of contrast, there is enough to see that the laser intensity is indeed varying with M106 Sxxx gcode commands.


    — David







Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.