Wireless CNC Touch Probe

by wolfend in Workshop > CNC

6354 Views, 34 Favorites, 0 Comments

Wireless CNC Touch Probe

PXL_20210913_173342678.jpg
PXL_20210913_170106691.jpg

Wireless conversion of Tormach passive touch probe using ATtiny85 generated Infrared beams

After being a user of the Tormach passive touch probe for several months on my PCNC 440 mill, I became used to its cable and found it no big deal- until I was recently able to outfit the mill with an Automatic Tool Changer. At that point I wanted to store the probe in the ATC where it could be automatically loaded and unloaded for use in probing cycles during CNC operations. That won't work with a cable. There is a commercially available kit for conversion of the Tormach passive probe to wireless operation that I considered which seemed to be very robust and full featured but it was a bit of overkill for my needs so I decided to do a basic DIY version.

Video demo/build overview:

https://youtu.be/wkzOw1YkcPI

I chose an IR link rather than RF to simplify the implementation of a reliable short range connection. The design uses a 38KHz IR transmitter with the signal sourced by an Arduino compatible attiny85 pulsing high power IR LEDs using a transistor driver. The IR is received by a 38KHz IR receiver chip which uses a transistor to drive a reed relay operating in the Normally Closed mode used by Tormach passive probes. The NC relay contacts connect to the accessory input port of the mill.

The IR transmitter and receiver circuits are each powered by their own Lipo battery and associated USB Lipo charger module. The receiver circuit needs 5V, so its power circuit also includes a 5V boost regulator. The probe circuit has low standby power (.09ma) and wakes-up only on probe opening which should give very long probe battery life between recharges from 600maH Lipo probe battery. The IR Receiver standby of about .4ma should similarly provide long life between charges from 2500maH 18650 cell.

UPDATE Oct 2022: Printed Circuit Boards for this project are now available from OSH Park. See details below.

SHOW LESS



The schematics and 3D model (including Fusion 360 and STL format files) are found here:

https://grabcad.com/library/wireless-tormach-cnc-touch-probe-1

The ATtiny85 code for this project is found here:

https://github.com/wolfend/WirelessIRProbe

The printed circuit board for the IR receiver is available here:

https://oshpark.com/shared_projects/sfqdNvrl

The printed circuit board for the IR transmitter is available here:

https://oshpark.com/shared_projects/44DuKtXZ

SHOW LESS

Supplies

schematic.png

Tormach Passive probe

Parts as shown in schematic which includes both transmitter and receiver circuit boards.

Printed Circuit Boards for Xmtr and Rcvr via links above (optional)

Lipo batteries for Xmtr and Rcvr as shown in individual steps

Lipo battery USB charger/manager modules for Xmtr and Rcvr (TP4056)

3D printed case

ATtiny85 programming environment (Arduino IDE + programmer)

5-pin DIN male connector/cable to plug into mill accessory port- you could use the length of cable that you cut off the probe, but likely are better off waiting to cut the probe cable until testing is done. I purchased a MIDI cable from Amazon that has the same connector on each end and cut it in half.

Downloads

Probe IR Transmitter

PXL_20210909_150916260.jpg
PXL_20221018_010538969.jpg
PXL_20210911_000852800.jpg
PXL_20210913_142548937.jpg
PXL_20210913_142909827.jpg
PXL_20210913_181101884.jpg
PXL_20210913_154132057.jpg
programmer.png
fuses.png

Build ATtiny85 circuit board as shown in schematic. Recommend using header pins for both LED and probe connections (not just LED connections like my prototype).

UPDATE Oct 2022: Printed Circuit Boards for the transmitter and receiver are available from OSH Park via the links above. You will have to purchase 3 copies of each, but at current prices the total is still less than $10.

Setup your Arduino environment for ATTiny using one of many online guides. Use the SpenceKonde ATTiny core to do this as described in the guides. Program ATtiny85 using code from Github using your favorite method. You can use an Arduino to do this but I use one of the sparkfun PGM-11801 USB programming boards as shown in the photo. Prior to programming the chip the first time, the fuses for the ATtiny should be configured as shown in the screenshot of the menu drop down from the Arduino IDE by selecting "burn bootloader" from the menu. Plug the programmed ATtiny into socket on board. Verify the board works as expected and recommend measuring the 38KHz nominal output that it produces using a frequency counter or oscilloscope to verify that the frequency is within one kHz or so from the nominal 38KHz.

3D print case and lid. I used 3mm layers with supports under the portions where the screws thread into. Use hot glue to install IR LEDs.

Wire the ATtiny board, the Lipo battery, and battery charger board as in the xmtr power schematic and install in case. Use hot glue to secure components as necessary. Be sure to use a connection between battery and rest of circuit that can be disconnected easily during maintenance. Wire the LEDs to their connector on the circuit board. They share a common Vcc and have individual current limiting resistors.

Probe IR Receiver

PXL_20210916_140205163.jpg
PXL_20221018_010559570.jpg
PXL_20210916_141707801.jpg
PXL_20210916_155140623.jpg

Build receiver circuit board per schematic. This board is connected to the receiver battery box using a cable made from a length of CAT5 cable. The board and connection to the cable is sheathed in transparent heat shrink tubing, not including the IR receiver chip. The leads of that chip were sealed with clear silicone. The entire assembly was affixed to the top of the inside of the mill enclosure, roughly facing the spindle, using zip ties.

Receiver Battery Box and Cables

PXL_20210916_140906659.jpg
PXL_20210916_141940721.jpg
PXL_20210915_143206464.jpg
PXL_20210913_164413105.jpg

Wire receiver battery box per schematic and install in box. I used a 3D printed 18650 battery holder from Thingiverse. The +5V output of the battery box feeds the receiver circuit board via its cable. The 5-pin DIN cable for the mill accessory input port is connected to the wires in the cable coming from the relay contacts on the receiver board.

Downloads