Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
#1
I'm wanting to install an N380 on a road bike. The issue is the standard NuVinci shifter doesn't fit curved handlebars. I could find a different shifter and modify it or make a shifter but I liked the idea of experimenting with an electronic shifter. I'm wanting to learn about Arduino's and programming, so thought I would base it around one. This would also give interesting possibilities of automating the shifting.

To start with I want to get it working as a manual shifter using a potentiometer as the handlebar control. Then I will move on to the challenge of changing the potentiometer from a ratio selector to setting the desired cadence.

[Image: WP_20160405_010_zpsczujbjmg.jpg]
Very quickly put together a circuit and uploaded a basic servo control program to the Arduino, works great. The pulsed DC to voltage convertor circuits I'm hoping to use can be seen in the photo.

[Image: WP_20160409_008_zpsgr9sq263.jpg]
Next was making the mechanics so that the 180° of rotation of the servo is converted into 95mm of pull needed for the shift interface. The cable drum had to be made out of individual pieces as I have no way of turning it. This meant I could cut a cable anchor into the drum (see photo). This enables me to use second hand cable which has broken off in a shifter instead of buying two new cables.

[Image: WP_20160410_015_zpsx0lhae48.jpg]
This is how far I got with it today the servo can now control the shift interface. A couple of potentiometers just arrived in the post. One of them I'm interested in experimenting with is logarithmic. I'll set it up so that the shifter moves quickest in low ratios and slow near overdrive. This will better match the shift rate to acceleration and give better fine tuning when cruising at higher speeds. That's the theory but we'll see if its usable in practice. I expect there's a way of programming the Arduino to mimic this and in a more customizable way.

A few ideas I've got for automating the shifter. I will always want to keep the option of manual so will have a switch to select between manual and auto.
I'm currently planning to use reed switch sensors from a cycle computer and input into the Arduino as a voltage. For this I have two pulsed DC to voltage converter circuits that I made for a college project a while ago.

What I need to experiment with to find out which is best is whether to monitor wheel or crank rpm or both. I like the idea of monitoring cadence but I think it could result in a lot of unnecessary shifting. To reduce this might result in an annoying lag in shifting when accelerating. Wheel rpm would be more stable but I would need to program the Arduino so that it knows what servo position for any given speed.

Lots to think about but first I want to temporary attach it to a bike in it's current state to see how I feel about it. Then I can work on waterproofing everything.
- Oran
Répondre
#2
Yesterday evening I managed to shift a NuVinci hub electronically whilst riding the bicycle. I very quickly taped and cable tied everything to the road bike and wired it all up.
[Image: WP_20160411_008_zpsfaeexlbb.jpg]

Although I was able to shift the lack of feedback and inability of the servo to shift under load meant the ratio I got was random and hard to control. However I've located the problem to excessive shift resistance on the N360 I'm using. Its a second hand one off ebay that had a destroyed freewheel and happens to have a road bike size rim. The next thing to do is move everything onto the other bike and try with the N380 as it has a much lower shift resistance. The servo is rated ultra high torque, 7.7kg.cm at 4.8Volt so I'm hopeful it will be capable. If it can at least shift a little between pedal strokes it will be fine.
- Oran
Répondre
#3
Had much more success with this setup over the past week. Shifts most of the time and I think a bigger 12V - 5V power supply will help.
[Image: WP_20160413_001_zpsav3z7zx2.jpg]
I've got everything ordered for finishing the mechanics such as switch's, waterproof box, brake lever I can fit the potentiometer into. Then once I have rebuilt the two wheels to swap the hubs I can start putting everything together on the road bike.
- Oran
Répondre
#4
Wow! You did go into a lot more efforts than I did for the electronic shift interface!!!

I simply used an RC sailboat servo that is SLOOOOOOOOW and geared down to a super torque ratio... Also, it is "endless"... meaning there is no stopping pin inside.
I ripped all the feedback circuitry from the inside and plugged the small motor directly to the 3 pos. switch in the handlebars.
The setup is powered by a single 1350mAh LiPo cell salvaged from a dead pack. It lasts for more than 500km before becoming a little to weak to shift well.
I will probably change the cell this year as I think I had it over-drained and it seems dead.
Fully charged, it will easily shift under "regular" load but I need to ease a bit on the pedals in super steep climbs.

Here are some pictures Smile.. The pulley came with the servo, I simply had to drill 2 small holes for the cables to go through...

[Image: crossrip_019_large.jpg] [Image: crossrip_008.jpg]
[Image: crossrip_009.jpg] [Image: crossrip_010.jpg]
-
Si ça a déjà été fait, je peux le faire
Si ça n'a jamais été fait, donnez-moi juste le temps de trouver comment !


Répondre
#5
BTW, I used a USB cable (it was dead, bad connector) to make the connection between the switch and the servo.
I cut it to length and stripped the ends to weld it directly in place... It is black like my brake lines and it looks good! Smile
-
Si ça a déjà été fait, je peux le faire
Si ça n'a jamais été fait, donnez-moi juste le temps de trouver comment !


Répondre
#6
Glad you shared more about your shifter setup I was interested in how you had done it. I really like the simplicity of your system, probably win in terms of reliability. Definitely has a big advantage in terms of energy efficiency and battery life only switching the servo motor on when needed. If I hadn't been wanting to learn about Arduino programming and didn't want the challenge of automation I would have done something like yours. Couldn't resist the temptation of exploring some of the possibilities opened up by removing the mechanical link between hub and shifter.

Have been working recently on getting the system into a more permanent and waterproof state.
The handlebar shifter is finished complete with real N360 planet.

[Image: WP_20160425_011_zpsafb7tk2h.jpg]

The 11.1V 3.2Ah lipo battery, 5V power supply and Arduino are all wired and taped together so they fit in the saddle bag. I'm using a telephone extension as the link between Arduino and handlebars.

[Image: WP_20160425_007_zpsb1xihe5m.jpg]

The servo is now in a waterproof box. I was a bit undecided about where to mount it on the bicycle. I wanted to minimize the cable length and mount it close to the shift interface. It would have needed a metal frame to support it and its liable to get knocked in that location. Also would have created issues with wheel removal if it wasn't above the shift interface. So I chose the top of the seat stays instead. The length of the cables is slowing down the servo so I need to get better quality or upgrade the servo.

[Image: WP_20160426_001_zpsajgypjys.jpg]

The upgraded 5V power supply is only powering the servo at the moment. The Arduino is using its onboard regulator so is wired direct to the 11.1V lipo. This seems to have improved the signal getting to the servo as its spending much less time micro adjusting it's position.

The next stage is to install the reed switches and probably the pulsed DC to voltage circuits. Then the Arduino programming can begin.
- Oran
Répondre
#7
Nice (and complicated) setup!
Did you know Arduinos has many servo control libraries all pre-coded and ready to use?

Envoyé depuis l'application mobile Tapatalk.
-
Si ça a déjà été fait, je peux le faire
Si ça n'a jamais été fait, donnez-moi juste le temps de trouver comment !


Répondre
#8
(04-28-2016, 06:44 PM)Normand_Nadon a écrit : Nice (and complicated) setup!
Did you know Arduinos has many servo control libraries all pre-coded and ready to use?

Envoyé depuis l'application mobile Tapatalk.

I'm currently using the most basic servo control using a pot code from the Arduino library. I haven't explored the libraries in depth yet. Other ways to control the servo will be useful when it comes to asking the Arduino to respond based on input from the reed switch.
- Oran
Répondre
#9
In fact, I think that you always use the same library(ies), it is just how you interact with its parameter that will affect the functionalities... In short, your main program controls the whole thing (inputs and outputs) and tells the servo what to do with the help of the preprogrammed library (wich is just a prebuilt sub-program)

Envoyé depuis l'application mobile Tapatalk.
-
Si ça a déjà été fait, je peux le faire
Si ça n'a jamais été fait, donnez-moi juste le temps de trouver comment !


Répondre
#10
That petty much sums up my understanding of how the library works.

Quick update on progress. Recently I have just been enjoying riding the bike in manual mode, giving it a good test before I move on. I upgraded the servo to one with 20kg per cm of torque. It was almost able to shift under load so when accelerating I could spin the pot to overdrive and control the shifting by the load on the pedals. Like a little taste of what auto mode will be like hopefully. Also now replaced the shift cables so its now able to shift most of the time even under load. Only gets stuck sometimes for some reason shifting the last third towards overdrive.

Have been trying to get the pulsed dc to voltage converter circuits to work without much success. A solder bridge I missed damaged one of the chips and then had no success getting a voltage out of the other circuit. To be honest I think the circuits would have been an extra complication and a source of trouble. I'm starting to put together a plan for getting the Arduino to time between pulse's and generate a useful number. There's code for a bicycle computer available I can modify.

I'm currently in the process of learning the different aspects of Arduino code and how it works. Once I know enough I'll have the confidence to try and write something.
- Oran
Répondre


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)