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:

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.