Forum
Idea for better shifting - Printable Version

+- Forum (https://copynotes.be/shift4me/forum)
+-- Forum: Discussion (https://copynotes.be/shift4me/forum/forum-6.html)
+--- Forum: Feature Requests (https://copynotes.be/shift4me/forum/forum-8.html)
+--- Thread: Idea for better shifting (/thread-22.html)



Idea for better shifting - Ed_R - 09-08-2020

A fellow auto shifter enthusiast here. Been having a nosy at your code, very impressed. I can tell it’s been developed over some time and had considerable thought put into it.
I'm too addicted to my enviolo (NuVinci) hubs to want to build one and don't really like derailleur gears. Therefore the following is just a suggestion and not able to test it myself.

I noticed in the code and could hear in the video that the servo only moves to the next gear position. Mechanical shift levers have a tendency to move the derailleur past the next sprocket and then drop back to the next position. Think its only when shifting to an easier gear but it helps with quicker shifting.

My suggestion is that this could be programmed in so that the servo does to same thing. Slightly over shift and then drop back, not sure for how long or by how much. Something to test if you want or perhaps the shifting is fine and this isn’t needed.


Also just remembered something else that has almost made me build a derailleur auto shifter just to test it and that is.

Time the shifts to happen at the dead spot of the pedal stroke.
As far a I know this isn’t implemented on any electronic shifting due to the need for a cadence sensor. However you have a reed switch for cadence measurement so the position and timing of the crank is known.
Would love to know if it could remove the need to ease off the power when shifting.


RE: Idea for better shifting - visitor007 - 09-08-2020

The over-shift-then-return thing is already in the code, see the CorrectAmount parameter


RE: Idea for better shifting - Ed_R - 09-08-2020

Now that you point it out its obvious, I'd completely missed it. The code is impressively complex and not easy to trace every variable in the Arduino IDE. Now rewatching the video I realise the noise of servo isn't changing just due to the change in resistance as the chain moves between sprockets as I originally thought.


RE: Idea for better shifting - Jan Oelbrandt - 09-09-2020

(09-08-2020, 03:54 PM)Ed_R Wrote: I'm too addicted to my enviolo (NuVinci) hubs to want to build one and don't really like derailleur gears.
Quote:The Nuvinci CVT hubs are great. With modified 3D prints of the BigBox and the servo horn, the Shift4Me would work with them too. This is needed to house the two-cable setup of the Nuvinci.


Slightly over shift and then drop back, not sure for how long or by how much. 
Quote:As Visitor007 pointed out correctly, it is already there. The CorrectAmount parameter does an over-shift of a pre-set amount PWM when moving to a larger derailleur sprocket, and this amount divided by 4 when moving to a smaller sprocket. This turned out to be great working for 9-speed derailleurs, PWM correction of 100. You can see that in action in this close-up video. It could be (haven't tried it) that this amount has to decreased for cassettes with more gears (typically 11-speed these days) and increased for older cassettes like 5- or 6-gears. In the Hubgear version of the code, you'll see it is only set to 4 (almost nothing).

Time the shifts to happen at the dead spot of the pedal stroke. <...>
Would love to know if it could remove the need to ease off the power when shifting.
Quote:That's a great idea. However: from what I suspect, the servo like the recommended ones wouldn't be fast enough to do so. For example: if you're doing 60 rpm, and let's sat the dead spot is 36 degrees (pedal round 12 o'clock), that makes for 0,1 second time for the servo to pull the cable and the chain to slide onto the next sprocket. Not enough, I'm guessing.
On hubgears it could work...
But what I would do to try it out, is to install two (at a different angle positioned) reed sensors, so the measurement of the cadence is more precise. That way, one could very accurately define the time where the dead spot occurs, so that shifting can be done at that exact moment. The installation of 2 sensors is something I considered during developement, but I decided against because with 1, cadence sensing is good enough and setup is a lot easier (for example, there's only one bar of a bike frame that's near the left pedal to install a sensor. So you'd need a bracket of some kind to install a second sensor)



RE: Idea for better shifting - Ed_R - 09-09-2020

Your code looks great for gears but unfortunately no way to enter infinity for GearAmount. To get the best out of enviolo hubs requires a totally different code, I’ve spent the past 4 years developing it. It’s on my Arduino project hub page if you’re interested https://create.arduino.cc/projecthub/erose


As for timing the shift at the dead spots of the pedal stroke, I’m a little concerned its going to be difficult to get the shift to happen at a precise time. Sprockets have ramps on them to initiate a shift when the teeth are correctly aligned for easy meshing. Will depend on how many ramps there are and the rpm as to what the time variation is.
I wouldn’t bother with a second reed switch or worry about the speed of the servo. The shift doesn’t need to happen on the first dead spot it could be the second or even third assuming cadence isn’t changing rapidly. Getting the optimum timing could be a little tricky, sort of situation you need a high speed camera.

I added this timed shifting into my code purely for energy saving. The hub shifts under load without issue but has more resistance. I never really worked out what the best timing values were and realistically I don’t think it makes a lot of difference to battery life. At one point I had my homemade power meter outputting pedal torque as often as it would suffer. This was picked up by the auto shifter and put along side servo position. The results weren’t very conclusive.


RE: Idea for better shifting - Jan Oelbrandt - 10-03-2020

(09-09-2020, 08:45 PM)Ed_R Wrote: Your code looks great for gears but unfortunately no way to enter infinity for GearAmount.
All you would have to do to work with a CVT is to change the lines like
<code> pos = LoadSprocketWidth("GetGear",ActiveGear);
into
<code> pos = pos + x;
(x being a preset amount to be added or reduced to get a noticable "gear" change)
And of course a limit to not go below or above servo limits

(09-09-2020, 08:45 PM)Ed_R Wrote: As for timing the shift at the dead spots of the pedal stroke, I’m a little concerned its going to be difficult to get the shift to happen at a precise time.
I've been observing shift times while riding. I came to an aprox of 90 degrees to early to shift at the dead spot.
So I've added a calculation to delay the shifting.
I'll be riding with my new code next week, I'll post here how it turnes out.


RE: Idea for better shifting - Ed_R - 10-05-2020

Must get hold of my 2 bikes, will hopefully in November. If I do I'll give you code a little try.

Great to here you are experimenting with the code timing. Interested to hear how you get on.