Wireless CNC Touch Probe
Introduction: Wireless CNC Touch Probe
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.
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
SHOW LESS
Supplies
Tormach Passive probe
Parts as shown in schematic which includes both transmitter and receiver circuit boards.
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.
Step 1: Probe IR Transmitter
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).
Setup your Arduino environment for ATTiny using one of many online guides. 267
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.
Step 2: Probe IR Receiver
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. 991