Welcome to Our Community

Some features disabled for guests. Register Today.

PWM output of the black box

Discussion in 'General Talk' started by DaveySLP, Jan 25, 2022.

  1. DaveySLP

    DaveySLP New
    Builder

    Joined:
    May 9, 2019
    Messages:
    52
    Likes Received:
    5
    Hi everyone!

    Was looking to set up my acro 1510 when it arrives soon and going to use the S9 laser from sculpfun. But I need to know the PWM output spectrum of the black box (have looked through the docs and couldn't find anything). I know in grbl the command to set the PWM is the S command, but the laser itself has full power output PWM = 10KHz. So was hoping that the blackbox can do this with the S command without having to make a frequency multiplier.

    Does anyone know if the black box can output up to 10KHz?

    Thanks for any help in advance :)
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,877
    Likes Received:
    4,285
    See Grbl's compile time directives: grbl/cpu_map.h at master · gnea/grbl


    Can you provide a link or details? Seems to be just a standard diode laser, they like 1khz PWM too
    Remember, PWM = pulse width (not frequency) - the duty cycle sets the power. Not the frequency.

    Understanding pulse width modulation - Knowledge Kitchen

    Within different S-values the frequency is a constant - the length of the 'on' versus 'off' periods within each cycle just differ.
     
    #2 Peter Van Der Walt, Jan 25, 2022
    Last edited: Jan 25, 2022
  3. DaveySLP

    DaveySLP New
    Builder

    Joined:
    May 9, 2019
    Messages:
    52
    Likes Received:
    5
    Hi Peter!

    Thanks for your reply, sure thing, the laser is:

    SCULPFUN S9 Laser Module-Shenzhen Sculpfun Technology Co., Ltd.

    Ah, just found on their site, it says 0-1KHz, but the info leaflet they sent said 10KHz, so looks like it is 1KHz after all!

    Also, I found this definition in the code block you sent:

    // Variable spindle configuration below. Do not change unless you know what you are doing.

    // NOTE: Only used when variable spindle is enabled.
    #define SPINDLE_PWM_MAX_VALUE 255 // Don't change. 328p fast PWM mode fixes top value as 255


    I'm hoping this doesn't mean the max PWM is 255Hz!

    Is that a value from 0 to 255 in the command value which then gives 0 - 1KHz output? Or is that 0 - 255 Hz output?
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,877
    Likes Received:
    4,285
    No, See Understanding pulse width modulation - Knowledge Kitchen

    PWM freq = 1khz+-

    there are 255 "steps" of pwm duty cycles (think of it as 255 shades of gray in laser engraving) - PWM = pulse width modulation, it's not FM (frequency modulation - familiar as standard FM radios)
    In PWM - Frequency is constant, duty cycle changes.

    Nothing special about that laser - standard 5.5w diode laser like the ones we recommend (except our recommended vendors has a lot less untruths than some of the nonsense I read on that link... 90w equivalent power - yeah sure lol)
     
  5. DaveySLP

    DaveySLP New
    Builder

    Joined:
    May 9, 2019
    Messages:
    52
    Likes Received:
    5
    Thanks Peter!

    Ah so it is duty cycle and not frequency, I though it was frequency! Thanks for the heads up. So for the S command in G code, is the specification of output in the range from S0 to S255?
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,877
    Likes Received:
    4,285
    Correct

    Or S0 to S-whatever. There are 255 steps, but for easier reading gcode, Grbl 1.1 uses S0-S1000 by default (still 255 steps, just S-value/1000*255 internally) - you can even set your own value in $30. For example the spindle guys sets $30=24000 so S24000 means 24k-RPM and it makes more sense than trying to remember S255 is 24k-RPM
     
    DaveySLP likes this.
  7. DaveySLP

    DaveySLP New
    Builder

    Joined:
    May 9, 2019
    Messages:
    52
    Likes Received:
    5
    Great!, Got it :) Thanks for your help Peter, that explains it all nicely :)
     
    Peter Van Der Walt likes this.
  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,877
    Likes Received:
    4,285

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