CNC Project

I looked for another thread to add to but didn’t see one.

@SteveO I have one for a Tuesday meeting.I posting this as I am sure the moment I do I will finally see what I screwed up.

I’m working on a simple two-axis machine. My initial thought was to use GRBL on an UNO with CNC Shield with an Octopi with the GRBL plugin. I am now questioning this along with other life decisions.


I got my assembly designed and printed all the parts. I got the Pi and UNO loaded and and running. I got the machine jogging yesterday but ran into a snag. I started getting an error when I tried to home via octopi. The GRBL plugin is fairly limited so I started using UGS to try to get the bug killed.

Xaxis motor and switch:

I edited the config.h file to disable the Z axis homing. Below is default…not what it looked like afterward. I uncommented 112,113 while commenting 105,106.

The problem is the machine will not try to home. I get an error each time I try to enable homing. Going through USG’s software I enable the switches, then enable homing. In the end the software says HOMED when it hasn’t moved. I then get an error when I try to jog it. I have to set $21 (hard limits enable), 22 (home cycle enable), and 23 (home direction invert) to 0 to clear the error and regain motion.

I have tried every variable I can think of.

  • Started using NO switches, tried NC.
  • Tried using UGS’s setup wizard to setup homing.
  • Inverted $5 (invert limit pins)
  • Tried 0,1,2,3 on $23 (homing direction input) This was changed by UGS setup.
  • Tried lowering $110,111 (max speed)
  • Tried $32 1,0 (laser mode)
  • I tried unplugging the switches and got the same error.
    All of these netted the same result.

I tried to add Jumpers to the other switches to see if it want’s all the switches closed.


Got a different UNO and Shield to ensure hardware wasn’t a factor.

I even took the shield off to verify it wasn’t a factor.

2 Likes

I forgot I also disabled this in config.h. It creates an error on startup to prompt the user to home the machine.
image

1 Like

Is it possible you’re wired to the NC part of the limit switches, rather than the NO side?

I wired them both ways with the same result. I ended up trying a separate cable and got it to work. Looks like it’s emi with the stepper. Each time the stepper would fire it would signal the uno that the switch had closed. I put pullup resistors on but that alone didn’t fix it. I got a shielded cable for the switches…so I think i"ll be putting that problem to bed this weekend.

I got my table installed this week. Overall I am really pleased with it. But I have some improvements in mind that I will tackle in the coming months. For now I am putting some hours on it to see how durable my design is.

4 Likes