I have build my own Laser machine with an Arduino Mega 2560 R3 on board.
I downloaded the grbl 1.1 with laser-mode and I customized the cpu_map.h and the config.h and the default.h.
It´s able to drive in X, Y, Z directions with Lightburn, but the laser won´t get a PWM signal.
#define SPINDLE_PWM_MAX_VALUE 1024.0 // Translates to about 1.9 kHz PWM frequency at 1/8 prescaler
#ifndef SPINDLE_PWM_MIN_VALUE
#define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero.
The PWM frequency can vary quite a bit between laser module manufacturers. Which laser module are you using? Is the intent to send TTL level signal? Some modules use pulsed 12V and ground.
A low power single-color LED with a current limiting resistor might be a good troubleshooting tool for finding your PWM pin. It would indicate for any of the frequencies selected for 6 (digital pin 9)
of interest, you may have selected the same limit pin for X_LIMIT_BIT and Z_LIMIT_BIT
#define X_LIMIT_BIT 10 // MEGA2560 Pin D13
#define Y_LIMIT_BIT 4 // MEGA2560 Pin 10
// #define Z_LIMIT_BIT 6 // MEGA2560 Pin D12 TEilt sich den Pin mit Endschalter X
#define Z_LIMIT_BIT 10 // MEGA2560 Pin D13
I’m not familiar with ESTLCAM but I’ll call on our subject matter expert if I need to.
Is there a Console window or G-code exporter that allows you to save (or copy/paste) the GCode out of ESTLCAM for Review?
If we were to compare the first 10 lines of each GCode instruction set I’m fairly confident that we’d see a difference in the configuration of the GCode sender…
In LightBurn click File, click Save GCode and save the file somewhere convenient. Please do the same with the ESTLCAM GCode. Open a new text file and copy the first 10 Lines from each of those files into a new text file.
Please upload the text file here for review and comment.
I took an other brand-new Arduino Mega 2560 R3 and I downloaded from Github the untouched version of GRBL 1.1, especially for this controller.
I flashed the controller and took my oscilloscope and I also couldn´t see either a PWM signal on the related pin or the spindle- enable signal. nothing.
Conclusio → the problem is not Lightburn. The problem is GRBL with Arduino Mega 2560