Maslow Home Maslow Community Garden

Automating z-axis zeroing


#1

You can automate the zeroing of the z-axis if you want to. It makes it a lot more precise and convenient.

  1. Solder pins on AUX4 on the motor shield. While you’ve got your soldering gear out, attach pins to aux1 as well, it can automatically start and stop the router. Never mind about the others, they aren’t used yet.

  2. Attach a wire (2m should be fine) to the AUX4 and one to the GND output

  3. Attach a piece of sheet metal, I like to use a ruler, to the AUX4 wire

  4. Attach a small metal clamp to the GND wire

  5. In settings, make a macro called “touch zero” and in it put

  • Imperial

G20 G90 G38.2 Z-.15 F1 G20 G90 M02

  • Metric

G21 G90 G38.2 Z-10 F1 G21 G90 M02

  1. Insert your bit into the router if you haven’t allready

  2. Attach the clamp somewhere a metal piece of the router body

  3. Put the metal ruler under the sled so that it covers the middle of the opening

  4. Use the Z axis panel to move the bit so that it is just above the ruler but not quite touching - within .15" of touching.

  5. Press the macro button

Now your z-axis will lower till it touches the metal ruler and automatically zero, or the Maslow will ‘Stop’ if the bit hasn’t touched down yet. If that is the case, click the ‘Stop’ button to acknowledge the alarm and run the macro again - the bit will lower another time trying to touch down on the ruler connected to AUX4

Et voila, workflow improved :slight_smile:

For the connector, here is a cable that could be made to work. It includes a 3-pin male connector you could solder onto the board and the mating 3-pin connector wired to 24" leads. That’s certainly not long enough to get from the board to your sled, you’ll need to cut one of the connectors off and solder on pieces of wire to make up the difference. Note that the middle pin is VCC (i.e. +5 volts), so not needed for the Z axis zeroing.


Zero z axis each time
Table of Contents
#2

Really nice guide! I will do this very soon! Maybe you could add it to the garden as well? I think a lot of people would want this.

Just a quick question (and may be some clarification)
I’m guessing that you’re using inches on your machine?
I haven’t tried the G38 command but I would suspect that it gives an error if it doesn’t find the zero after 0.15inch of travel? is that correct?
If the machine is set to mm this would not be very much (coming in from +20 mm maximum) so by simply changing the value to something larger would make it probe deeper.

Is the feedrate set as low as possible to increase the precision? My z-axis is pretty slow already so I usually just max it out :wink:


#3

The g20 sets the commands to inches, so it doesn’t matter is everything alse is in mm, i’m a metric guy myself.


#4

@Dag83 I see you have three wires on pins, one is to ruler and ground to clamp. Wheres the third wire going to? Also does the top wire go to ruler or second one down? My X-Carve has a probing feature where you put clamp on collet and set puck on work piece (2wires setup) and hit probe button and it automatically probes puck and raises to automatic hight. Also do you have a link to where we can get pins and black wire clip to go on pin?
Thank you very much for this post.


#5

I usually don’t put a wire on the VCC pin unless it is needed, and in this case I would leave it off.

For the connector, here is a cable that could be made to work. It includes a 3-pin male connector you could solder onto the board and the mating 3-pin connector wired to 24" leads. That’s certainly not long enough to get from the board to your sled, you’ll need to cut one of the connectors off and solder on pieces of wire to make up the difference. Note that the middle pin is VCC, so not needed for the Z axis zeroing.


#6

@blurfl what does VCC stand for? Sorry for probably silly question to you. I haven’t had time to see if new laptop fixes my USB lost problem but I for sure wanna do this feature when i do get it going properly. Thanks for replying bud! :slightly_smiling_face:


#7

Sorry for adding confusion, in this case VCC means 5V , the 5 volt power for the Arduino logic and the encoders.


#8

If you are in the middle of a cut using metric and it stops for a tool change, will this macro cause a problem? If you set it to inches mode and never set it back to metric, would the firmware misinterpret the gcode as inches from that point on? If so, perhaps a better solution is to have code for macro for metric and macro for inches.


#9

I loaded a metric file and ran the macro, and the units of the main screen did not change. I don’t have a way to do other testing at the moment though.

The macro could be written for metric as well:

G21
G90
G38.2 Z-5 F1
G21
G90
M02

#10

Well, might be good to hear from others that do this and see what their experience is. If I get around to it this weekend, I can try to run a test.

What’s the purpose of the second G21 & G90 commands? G21 puts it into metric, G90 sets it for absolute positioning… but why issue that again when the next line is M02 (program end)?


#11

I have no idea, i don’t read gcode, i just copy pasted :slight_smile:
I tried to add a command to raise the bit a bit, bit it didn’t work.
Appearantly i have
G21 G90 G38.2 Z-30 F1 G21 G90 M02

The other macro is G21 G0 Z5.0 to raise the z-axis to a safe transfer height.

But when i tried
G21 G90 G38.2 Z-30 F1 G0 Z5.0 G21 G90 M02 it didn’t raise the bit

The third wire is not connected, but i can’t remember which wire it is. Halfway they are soldered together with another wire, so the colors change. :-s

The pins are called “header pins”, guess the cable should be next to it when you find a webshop.

Edit, never mind, forgot this was a wiki, someone already completed it :slight_smile:


#12

https://www.digikey.com/product-detail/en/wurth-electronics-inc/61300311121/732-5316-ND/4846825
https://www.digikey.com/product-detail/en/te-connectivity-amp-connectors/640456-3/A19470-ND/259010

Above are 3 pin male board connectors with 0.1" spacing between the pins. Not sure if that is a match for maslow’s motor shield


#13

The holes are not in a complete straight line, but straight enough to get a line of three pins in it.
I just used some standard pins laying around for arduinos and stuff. Some soldering and done!

I’ve also added pins on the other AUXs. You never know when you need them :slight_smile:


#14

That’s a PCB layout trick that aids in assembling the board. The holes are just enough offset that the pins of the header touch the sides of the holes so that the part stays in place by friction before is is soldered, and will stand perpendicular to the board on its own.


#15

FWW -

Explanation of VCC in detail

https://www.pcmag.com/encyclopedia/term/53705/vcc

Thank you


#16

Learned something new. During soldering I was thinking indeed: not bad, stays nicely in place :face_with_monocle:


#17

Try THIS for a longer cable…I think it should work.


#18

So I see in GroundControl that there is a touch Zero button that sends the G38.2 command, but mine is greyed out. What do I have to do enable this button?


#19

I believe there is a toggle to enable it under advanced settings.

David Lang


#20

I can’t see anything there. Looking in the code I don’t see anything either. Has anyone ever used that button?