GRBL running on Ramps

When I run ‘?’ in the grbl console I get this if I manually touch the z touchplate:

? <Alarm|WPos:1218.000,608.000,-16.968,1218.000,608.000|Bf:35,254|FS:0,0|Pn:Z|Ov:100,100,100>
So it is detecting the z limit but it isn't acting on the touch

Hi Todd, you can directly import my config settings. In UGS, connect your machine, go to machine menu, then go to firmware settings and click on import. Select my config file and click OK.

Sorry for the delay.

Pablo.

Hi I have installed only one min endstop per axis, but I have changed my endstops pins to NO so I never had this issue. Your solution sounds good if anyone has the same problem, thankyou.

Pablo

Hi you can see the wiring connections opening my file (GRBL-MPCNC-Autosquare + Laser-IJK FIXED) go to doc/images/grbl-Mega-5X_MPCNC_Wiring.

I´m working with UGS, it has a Z probe plugging but it doesn´t work very well so, I´ve created a macro in UGS to do the Z probe.

To add the new macro in UGS go to tools-options-UGS-Macros and put the next text on a empty gcode number nº1 for example.

This is the text of my Zprobre macro:

G38.2 Z-10 F70;G91 G0 Z1.5;G38.2 Z-2 F30;G0 Z1;G92 Z20.78

The last command (G92 Z20.78) is the probe height + 1mm retract (my probe height is 19,78mm). So you have to change this last value.

[attachment file=“Z probe Macro.jpg”]

I hope you understand, sorry foy my english.

Pablo.

If you have a z probe plate you haveo to connect it to the probe pin(A15) not to z Min pin.

This is the wiring scheme:

[attachment file=“MPCNC Wiring1.jpg”]

1 Like

Thanks for all your work Pablo! This is awesome.

I’ve uploaded the grbl firmware onto my RAMPS board, and everything seems to be working except the TTL port. I’ve got it plugged into pin 44, but there doesn’t seem to be any voltage coming through there. I’ve ran M3 S1000 and checked it with a multimeter and it says 0v.

I don’t have any endstops, but disabled all those (I think). Could anything along those lines be interfering? I also don’t have anything connected for the spindle directions pin, I’m not sure what those would before.

Any help would be really appreciated, this is starting to drive me crazy!

Hi,

Thanks for this topic, it’s very useful.

I’m at the end of the build of my MPCNC

I’d like to use GRBL, so I downloaded and installed (on a RAMPS 1.4) the version available in first page of this topic

It works fine for part but I have problem with the homing action, the homing direction is inverted ( gantry mobe to +X and +Y direction)

I tried to invert motor connection, that invert physical homing direction but X and Y axis are also reverted, so homing is always in +X+Y dir.

I tried to make some changes in GRBL settings but it seems that changing $23 for homing direction do not support the dual X and Y motor setup.

How can I get homing in -X and -Y direction ( to the bottom left corner of the table) ?

thanks for you help.

 

Hi, GRBL has a security mode, if you have $32=1 this security mode doesn’t allow to work the ttl, so to test your d44 pin you only have to disable the laser mode $32=0. Then put m3 s1000 with this you will have 5v in d44.

 

Hi, in my machine x+ goes to right y+ goes away from the front of the machine so homing is in (front - left) point.

Change the steppers connection ONLY to get the correct axis direction.

With $23 mask you only have to assign 1 or 0 for each axis, this number set the axis direction. in our case we have to assign 5 numbers for example (10110)=22. So put would have to put $23=22.

I hope you understand me.

1 Like

Hello, thanks for you help, I did not know we can extend mask for more than x y z axis

The correct mask for reversing dual x and y is 27

now it seem to works as espected

my axis are as yours -x -y to the botom left corner

Hi Alb, yes this grbl version support 5 axis and there is another version with 6 axis on the same Ramps. But with that we lose limit pins and ttl pins.

I’m glad you have solved your problem. I’m working with this firmware 4 mouths ago with ESTLCAM and Fusion 360 and it works perfectly. The probe mode is very usefull to improbe z accurazy, I recommend it to you.

Yes Pablo, I tested the Z probe feature, it’s great, i made a quick MDF plate with aluminium paper glued on and a cable soldered to it. it works but I plan to make something nicer :smiley:

Do you think it’s possible to use the probe on 3 axis like this video ? - YouTube

Hi, yes with UGS you only need a calibrate corner.I think it will works perfect.

Thank you everyone for the great work.

Does anyone know what changes need to be made for this to work with a RAMBo board vs a RAMPS board?

I assume there may be some changes in pin mapping in cpu_map.h

I appreciate any help

Hmm… I just gave that a shot and it didn’t seem to change anything. Still nothing on pin 44. I also just noticed I’m getting a few warnings when compiling. This one seems to be the most relevant:

C:\Users\contagon\Documents\Arduino\libraries\grbl\spindle_control.c: In function 'spindle_init':

C:\Users\contagon\Documents\Arduino\libraries\grbl\spindle_control.c:31:24: warning: left shift count >= width of type [-Wshift-count-overflow]

SPINDLE_PWM_DDR |= (1<<SPINDLE_PWM_BIT); // Configure as PWM output pin.


Could this be causing it?

Hi Easton, I think that compiling warning could be de cause, try to compile with another arduino version, I have 1.8 version.

I made my first real project with the MPCNC, so happy :D
The homing for squaring and the Z probe features works great
Thanks for your help
I use Universal Gcode Sender on linux and it remains a problem.
When I home the machine, the machine coordinate are set to -Xmax and -Ymax (X:-795, Y:-495)
I home to the bottom left corner of the machine, but GRBL seams to consider that the zero machine point is the top right.
I'd like to obtain X:0, Y:0 after the homing.
Is there a Gcode command to reset the machine coordinate ? I know the command to reset work coordinate.
1 Like

In Marlin, It’s G92 X0 Y0 Z0.

1 Like

Also, have you tried CNC.js?

I wanted to try cncJs but I had usb detection errors.
Know as all is working fine with GRBL and UGS, I will try cncjs again.