You can use Hall effect sensors to sense chainwheel teeth. Two sensors and you can get quadrature and direction. I've done that on a mobile robot. With analog-output Hall effect sensors and some processing, you can get sub-degree precision, although 0.05 degree is asking a lot.
We're trying to measure aerodynamic drag, thing is there are huge vertical forces (weight of rider pressing down on pedal) and relatively small horizontal forces (due to drag). So if we don't know the angle accurately, we can't separate out the components - make sense?
Gyroscope or mems accelerometer. Otherwise convert rotational crank movement to push-pull linear slider (see piston, flywheel, linear actuator, etc) and measure linear change in resistance between contact points (like a cheap caliper does, you can even use a chinesium one off eBay as they have a pin out under the battery tab, if your resulting linear motion is within that scale). You don’t need to drive anything besides the read head, so it should have extremely low losses.
Thanks for reply, and do you already work for us? :)
We've burnt through a pile of MEMS devices, currently working with CRM100 gyro's. As far as I've got is we definitely need a non-contact solution, either optical or MEMS with a once-per-rev index pulse (which obv. needs to be within the same 0.05 degree requirement).
I’ve been tackling my own issues with ideas that are sound on paper for physically small products where I run into mechanical or industrial limitations/difficulties which I’m not (or at least certainly didn’t start out) well-versed in rather than any electronics or programming issues. I hit a brick wall years ago (asked here on HN in the distant past but didn’t get anywhere) and actually never progressed past that.
I’m not sure what issues you ran into with the MEMS but my instinct (if I were forced to use them, as they are still rather nascent tech) would be to use multiple physically spread out on a plane and then clean up the signal in software. I’m not sure what price point or “genericness” you’re looking for, my assumption is that you need something that a customer can install or have installed on any bike and you don’t have the luxury of making your own bike parts because otherwise you could basically make it a stepper motor in reverse if you have access to the very axis rather than your device being off-center.
If you can mount something on the shaft itself (externally coupled at the end or by replacing it or other parts) your options become a lot more reliable as you’re in “tried and tested” territory.
Other options (warning: brain dump not thought through) would be an LVDT (see earlier piston suggestion) as they’re basically infinite life, contactless, and can give you micrometer accuracy; if you can somehow determine the distance between two points and have a sensor at a fixed position on each pedal so you can get the distance between them; coating the crank with a reflective substance and using IR sensors to get the distance at arbitrary angles (I’m pretty sure IR raw output can give you the accuracy you seek, though PIR definitely won’t); and a crazy idea based off a tilt switch of using a conductive liquid in a sealed non-conductive cylinder with two strips of differing conductivity on either (long) side, calculating the resistance with a high precision ADC could easily give you what you are looking for but I can’t find any off the shelf parts that do this (which is weird since it seems to be very obvious and is free of moving parts).
Good ideas though, we've come across the multiple MEMs approach (someone put I think 16 on a single PCB to get 4 times the resolution). The CRM100 [0] we're currently using is the best we've found so far for our application.
We're been using liquid-level inclinometers for calibration and lab testing, unfortunately they are too slow for use on the road.
LVDT's and similar would be great, however the engineering cost (at bicycle scale) puts them out of reach, which is the same for precision optics for IR solutions. Plenty of $1k+ encoders out there but way over budget for us!
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.
Brainstorm here - could you put a number of lower resolution encoders firmly on the same shaft? The theory would be they'll all pulse on slightly different but consistent phases.
Simple example, an encoder is capable of 60 degree resolution. I'll mount 5 of these which will all have some variation in phase, and I'd average out to having 12 degree resolution, with variation that could be modeled statistically.
Conceptually I would have a shaft with n different key slots, one per encoder. This would ensure there will be variation as opposed to having the phase be super similar, such as +/-1 degree in the above low resolution example.
Interesting, but I think we're run out of space. Sort of related, we've been considering how we can gut an optical mouse and use the sensor from them. The idea is broadly similar, basically learn the pattern around one revolution and work out where we are in it.
Real-time, in fact we're acquiring data at quite a high rate and boiling it down with a view to presenting the results to the rider a few times a second. You can see more at https://bodyrocket.cc if you're interested!