Author Topic: Need help with grayscale/dithered  (Read 363 times)

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Need help with grayscale/dithered
« on: July 06, 2018, 12:23:25 AM »
Grayscale and dithered don't seem to work for me...

Setup: A3 with older (purchased May 2017) black 3 wire 2.5w eleksmaker laser (with low power button on top), mana se board.  Current version of T2 running grbl 1.1e.  I did a reset of all grbl params prior to these tests.

Are all 3 wire lasers TTL compatible?  This isn't acting like what I believe it should...

All tests on the same piece of MDF.  For what it's worth, black & white engraving seems to work fine.

Dithered, power 0-100, speed 3700
Dithered, power 50-145, speed 3700
Grayscale, power 0-100, speed 3700
Grayscale, power 50-145, speed 3700

As you can see from the images, it seems that the laser is on or off, no in between, though this doesn't explain why the dithering isn't working...
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #1 on: July 06, 2018, 05:39:15 AM »
It looks like you have an Eleks Mana board and TTL laser, so you should have power control. Some lasers have a button to change mode, not the low power button, a separate one incorrectly labelled as PWM/TTL.

I don't know if you've used any other software but I understand other programs change your Grbl settings without asking, they change laser max to 1000 and also disable laser mode (I have no idea why they would do that).

So if you have, first reset the Grbl parameters to default or display them and post here.

Assuming that's not the issue, test using the manual laser power controls. Set it to 5 and turn on the laser, you should get something close to the low power mode. If you get nothing or full power, there's a problem with the Nano or laser driver.

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #2 on: July 06, 2018, 08:40:32 AM »
Thanks Zax!

Attached is a pic of the top of the laser, low power button next to the wiring connector, I don't see any other buttons on it anywhere.

I haven't used any other software since switching to T2, why would I?  :)

I reset the grbl params just before these tests, here are the params:

$0=10 Step pulse, microseconds (10)
$1=25 Step idle delay, milliseconds (25)
$2=0 Step port invert, mask (0)
$3=1 Direction port invert, mask (0)
$4=0 Step enable invert, boolean (0)
$5=0 Limit pins invert, boolean (0)
$6=0 Probe pin invert, boolean (0)
$10=1 Status report, mask (1)
$11=0.010 Junction deviation, mm (0.020)
$12=0.002 Arc tolerance, mm (0.020)
$13=0 Report inches, boolean (0)
$20=0 Soft limits, boolean (0)
$21=0 Hard limits, boolean (0)
$22=0 Homing cycle, boolean (0)
$23=0 Homing dir invert, mask (0)
$24=100.000 Homing feed, mm/min (100.000)
$25=1000.000 Homing seek, mm/min (1000.000)
$26=250 Homing debounce, milliseconds (250)
$27=1.000 Homing pull-off, mm (1.000)
$30=255 Max spindle speed, RPM (255)
$31=0 Min spindle speed, RPM (0)
$32=1 Laser mode, boolean (1)
$100=80.000 X steps/mm (80.000)
$101=80.000 Y steps/mm (80.000)
$102=80.000 Z steps/mm (80.000)
$110=4000.000 X Max rate, mm/min (5000.000)
$111=4000.000 Y Max rate, mm/min (5000.000)
$112=6000.000 Z Max rate, mm/min (5000.000)
$120=800.000 X Acceleration, mm/sec^2 (800.000)
$121=800.000 Y Acceleration, mm/sec^2 (800.000)
$122=5000.000 Z Acceleration, mm/sec^2 (5000.000)
$130=400.000 X Max travel, mm (400)
$131=300.000 Y Max travel, mm (300)
$132=200.000 Z Max travel, mm (200)


I'll go out and try the manual power controls in a bit when I get a few minutes.  Work is getting in the way of my fun... 
A3 2.5w with longer rails making it ~85cm x 40cm

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #3 on: July 06, 2018, 09:21:06 AM »
Forgot to add the pic of the laser...
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #4 on: July 06, 2018, 09:56:57 AM »
The Grbl parameters are correct now.

You should be getting grey scale (power level control) so check the manual operation, perhaps something is wrong with the driver. It did work previously, right?

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #5 on: July 06, 2018, 11:27:21 AM »
This is the first time I've really tried grayscale, so I can't say it worked before...

I went out to test and realized I had no idea what you were asking me to do with manual operation.  I did run a few more tests:

Grayscale power 0-5, speed 3700 - no visible marking on MDF
Grayscale power 0-50, speed 3700 - image attached, very light, 5% segment seems empty, others all look nearly the same if not the same
Grayscale power 0-75, speed 3700 - image attached, obviously darker than previous, 100% and 5% segments are different, but not by much...

If you can provide instructions on manual operation, or point me to documentation/video I'd appreciate it.

Even if power variation isn't working, it wouldn't explain the dithering not not giving "shades" of gray, would it?  Doesn't dithering use full power for the dots?
« Last Edit: July 06, 2018, 11:28:12 AM by mattm58 »
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #6 on: July 06, 2018, 02:49:15 PM »
I would expect much more variation so the manual power test is important.

Yes, dithered should work since it’s full power on/off so something isn’t right.

On the laser controller screen the manual laser power is above the laser on icon, so change it to 5 and click the laser on icon. It shouldn’t burn, just be like the low power mode or pointer. Then turn it off, change the power to 100 and see if that’s much brighter, then do the same with 200 and 255.

Are you checking the simulation “view” to make sure the g-code matches what you expect?

You should be able to see the dithering or power variation.

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #7 on: July 06, 2018, 07:00:51 PM »
Woohoo, solved one problem, got the dithering to work.  For some reason none of the "Sketch" modes were selected.  I selected Sketch (Filled) and regenerated the gcode and all worked!

Grayscale still doesn't work though.  I did the manual test, seems to do what I would expect. 

In the "Manual Laser" pic there are actually 4 burns 5mm apart, the bottom was power 5, left no trace of a burn, the next one up was 100, then 200, then 255.  Each "laser on" was for approximately 5 seconds.

I've also attached the grayscale test grbl file, along with what it looks like in the viewer.
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #8 on: July 07, 2018, 07:17:37 AM »
Everything looks good on the grey scale G-code and "view", so it's likely a material issue. Try something other than the MDF.

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #9 on: July 10, 2018, 01:03:16 PM »
Sorry, didn't grab any pictures, but tried this same file (looks good in viewer) on both a piece of oak and a piece of alder, both had the same result, no grayscale, just solid dark burn.

Everything looks good on the grey scale G-code and "view", so it's likely a material issue. Try something other than the MDF.
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #10 on: July 10, 2018, 02:15:49 PM »
If the G-code is correct but you are only getting a solid burn there are a few possible reasons.

1. Laser isn't providing variable power
2. Feed rate too low / Power too high
3. Resolution is too small

For #1, set the vector feed rate to 1000, make sure you disable Sketch (Filled) and Velocity Mode then run the "power line" sample.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2284
    • View Profile
Re: Need help with grayscale/dithered
« Reply #11 on: July 10, 2018, 06:17:08 PM »
Don't forget acceleration. If it is too low the unit will never get up to speed and just linger on a small area.
SARCASM - Just one more service we offer here.

mattm58

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Need help with grayscale/dithered
« Reply #12 on: July 10, 2018, 11:28:38 PM »
Woohoo, finally got the grayscale to work!  Not sure if it was disabling velocity mode or disabling sketch, or the combination, but that did it.  I didn't change any other settings.  After reading your last post, Zax, I disabled those two and ran the power line sample, which worked.  Then with the same settings ran the grayscale test and it worked.

Guess I'm going to have to do some more testing to come up with the matrix of what works best with B&W/Dithering/Grayscale.  When I was trying the dithering before it didn't show up correctly in the viewer unless I had sketch selected.  Either that or read the manual, but that immediately revokes my man card.   ;D

As always, many thanks Zax, you're the man, and your software is great!
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5997
    • View Profile
    • T2Laser
Re: Need help with grayscale/dithered
« Reply #13 on: July 11, 2018, 05:28:12 AM »
That's great news! I wrote the software and still refer to the manual  ::)

Always select Dithered last, as if you change some parameters (especially resolution) it will affect the result. It's supposed to re-generate before sending but I'm aware of a bug where it doesn't always do that. Check the "view" to make sure it's correct, then you should be OK.