I've spent the last couple of days tracking down how to use the digitizing capability of Mach3 to implement a z-depth and centering tool. There were several threads that were very helpful but didn't quite fill in all the blanks- http://www.cnczone.com/forums/showthread.php?t=36099
So in the interest of saving someone in the future the trouble of figuring this out here is a cook book on how to do it. Caveats: This article assumes you are using Mach3.
Here is a video of how this works: [ame="http://www.youtube.com/watch?v=KOXY4O0UkRM"]YouTube - Mach3 CNC Probe Tool[/ame]
Theory of operation: Mach3 allows you to read an input line through the parallel port that can be used for detecting contact with a metal plate. In conjunction with the G-code probe command (G31) you can drive your gantry under software control until it hits the plate. This facility can be used to very accurately move your bit to the plate. Depending on how the plate is oriented, you can find an X, Y or Z position.
Step 1: Wire up a probe circuit.
Cut a length of 16ga wire about 12' long- long enough to reach from your controller box to the front of your work surface. Open up your controller and attach one end of the wire to an available I/O pin. I used pin 15 on my HobbyCNC Pro board. You may also have to connect a 0.10uf capacitor between the wire and ground.
http://www.cnczone.com/forums/attach...1&d=1207688579
Step 2: Fabricate probe plates.
Build a touch plate. I made one plate out of a piece of aluminum angle. The other plate I made is a 1" piece of copper tubing inset into a 2.5" x 2.5" x 0.25" plexiglass. The bottom of the plexiglass has a cross hair scribed in it. The top has a 1/16" circular goove 1/16" deep that the copper tubing is press fit into. Cut the groove so that is is a slight interference fit with the tube so it will stay put. Attach your signal wire to the plates.
http://www.cnczone.com/forums/attach...1&d=1207688579
http://www.cnczone.com/forums/attach...1&d=1207688579
http://www.cnczone.com/forums/attach...1&d=1207688579
Step 3: Download and install the MachBlue screens
Download the MachBlue screen set from the ArtSoft web site http://www.machsupport.com/screens.php
Unzip the file and run the MachBlue_setup.exe program to install the screen set and .jpg screens.
Step 4: Download and install MachBlue modifications.
Download the BlueProbeVer3.zip file
http://www.cnczone.com/forums/attach...1&d=1207688579
Unzip the file and move the MachBlue.set file into your Mach3 folder. Then move the MacBlue_ProgramRun.jpg file into the Mach3/Bitmaps/MachTestScreens folder.
NOTE:
It looks like Artsoft did some reorganizing of their web site so the link to the Blue Screenset has changed. You can now download it from here
http://www.machsupport.com/screens/MachBlue_setup.zip
The modifications to the screen set are here http://www.cnczone.com/forums/attach...2&d=1207685850
Step 5: Startup Mach3
Start up Mach3. Go to the "View" menu "Load Screens" and choose MachBlue. Your screen should now look like this:
http://www.cnczone.com/forums/attach...1&d=1207688579
Step 6: Configure the probe pin
Go to the Config menu and choose "Ports and Pins". In the "Input Signals" list, enable "Probe", specify the Port# and pin number 15 (or the pin you plugged your probe circuit into). Make sure you save your configuration file when you are done.
http://www.cnczone.com/forums/attach...1&d=1207688579
Step 7: Use the Probe panel software
Always start out by touching the probe plate to the bit. If your circuit is working, the Touch Test LED in the Probe panel will turn green. Normally you only need to run 1 wire to the probe. If your router is plugged in and correctly grounded you shouldn't need to run a separate ground wire from your controller board.
The new Probe panel features several buttons that allow you to probe in the four cardinal directions, find a center or probe in the z direction. For instance, if you click on the x- arrow, after a 1 second pause the gantry will start advancing in the - x direction until it hits your metal plate. It will stop exactly at the plate and the DRO will show you the location in current coordinates. The other 3 arrows work in a similar fashion but advance in the other cardinal directions. The probe routine will run a maximum of 2" before it stops, so you need to jog your tool within 2" of the touch plate before you start.
The round circle with cross hairs button in the middle activates the probe search for the center of a round pipe centering tool. It advances in the 4 cardinal directions looking for the insides of the pipe and then computes where the center of the pipe is and advances your gantry to the exact center. After it finishes moving, the DRO's for x and y are the location of the center in current coordinates.
Finally, the z button will advance the gantry towards the table until it hits your plate. If there is a value set for the plate offset, the Z DRO will be zeroed to the work top and the gantry will retreat 0.25" above the plate. If you put a zero value in the plate offset field, the gantry will stop at the plate and the Z DRO will give you the vertical coordinate of the plate top.
That's it. Enjoy!