This is my first attempt at a contribution to this community, so please bear with me.
We were able to detect tool height by reading an Analog Devices accelerometer attached to the work piece, and looking for a spike in the frequency domain corresponding to the spindle speed. I think it was an ADXL320, and we read the signal through the microphone port on the computer.
This should be all you need to do some comp black magic to make it work. Disclaimer: I don't think this operates in the "realtime" domain, so low feed rates are recommended. Also, see here: http://linuxcnc.org/docview/html/hal_halmodule.html Any comments or feedback are welcome! David Stonely deserves all the credit for the code.
-Mikegg
Link to code: http://pastebin.com/vhnUkvvm