Welcome to Our Community

Some features disabled for guests. Register Today.

Newbie question and help please . . .

Discussion in 'Laser Cutters' started by Andy Brown, Jul 30, 2021.

  1. Andy Brown

    Builder

    Joined:
    Jul 30, 2021
    Messages:
    4
    Likes Received:
    3
    HI,
    I have built a small laser engraver using an Arduino Uno and a Protoneer v3.51 CNC shield.
    I have uploaded GRBL 1.1h to the Arduino and am using LaserGRBL to test it.

    I have a few problems:

    1. I have a limit switch at each end of both X and Y axis. I can move the laser head back, forward, left and right using the jog buttons in LaserGRBL, but when I hit home it just locks up.

    2. Whenever I connect the 12v PSU to the machine the laser comes on at full power. I'm currently testing without the laser plugged in.

    When I start LaserGRBL it says it's locked and I have to unlock it before I can move anything.

    I've attached the configuration file from LaserGRBL if that helps.

    Can someone please point me in the right direction ?

    Thanks in advance,

    Andy
     

    Attached Files:

  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    As it doesn't have a Z axis, and Z homes first. See Frequently Asked Questions · gnea/grbl Wiki to recompile without Z axis homing


    Normal, if homing is Enabled. See Grbl v1.1 Configuration · gnea/grbl Wiki and Grbl v1.1 Commands · gnea/grbl Wiki


    Either laser wired incorrectly, or see Grbl v1.1 Laser Mode · gnea/grbl Wiki
    Or, if you have a chinese Fake CNC shield (not an original Protoneer) know that is a Grbl 0.8 shield, and the pinout is incorrect for Grbl 1.1 - spindle PWM pin is not on the pin marked as such...
     
  3. Andy Brown

    Builder

    Joined:
    Jul 30, 2021
    Messages:
    4
    Likes Received:
    3
    Hi Peter,
    Many thanks for your reply and advice.
    I had just downloaded the hex file and flashed that, so I'll try changing the config.h and try that.
    I think the laser module is wired correctly as connecting the signal wire to +5v switches the laser on and connecting it to ground switches it off. It's only when connected to the shield that the problem arrises. I may of course have it on the wrong pin on the shield. Do you know what pin is used for the laser ? It is a genuine Protoneer board, not a knock off.

    Thanks again,

    Andy
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    Then you can approach Protoneer for support and I am sure he has documentation for the boards too, showing the pinouts. The fakes has it wrong, his latest has the right labelling.


    PS: use the official gnea/Grbl 1.1 - LaserGrbl is not Grbl.
    Grbl 1.1 has a full laser mode:

    maybe LaserGrbl has the pinout screwey :)
     
  5. Andy Brown

    Builder

    Joined:
    Jul 30, 2021
    Messages:
    4
    Likes Received:
    3
    Hi Peter,
    Sorry to be a pest here. I downloaded "grbl-1.1h.2019082"
    Added the libraries.
    Opened grblUpload.ico and included the grbl library.
    When I compile I get errors as below:

    In file included from C:\Users\andy.brown.ANDY\Documents\Arduino\libraries\grbl/config.h:30:0,
    from C:\Users\andy.brown.ANDY\Desktop\grbl-1.1h.20190825\grbl\examples\grblUpload\grblUpload.ino:1:
    C:\Users\andy.brown.ANDY\Documents\Arduino\libraries\grbl/grbl.h:68:4: error: #error "Required HOMING_CYCLE_0 not defined."
    #error "Required HOMING_CYCLE_0 not defined."
    ^~~~~
    C:\Users\andy.brown.ANDY\Documents\Arduino\libraries\grbl/grbl.h:108:4: error: #error "WCO refresh must be greater than one."
    #error "WCO refresh must be greater than one."
    ^~~~~
    C:\Users\andy.brown.ANDY\Documents\Arduino\libraries\grbl/grbl.h:111:4: error: #error "Override refresh must be greater than zero."
    #error "Override refresh must be greater than zero."
    ^~~~~
    exit status 1
    Error compiling for board Arduino Uno.

    All I did was change the two defines for the homing to what you suggested. Even with the original config.h I get the same error.

    Any idea ? I take it that it's something I'm doing wrong.

    Cheers,

    Andy
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    You shouldn't include the library to a sketch. Use the correct method (Files > Examples > Grbl > GrblUpload) as described in step 4: Compiling Grbl · gnea/grbl Wiki

    or, if you just want to Disable Z homing, easier way:
    OpenBuildsCONTROL > Wizards and tools > Firmware Flashing tool > Select 2 Axes, select Uno, Select port > Flash
     
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,028
    Likes Received:
    4,119
    Like so:

    upload_2021-7-30_17-36-57.png
     
  8. Andy Brown

    Builder

    Joined:
    Jul 30, 2021
    Messages:
    4
    Likes Received:
    3
    Hi Peter,

    I did as you suggested and got the sketch uploaded and the machine now homes properly.

    I also noticed that I hadn't enabled "Laser Mode" in Grbl Settings ($32=1)so did that and now the laser switches on and off with the M3 and M5 codes.

    Many thanks for all your help,

    Cheers,
    Andy
     

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