Hi Michael
Great to have an update I was wondering how you were getting on. So you’ve finally been able to bring Arduino, Android app and NuVinci hub together. I remember how exciting it was when I uploaded the first automatic shifting code and the first test ride. I’d been riding the bike for weeks before using the potentiometer to shift manually. Interesting to see photos off your setup and the smartphone app. The up and down buttons I assume are for increasing and decreasing cadence. I’ve yet to explore the world of app design. You're using this instead of a potentiometer like I have? Like the old bike with all the electronics, its the way I like to do things as well.
I like the challenge of making things reliable, its often more difficult than making something that works but doesn't last. I want it to be as reliable as a manual cable shifter. I need two Arduinos due to the number of timers and they are connected in parallel so thought redundancy would be a nice feature but have yet to write the code.
My goal is constant cadence in that I want it to as closely as possible maintain the cadence that I ask it to. Obviously the ideal cadence depends on power output. For me automatic adjustment of cadence depending on power is a challenge for the future as it is the ultimate automatic shifter. I find that on longer distance rides maintaining a fairly constant power output is a nice, efficient way to ride but it relies on the cadence being maintained with high accuracy. I think I’ve maybe become ultra sensitive to cadence due to years of CVT riding, ±5 rpm makes me feel like I’m in the wrong ratio.
I’ve now learnt that the different modes I created were really just compensating for it not being able to maintain a cadence with sufficient accuracy. The hilly road one for example helped it to down shift as the bike slowed on hills. I could now in theory have the quick shifting of city mode and sufficient down shifting on steep hills because the cadence correction would keep it right.
Monitoring the servo was something I had considered as well, comparing the set position to the actual position but never went any further with it. I was concerned about over stressing the servo and reducing its life. When it comes to forcing the hub to shift and doing damage I’m not aware of any evidence this happens. However it is worth considering such things and will be interesting to hear about your results from monitoring the servo. Its obviously true that a hub will only shift through half of it’s range when the wheel is stationary. I did have a hub that would stick when down shifting even when the bike was still moving, up shifting a bit would unstick it.
What I find with the auto shifting is the however hard I brake the servo still has enough time to shift the hub more than half way. Once its done that if the bike has stopped it can still complete the shift into full underdrive. That works because the servo position is mostly determined by the speed. There’s only one situation I’m aware of when the servo has been unable to shift to were it’s been told to. That was when the reed switch code would give a high value due to the magnet stopping next to the switch. A modification to the code has removed this problem.
The times when the servo is under most stress and likely to lag is when the hub is under a lot of torque and shifting is required. Most noticeably during the initial part of hard acceleration from a stop and during a change of speed when climbing a steep hill slowly. I chose a high torque (20kg/ cm) servo because I wanted it to keep up during acceleration. So far after 2500 miles I’m not aware of any damage to the hub due to this. Damage I am aware of and I’ve done it to another hub as well years ago is a slight roughness in underdrive. I think its due to too high a torque when the hub is stationary and the resulting slippage. I have a habit of starting acceleration with the front wheel almost off the ground.
Nice to hear you’re starting to enjoy the benefits of automatic shifting. I think riding around town with traffic lights and junctions is when auto shifting is most useful. Although I enjoy mine most riding in the country side on quiet roads and not too hilly.
Great to have an update I was wondering how you were getting on. So you’ve finally been able to bring Arduino, Android app and NuVinci hub together. I remember how exciting it was when I uploaded the first automatic shifting code and the first test ride. I’d been riding the bike for weeks before using the potentiometer to shift manually. Interesting to see photos off your setup and the smartphone app. The up and down buttons I assume are for increasing and decreasing cadence. I’ve yet to explore the world of app design. You're using this instead of a potentiometer like I have? Like the old bike with all the electronics, its the way I like to do things as well.
I like the challenge of making things reliable, its often more difficult than making something that works but doesn't last. I want it to be as reliable as a manual cable shifter. I need two Arduinos due to the number of timers and they are connected in parallel so thought redundancy would be a nice feature but have yet to write the code.
My goal is constant cadence in that I want it to as closely as possible maintain the cadence that I ask it to. Obviously the ideal cadence depends on power output. For me automatic adjustment of cadence depending on power is a challenge for the future as it is the ultimate automatic shifter. I find that on longer distance rides maintaining a fairly constant power output is a nice, efficient way to ride but it relies on the cadence being maintained with high accuracy. I think I’ve maybe become ultra sensitive to cadence due to years of CVT riding, ±5 rpm makes me feel like I’m in the wrong ratio.
I’ve now learnt that the different modes I created were really just compensating for it not being able to maintain a cadence with sufficient accuracy. The hilly road one for example helped it to down shift as the bike slowed on hills. I could now in theory have the quick shifting of city mode and sufficient down shifting on steep hills because the cadence correction would keep it right.
Monitoring the servo was something I had considered as well, comparing the set position to the actual position but never went any further with it. I was concerned about over stressing the servo and reducing its life. When it comes to forcing the hub to shift and doing damage I’m not aware of any evidence this happens. However it is worth considering such things and will be interesting to hear about your results from monitoring the servo. Its obviously true that a hub will only shift through half of it’s range when the wheel is stationary. I did have a hub that would stick when down shifting even when the bike was still moving, up shifting a bit would unstick it.
What I find with the auto shifting is the however hard I brake the servo still has enough time to shift the hub more than half way. Once its done that if the bike has stopped it can still complete the shift into full underdrive. That works because the servo position is mostly determined by the speed. There’s only one situation I’m aware of when the servo has been unable to shift to were it’s been told to. That was when the reed switch code would give a high value due to the magnet stopping next to the switch. A modification to the code has removed this problem.
The times when the servo is under most stress and likely to lag is when the hub is under a lot of torque and shifting is required. Most noticeably during the initial part of hard acceleration from a stop and during a change of speed when climbing a steep hill slowly. I chose a high torque (20kg/ cm) servo because I wanted it to keep up during acceleration. So far after 2500 miles I’m not aware of any damage to the hub due to this. Damage I am aware of and I’ve done it to another hub as well years ago is a slight roughness in underdrive. I think its due to too high a torque when the hub is stationary and the resulting slippage. I have a habit of starting acceleration with the front wheel almost off the ground.
Nice to hear you’re starting to enjoy the benefits of automatic shifting. I think riding around town with traffic lights and junctions is when auto shifting is most useful. Although I enjoy mine most riding in the country side on quiet roads and not too hilly.
- Oran