Re: Sensor to read the size of a laser shadow?
That looks like what I need. This is my first electronics/Arduino project so there is plenty to learn. I'm thinking the strategy is to read values from each pixel. If it is bright/saturated, go to the next. If it is darker, start counting, and stop counting when another bright pixel is encountered. I'll need some calibration step where it can present a # of dark pixels and have the user enter a known measurement that they relate to. Then it would take that relationship between pixels and mm to output a measurement.
I'm thinking of adding a second laser/sensor combo at 90 degrees to compensate for any movement of the filament in relation to the lasers. If the filament moves up or down in relation to the laser, the diameter would appear to change. A change in diameter would cause the first and last dark pixels would move in opposite directions (scaling). If the filament moves, the first and last dark pixels would move in the same direction (translating).
If the bottom sensor shows the shadow scaling but the sideways sensor shows its shadow translating, then the bottom sensor reading can disregarded. Likewise the bottom sensor can detect sideways translation and disregard the sideways measurement.