@Mr Mayhem, dynamic height sensing? Would be an incredible solution for hobby level CNC machines (Shapeoko, Carvey, OXO...........) anything you can share? Perhaps start a new thread?
That's my goal anyway. I have the electronics done pretty much, and posted Teensy/Processing stuff related to the linear photodiode array sensor. What's needed next is a way to apply this in a sensor head that goes on the cnc machine. I am looking at triangulation vs a cantilever probe tip kind of thing, vs a edge finder kind of thing. After deciding on a sensor head design, I can do the pcb, etc.
Here's my github:
https://github.com/Mr-Mayhem?tab=repositories
I have a thread going in this forum on this linear array focused stuff, but have not drifted into the actual cad model of a workable use of the electronics yet.
https://forum.pjrc.com/threads/3937...Read-TSL1410R-Optical-Sensor-using-Teensy-3-x
Essentially the idea is use the precision of the photodiode array as a way to quickly measure points as the workpiece is scanned. A shadow falling on the sensor is one way, and I have this delivering position data at accuracies below one micron on Teensy at 800 sensor frames per second (each frame containing all the pixels, (usually 256 pixels) at around 8.5 megabits per second via USB serial. The way it would work is some artifact touches the workpiece and conveys it's motion to a moving shadow on the sensor.
One could also add a lens and have the array watch for a laser line on the workpiece rather than looking for shadows cast from an artifact. We could do this many ways, including not necessarily shining right into the camera, but just seeing the laser line on the workpiece from some other angle. I will be exploring this option as well, making some laser scanners that use the sub pixel math like my shadow sensor does, but rehashed for a bright spot on the line of pixels, rather than a shadow.
Looking at linear array sensor pixels from left to right, a shadow signal goes from the nominal illuminated level down steeply, across low and back up steeply. A bright spot (from a laser line image) goes up to a peak and back down, and is shaped more like a positive Gaussian bell curve.
Some atomic microscopes use a laser bouncing off a tiny mirror or on a cantilever, like a phonograph needle riding a vinyl record, it touches the workpiece as it is scanned. I could scale that up for a cnc kind of dial indicator probe, and have the laser reflect from the cantilever mirror into the sensor through a dark filter, etc.
Back on the speed topic, I could probably go faster say with SPI from one Teensy to another if that's doable, or maybe even running on the same Teensy board if there is enough processing power remaining after the controller is done taking it's share, so to speak. Even if I had only 100 measurements per second, that would be likely alot faster than a probing mechanically. Plus you kinda want to go slow anyway for sake of the machine's own accuracy shifting around, and other factors.
I know also the sensor will go past 30,000 frames per second in an ideal circuit with a fast ADC. They rate it at a pixel clock rate of 8 million pixel clocks per second. Divide 8 million by 256 pixels and that's 31,250 complete all pixel frames per second. It would have to have dedicated logic like a CPLD or FPGA and a fast ADC and careful pcb design, but it's doable if needed. The issue becomes everything else has to speed up also to make use of it.
I will be happy if I can simply scan a point cloud, using a mow-the-lawn pattern of cnc movements, and get 10 to 50 microns of repeatable precision.
I will post more when I get a more complete prototype built up.
The connection to this thread is the more Teensy cpu available after the motion controller takes its share, the more likely I could run this sensor on the same board, rather than a separate one hooked up with SPI, etc. I figure it will always be a compromise between the motion controller's top pulse rate and my sensor's top frame rate. The sensor can slow down quite a bit and still be useful, however, at least compared to a touch probe way of measuring heights to a workpiece.