Thanks. That promises to be a unique riding experience. Great ergodynamics.
Is there a way to electrically control shifting? Perhaps a single pair of up/down paddle shifter buttons? Are there even electric derailleurs?
Thanks. That promises to be a unique riding experience. Great ergodynamics.
Is there a way to electrically control shifting? Perhaps a single pair of up/down paddle shifter buttons? Are there even electric derailleurs?
To make the gears change via paddle shift or pushing a code eg. C3 , A7 is way beyond my abilities with circuits, but if you can figure out a way, I’d be more than keen to test it out for you.
How would you get the Front Derailleur to cover the distance from 1st to 4th? Servo motor with a capstan winch type set up?
Range of the rear derailleur could be covered in a similar way, just with a longer winch set up
If you get the 2 servos working to change gears, you can use nth-input for front/back gear to lookup desired servo position for that gear…You’ll need to convert A-D to numbers or replace nth-input with switch-case node.
To find correct value for each gear, it would probably be easiest to wire up a POT to control the server & add watch node to see current value. Adjust the POT and write down the value when each gear lines up & use that to configure nth-input and/or switch-case nodes.
If you were trying to sell the product, you would probably need an interface to adjust the servo position for each gear & save it between reboots, but for a home project, hard-coding the values in the program is MUCH simpler.
If you had a strong enough servo, you could probably remove the return spring on the derailer and use the servo to position it directly. I would think you would need a stronger servo if you are connecting it in a way to pull existing cable and fighting against the return spring…it might be hard to position the servo to control the derailer directly, though.
Yes 2 servos. I’m thinking of a car’s throttle housing pulley, but operating in reverse. In a car, one pulls on the throttle cable and the pulley converts that linear motion to a rotary motion to open or close the throttle butterfly valves.
An electric derailleur uses the same part and operated in the reverse direction. The throttle housing pulley mounts right onto the servo arm. A small piece of cable connects from the derailleur to throttle pulley.
When the servo turns, it turns the pulley, which pulls the derailleur cable (spring return for now). That converts rotary motion to linear motion. Servos are have a lot of torque (42 inch-lbs). Depending on the diameter of the pulley, the full 0-180 degree servo rotation motion pulls the full derailleur from highest to lowest gear.
Same for the back derailleur with its servo and pulley.
Now for the cool parts:
Servos are very linear and precise.
You do the same for the RearFirst and Rear7th values
R2Pos = RearFirst + (Rear7th - RearFirst)/6.0
R3Pos = RearFirst + 2*(Rear7th - RearFirst)/6.0
R4Pos = RearFirst + 3*(Rear7th - RearFirst)/6.0
R5Pos = RearFirst + 4*(Rear7th - RearFirst)/6.0
R6Pos = RearFirst + 5*(Rear7th - RearFirst)/6.0
To set a desired Gear position you break the desired Gear number 1-28 into front and rear parts like in the gear display nodes.
Then you lookup using nth-input nodes, the Front and Rear servo positions, send those two values to the two servos.
I’d add a user convenience of two separate up down switches, both to paddle shift the Main Gear Number. The first pair does Gear UP1 and DOWN1 (by 1), and a second one to do it by 4’s or 5’s (you will know what fits your shifting tendencies)
First controlling both servos with 2 pots is a good idea. It’s probably an example patch. Anyway, you already have a debug watch node to display the Gears. Just add one to display the servo positions.
I’m pretty sure both front and rear gears are equally spaced. Thus if you ever want to recalibrate you can use the interpolation method to only require the 4 new trim values all the mid gears follow from those. I’m pretty sure XOD supports eeprom writing, perfect for saving the trim values.
I checked out Youtube video review of the Shimano electric deraillers and its little control box. ($2600 clams!), a little beepy, and not as nice as yours.
Thanx for the replies!
I actually thought of stepper motors, but wrote servo motor instead.
Can stepper motors be used in a casptan winch type set up?
I can make the mechanical bits work, the electric bits work, just learning how to do the circuity bits
But if you brainiacs are willing and able to help make electronic shifting for my gear set, I would be most appreciative.
You’ll also need to tell me which pins which parts get connected to the Arduino
I investigated this on Backcountry.com. Several points.
You might be able to get around the fighting the spring problem by removing the spring and using two servos, each one pulling a cable, in opposite derailler directions. Electric power to the servos maintain their positions once set.
What you really want to do is pull AND PUSH a single cable or linkage to change gears down and up. It seems to me a bit like putting toothpaste back into the tube.
Perhaps you can pull/push a thin steel or titanium rod or arm that attaches from the derailleur where the cable did, to the servo at the rod’s other end. If so it would enable removing the spring, and using only one servo for front and one for back.
This may be a job for a real gear-head (mechanical eng. or designer).
If petert can rig up a steel gear servo to operate a derailleur in both directions, i.e. ditch the spring, than things become straightforward. I can show how. Many bikers would be interested in DIY electric shifting. Reviewers gush over it.
This servo has steel gearing and over 3 inch-lbs of torque. A 1/2 inch servo arm 180 deg. swing would provide 6 pounds of force and cover a 1.5" inch range of motion. That’s probably in derailleur range?
If the servo motor was Diam 50mm/2", and directly centred over the front cluster, this plate attached to a 7mm shaft would allow the servo motor to travel from centre of cluster to both edges, a total of 21mm
rear cluster would need a longer slot, haven’t measured that bit yet
so a small and bracket bolt set up on the top of the derailleur, running parallel to the chain would be sufficient to allow a servo motor to swing across the chain line easily
And this should allow the rear derailleur to swing 3 gears to the left, and three gears to the right, when the servo motor is parallel to the chain line
I almost get it. The elliptical holes somehow attach to the derailler part that moves the chain.
21 mm corresponds to 37.6 degrees or +/- 18.8 degrees each way from center.
That being the case, if we still want to interpolate the servo positions to get the inbetween gears, we would take into account the sin of the arm angle because at large left and right angles, left/right distance requires larger servo angles than middle gears do. Once you know the angle from vertical, theta, horDisplacement = radius * sin (theta). Thus -90 to +90 position effects the full -radius to +radius horizontal displacement. You’ll be using smaller angles than that I imagine.
38 degrees is about only 21 percent of the full 180 degree range. Any easy way to gear it up to use 80-90% of the servo range for more precision? (That may not be needed.)
Still designing the bits, but if I know how much distance/angles are required, I can soon modify my drawings
To make the derailleur swing cradle, find a small piece of 1/2" square steel/aluminium, drill your 3mm/.118" hole first, then drill two holes into the bottom so you can locate two bolts through the derailleur cage top piece, then cut to shape.
Drill your two locating holes in the derailleur cage top and insert 3mm bolts from cage into swing and fasten nut tightly.
Attach the arm plate and 3mm bolt into cradle, and then measure to see where servo motor will sit, make a small attachment piece for servo motor, so that servo is positioned directly above smallest chain ring, parallel to the chain line.
Move derailleur to largest gear ring, making sure nothing is fouling, then tighten servo motor in place.
Move derailleur(der) back to lowest and make sure der cage isn’t fouling at any point in transition.
Wire the servo and enjoy electronic shifting.
You should not need to remove the return spring with the servo over the lowest gear
I think using two servo motors gets rid of a lot of problems. No limit switches needed. No overshoot problems. No need to ramp up/down to speed. You get to set new positions for front and rear gears at the same time. They’re built for torque and don’t slip.
I came across and alternative that totally gets rid of angular conversions, and raising of derailleur at the extreme ends of arc motion compared to middle.
It’s called a linear servo motor. Linear actuators are cheap but most linear servo motors aren’t. The is one used for Hobby RC.
http://www.irrobot.com/en/product-01-2/
I didn’t find the speed specification, but it looks fast.
If you can mount the chain pusher part directly to the linear servo, everything is simplified. Your 0-1023 PWM output (or 0 - 1.00 for the XOD way) precisely moves the chain horizontally. Also, it might even make a better derailleur than Shimano Di2’s!
It might be overkill, or take too much current. If the rotational motion can compensate for large angle swings, a single XOD servo node is simplest.
You can count me in for the math and electronics.
The price on the link you sent was $88, not sure whether that’s US, AU, CAN, but a reasonable price for the luxury of not having to force levers when trying for world record speeds!
The swing cradle can stay the same, and using a linear servo would make it easier to connect the stationary end to the frame.
The 27mm stroke fits for the front gears, and possibly the rear derailleur, but will need to measure that properly.
The ability to add a rod end bearing allows for any torsional twists from the derailleur as it moves in/out.
So I’m either preaching to the choir , or selling ice to an Eskimo!
And you can control the servo precisely?
Let’s Do This!
In the bike gears with motor.xodball, how do I show the motor is connected/running?
Do I need to put an “if-else” with a LED attached in somewhere?
Which wires from the proximity switches get wired into the Arduino? The Blue? the Brown? the Black?
and to which ports?
Also which wires from the IR Tx and Rx do I connect, & to what? There are three pins on both.
I’ll get a I2C plug-in next pay day, and then what wires do I connect to the 128*64 LCD dot matrix screen?
How do I connect in the GPS module?, and the real time module?
Yes, it can be controlled very precisely. They have a video showing the unit counting out individual 1mm movements, all of which look precisely aligned. The 0-27mm range is set by setting a PWM signal with relative pulse widths 0 to 4000. That’s a precision of 1/150th of a mm.
In XOD you specify a floating point, normalized PWM signal 0.0 to 1.0. That implies no inherent precision limit, which the Arduino, with its integer 0 to 180 degrees does.
I have a brief query about this on the forum.
( “analogWrite - bit resolution precision limit?” )
XOD is very elegantly designed and I think there will be a way to get the 10 or 12 bit resolution these linear servos have.
Regarding the 27mm limit, you could always increase it mechanically with a lever.
Also, I’ve only done pleasure biking. I find that sometimes I had to overshoot the desired derailleur position a little and then back off. That would be easy to add in XOD based on a trim constant “gearOvershoot”. A setting of 0.25 would briefly shift to 25% further to the next gear and then back-off to the exact setting. A value of 50% or more would probably be too much and actually change to the overshot gear instead of simply making the gear change quicker and snappyer. The linear servo wouldn’t require that at all. Maybe good derailleur design doesn’t need that either.
(I just noticed and thought I’d comment that such a feature needs to know, separately for Front and Back, the current derailleur positions and the desired new ones. This would not be a problem since the software keeps in memory both gear positions, so even if a big overall gear change requires one derailler to increase and the other to decrease in position and the overshoot/backoff feature has benefit, it would just simply happen.)
If you have a tachometer type pickup, for example a magnet and a Hall effect device, you can time the number of ms between pulses. If a pulse is not picked up in let’s say 500 ms we assume the motor is off and RPM is 0.
( https://www.amazon.com/Anmbest-KY-003-Effect-Magnetic-Arduino/dp/B07NWFX53H )
Wiring wise, all 11 sensors are each wired to V+ and Gnd. There is a single digital output wire for each which goes to separate digital input port for each.
In that case the display says motor RPM: 0 or Off
If we do measure the time between two consecutive pulses, that shows us the motor is running with an RPM as equal to 1 / periodMs.
We could also simply use the fact that the motor is energized to decide whether motor is on or off. An opto-isolator running off the motor power is all that is needed. It has an internal LED, shining internally on an internal photo transistor. That can be be connected to an if/else conditional which selects one of the two strings “Motor: On” or Motor Off".
For the I2C LCD displays though graphics displays are nice they take up a lot of computer resources. The 4-line LCD I2C devices do not. Quite easy to interface to (to print to).