Auto Zero [PROBE] setup

So after many hours of trial and error, optimizing and testing i have finally made a fully automatic probe code that runs automatically before each cut. i also added a SSR (Solid State Relay) to control the on/off of my dewalt 611 using the auto control in Gcode. Below is the code for the auto zeroing. if you read through it you can tell in what coordinates my touch plate and touch arm are and how it goes about doing this without the alligator clip.

VECTRIC FORMAT:

Β±--------------------------------------------------

  • Commands output at the start of the file
  • Probe Location: X30, Y29.5
  • Future probe location: X31, Y32 (So i dont forget location measured)
    Β±--------------------------------------------------

begin HEADER

β€œ$H”
β€œT1”
β€œG17”
β€œG20”
β€œG1 F50”
β€œG10 P0 L20 X0 Y0 Z0”
β€œG0 X29 Y29.5”
β€œG0 Z-2.125”
β€œG1 X30 Z-2.25”
β€œG38.2 Z-3 F1”
β€œG10 P0 L20 Z0.055”
β€œG1 F50”
β€œG1 Z0.1”
β€œG1 X29”
β€œG0 Z2.3”
β€œG0 [XH][YH]”
β€œG0 [S]M3”

PICTURE: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_125610.jpg

LESSONS LEARNED:

  • Gcode is picky… Feedrates need to be defined for G1 or G38.2 moves.
  • The machine is very smart but in reality it does what it is told no matter what is in its way… in other words it has no issues colliding with itself if told to do so… Stupidity is in everything.
  • if you tell Z to go hear before probing it will go there, even if it hits the wasteboard it keeps going
  • i hope people find this code as usefull as i do.
  • any questions or changes you think would help let me know!
2 Likes

This is only for zeroing the Z axis, right? I like the idea, maybe it could even be embedded into a future wasteboard…

What kind of SSR did you use, and how did you hook it up? I’m moving up to a 611, and am starting to order parts for the upgrade.

Below i commented all the lines of the code and added a few M0 and a M8 command.

M0 is a start button so you can tell it to do something then wait for someone to hit the button and it will continue
M8 is the coolant enable pin witch runs my vaccum through another SSR

the SSR’s im using are cheapos off ebay and look like this exactly: http://i01.i.aliimg.com/wsphoto/v3/486924527_1/25A-SSR-input-3-32V-DC-output-24-380V-AC-single-phase-ssr-solid-state-relay.jpg

β€œM0” when you send a file you have to hit a fee/resume button connected to Pin A2
β€œM0” for some reason it ignores one of these so i had to put 2 (this feature is for safety)
β€œ$H” home the machine
β€œT1” tool number
β€œG17” XY plane selection
β€œG20” Inches
β€œG1 F50” Set Feedrate
β€œG10 P0 L20 X0 Y0 Z0” set current position (HINT XY ZERO)
β€œG0 X29 Y29.5” move to just outside probe area
β€œG0 Z-2.125” lower z axis
β€œG1 X30 Z-2.25” move over probe and lower some more
β€œG38.2 Z-3 F1” do probing operation very slowly
β€œG10 P0 L20 Z0.055” set Z zero (thickness of my probe plate is 0.055")
β€œG1 F50” set feedrate again
β€œG1 Z0.1” move z up to 0.1"
β€œG1 X29” clear probe area ands arm
β€œG0 Z2.3” move z axis almost all the way up to clear everything on wasteboard
β€œG0 [XH][YH]” go home
β€œM0” wait for user input from start/Resume Button
β€œG0 [S]M3 M8” start spindle and coolant aka vaccum

1 Like

i hooked up the SSR to the spindle output of the (logic/on/off) port on the power supply. for the vaccum i just attached the one side to gnd and the other to the coolant pin since the ssr works down to 3v. just down pwm the ssr’s. set your rpm to 12000 or higher so it will be constant output. and for the zeroing it actually zero’s all the axis’s.

How funny, those were the same relays I had in my cart on Amazon. Must be a good omen. Instead of running through the coolant pin, could you run both relays off the spindle logic so you don’t have to solder on additional arduino pins?

here is where i mounted the one for my spindle. makes it easy if i ever change over to a 24v spindle (i never will after using the 611) you could wire them both off the same ssr if you put the ssr off the machine unlike me where mine is mounted to the x carriage.

SSR mounted: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_154137.jpg

Buttons: https://dl.dropboxusercontent.com/u/21605196/IMG_20150912_154146.jpg

Here is the updated code with Manual Tool Change!

+================================================
+

  • Block definitions for toolpath output

+================================================

Β±--------------------------------------------------

  • Commands output at the start of the file
  • Probe Location: X31, Y32
    Β±--------------------------------------------------

begin HEADER

β€œ$H”
β€œT[T]”
β€œG17”
β€œG20”
β€œG1 F50”
β€œG10 P0 L20 X0 Y0 Z0”
β€œG0 X30 Y32”
β€œG0 Z-2.125”
β€œG1 X31 Z-2.25”
β€œG38.2 Z-3 F1”
β€œG10 P0 L20 Z0.055”
β€œG1 F50”
β€œG1 Z0.1”
β€œG1 X29”
β€œG0 [ZH]”
β€œM0”
β€œG0 [S] M3 M8”

Β±--------------------------------------------------

  • Commands output at toolchange
    Β±--------------------------------------------------

begin TOOLCHANGE

β€œG0 [ZH]”
β€œG0 X30 Y32”
β€œM5M9”
β€œInsert Tool [T] And Press Start”
β€œM0”
β€œT[T]”
β€œG0 Z0.375”
β€œG1 X31”
β€œG38.2 Z0 F1”
β€œG10 P0 L20 Z0.055”
β€œG1 F50”
β€œG1 Z0.1”
β€œG1 X29”
β€œG0 [ZH]”
β€œG0 [S] M3 M8”

1 Like