How to unlock the Z-axis stepper motor?

Talk about all things CNC
cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: How to unlock the Z-axis stepper motor?

Post by cvoinescu » Thu Nov 06, 2014 6:34 pm

aeleus wrote:Forgive my ignorance, but is there a danger to the driver chip even when the interruption of power is between the grbl shield and the motor?
Yes, that's where the danger is.

It's fine to turn power off, make or break the connection, then turn power back on, but I'm pretty sure that's not what you're after. Even one disconnection while the power is on can fry a driver chip.

The only ways I see are:
  • Use a different control board, one that can enable and disable motors independently.
  • Modify the gShield to add a switch (and pull-up resistor) on the ENABLE input of the Z driver chip.
  • Leave the motors on and use jogging instead:
    • with the current interface (probably awkward);
    • modify a USB keyboard to make a handy jog controller (see below);
    • use a jog dial (expensive, and no software support that I know of).
What I'm thinking is that you could get a standard USB keyboard, and rip the small controller out of it. See which two contacts the keys that jog Z up and down would close, and mount two switches so that they close those contacts. (You can also use a momentary on-off-on three-position switch.) Mount those in a small handheld box, or even on the machine, where they are easy to get to. Plug in the USB lead: instant jog controller.

If you have homing switches, and use work coordinates, the sweet part is this: home the machine. Jog over to the desired X and Y, and just above the Z you need. Reduce the Z jog increment and adjust the Z carefully. Store the current position as origin of one of the work coordinate systems (G10 L20 Pn X0 Y0 Z0, with n = 1..6). Run the job. Midway through it, pause it, note the G-code line, and turn off the machine. Come back a week later, edit the G-code file to remove the lines already processed (keep the preamble), home the machine, select the same work coordinate system, and run the job again. Calibration preserved -- like magic! (Actually, it's not magic, it's EEPROM -- electrons jump through an insulation wall that they can't get through, and stay trapped in a bit of silicon that acts as a gate for a transistor, unless we use a high voltage to convince them to jump out. They don't really go through that wall, they sort of disappear on one side and appear on the other, because quantum mechanics. Which is very much like magic.)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

aeleus
Posts: 30
Joined: Wed Oct 01, 2014 11:46 pm
Location: Washington, DC

Re: How to unlock the Z-axis stepper motor?

Post by aeleus » Thu Nov 06, 2014 9:09 pm

Wow, that's a lot to think about. But, I've come up with an alternative that works almost as well. First, I found a new Grbl controller/sender that allows me to do much of what you've described in software: Grbl-Panel (https://github.com/gerritv/Grbl-Panel). I'm currently using a Surface Pro (1st series) tablet that has a touch screen and keyboard. Among other cool features, Grbl-Panel allows me to use the keyboard or touch screen and quickly choose from a set of values to jog. The tablet is very portable, so I can have it up close while I zero things out. I can still quickly zero out the z-axis with the power off and do the X and Y using the jog method.

I thought about homing switches, but I don't think they would help me much. I work mostly on irregular shapes (guitar parts). It's easier to just establish where 0,0 is on the part (e.g., alignment holes/pins) than to try to align the part up with machine coordinates. I'm still new to CNC, so everything is subject to change.
ShapeOko 2 #6502 w/ NEMA 23 (140oz) motors (X and Y), Acme Screw Z-axis, Arduino/grblShield/grbl v0.9g
Spindles: Dremel 395; 400W BLDC

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: How to unlock the Z-axis stepper motor?

Post by cvoinescu » Thu Nov 06, 2014 9:41 pm

aeleus wrote:I thought about homing switches, but I don't think they would help me much. I work mostly on irregular shapes (guitar parts). It's easier to just establish where 0,0 is on the part (e.g., alignment holes/pins) than to try to align the part up with machine coordinates. I'm still new to CNC, so everything is subject to change.
That's exactly what I'm talking about. You jog (that's the downside -- you have to actually jog, under power, all three axes, and never move the machine by hand) to where you want the origin to be (a hole, or a corner of the part). Without limit switches, you'd reset the controller at this point, or say G92 X0 Y0 Z0. Instead, you say G10 L20 P1 X0 Y0 Z0, which does about same thing, except it's persistent. It makes the current position the origin in the default work coordinate system. So if you have to hit the emergency stop, or power off the machine, the coordinates are not lost. Just home the machine again, and its work zero is where you left it. You don't have to mess with machine coordinates at all. Eyeball the origin, then the machine remembers the offsets, and can reliably return there. (To clear the offsets, it's G10 L2 P1 X0 Y0 Z0.)

You can even do the X, Y and Z separately, if it's easier to set first the X and Y, then the Z (e.g. if you use the method of rolling a cylinder under the endmill to set the Z height, and you need the X and Y at the corner of the stock, but you need to be over a flat area to set the Z). The command is the same, but you use only the axes that you want to affect (in that example, jog over the corner of the part; G10 L20 P1 X0 Y0 sets that point as X = 0, Y = 0; now jog up a bit and over a flat area; roll the shank of an endmill (say 1/8" = 3.175 mm diameter) on that flat area, and lower the Z until it barely touches the tool as it rolls under it; G10 L20 P1 Z3.175 sets the current position as Z = 3.175 mm, that is, the flat surface as Z = 0).

Now, if you always run your jobs in one go and never have to resume one, you don't need to mess with this. But if you commonly make more than one of a part, use fixtures, or have to stop the machine and resume later, this makes your life easier.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

WillAdams
Posts: 8501
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: How to unlock the Z-axis stepper motor?

Post by WillAdams » Thu Nov 06, 2014 9:45 pm

(re: Grbl Panel)

Nice find!

Especially cool the support offset/work-coordinate systems.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Post Reply