Xcarve losing machine Zero. Issues with homing

When I tried to load the .hex file from the Inventables web site, it didn’t work.

I downloaded the source files, re-compiled and then loaded in version 0.9j. It worked fine.

The source code is here: GitHub - inventables/grbl: Inventables X-Carve specific Grbl versions:

Instructions for compiling grbl: Compiling Grbl · grbl/grbl Wiki · GitHub

I assume hex file has .hex extension? I have followed all the steps for flashing grbl…Using Arduino IDE method…By doing this hex file is not created?!
Then if I follow compile for Mac OSX I get stuck on this part

To compile: Once your paths are setup, all you will need to do is go to your grbl directory and type make. (To clear all of the old compilation files from a previous build, type make clean first.) This should call avr-gcc, begin compiling grbl, and create a brand new firmware file called grbl.hex that may then be flashed to your Arduino."

Grbl Directory? And where am I typing “make” command? . I see a file in grbl-master folder that says “make” but when i run it, terminal spits out lines and lines of messages looking like this

/Users/nataliehuguet/Desktop/grbl-master/Makefile: line 96: cpp:: command not found
/Users/nataliehuguet/Desktop/grbl-master/Makefile: line 97: COMPILE: command not found

Also turns out I do have grbl v0.9j… Would you suggest using v0.9i instead? Thanks @LarryM !

When you use the Arduino IDE (the easiest method) you don’t create a .hex file.

You set up the grbl library and then open the File->Examples->grbl->grblUpload sketch. Once this is loaded you press the Upload button (right arrow) on the IDE toolbar.

This compiles the code and then loads it into the Arduino.

Be sure to select Tools->board->Arduino Uno and the Tools->Port->COM1(substitute your COM port number) before you do the compile and upload.

Also, select 115200 for your baud rate on the COM port that the Arduino is attached to.

v0.9j versus v0.9i? I still have issues with cutting geometry in inches and setting my machine 0 in the bottom left corner. After homing it still notes it at -31.something inches.

v0.9j supports M30 v0.9i does not. I use M30 in my post processor code for V-carve Pro.

I had trouble with the negative co-ordinates. Something I did fixed it. I don’t know what it was. It might have been v0.9j, just not sure.

You could try v0.9j to see if it would help. There were some other changes besides the M30 support.

I’ve tried re-flashing both v0.9j and 0.9i using using IDE…Now it wont home at all… it moves down maybe 1/4" and triggers the “alarm”…
I got this thing in June and I still haven’t managed to cut a thing on it…

Go into UGS to the Command tab and enter $$

This is a grbl command to have it print out the grbl parameters. Then post them here.

I have adjusted all of those. From turning on homing and limit switches, to reversing x and y axis travel direction. I started dreaming about grbl parameters… I can post them, but I am certain it’s not that

Do you have the standard kit wiring for the homing switches or did you change over to shielded wire?

Would like to see the parameters anyway. Some thing is wrong and we need a good place to start.

$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=1 (report inches, bool)
$20=1 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=3 (homing dir invert mask:00000011)
$24=25.000 (homing feed, mm/min)
$25=200.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=250.000 (x, step/mm)
$101=250.000 (y, step/mm)
$102=250.000 (z, step/mm)
$110=500.000 (x max rate, mm/min)
$111=500.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec^2)
$122=10.000 (z accel, mm/sec^2)
$130=800.000 (x max travel, mm)
$131=800.000 (y max travel, mm)
$132=100.000 (z max travel, mm)

still standard wiring for switches. new spindle. Switches were running great since then…I am still not sure how limit switches would affect machine skipping steps or offsetting itself

Change these:

$1=255
$10=19
$100=40.000
$101=40.000
$102=188.976 if ACME rod
$110=5000.000
$111=5000.000
$120=250.000
$121=250.000
$122=50.000

I think those were the settings before I started messing with grbl. But let me adjust these again…

Nothing really changed when it comes to homing. And it doesn’t seem like it still understands where its machine 0-0 is, based on the fact that x and y are reversed compared to how they were running before… Z axis still moves down a bit and then stops.

Grbl 0.9j [‘$’ for help]

$H
ALARM: Homing fail
ok

Here are the parameters again

$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=19 (status report mask:00010011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=1 (report inches, bool)
$20=1 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=3 (homing dir invert mask:00000011)
$24=25.000 (homing feed, mm/min)
$25=200.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=188.976 (z, step/mm)
$110=5000.000 (x max rate, mm/min)
$111=5000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=250.000 (x accel, mm/sec^2)
$121=250.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=800.000 (x max travel, mm)
$131=800.000 (y max travel, mm)
$132=100.000 (z max travel, mm)

The $10=19 change turns on the ability for grbl to report the state of the homing switches. Unfortunately, UGS doesn’t pass the command to read them.

Using the serial monitor in the Arduino IDE to talk to grbl, issue the ? command. It will report Machine and Work co-ordinates which will be meaningless at this time, but the LIM= information is what you want to see.

The order is ZYX so LIM=000 shows all homing switches are not tripped. LIM=100 would mean that homing switch Z is tripped.

Issue the ? command and then press and hold each switch in turn as you issue the ? command while holding the switch closed to test each switch to see if the Arduino is seeing it operate.

Parameters look good now.

I’ll have to report on that tomorrow then, and see if it reads it as tripped or not.
Again, is it possible that there is something going on with either grbl or arduino to get the machine to skip steps and offset? Or am I going crazy? I have checked everything else mentioned before, and I am starting to run out of ideas…

Yeah, it’s getting late for me. At this point I don’t think that the Arduino, gShield or grbl is your issue. You are experiencing some issues that we know are not working. I’m trying to systematically eliminate the known problems so we can get them out of the way. That makes it easier to concentrate on the real issue.

Thanks again Larry. I really appreciate it.
I’ll keep you posted.

Just a wild random thought that don’t mean a thing, but do you happen to have a power cord (ac 110v) crossing over or running closely parallel to the stepper or homing wiring?

I use a home made touch plat and since it get moved around a lot more radically than any other wiring, it occasionally gets in close proximity to the line power cord then things go haywire from electrical interference until I reorient it away from the power cord.

This is what I get when I try opening serial monitor in IDE
Error opening serial port ‘/dev/cu.usbmodem1d11’. (Port busy)

Homing randomly decided to work again…Switches running smoothly… Still repots -31.457" coordinates for x and y… and still goes waaayy off when I try to run a file, to the point where it slams itself into the y rail…
Where there any issues depending on what kind of machine you’re using to run it from? I have an old Mac with Processor 2.16 GHz Intel Core 2 Duo; Memory 2 GB 667 MHz DDR2 SDRAM and OS X Lion 10.7.5

@JkWestphal no power cord running next to it. I made a whole enclosure for the x-carve and power cord sits outside of the enclosure