Welcome to Our Community

Some features disabled for guests. Register Today.

PWM/TTL control in gcode? What am I missing?

Discussion in 'Laser Cutters' started by UniqueUserName2001, Jul 8, 2018.

  1. UniqueUserName2001

    Builder

    Joined:
    May 29, 2018
    Messages:
    5
    Likes Received:
    0
    I'm using a SparkConcepts CNC xPro v3 to control my ARCO with a 5W TTL Endurance laser. All works well when I put a constant 12V on the TTL line. Laser comes on, etches well, all good. But when I connect the TTL line up to the SparkConepts D11 pin (PWM/Spindle) the laser never comes on during a print.

    Question: My workflow is currently using Inkscape to create my gcode to Universal GCode Sender. What am I not getting regarding the Z-Axis that would be used to turn on/off the laser or even set a percentage power? What would that even look like in the Inkscape drawing program to set the PWM %? Grayscale vs black? I'm just not sure how make this final connection to what is so far a well performing system.

    A snippet of my gcode that works follows. How to I get commands in there to get the SparkConepts to actually tickle the PWM/TTL D11 pin properly?

    Thanks,

    Craig

    G21 (All units in mm)

    (Start cutting path id: path9)
    (Change tool to Cylindrical cutter)

    G00 Z5.000000
    G00 X74.461860 Y63.942400

    G01 Z-1.000000 F10000.0(Penetrate)
    G01 X90.874970 Y83.582360 Z-1.000000 F750.000000
    G03 X91.808550 Y85.194676 Z-1.000000 I-4.124773 J3.464811
     
  2. Scotty Orr

    Scotty Orr Master
    Builder

    Joined:
    May 21, 2015
    Messages:
    286
    Likes Received:
    137
    Somewhere you need an M3 or M4 command and an Sxxxx command (S1000 sets the laser to full power). You can see info on GRBLs laser mode here: gnea/grbl

    I'm not familiar with inkscape G-code generation, so not sure that it's capable. I use Laser4Web. If I import a grayscale image, it generates the appropriate "S" value changes.
     
  3. UniqueUserName2001

    Builder

    Joined:
    May 29, 2018
    Messages:
    5
    Likes Received:
    0
    Thanks. That is what I needed. I just found those listed in the Endurance Laser Guide. ...

    Using the GRBL version that is installed on the CNC xPro you can set your Min and Max RPM values (which control the laser intensity).
    Add the settings: $30 = 255 (RPM Max)
    $31 = 0 (RPM Min)

    Laser ON 100%: M03 S255
    Laser ON 50%: M03 S127
    Laser ON 10%: M03 S25
    Laser OFF: M03 S0 (or M05)

    So now I need to figure out if someone has Inkscape experience on how to get grayscale lines to create the appropriate S values???.

    In the meantime I'll checkout Laser4Web. Thank you for that reference.
     
  4. Scotty Orr

    Scotty Orr Master
    Builder

    Joined:
    May 21, 2015
    Messages:
    286
    Likes Received:
    137
    I guess it's called LaserWeb4 now. Here are some test pieces I did for Christmas presents last year (using LaserWeb4 and a 2.3W laser). Note: you will have to play with your contrasts a bit (depending on your medium) to get good results.

    20171230_051942.jpg

    20171231_121547.jpg
     
    GrayUK likes this.
  5. BNMaker

    BNMaker Veteran
    Builder

    Joined:
    Jul 13, 2017
    Messages:
    60
    Likes Received:
    30
    Not an Inkscape user, but this should tell you all you need: Working with SVG - LaserWeb / CNCWeb

    One tip, set white space to 0% power, rather than turning the laser on and off. Much faster/safer as there's no millisecond delay while the driver spools up.
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    358
    Likes Received:
    271
    T
    These look like Grbl 0.9 Settings. LaserWeb uses Grbl 1.1's built in Laser Mode (G0=laser off moves, G1=laser on moves. No need to send any on/off commands. M4 in start GCODE, M5 at the end of the Job, and G1 X?? Y??? S0-1000 (PWM Value) for each move

    Grbl 0.9 is terribly old, upgrade to 1.1 as soon as possible, LaserWeb basically wont even connect to anything older
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Contest Winner! Builder

    Joined:
    Mar 1, 2017
    Messages:
    358
    Likes Received:
    271
    See Grbl Wiki -> Laser Mode -> gnea/grbl (In depth explanation)
     
    BNMaker likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice