WARNING: THIS THING IS OUTDATED.
Please visit http://www.thingiverse.com/thing:704897 for updated version.
I've modified flipper's great filament width sensor design to use an Arduino board, which is considerably more familiar to most makers.
This sensor board have equivalent sub-pixel accuracy which came from the flipper's design. It dismisses the calibration button, however it allows serial communication via USB (Atmega32u4) that permits in-situ calibration and monitoring of the reading values. Also, this approach enables easy firmware update even after installation.
With very limited soldering equipment (no reflow oven), I decide to use ready-made Arduino Pro Micro (https://www.sparkfun.com/products/12640) board from Sparkfun electornics. (As an alternative sourcing place, a cheap ebay one only costs <7$)
I designed the board to be CNC-familiar; it needs few (maybe two for GND and one for AO) jumpers when you make an one-sided board with home CNC milling machine.
I modified the case to fit 1.75mm filament instead of 3mm. (If you wanna get it back, you may simply remove several cylinders from OpenSCAD source.) Also, 2mm rod is used for calibration instead of 1.57mm which is rare in metric world.
This part is still work-in-progress, so I'm not able to provide very instructive guide to build this, but I think the source codes and pictures are self-explanatory.
1 x Arduino Pro Micro board
1 x PCB (can be CNC-milled)
1 x TSL1401 Line scan sensor
2 x 1K resister (SMD 2012 size)
1 x 10nF ceramic capacitor (SMD 2012 size)
1 x 0.1uF ceramic capacitor (SMD 2012 size)
1 x 1x5 right angled pin header
1 x High-brightness blue LED (5mm radius)
- electric wires, pin header sockets, solder, ...