Help Needed: No Signal to 12V Laser on MPCNC with Ramps and Marlin Firmware

Hi everyone,

I’m reaching out for some assistance with an issue I’ve encountered while setting up a 12V laser on my Mostly Printed CNC (MPCNC) controlled by a Ramps board running Marlin firmware provided by V1 Engineering. Despite following the general guidelines for laser setup, I’m facing a problem where the laser receives no signal when powered on.

I understand that PWM, TTL, and the control voltage (3.3V, 5V, or 12V) are crucial for laser operation. My laser is supposed to operate with a 12V signal, which I thought would be straightforward by connecting it to the print fan port or any 12V port on the control board. The documentation suggests that for 12V signal-driven lasers, one might need to redefine the laser pin in the firmware.

Here’s what I’ve tried so far:

  • Checked the laser and board compatibility; everything should technically work with a 12V signal.
  • Attempted to redefine the laser control pin in the Marlin firmware to align with the port I used for the laser. Despite trying different ports and adjusting the firmware accordingly, there has been no change in the laser’s behavior – it still shows no signs of receiving a signal.

I’m reaching out to see if anyone has faced a similar issue or has insights on what might be going wrong. Here are some specifics:

  • Laser Type: 12V signal-driven
  • Control Board: Ramps
  • Firmware: Marlin (version provided by V1 Engineering for MPCNC)

Any advice on troubleshooting this or steps to ensure the firmware correctly communicates with the laser would be greatly appreciated. I’m wondering if there’s a particular setting or configuration I’m overlooking that’s critical for 12V laser operation on this setup.

Thank you in advance for your help and suggestions!

Deleted both my responses because you’ve clearly already read the section in the DOCs. I haven’t done this myself, so hopefully someone with first-hand experience with RAMPS and a 12V laser will be along soon.

1 Like

The 12V pins on the Ramps board are ground-side switching. That is, the voltage side is constant on, and the PWM signal is implemented on the ground pin. This setup does not work with a lot of lasers. To even have a chance of working, the laser and the control board must have separate power supplies.

Are you sure your laser uses 12V PWM? Historically, lasers needed to match PWM voltage. I’m assuming because the actual laser was analog and used the laser power voltage. Many lasers these days will use a range of PWM signals with the range of 3V - 12V being common. If the laser asks for a fixed voltage PWM signal, typically it is 5V, not 12V. This is true even when the laser requires 12V or 24V power.

If your laser really does require a 12V PWM signal, then you will likely need a small bit of additional circuitry.

You may also want to take a second look at the PWM pin and verify what you have defined is being triggered. I don’t have access to the Marlin source at the moment, but, if I remember correctly, there were two different pathways in the pins file with both D4 and D6 being a possibility. I don’t remember which pin was the laser pin, but you can verify you are driving the pin you defined by carefully using a voltmeter. Ramps boards don’t have pin protection, so if you short a pin to ground, you likely will burn out the pin or the voltage regulator.

Also, there are issues with trying to turn on the laser pin from the LCD menu. This issue is fixed in later versions of Marlin, but V1 has not taken a new drop yet. The issue is related to the safety timeout, and results in the laser only firing briefly. There are several workarounds, including manipulating the pin directly using an M42.

Thank you for your response.

Does this mean I should connect the ground to the PWM pin?

Yes, it operates with 12V on the PWM, LT-80W-AA-PRO: https://cdn.shopify.com/s/files/1/0549/7500/4823/files/LT-80W-AA-PRO_User_Manual.pdf?v=1679598556

They provide a P-DA-01 driver board with it, which I haven’t used.

I should mention that it worked with GRBL, but only with LaserGRBL and not with LightBurn. With LightBurn, the machine would stop for no reason after a few seconds, which is why I switched to Marlin.

It seems complicated to get a laser working on Marlin. Would it be better to go back to GRBL?

Thank you for your help.

Connecting the laser to constant 12V and grounding through the PWM sort of works, with a few problems.

The laser’s cooling fan is now also limited by the laser PWM, which can lead to overheating of the diode element, and failure of the module. it also requires some fiddling with the PWM pin, and regardless some lasers just don’t work well when switched in that fashion.

The Duet that I use has no positive PWM output, and I’m using a heater circuit, which is of course switched on the negative side, but I have an add-on board that inverts the signal using logic gates to switch the PWM signal. There are plenty of very simple circuits that work to do the job too. On mine, I have a blue LED that reacts to the input so I can see what the laser would do if I run the job with the laser module turned off. It can be helpful to debug, but does increase the parts count…

Anyway, inverting the voltage so that you can provide constant 12V, and have a TTL/PWM signal to switch the laser is a better idea.

Which specific laser module do you have? I ask because I think you make some wrong assertations in your post.

If you had it working with GRBL and LaserGRBL but problems with GRBL and Lightburn where do you imagine the problem lies?

GRBL is a much simpler piece of firmware than Marlin and IMO a much better platform for laser applications but if you have decided to use Marlin then I suggest you apply the KISS principle and choose a PWM capable output pin and forget about using a mosfet output. Those suitable are D4,5,6 or D11 at the servos connector ( also connect your laser module gnd to gnd at that connector and take your +12V power feed to the laser module from the +12V in connector on your RAMPS). My bet would be your laser will work fine on a 5V PWM signal that is correctly orientated ie + PWM and not -PWM which is what a ‘FAN’ output gives you.

Thanks for all response, I need to test before. But I can tell wich is my laser : LT-80W-AA-PRO

As I suspected, your laser will handle 3V to 12V as PWM input, so a 5V PWM pin will work. From the manual you reference:

At this point, your best choice is to restore your firmware to the V1 release (i.e. undoing your pin assignment). Then you will need to connect your laser to the assigned 5V PWM laser pin. I don’t remember if it is pin D4 or pin D6. If you are using a separate power supply, you will also need to share a ground connection between the laser and the control board. The companion board often makes connecting the grounds easier, but it is not required.

Looking forward, if you are using Lightburn, you will want to use inline commands. To make that happen, you must set Lightburn for inline commands, and you must put the following at the top of your g-code files (can be automatically added).

M3 I

Laser performance is substantially better using inline commnds vs M03 commands.

I recently upgraded to an SKR PRO 1.2 for my laser engraver setup. Currently, I am able to control and move the machine through the control panel interface without any issues. However, when I attempt to start an engraving process using LightBurn, the machine does not respond – there is no movement, and more importantly, the laser does not activate at all. Despite this, LightBurn indicates that it is “working,” but no actual engraving takes place.

I have carefully followed all the setup instructions available on the laser page of V1Engineering.com, ensuring all settings were correctly applied as per the guidelines. Despite this adherence to the setup instructions, I am facing the aforementioned issues.

Could you please assist me in troubleshooting this problem? I am unsure if this is a configuration issue with LightBurn, a firmware issue with the SKR PRO 1.2, or possibly a wiring/connection issue. Any insights or suggestions on how to resolve this would be greatly appreciated.

Thank you for your time and assistance.

Humm… My gcode is odd :

;Header Start
;header_type: laser
;file_total_lines:35
;max_x(mm): 16.5
;max_y(mm): 18.5
;max_z(mm): 0
;min_x(mm): -16.5
;min_y(mm): -18.5
;min_z(mm): 0
;thumbnail: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGG0lEQVR4nO3YzS2FURSG0X3FTIxRiZ+RSvSiGaUYMNAEGriX6aeDK57kTGStAt49O09ydtu2bQMAf3S6avjzc+bhYeb2dtUFAI55fp55epq5uFizvywg+/3M6+vM/f2qCwAc8/Iy8/W1bn+36gvr42Pm+nrm/X3FOgC/ubqaeXububxcs3+yZhaA/05AAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIDkdNXw4TCz3888Pq66AMAxh8PM9/e6/WUBOT+fubmZ2bZVFwA45u5u5uxs3f5u2zzxAPzdDxYzLkrCct5KAAAAAElFTkSuQmCC
;Header End
; LightBurn 1.5.00
; SnapMaker device profile, current position
; Bounds: X-16.5 Y-18.5 to X16.5 Y18.5
G21
G91
; Cut @ 1000 mm/min, 80% power
M107
M05
G0 X16.5 Y-18.5 F0
; Layer C01 Pass 1 of 2
M03 P80 S204
G1 X-33F1000
G1  Y37
G1 X33
G1  Y-37
; Layer C01 Pass 2 of 2
G1 X-33
G1  Y37
G1 X33
G1  Y-37
M107
M05
; return to starting pos
G0 X-16.5 Y18.5 F0

I used the option to set the laser at 20% to see the point of the laser, but I have 0 signal on D9.

I think that there needs to be the M3 I command in there to tell Marlin to use the inline power commands.

I don’t use Marlin myself, but Ive seen that as needed.

Looks like Lightburn is configured for a max of 255 for power setting, hope that matches the firmware.

Ok, thanks for your answer, I looking in lightburn to change that, but I don’t know how.

file | Device Settings

I haven’t this option :

Do you have the device set up as Marlin?

Yes but manualy, LightBurn doesn’t reconize my cnc (Marlin)