Help! - Impossible to driver Neje laser diode on a Ramps diy engraver

I’ve built an X-Y engraver driving it with a Ramps 1.4 and GBRL 1.1. With Lightburn it connects runs perfectly, included the D4 pwm output (“servo” connectors) to which I connected a normal white led during testing: the led confirms that all is ok, by dimming up and down following the drawing traces.
But it is impossible to drive a simple Neje laser (5,5 w) tha comes with its driver board that holds 4 wires: +12, Gnd, pwm and Thermal sensor. I connected + and gnd to main power, and the pwm to d8, but the laser fires always at 100%, no way to have it following the settled power, both with the “focus” button, or sending a gcode line.
I loaded a brief test script on the Mega, just to have an ordinary pwm on output D4, an the diode works perfectly, moduling from 1 to 100% according to the 1-255 analogWrite on D4.
But for some reason that is making me crazy even if the Gbrl settings seems correct, and I can see a test led dimming up and down on D4, the laser controller goes always on 100%.
Anyone has a similar experience with a Chinese laser with tis kind of drivers?
Thank you for any help!


I’m not familiar with RAMPS 1.4 specifically but some questions for you.

Are you using the interface board in the picture? Or something else?
Are you able to get variable output from the laser module when using this interface board? In other words, does the laser module work as expected with varying PWM? Want to confirm that the laser module is in operating condition.

Where are you getting + and gnd?
Why are you connecting to D8 here but then you reference D4 when testing LED?

The laser module is expecting a digital PWM signal. Does D4 provide a digital PWM? Some laser modules can also take analog signals but not sure if the Neje supports this.

Can you put a meter on the output to D4? What is voltage at 0% power vs 100% power?

Do you have access to a scope? If so, analyze output of D4. Duty ratio at any voltage within 3.3V - 12V will determine power level.

Also, update frequency of the PWM signal is going to matter. I think D8 is traditionally used for heating beds. Normally PWM frequency is not going to be too high for this need. It’s possible that the frequency is so low that the laser stays on at max power continuously.

just a simple question… in your GRBL in the RAMPS… max power is set to? 255? cause in Lightburn max power is set to 1000, maybe is for that reason that your module is always full power?

1 Like

Thanks for your notes and suggestions, first of all please note that d8 has been just a typing mistake, in reality was D4; I preferred to use D4 rather than D8 or D9 exactly because they are dedicated -as you correctly note - to heater fans etc. Anyway, I guess that your suggestion to test D4 with a scope is the best way to understand; I’ll report the results as soon as I’ll have a scope available next days.

I have tried both 1024.00 and 255 settings, but it did not fix. Btw, I tried also to run LaserGbrl, but the behavior is still the same.

Have you tried someone else’s profile with a Neje, I have a Neje laser using that 4 to 3 pin board. I can send you my profile ! see what happens.

Does the laser module power with the interface board?

1 Like

Yes, it does regularly, and applying an ordinary 0-255 pwm, 0 to 5v, the module fires the laser regularly, from 0 to 100% of the local display.

It could be a good idea, if you are so kind to share that cpu_map.h and config.h you uploaded to your Ramps I’ll check it and report the result a.s.a.p.
Thank you!

I was referring more to my device profile, than GRBL compile info. I found all my Neje issues to have been resolved in the device profile (.lbset)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.