would love to see someone build their own optical sensors, but its a non-trivial job, and a bit of a waste of time considering the resolution you actually need. I work with 20k cpr sensors that cost me around 120gdp, that's hard to beat time wise. Im guessing 1k cpr would be more then enough for your application. There are 14-15 effective bit magnetic sensors out there for around the 3-4 gbp mark.