Author Topic: Maximum Laser Power not Adjustable  (Read 1480 times)

maxcoros

  • Newbie
  • *
  • Posts: 2
    • View Profile
Maximum Laser Power not Adjustable
« on: February 20, 2017, 05:03:28 PM »
Hi, i've an elekmaker engraving machine, i'm started to test your program today, i've found the very useful function of laser power table, but i've a little problem, this table and all the software seems to have a maximum value for laser power to 255, my laser have a maximum of 1000 so i was unable to draw in gray scale. It's is possible to change the maximum value of the laser power?

Regards
« Last Edit: March 03, 2017, 12:45:52 AM by maxcoros »

nottingham82

  • Hero Member
  • *****
  • Posts: 1642
    • View Profile
Re: Maximum Laser Power not Asjustable
« Reply #1 on: February 20, 2017, 05:11:59 PM »
per zax

The Nano PWM is 8-bit resolution, so the range is 0-255. That is also the default for Grbl.

It is possible to compile Grbl to use another number (e.g. 1000) as maximum, but values are then converted back to the 0-255 internally. You don't gain anything doing this.
Laser: 2500mw A5 eleks maker
OS: Windows 10 all in one pc
Software: T2
http://www.gearbest.com/3d-printers-3d-printer-kits/pp_290386.html Paid $160 in 2016

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5674
    • View Profile
    • T2Laser
Re: Maximum Laser Power not Asjustable
« Reply #2 on: February 20, 2017, 05:58:29 PM »
You can use 0-1000 or any range you like with T2Laser, and you can also change the max value in the firmware to 1000 if you wish. No need to recompile, just change the $ setting.

The default values in my firmware is 0-255.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
Re: Maximum Laser Power not Asjustable
« Reply #3 on: February 20, 2017, 05:58:44 PM »
But you "DO" have to use a range that "YOUR" firmware is built for.
SARCASM - Just one more service we offer here.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5674
    • View Profile
    • T2Laser
Re: Maximum Laser Power not Asjustable
« Reply #4 on: February 20, 2017, 06:01:37 PM »
Correct, the software and firmware need to match but both can be configured so take your pick.

The fact is your PWM output is still 8-bit (0-255) no matter what you do as that's the resolution of the hardware.

maxcoros

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Maximum Laser Power not Asjustable
« Reply #5 on: February 21, 2017, 03:33:28 AM »
As I told before, if i use 0-255 range, the laser don't burn. At maximum value of 255 i obtain only a very low burn. In other software like T2 or image2gcode i can set minimum and maximum value of the power.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5674
    • View Profile
    • T2Laser
Re: Maximum Laser Power not Asjustable
« Reply #6 on: February 21, 2017, 05:09:31 AM »
Sorry, I didn't realize this was in the RobotLaser thread.

If the software won't let you set 0-1000 then you can change the firmware value instead.

$30=255

That will make max power 255.

RobotEyes

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • RobotLaser
Re: Maximum Laser Power not Asjustable
« Reply #7 on: February 22, 2017, 09:37:50 AM »

First of all a general consideration:


RobotLaser works with GRBL 0.9.
GRBL 0.9 has a power range 0-255, because Arduino has an 8-bit PWM converter (0-255).
In GRBL version 1.x  is possible to use the parameter $30 (not available on 0.9), which sets the maximum power value.
Setting for example $30=1024 sending a command S1024 the value is divided by 4 and becomes S255. setting $30 = 65536,
the value is divided by 256 and back to 256.
The division has integer result, so whatever value between, for example 32513 and 32768 becomes 128.
Therefore is quite useless increase the resolution with $30 because it still is internally reset to 0-255.


Furthermore, most of the laser are not linear, more a 0-255 scale is much higher than the range of contrasts achievable from a laser of the type used by the benbox machines.
on most materials no more than 4 levels of "burning" can be distinguished.


for maxcoros


It is not the laser that has a range of values.
The standard hardware laser interface operates at 12V;
0V = off, 12V = maximum power.
The elemaker board powers the laser by pulse turning it on and off at high speed.
S0 = always off, S255 = always on. S128 turned on for half of the cycle etc.


If your laser takes a maximum value of 1000, you probably have a GRBL firmware v1.x,
Robotlaser officially don't supports ver.1, but officiously seems to work.
To find out what version of firmware is installed, simply press the test button on the tab [Serial] in Configuration.
In case of ver 1.x, you have to adapt the firmware to the software by following the excellent advice of Zax (thank you)
and give the command $30 = 255 (in manual mode page).


As soon as the current work commitments (very pressing in recent months) will allow me,
I will add complete support to the firmware GRBL 1.1.


Greetings to everyone.