# Grayscale issues

**URL:** <https://forum.lightburnsoftware.com/t/grayscale-issues/6161>\
**Category:** Getting Started With LightBurn\
**Tags:** grbl, grayscale\
**Created:** [August 26, 2019, 3:44am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161 "2019-08-26T03:44:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRP](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@DRP](https://forum.lightburnsoftware.com/u/DRP)\
**Post date:** [August 26, 2019, 3:44am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/1 "2019-08-26T03:44:13Z")

</div>

Hi all, new forum member here.  
I have literally spent months trying to get grayscale to work properly on my machine. I have tried both Marlin and GRBL firmware, as well as various plugins and software to no avail. I was hoping I would have luck with Lightburn but this too seems to be unsatisfactory.

I initially used Marlin firmware on an Arduino Mega 2560 (clone) with Lightburn but have now switched to GRBL on an Arduino Uno (clone).

No matter what I do there is very little difference across grayscale % power - see images.

My current hardware and firmware is:

Hardware  
Laser diode 15w - [https://www.aliexpress.com/item/33022812797.html?spm=a2g0s.9042311.0.0.27424c4ddjNaEf](https://www.aliexpress.com/item/33022812797.html?spm=a2g0s.9042311.0.0.27424c4ddjNaEf)  
Arduino Uno (clone)  
CNC shield V3.51

Firmware  
GRBL v1.1j

Within Lightburn I have set the maximum power at S600 (being 60% of the 1000 that GRBL allows) to ensure I do not shorten the life of the laser.

As can be seen, between 100% and 50% at 600, 700, and 800 mm/min there is no/very little variation in darkness. At 40% there is a drop-off in darkness, and nothing at 30%, 20% or 10%. A similar thing is seen at 1100mm/min but the drop-off is at 50%.

![Grayscale%20test](https://forum.lightburnsoftware.com/uploads/default/original/2X/7/7a8de9ee6248182c644c39844b74d7d04e4977c9.jpeg)

I am suspecting that given I have used a variety of hardware, firmware, and software it must be an issue with the laser itself (or the laser driver), although it says it supports TTL/PWM.

Any help in getting it to give better results is appreciated.  
On a side-note, I am also in the process of building a CO2 laser engraver which I will use Lightburn with as Lightburn is the best front-end software I have come across.

Thanks in advance.  
Denyse

---

<div class="post-metadata">

**Author:** ![LightBurn](https://forum.lightburnsoftware.com/user_avatar/forum.lightburnsoftware.com/lightburn/32/75577_2.png) [@LightBurn](https://forum.lightburnsoftware.com/u/LightBurn)\
**Post date:** [August 26, 2019, 4:11am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/2 "2019-08-26T04:11:36Z")

</div>

Given that there is no such thing as a 15w blue diode laser, I suspect it’s the driver itself that’s causing you grief. These systems usually pulse internally at a 50% duty cycle, overdriven when on to give the “15w”, but available only half the time. You might need to specify a longer PWM period in GRBL to make it work with the driver.

I am also not familiar with GRBL 1.1j (1.1f is standard, 1.1g is available from some vendors who’ve customized 1.1f). Where did you download it? I don’t see anything like a wiring diagram, so it’s possible it needs to be wired differently than you have it. Has the seller provided any info?

You can save the GCode from LightBurn and inspect it yourself - there’s no magic happening there - It’s pretty basic G1 X Y S F commands.

---

<div class="post-metadata">

**Author:** ![DRP](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@DRP](https://forum.lightburnsoftware.com/u/DRP)\
**Post date:** [August 26, 2019, 4:44am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/3 "2019-08-26T04:44:10Z")

</div>

Hi Oz,

Thank you for your quick reply.

Sorry, you are correct it is only GRBL 1.1f I am running - probably getting mixed up with all the firmware versions I’ve tried! I downloaded from the GRBL site on GitHub. I note as of yesterday there is now version 1.1h available from the site.

According to the GRBL site version 1.1h includes the following: Support for Protoneer CNC Shield v3.51. Step/dir on pins A3/A4, and coolant enable is moved to D13 (old spindle direction pin). Variable spindle/laser mode option IS supported for this shield.

I wonder if the fact the variable spindle/laser mode is supported for the shield in the latest edition would also make a difference. Before I delve into this though and upload that I’ll take a look at your suggestions and see if a longer PWM period helps with v1.1f.

Regarding the wiring, the seller did not provide any info. You will note it has both 3 pin and 2 pin TTL/PWM connectors (as in this image from the internet which appears to be the same driver) . I was unable to get it working with the 3 pin connector (+ - and signal) and am using the 2 pin connected to the signal and ground of the spindle enable of the CNC shield.

![2%20and%203%20pin%20pwm-ttl](https://forum.lightburnsoftware.com/uploads/default/original/2X/e/e53033643079f99179ad9000600cd13f7349b700.jpeg)

Thanks again for your feedback. I’ll let you know how I get on (either good or bad) in the hopes it may be of use to someone else encountering the same issue.

Kind regards  
Denyse

---

<div class="post-metadata">

**Author:** ![DRP](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@DRP](https://forum.lightburnsoftware.com/u/DRP)\
**Post date:** [August 26, 2019, 8:23am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/4 "2019-08-26T08:23:12Z")

</div>

Hi Oz,

I’ve now been into the GRBL cpu\_map.h file and tried each of the following prescalers in turn, but I’m getting the same results. I may try the latest version of GRBL tomorrow and see if that helps - although I must say I don’t hold out any hope.

**// Prescaled, 8-bit Fast PWM mode.**  
\*\* #define SPINDLE\_TCCRA\_INIT\_MASK ((1\<\<WGM20) | (1\<\<WGM21)) // Configures fast PWM  
mode.\*\*  
\*\* // #define SPINDLE\_TCCRB\_INIT\_MASK (1\<\<CS20) // Disable prescaler -\> 62.5kHz\*\*  
\*\* // #define SPINDLE\_TCCRB\_INIT\_MASK (1\<\<CS21) // 1/8 prescaler -\> 7.8kHz (Used in v0.9)\*\*  
\*\* // #define SPINDLE\_TCCRB\_INIT\_MASK ((1\<\<CS21) | (1\<\<CS20)) // 1/32 prescaler -\> 1.96kHz\*\*  
\*\* #define SPINDLE\_TCCRB\_INIT\_MASK (1\<\<CS22) // 1/64 prescaler -\> 0.98kHz (J-tech  
laser)\*\*

There’s no doubt the laser is turning on and off and the gcode for the first 2 passes at 600mm/min along the x axis direction show the S value changing - below with added comments. I even upped the laser max power from 60% to 80% as shown in the gcode and this gave the same results as the 60% max power in my first post

; LightBurn 0.9.04  
; GRBL device profile, absolute coords  
G00 G17 G40 G21 G54  
G90  
M4  
; Scan @ 600 mm/min, 100% power  
M8  
G0X20Y13.1  
G91  
G1X10F600S800 // 100% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S720 // 90% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S640 // 80% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S560 // 70% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S480 // 60% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S400 // 50% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S320 // 40% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S240 // 30% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S160 // 20% power where device settings using GRBL are fixed at max power of 80%  
G1X5S0  
G1X10S80 // 10% power where device settings using GRBL are fixed at max power of 80%  
G1Y0.12S0  
G1X-10S80  
G1X-5S0  
G1X-10S160  
G1X-5S0  
G1X-10S240  
G1X-5S0  
G1X-10S320  
G1X-5S0  
G1X-10S400  
G1X-5S0  
G1X-10S480  
G1X-5S0  
G1X-10S560  
G1X-5S0  
G1X-10S640  
G1X-5S0  
G1X-10S720  
G1X-5S0  
G1X-10S800

Tomorrow is another day, so it’ll have to wait until then.

Kind regards  
Denyse

---

<div class="post-metadata">

**Author:** ![DRP](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@DRP](https://forum.lightburnsoftware.com/u/DRP)\
**Post date:** [August 28, 2019, 10:08pm UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/5 "2019-08-28T22:08:18Z")

</div>

Hi Oz, and other members/visitors,

An update on progress for those having same/similar issues.

I tried out the new version (v1.1h) of GRBL and had no improvement.

I was able to get these results using the following settings - I went back to v1.1f of GRBL just because I had all my settings saved properly.

![Test%20scale](https://forum.lightburnsoftware.com/uploads/default/original/2X/f/fff416789a849cfd5b4800cd49f72400eaa3ec48.jpeg)

S value maximum (device settings) - 600  
Speed - 1000mm/min  
Min power - 0%  
Max power - 100%

As can be seen there is very little variation in the darker shades from about 75% upwards, and in the lighter shades from about 25% downwards.

I then got the following using these settings:

![Test%20scale%20reduced%20max](https://forum.lightburnsoftware.com/uploads/default/original/2X/9/91e0dcb390243ae9ebcf8c6ba343cc9decda47cd.jpeg)

S value maximum (device settings) - 600  
Speed - 1000mm/min  
Min power - 25%  
Max power - 75%

This has given a much improved variation in shades between 5% and 100%. I am sure there can be more tweaking but I was happy with this so far as it’s progress from the many months it’s taken to get to this point.

Unfortunately I didn’t have any further luck with the power scaling feature in Lightburn.

I hope this helps anyone else who may be experiencing similar issues.

Kind regards  
Denyse

---

<div class="post-metadata">

**Author:** ![JeffH](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@JeffH](https://forum.lightburnsoftware.com/u/JeffH)\
**Post date:** [September 4, 2019, 10:51pm UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/6 "2019-09-04T22:51:31Z")

</div>

I was using an Arduino Uno a while back and it worked like a champ. The version of GRBL you have will have Laser mode and I am sure you turned that on. The thing I noticed in your comments was the intensity of 600 for ‘full power’. I have my S set at 255 in and that seems adequate - Edit, Device Settings, just above baud rate.

---

<div class="post-metadata">

**Author:** ![DRP](https://forum.lightburnsoftware.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@DRP](https://forum.lightburnsoftware.com/u/DRP)\
**Post date:** [September 5, 2019, 1:51am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/7 "2019-09-05T01:51:08Z")

</div>

Hi Jeff,

Thanks for that.

I did try S255 but it was extremely light.

It seemed like S1000 was 100% with GRBL but not wanting to overwork the diode I’ve restricted it to S600 or 60% of maximum.

Much better results were obtained but it is highly dependent on the wood I’m engraving.

Some I have to increase the minimum from 0% to 25/30% with maximum at 75-100%.

I did note in GRBL firmware the laser settings are 255 so not sure why it’s so light when I set to 255 in device settings and then use 100% power in lightburn.

Thanks again.

Kind regards

Denyse

---

<div class="post-metadata">

**Author:** ![system](https://forum.lightburnsoftware.com/user_avatar/forum.lightburnsoftware.com/system/32/64335_2.png) [@system](https://forum.lightburnsoftware.com/u/system)\
**Post date:** [October 5, 2019, 1:51am UTC](https://forum.lightburnsoftware.com/t/grayscale-issues/6161/8 "2019-10-05T01:51:11Z")

</div>

Closed on October 5, 2019, 1:51am UTC

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