Showing posts with label DIY. Show all posts
Showing posts with label DIY. Show all posts

Monday, May 30, 2022

CNC Probe for Mach3

I'm putting the finishing touches on a 3-pin style probe for my little CNC mill and figured I'd share what worked. The 3-pin switch is amazingly sensitive - closer than I can measure in my shop. I've already used it on one project so far, and after years of manual edge finding and fighting with flipped parts, it's pretty awesome. This page does a much better job than I can do to explain how it works: https://www.silvercnc.com/touch-probe/  A bunch of folks have made these, and you can even buy a pretty decent looking version on Aliexpress for under $70US. (V5 Touch Probe)



The goal was to keep it as short as possible in the vertical axis and to be able to use it on both CNC and manual machines. In order to use it on the manual mill, I needed some visual feedback (also helpful on the CNC), so I added red and green LEDs to indicate the state of the switch.

 

Mechanical:

The switch mechanism consists 3 radially spaced horizontal pins resting on 6 steel balls. The balls are soldered to a copper circuit board that's been machined to isolate the balls in pairs. A stylus on the bottom of the mandrel is used for probing and when it touches a surface in any plane, one of the pins will lift off the ball, breaking a circuit. This creates a very sensitive electrical switch. 

Centering and calibration are managed by a steel hub with a press-fit 1/4" shank to mount in the machine spindle, a V-groove, and a top lip. That inserts into an outer aluminum ring with set screws that engage the V-groove and lock it in place. There is about .030" clearance on the ring/hub interface to allow for centering.

3 long bolts run from the bottom acetal plate into the top aluminum ring, capturing an outer aluminum housing.

The stylus is a turned steel part with a 3/16" ball bearing soldered to the bottom end with 3mm threads on the top to attach to the mandrel.

Since none of my machines are particularly accurate, the probe is calibrated for the CNC mill, which is where I'll use it most. In order to maintain rotational orientation, it's mounted in an R8 tool holder that always goes back in the spindle in the same orientation. That way, I can calibrate it to about +-.001" on the CNC mill. I care a lot less about accuracy on the CNC router, so any runout will be close enough. On the manual mill, I can rotate the probe to take multiple readings and get an average. (there's about .002" difference in runout between the two milling machines - I suspect it's mostly in the old worn-out manual mill.)




 






Electrical:

The electronics consist of an inverting circuit that lights the red LED when the switch is open and green when closed. A transistor acts as a switch for the probe circuit, driven by the 3-pin switch. 

 My two CNC controllers use different voltage for the probe signals. The router uses a Gekko G540 which outputs 12V at about 7ma. The mill uses an old Probotix breakout that outputs about 4.3V at 2.5ma. I was a little worried about getting them both to work on the same wiring, but they seem happy. On both machines, I pulled 5V power from the internal power supply so there's a single connector. I used DB9 connectors on the controller box with just 3 pins active.

The connector on the probe itself uses mini-USB with Vin, ground and Data+. (But, it's NOT USB protocol, just the wiring.)

For use on the manual mill, a 5V wall wart with a 10K resistor on the probe circuit (without it, the transistor gets hot, smells bad then stops working...), and just use the lights to tell when the switch is triggered.


Mach3 code - (be sure to test and use at your own risk)

Here's the code I use for probing the ID of a circle:


If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Probe plate is grounded, check connection and try again)"
Else
FeedCurrent = GetOemDRO(818) 'Get the current settings
XCurrent = GetDro(0)
YCurrent = GetDro(1)

Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F4" 'slow feed rate to 4 ipm 100mm

Rem Probe Left

XNew = Xcurrent - 3 'probe 3 inches to left 75mm
Code "G31 X" &XNew
While IsMoving() 'wait for the move to finish
Wend
XPos1 = GetVar(2000) 'get the probe touch location

Code "G0 X" &XCurrent 'rapid move back to start point

Rem Probe Right

XNew = XCurrent + 3 'probe 3 inches to right 75mm
Code "G31 X" &XNew
While IsMoving()
Wend
XPos2 = GetVar(2000)

XCenter = (XPos1 + XPos2) / 2 'center is midway between XPos1 and XPos2
Code "G0 X" &XCenter 'rapid move to the x center location

Rem Probe up

YNew = YCurrent + 3
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos1 = GetVar(2001)

Code "G0 Y" &YCurrent

Rem Probe down

YNew = YCurrent - 3
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos2 = GetVar(2001)

YCenter = (YPos1 + YPos2) / 2


Rem move To the center

Code "G0 Y" &YCenter
While IsMoving ()
Wend

Code "F" &FeedCurrent 'restore starting feed rate

DoOEMButton ( 1008 )
DoOEMButton ( 1009 )

End If

 

And this probes the upper left-hand corner of a rectangle. 

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Probe plate is grounded, check connection and try again)"
Else
FeedCurrent = GetOemDRO(818) 'Get the current settings
XCurrent = GetDro(0)
YCurrent = GetDro(1)
ZCurrent = GetDro(2)

probedia = .1875
ProbeOffset = .375

fff = machmsg("Is the probe diameter " &Str(probedia) & "?", "Probe Diameter", 4)
If fff = 7 Then
    probedia = question("Enter Current Probe Diameter")
    machmsg("Updated probe diameter is: " &Str(probedia), "Probe Diameter", 0)
End If

BackOff = .05


Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F4" 'slow feed rate to 4 ipm 100mm


YNew = YCurrent - 2
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos2 = GetVar(2001)

Code "G0 Y" &YPos2 + BackOff
While IsMoving()
Wend

Code "G0 Z" &Zcurrent + ProbeOffset
While IsMoving()
Wend

Code "G0 X" &Xcurrent - .6
While IsMoving()
Wend

Code "G0 Y" &YPos2 - ProbeOffset
While IsMoving()
Wend


Code "G0 Z" &ZCurrent
While IsMoving()
Wend

XNew = XCurrent + 2 'probe 2 inches to right
Code "G31 X" &XNew
While IsMoving()
Wend
XPos2 = GetVar(2000)

Code "G0 Z" &ZCurrent + ProbeOffset
While IsMoving()
Wend
Code "G0 X" &XPos2 - probedia/2
While IsMoving()
Wend
Code "G0 Y" &YPos2 + probedia/2
While IsMoving()
Wend

Code "F" &FeedCurrent 'restore starting feed rate

DoOEMButton ( 1008 )

DoOEMButton ( 1009 )

End If
             






Sunday, November 20, 2016

Cherry tables

A couple of cherry side tables.

Finished tables

Specs:
Overall height: 28"
Top: 18" x 18"
Apron width: 14"
Apron height: 4"
Legs: 1.25" taper to .75"

The legs are mortised with 3/8" tenons and pinned with 1/4" dowels. 3/4" thick top, edged glued from 3 boards, hand planed and scraped flat. The bottom side of the top has 1/4" deep, by 2" long bevel, leaving a 1/2" thick edge. Finish is a seal coat of thinned shellac topped with  multiple coats of danish oil. The top surface was wet-sanded with 320 grit and oil to fill grain pores.

Some photos:

Pile of shavings from power and hand planing lumber
Many shavings


Clamped table bases



table bases showing dowels pinning mortises
Pinned mortises

Assembled bases and one table top


Attaching the table top
Attaching the top


















Saturday, March 23, 2013

Tripod head adapter


This is an adapter for a ball-head tripod for use with a spotting scope. A ball head works great for a camera, but not so great with a spotting scope -- it's tough to aim a scope when you loosen the ball and everything gets all floppy. This adapter adds a vertical plane tilt mechanism to the top of the ball head. Just lock the ball tight and use the tripod's pan (rotation) and this adapter for the vertical.This setup allows me to have both options -- a pan/tilt for the scope and a ball head for a camera, without carrying a bunch of gear. Plus, the pan mechanism that came with the tripod on the ball head is amazingly smooth, so I get to use that with both heads.

It has an Arca type dovetail quick-release plate on the bottom that attaches to the ball head on the tripod, and a clamp on top to attach to the scope.




The center pivot block is solid acetal plastic, or Delrin and the rest is aluminum. The acetal against aluminum provides a silky smooth motion.

Tilt adapter breakdown



















The clamp and plates are compatible with the tripod hardware. The springs fit into holes on either side of the screw and parallel to it to keep the clamp open when not tightened.

Arca type clamp


The plate on the left goes on the bottom and is relieved to fit a locking pin in the tripod head's clamp. The one on the right fits on the scope and attaches to the top.

arca type mounting plates



It works great. Smooth tilt, easy to use. I can pop the whole scope / adapter assembly off and use the ball head with a camera.

Tilt adapter with scope mounted


And here's the tripod with the scope and top assembly removed, and a camera on the ball head. It works very well and only takes a few seconds to switch.

Adapter removed, camera mounted


When I started I figured I could find some standard dimensions for Arca Swiss type dovetail quick-release clamp and plate. I didn't have much luck, so I'll share what I came up with. These are what I used, but I had to tweak the clamp side a bit to make it fit. They should be a good starting point, but use them at your own risk. I have no idea if the Promaster tripod they were based on is a standard size.

Arca type dovetail quick release plate dimensions
I used a couple of 3/32" drills to measure the dovetails (actually .094" dia)


Arca type dovetail quick release clamp dimensions
The clamp side dovetail needed to be cut more than shown here to fit the plate.