Grbl on RAMBo w/ Dual Endstops!

New Home Forum Software / Firmware Development Grbl on RAMBo w/ Dual Endstops!

This topic contains 24 replies, has 8 voices, and was last updated by  damien huvelle 1 week, 4 days ago.

Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #107678

    John Boiles
    Participant

    tl;dr I have Grbl working on my MPCNC + RAMBo with full dual-endstop support! I’d love it if other people could give it a try!

    I built upon to the great work from @enducross (and GitHub user @fra589) to get grbl-Mega-5X working on RAMPS boards and also @alexp‘s instructions on how to invert the endstops for the NC endstops. I added support for digipots and microsteps necessary to support the RAMBo board. I also added a feature to provide per-axis offsets, similar to the {X,Y}_DUAL_ENDSTOPS_ADJUSTMENT / M666 setting in Marlin.

    I set the pin map so that if you followed the Marlin instructions for dual endstops with RAMBo, you should just be able to drop in this firmware and it should work out of the box.

    My code is the mpcnc-rambo-support branch of my fork of grbl-Mega-5X on GitHub. Here’s how you can try it out:

    1. Download the code from my branch (either with git or by clicking the ‘Download’ button).
    2. Follow the instructions on the Grbl wiki for compiling / flashing Grbl.
    3. (Optional) To set per-axis offsets to square your machine, set values for settings ($150, $151, $153, $154 for axis X1, Y1, X2, Y2 respectively). For example, to tell axis X1 to move 1.7mm from the endstop to square the machine, send $150=1.7 to Grbl using your gcode-sending software of choice (I like CNCjs). These offsets are applied during homing ($H).
    4. (Optional) You may also want to set the per-axis max travel settings as appropriate for your machine’s size with $130, $131, $133, $134 for axis X1, Y1, X2, Y2 respectively.

    Let me know how it goes!

    • This topic was modified 2 months, 2 weeks ago by  John Boiles.
    • This topic was modified 2 months, 2 weeks ago by  John Boiles.
    6 users thanked author for this post.
    #107696

    Jeffeb3
    Participant

    Excellent work. Thank you!

    1 user thanked author for this post.
    #107701

    Ryan
    Keymaster

    What!?! That is pretty nuts, great work!

    1 user thanked author for this post.
    #107702

    Aaron
    Participant

    Awesome! I wonder if it would be possible to compile GRBL for Rambo Mini? This is great, as grbl itself can’t do dual endstops on any axis as it only has 3 axis total.

    1 user thanked author for this post.
    #107711

    John Boiles
    Participant

    Thanks for the love y’all!

    @forgecnc the main Grbl project (github.com/gnea/grbl and github.com/gnea/grbl-Mega) would probably work on the Mini Rambo if you ported my digipots and microstep changes over. I’d be happy to make a pull-request with digipots and microsteps into the main Grbl repo, but I want confirmation from a maintainer that they would be willing to accept the change if I put in the work. I created two issues: #695 for microstep controls, and #696 for digipots to ask if they’d like to have those features in Grbl. We’ll see what they say.

    Alternately, you can probably use my branch if you change N_AXIS to be 3 instead of 5. I _think_ @fra589 wrote grbl-Mega-5X in such a way that it can still work with only 3 axes, but I’m not sure. Please report back if you give this a try.

    1 user thanked author for this post.
    #107718

    Aaron
    Participant

    Also, I just wanted to clarify, there is no lcd/SD support right? That’s what I’m thinking, but just wanted to verify.

    #107747

    John Boiles
    Participant

    Correct, no LCD or SD support in Grbl. But I think it’s way more usable to just use CNCjs on a Pi with a touchscreen anyways. Bonus is that you can load gcode over WiFi.

    Edit: I did notice this issue with some folks adding LCD and SD support to Grbl.

    • This reply was modified 2 months, 2 weeks ago by  John Boiles.
    #107766

    Serg
    Participant

    Will it still work for RAMPS ?

    • This reply was modified 2 months, 2 weeks ago by  Serg.
    #107771

    John Boiles
    Participant

    Probably! Though you can just use grbl-Mega-5X for RAMPS. Maybe I’ll submit my axis adjustment code as a pull request to that repo

    #107780

    Serg
    Participant

    I’ll try to setup your version on RAMPS and report here because I want to use endstop adjustment.
    That will be nice if it got merged. I’ve opened and issue a while ago in grbl-Mega-5X but it was closed with resolution not needed. https://github.com/fra589/grbl-Mega-5X/issues/29

    #107783

    John Boiles
    Participant

    Great! Make sure to comment out CPU_MAP_2560_RAMBO_BOARD and uncomment CPU_MAP_2560_RAMPS_BOARD from config.h. Let us know how it goes!

    #108141

    Serg
    Participant

    I can confirm that everything works for RAMPS

    there is a small bug with digipots settings
    I did a quick hack to make it work but I think there should be a better solution. This setting should probably not present if digipots are disabled in the code

    https://github.com/zerg32/grbl-Mega-5X/commit/67f1ab31350aeab7b6b0f9194a13d67d09724dc9

    I’ve also added an config file for platform.io to be able to build it easily

    https://github.com/zerg32/grbl-Mega-5X/tree/platformio-support

     

     

     

    1 user thanked author for this post.
    #109395

    John Boiles
    Participant

    @zerg32 thanks for letting me know about the bug. I got buy-in from the grbl maintainer @chamnit to add the digipots code to the gnea/grbl-Mega repo. I’ll make sure to include your fix when I make the PR to that repo.

    Platform.io support is a nice addition. Thank you!

    #109428

    Serg
    Participant

    I’ve only #ifdef the set_current method. If you are going to bring it to the main repo I think it is a good idea to #ifdef the setting also. In other case we’ll have a setting that does nothing.

    #109712

    John Boiles
    Participant

    I put up my pull-request upstream for digipots! https://github.com/gnea/grbl-Mega/pull/108

    Ideally I’d like to get as much of this as possible merged upstream so that I don’t have to maintain a sizeable fork 🙂

    • This reply was modified 2 months ago by  John Boiles.
    1 user thanked author for this post.
    #109816

    Ryan
    Keymaster

    Awesome! I know the feeling less edits make for much easier fork maintenance.

    #110135

    damien huvelle
    Participant

    Hi everyone,

    I’m new to the community but i’m very interessed but putting GRBL on my lowrider v2.

    I flashed my Rambo with the firmware found on this topic.

    As the firmware is for MPCNC I think it’s normal untill I make some changes that my steppers don’t do what they are supposed to do … Can some one help me ?

    By the way I have planed to put endstops but i’m still waiting for the 3D printed parts, so for now my lowrider doesn’t have endstops. I uncommented the homing cycle on start in the config.h (I think it’s ok) but when I try to move some directions, with CNCjs, I can read in the console “ALARM:2 (Soft limit) [msg: reset to continue]”

     

    Thanks

    #110151

    damien huvelle
    Participant

    Well i’m making my path into the mess …

    so I have changed assigment letters of Axis 4, in “config.h” to assign it to the Z axis (for the lowrider). So now every stepper do what they are supposed to do exept for the “Axis_4” that is moving much slower than the other Z axis … I have tried to change the steps/min, … etc in “defaults.h” to match with the original Z axis but seems to do nothing … it keeps to move slower.

    moving to negative coordinates is ok with “$20=0”, it is also done for this part …

    Someone can help me ?

     

    (excuse my english by the way, hope you understand everything)

    #110173

    John Boiles
    Participant

    I know the feeling less edits make for much easier fork maintenance.

    Ha I’m sure you do know the feeling! I’ve been impressed with how well you’ve kept the MPCNC/MP3DP/LowRider cose organized!

    @dhuvelle I don’t have a lowrider so I don’t think I can be very helpful. Let us know if you make progress!

    #110279

    damien huvelle
    Participant

    OK !!! Found the solution !! YOUHOU

    It was the Grbl settings in the EEPROM that wasn’t right … I don’t know why it wasn’t changing the settings in the EEPROM when I was flashing with Arduino IDE (I don’t know how it works, but maybe there is something to change in the firmware and this can help you or it is normal).

     

    #111315

    Victor D.
    Participant

    I apologize if this was addressed elsewhere but what are the pins/connections for spindle control (e.g., spindle I/O, spindle speed control) on the Rambo board for use with your GRBL branch?

    Thanks!

    #115124

    Melvin
    Participant

    I set the pin map so that if you followed the Marlin instructions for dual endstops with RAMBo, you should just be able to drop in this firmware and it should work out of the box.

    Cannot wait to try this out! I will let you know.

    I have Rambo with dual endstops, if it works as easily as you say, Ill send you a pizza or something!

    • This reply was modified 3 weeks, 2 days ago by  Melvin.
    #115147

    Melvin
    Participant

    Is there a way to wire a physical button (feed hold, cycle start), as you would on a grbl aurdrino board?

    #116741

    damien huvelle
    Participant

    @johnboiles I’m wiringthe endstops on my lowrider. I’m planning to have endstops on both Y axis (like on the mpcnc), on the X axis (X-min) but also on both Z axis (to go to the higher position of the machine and make it leveled). I also want to use an Z probe. Are the Z-min and Z-max already configured to let me do this or is there something to change the Firmware ? I already changed the homing cycles relatively to the Axis names (not the same for the lowrider than for the MPCNC)

     

    thank you for your help, and if anybody have a solution it’s always welcome

     

    #116834

    damien huvelle
    Participant

    Hi everyone,

    again ‘im making my path into this !! it’s fun !!

    is there any risk that you had make mistakes in the attribution of the RAMBO’s pins into the “CPU_MAP.H” ? I found this

    cpu_map.h

    line 480

    #define MIN_LIMIT_BIT_0 6 // X Limit Min – D12 / PB6
    #define MIN_LIMIT_BIT_1 5 // Y Limit Min – D11 / PB5
    #define MIN_LIMIT_BIT_2 2 // PH4

    but when I check on the RAMBO schematic prints it seems to me that it’s not the same … I also found here when @johnboiles add the cpu map of the RAMBO, what seems to be the corrects pins but it is no more in the download files.

    thank you for your help

Viewing 25 posts - 1 through 25 (of 25 total)

You must be logged in to reply to this topic.