2016-10-27, 17:45
I've now got the Arduino to log cadence as well as speed. I had to modify the cycle computer code so that it also works with timer 2. This means increasing the interrupt to 10kHz instead of 1kHz as the timer is 8bit instead of 16bit and can only count up to 256 not 65536.
Here's an example of some cadence and speed data.
![[Image: Auto%20shifter%20cadence%20speed%20graph...7ktvdo.jpg]](http://i1301.photobucket.com/albums/ag114/Ed_N_R/Mobile%20Uploads/Auto%20shifter%20cadence%20speed%20graph_zpswm7ktvdo.jpg)
I was out on a ride and found a good cadence so decided to stop adjusting the potentiometer and removed the planet from it. I continued for 30 miles and the following graph is the resulting summery of the cadence values. I know its good at maintaining a steady cadence but this graph proves it.
![[Image: Cadence%20speed%20frequency%20graph%2023...rynkum.jpg]](http://i1301.photobucket.com/albums/ag114/Ed_N_R/Mobile%20Uploads/Cadence%20speed%20frequency%20graph%2023_10_2016_zpsbwrynkum.jpg)
Since then I have left the potentiometer untouched and have commuted to work a number of times. I find my cadence is sometimes too high or too low but its no more than the difference between gears on a derailleur bike. The simplicity of not worrying about the pot position is rather nice, like riding a single speed.
I should now be very easy to find the relationship between potentiometer position and the resulting average cadence. With this information I can assign a value to a button or switch position and know what cadence I will get. Just need to put the planet back on the pot and keep logging data until I find my favourite cadence values.
Here's an example of some cadence and speed data.
![[Image: Auto%20shifter%20cadence%20speed%20graph...7ktvdo.jpg]](http://i1301.photobucket.com/albums/ag114/Ed_N_R/Mobile%20Uploads/Auto%20shifter%20cadence%20speed%20graph_zpswm7ktvdo.jpg)
I was out on a ride and found a good cadence so decided to stop adjusting the potentiometer and removed the planet from it. I continued for 30 miles and the following graph is the resulting summery of the cadence values. I know its good at maintaining a steady cadence but this graph proves it.
![[Image: Cadence%20speed%20frequency%20graph%2023...rynkum.jpg]](http://i1301.photobucket.com/albums/ag114/Ed_N_R/Mobile%20Uploads/Cadence%20speed%20frequency%20graph%2023_10_2016_zpsbwrynkum.jpg)
Since then I have left the potentiometer untouched and have commuted to work a number of times. I find my cadence is sometimes too high or too low but its no more than the difference between gears on a derailleur bike. The simplicity of not worrying about the pot position is rather nice, like riding a single speed.
I should now be very easy to find the relationship between potentiometer position and the resulting average cadence. With this information I can assign a value to a button or switch position and know what cadence I will get. Just need to put the planet back on the pot and keep logging data until I find my favourite cadence values.
- Oran