Introduction: Electric Mountain Bike Shifter

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).

This project is a low budget customizable arduino based electric mountain bike shifter. With this you would be able to create custom shift patterns with instantaneous feed back.

As a precaution, this project is unfinished as the shift cable driving motor is not suited for this application. Therefore I will be updating this instructable as a correct drive system is implemented.

Step 1: Wiring

Shown is a wiring diagram for the system. From the arduino there is a common 5v and ground set to the breadboard. The Joystick and Stepper motor driver both have long jumper wires to extend across the length of the bike as the control system of the project is mounted behind the bike seat. Note that IN2 and IN3 are reversed in order when connecting to the arduino.

I used a 9V to add external power to the stepper motor, and another 9V to power the arduino board itself with all the other components feeding from the arduino.

The wiring to the arduino can be changed, however this is the diagram that correlates with the code in the following step.

Wires used: https://www.amazon.com/gp/product/B01LZDZBAG/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1

Step 2: Arduino Code

Attached is a copy of the code used in this project. There will be variables that will need changing based on RFID tag used, as well as trial and error values based on the bike this project is installed on (Step distance and possibly analog joystick values). All of these variables are commented and explained in the code.

This was built using the Arduino 1.8.2 editor.

Step 3: 3D Printed Components

Attached are the models for the 3d printed components. All models are required once for the project excluding the motor housing top which is required twice, once for the motor housing and once for the driver housing.

Prints were conducted on a Monoprice select mini from PLA with 40% infill and 0.125 layer height.

Step 4: Assembly

Pictured is The mechanical components of the Assembly. The stepper motor box, box lid, and stepper motor on the left. In the center the stepper motor driver box, box lid, external battery, and stepper motor driver board. On the right the analog joystick housing, top and bottom, with the analog joystick. Not pictured is the control system enclosure which is placed behind the seat. DC-47P DC Series Heavy Duty Electronics Enclosures was used for this with the link below.

Hardware used will be:

M3 x 9.5mm machine bolts (16)

M3 nuts (4)

4 zip ties

Craft foam (Optional)

3M Dual lock for electronics enclosure (Optional)

To assemble these pieces the stepper motor gets placed inside the motor housing box into the pre-formed slot, with the wires threaded through the wall of the box. The motor is then secured on each bolt earlet using m3 bolts. The motor assembly is then zip-tied to the rear upper A-arm on the mountain bike with craft foam placed in between to add dampening, and the pulley with shift cable is placed onto the step motor shaft. The shift cable is inserted through the wall hole and wired into the rear derailleur. The box lid is secured to the box using the m3 machine bolts.

The driver box is zip tied further up the A-arm with craft foam placed in between. The 9v battery is wired to the driver control and placed into the box. the stepper motor and arduino wires are ran into the box from the sides and wired into the driver control. The box cover is secured using m3 bolts.

The RFID tag is secured to the side of the control enclosure box by drilling 4 holes and using the m3 bolts with m3 nuts on the inside.

The analog joystick is placed into the bottom of the analog joystick housing, and the top is placed over securing it to the bottom with two m3 bolts. This housing is then secured to the handle bar using more craft foam and a zip tie threaded through the pre-formed slots on the bottom housing cover.

Remaining electronics are wired using the wiring diagram in previous step.

Links:

3M Dual Lock

https://www.amazon.com/Dual-Reclosable-Fastener-SJ3560-Clear/dp/B0141MQRGI/ref=sr_1_3?ie=UTF8&qid=1512528513&sr=8-3&keywords=3m+dual-lock

Electronics enclosure

https://www.polycase.com/dc-47p

Step 5: Finished Product

Shown is my project assembled with highlighting to show positioning of components. The green line indicates wiring and placement of the stepper motor system. The red line shows wiring and placement of the analog joystick system.

Wires were hidden using 3/8" wire loom and zip tied to the frame of the bike. Holes were drilled into the control box to further hide the wires.

That's it! If this instructable is followed you should have a cheap alternative to electronic shifting on a mountain bike.

As stated in the introduction I will be editing and updating this guide as I adjust the shift drive system to a linear actuator and rechargeable lithium ion battery.