Good to get your attention :) but still got to print the gray code to 1 part in 8192 and fit it all on a bike.
Along the lines of your idea, we've looked at using the CCD array out of desktop scanners with a spiral pattern printed on the crank. But bike bottom brackets are a hostile environment, plus (ideally) we'd actually be measuring the angle against local vertical (i.e. the direction in which gravity sucks).
Our test bike currently runs 4 Pi zeros, 4 Cortex M0s (nRF52), a fistful of 24-bit ADCS, 2 high precision gyros, air pressure/air speed sensors and a 2.4GHz network, all in order to measure realtime CdA. Still unable to crack the angle problem though.
Indeed, manufacturing is hardly a problem in the software world. =)
Maybe get it laser engraved into aluminium and mount it... somewhere? Grey code is essentially a more robust spiral pattern, so that's the same idea.
What if you put a roll sensor on the chain instead and infer crank angle from that? Chain slip is rare enough not to worry about it, right? You'd also have more space and could use off the shelf components.
I don't think measuring against gravity will be precise enough to be one in 7200 parts. So you'd need a second sensor for that in any case (and likely already have, don't you?).
Nice idea on the laser engraving, maybe we could use that inside the bottom bracket - thanks.
We have considered the chain, trouble is both chains and chainrings wear and often cranks/rings aren't terribly-well centred (as fixed gear bike riders know, from variations in chain slack).
For the gravity part we've tested a range of accelerometers; vibration is quite an issue though.