GRBL running on Ramps

I tried it again having no direction invert mask OR homing direction invert mask. Behavior was the same. But I noticed additional weirdness. Thinking everything was fine with Y, I had it far from home before I started the homing cycle. The first time I homed, the Y2 motor (left side of machine) moved toward the end stop a bit, and then stopped. The Y1 motor kept going but was far enough away from the endstop that it got in a bind and started skipping steps before I could kill the power. Through various trials I found that sometimes the Y2 motor homed correctly but sometimes it didn’t. While X2’s misbehavior was very consistent, Y2 misbehaved but inconsistently.

So, I’m officially finally giving up on grbl on my current board. If I ever need to replace the board, maybe I’ll get something that has better support for grbl. Until then, I’m just sticking to Marlin.

1 Like

Thanks for trying again, Heath.

I know this is an older thread but… I’m very close to making this work and just need something to verify.
I have a Ramps 1.4. All motors move in the direction as requested. Homing now moves in the correct direction too - I originally had the same issue as Heath, but by uncommenting this in config.h, it is now moving both motors: Line 247 #define LIMITS_TWO_SWITCHES_ON_AXES
I have two limit switches per axis, I have them wired to xmin and xmax, ymin and ymax. They of course are not min/max but used in parallel to auto-square.
The question I have with the RAMPS board are these wired correctly? It works for Marlin wired this way but wanted to be sure because what I’m seeing now is that one switch triggers and the other does not so it banks against the endstop.
Z homing works with a touchplate, so basically a single switch.

Thoughts?

If you have them in parallel, then aren’t they connected to the same pins? Both x switches on the x min, both y on the y min?
If I understand how that setup works, you’d need them both NO, and a script to drive each motor separately so you could position one, then the other, with a slight amount of ā€˜racking’ to be expected during the process. So both drive until one hits an endstop, back up 3mm or so, drive one into the switch, back up, drive the other into the switch, back up. Honestly, I’m not even sure if driving a single motor is possible with grbl.
You could do the same thing with endstops in series and NC.
I THINK to have independent switches and independent motors, you want grbl mega 5x. Maybe I’m off and that’s what you already have. It’s been a while since I read this thread, but I think it was the main 3 axis grbl so that’s what I’m going with.

I’m running the mega-5x firmware. This is what the thread is about so I thought it was assumed.

Motors are independently running on their own steppers and the limit switches are separately wired (not in series) so uses different pins.
Triggering each switch manually does show as such.

1 Like

Like I said, been a while since I read through it, so my bad.
In that case, I got mine to work on the min/max by digging through the pin assignments. They are in blocks that also assign ports and that’s important, too. Swapped them all around, not too bad.
Alternatively, you can try finding the min switch pins for the 4th and 5th axes and just plug in there.

Great idea. I will do that. If you have the same config, can you post your pin assignments?

Thanks

@ndressler I think they should be in that folder. I took a look through some of the configs and maps, but I don’t see my notes. Makes me wonder if I failed to save the right backup properly or just gave up on notes after the 10th install…
I’m have a little more time to dig this weekend, if it’s not in there.
I should also note that I used a ramps 1.6 plus, not the 1.4, but I think all the pins and such are the same.

1 Like

I got mine working! I used this firmware:
https://github.com/Enducross/Grbl_MPCNC_Autosquare

I can do everything I wanted now - home x/y and z (touchplate). This was my main goal.

Thanks
Norm

2 Likes

Norm, did you have to make any modifications to the config, or did it work as provided?

No not that I can recall. I only needed to make changes via $ commands to match what I needed. I would be happy to share my config.h for confirmation and my $$ output.

2 Likes

That would be great

config_files.zip (16.4 KB)

Please see attached file for config.h and the output from $$ for my settings. I have ā€œnormally openā€ switches so just be aware of that difference.

Norm

1 Like

Thank you very much

Hi ! I“m glad my grbl version has been usefull to you mates. I“ve been working with it in my MPCNC since one year and it“s working perfect.
I“m sorry, I can“t answer all your request because my work don“t let me be here a long time.

Best regards.

4 Likes

So I have my board flashed with the firmware posted by Norm Dressler in Oct of '20… Everything so far is working as expected. One thing, I am not able to get coolant working on the Ramps 1.4 board. All the references I see state that Digital Pin 0 and 1 (mist and flood respectively) are located in the AUX 1 location. No joy… I am trying to find a switchable digital pin that I can use to enable a location laser. I am already using the Spindle Enable for the spindle… Anyone have any ideas why it is not working? BTW… my firmware modifying skills are newbie at best… so be gentle…

Hi Follow up to this Please.

I have MPCNC with enstops on all axis.
movements are going the right way endstops are triggering.

only issue i have is the Y axis only one moves when homing, but when i jog both move.

$0 = 10 (Step pulse time, microseconds)
$1 = 255 (Step idle delay, milliseconds)
$2 = 0 (Step pulse invert, mask)
$3 = 24 (Step direction invert, mask)
$4 = 0 (Invert step enable pin, boolean)
$5 = 0 (Invert limit pins, boolean)
$6 = 0 (Invert probe pin, boolean)
$10 = 1 (Status report options, mask)
$11 = 0.020 (Junction deviation, millimeters)
$12 = 0.002 (Arc tolerance, millimeters)
$13 = 0 (Report in inches, boolean)
$20 = 0 (Soft limits enable, boolean)
$21 = 1 (Hard limits enable, boolean)
$22 = 1 (Homing cycle enable, boolean)
$23 = 31 (Homing direction invert, mask)
$24 = 200.000 (Homing locate feed rate, mm/min)
$25 = 2000.000 (Homing search seek rate, mm/min)
$26 = 200 (Homing switch debounce delay, milliseconds)
$27 = 2.000 (Homing switch pull-off distance, millimeters)
$30 = 1000 (Maximum spindle speed, RPM)
$31 = 0 (Minimum spindle speed, RPM)
$32 = 0 (Laser-mode enable, boolean)
$100 = 200.000 (X-axis travel resolution, step/mm)
$101 = 200.000 (Y-axis travel resolution, step/mm)
$102 = 3200.000 (Z-axis travel resolution, step/mm)
$103 = 200.000
$104 = 200.000
$110 = 4500.000 (X-axis maximum rate, mm/min)
$111 = 4500.000 (Y-axis maximum rate, mm/min)
$112 = 300.000 (Z-axis maximum rate, mm/min)
$113 = 4500.000
$114 = 4500.000
$120 = 200.000 (X-axis acceleration, mm/sec^2)
$121 = 200.000 (Y-axis acceleration, mm/sec^2)
$122 = 200.000 (Z-axis acceleration, mm/sec^2)
$123 = 200.000
$124 = 200.000
$130 = 642.000 (X-axis maximum travel, millimeters)
$131 = 642.000 (Y-axis maximum travel, millimeters)
$132 = 120.000 (Z-axis maximum travel, millimeters)
$133 = 642.000
$134 = 642.000

Help will be appreciated.

Look in the config.h file for homing. You want to make sure that the y sequence includes both y axes, something like:
((1<<axis2)|(1<<axis4))
Of course, if your y axes aren’t 2 and 4 then you want to use the correct ones. Does your x axis home correctly? You can look at that if it does. If not, I think there is an example in the code comments a little above or below that.

Config.H

#ifdef DEFAULTS_RAMPS_BOARD

#if N_AXIS == 4 // 4 axis : homing

#define HOMING_CYCLE_0 (1<<AXIS_4) // Home 4th axis (A)

#define HOMING_CYCLE_1 (1<<AXIS_1) // Home X axis

#define HOMING_CYCLE_2 (1<<AXIS_2) // Home Y axis

#define HOMING_CYCLE_3 (1<<AXIS_3) // OPTIONAL: Home Z axis

#elif N_AXIS == 5 // 5 axis : homing

#define HOMING_CYCLE_0 ((1<<AXIS_1)|(1<<AXIS_4))   //HomeX

#define HOMING_CYCLE_1 ((1<<AXIS_2)|(1<<AXIS_5))  // HomeY

//#define HOMING_CYCLE_2 (1<<AXIS_3) // Home Z axis

Yeah, that looks right if 12345=xyzxy.
Only other thing I can think of is to make sure the endstops are hooked up and working. Maybe the machine ā€œthinksā€ one side was tripped and already home. If you trigger the moving side and the dead side backs off a little, dead give away.

1 Like