Developing a Motorized Retractable Joystick


Introduction: Developing a Motorized Retractable Joystick

This motorized retractable joystick is a low-cost solution for power wheelchair users who experience difficulty using manual swing-away joystick mounts. It is a design iteration on a previous retractable joystick project .

The project is composed of two parts: a mechanical part (mount design, assembly etc.) and an electrical part (circuitry, Arduino code etc).

The motorized retractable joystick module can be made and replicated by anyone by following the instructions provided here. No prior knowledge about circuits or Arduino or Solidworks is needed. Very little soldering is involved in this project, and instructions of soldering can be found here. Access to basic drilling/machining operations will be necessary. Detailed explanations of the design are addressed in Mechanical Part and Electrical Part.

Step 1: Contents

  1. Contents
  2. Features and Functionality
    • Motorized Retract and Extend Mechanism
    • Left/Right-Hand Mode
    • Modularity
    • Adjustable Rotation Speed
  3. Preparation
    • Software
      • Arduino
    • Hardware
      • Summary of All Parts and Tools Needed
      • Arduino Nano (Rev 3.0)
      • Motor Driver Chip: L293D
      • Pull-down Resistors
      • Buttons and Switches
      • Motor Selection
    • Powering from Power Wheelchairs
      • Using an USB port
  4. Mechanical Part
    • Manufacturing
    • Limit Switch Attachment
    • Assembly/Disassembly
    • Motor Replacement
    • Electronics Housing
  5. Electrical Part
    • Circuits
      • Schematics
      • Breadboard Layout
    • Arduino Code
  6. Step-by-step Instructions
    • Download the PDF file of Instructions
  7. Troubleshooting
  8. Video Documentation
  9. References

Step 2: Features and Functionality

Motorized Retract and Extend Mechanism

This motorized retractable joystick mount will enable power wheelchair users to retract or extend their joystick automatically. Users have the option of either pressing two buttons (one for retracting and one for extending) or one button (a single button for both retracting and extending) depending on their preferences. The placement of the buttons are flexible and can change to cater different user requirements. The buttons are attached to the circuit through universal button jacks, so the buttons used in this demo can be replaced by any universal button.

Left/Right-Hand Mode

This product is suitable for both left and right-handed users. The technician installing the motorized system to the client’s power wheelchair can easily change the mode by toggling a switch in the electronics box. No modifications need to be made to the code.


The product is fail-safe. If the automated mechanism defaults or if the system is being repaired, the manual swing-away mechanism will not be affected. A detailed description of the simple assembly and disassembly process is included later in the instructions.

Adjustable Rotation Speed

The rotation speed of the automated mechanism can be adjusted by modifying the Arduino code (instructions are provided in later sections). As a safety precaution, the speed of rotation should not be too fast, as the system cannot sense what might be in the way, which could cause minor injury.

Step 3: Preparation


In this project, Arduino is used, so you will need to have the Arduino IDE installed on your computer. The link to download the application is here. The Arduino code used for this product is available in a later section.


Summary of All Parts and Tools Needed

This following table contains all parts and tools needed for this project.

Arduino Nano (Rev 3.0)

Arduino Nano (Rev 3.0) is used in this product. However, you can replace this board with other Arduino boards containing PWM pins. PWM pins are required in this project, as we will use Arduino (picture) to control a motor driver chip (L293D), and the chip needs to be controlled by PWM inputs. The PWM pins of Arduino Nano (Rev 3.0) include : D3 pin (Pin 6), D5 pin (Pin 8), D6 pin (Pin 9), D9 pin (Pin 12), D10 pin (Pin 13), D11 pin (Pin 14). If you are interested in more details about Arduino Nano, its pin layout and the schematics can be referenced here.

Motor Driver Chip: L293D

L293D is a powerful DC motor driver chip that enables the DC motor to rotate both in the clockwise direction and in the counterclockwise direction.

The pins that are used in this project include: Enable1,2 pin (Pin 1), Input 1 (Pin 2), Output 1 (Pin 3), GND (Pin 4), Output 2 (Pin 6), Input 2 (Pin 7), Vcc 1 (Pin 8), Vcc 2 (Pin 16).

  • Enable1,2 pin (Pin 1): control the speed of the motor
  • Input 1 (Pin 2): control the direction of the motor
  • Output 1 (Pin 3): connect to the motor, polarity does not matter
  • GND (Pin 4): connect to ground
  • Output 2 (Pin 6): connect to the motor, polarity does not matter
  • Input 2 (Pin 7): control the direction of the motor
  • Vcc 1 (Pin 8): power the internal circuit of the chip, connect to 5 V
  • Vcc 2 (Pin 16): power the DC motor, varies with motor requirement. The motor used for this project can be powered at 5 V.

If you are interested in more details about the L293D, its datasheet can be accessed here and here.

Pull-down Resistors

Each button/switch is paired with a pull-down resistor. Pull-down resistors are here to help make sure that the Arduino will read a constant value from the pin. If you do not pair our buttons/switch with a resistor, the value that Arduino reads from the corresponding pin would float between 0 and 1. In this case, the buttons/switch will not perform as expected. Since we are using pull-down resistors, the resistors will be wired between the corresponding digital pin and the ground, so the buttons/switch will be wired between the power pin (+5V) and the digital pin on the Arduino Nano. When the button is pressed, the Arduino will read 1 from the corresponding pin. Three 270 Ω resistors are used in this project.


In this project, we implement 3.5mm button jack(s) on the breadboard for easy button replacement. A two-pin switch (to switch left-/right-handed mode) is wired directly on the breadboard since most power wheelchair users will not need to interact with the switch and the switch is designed for the person who helps install the whole mechanism.

Motor Selection

We obtained some manually retractable stand mounts from different power wheelchairs from The Boston Home Inc. The amount of force and torque needed to retract all of these samples were tested and calculated. After checking the motor specifications, a DC geared motor was chosen for the joystick stand mount shown before as a demo for the instructions, since that joystick stand mount required the most torque among the 4 samples we had. You will want to test the amount of force and torque needed for your joystick arm + the weight of the joystick assembly itself to make sure it will fit within the specification.

Powering from Power Wheelchairs

Most power wheelchairs are equipped with a 24V power supply. This automated retractable joystick product requires a 5V input. Since the product is designed to receive power from the wheelchair power supply, no external power supply is needed.

Using an USB port

A DC-DC 24V-to-5V buck converter (A buck converter is used to bring the voltage down.) module with an USB port can be ordered online (the one we used was ordered from here). Connect the input of the buck converter to the 24V power supply (power port to power port, and ground port to ground port), and the Arduino Nano board can then be connected to the buck converter module through the USB port.

Step 4: Mechanical Part

All measurements and dimensions were made in reference to the specific joystick arm we used for this project. These may vary depending on the arm and we will note important areas of variability.


There are three additional parts that need to be fabricated to re-create the mechanical part (See figures). The outer arm of the joystick arm also requires modification to attach the mechanical components to the joystick mount.

  1. Top Bracket
  2. Bottom Bracket
  3. Torque Coupler Block
  4. Outer Arm

Using Aluminum L-shaped Angle Stock (top and bottom brackets), Aluminum Square Bar Stock (torque coupler block), and the existing joystick arm (outer arm), follow part drawings and/or 3D STL files.

Limit Switch Attachment
Wires should be soldered onto limit switch before attachment. Limit switch positioning is flexible as long as the switch is closed when arm is retracted and open when joystick is in its normal position. See Assembly Step 8 and "outer_arm" files linked above for details.

Assembly Method

See figures for each step.

  1. Attach motor to the motor bracket by aligning the holes and screwing in 6 M-3 flathead screws (not all 6 will be needed to keep the motor in place but screw in as many as possible for maximum secureness; make sure to use screws of the correct length according to the thickness of the bracket in order to prevent damage to the motor).
  2. Align coupling piece below outer bar and screw into place with an ½” #8-32 flathead screw. You may need to drill and tap a 8-32 hole into the arm in order to connect the coupling piece to the arm. *In this case, the arm swings out counter-clockwise, so the outer bar (from the perspective of the power wheelchair user) is on the left. For right-handed users, this will be reversed.
  3. Attach top bracket to the retractable arm with the M-6 screw (loosely).
  4. Bring the retractable arm to extended position.
  5. Attach motor-motor bracket sub assembly to retractable arm by inserting the motor shaft into the corresponding hole on the coupling piece. The bracket part should slot in between the arm and the top bracket, aligning the holes.
  6. Use the ¼-20 screw and a lock-nut to fasten the two brackets together. Then, tighten the M6 screw on the top bracket.
  7. Making sure mount is in the extended position, secure the motor to the coupling with the 10-32 set-screw/s.
  8. Screw on limit switch with 2 #2-56 screws (make sure the limit switch will be closed in the fully outward position - in our case, the shoulder bolt presses it closed).

*Note on attaching set-screws: set-screws must interface with flat side of D-shaft. In order to adjust the shaft direction, attach motor to power supply until flat side is in the desired position. Alternatively, set up the circuit as outlined in 4.1 Electrical Part Circuits below and change the timing in line 52 of the code as indicated in 4.2 Electrical Part Arduino Code until it is in the desired position. Remember to change it back after assembly!


Follow assembly procedure in the reverse direction. See below if your motor burns out and needs replacing.

Motor Replacement

  1. Remove set-screw that holds shaft to coupling piece.
  2. Unscrew ¼-20 bracket fastener and lock-nut.
  3. Pull motor-motor bracket sub assembly out and unscrew motor for replacement.
  4. Attach new motor to bracket with screws.
  5. Insert new motor shaft into the hole in the coupling piece, slotting the bracket into place (loosen top M6 screw if needed).
  6. Screw the ¼-20 screw and lock-nut to fasten the brackets again (tighten top M6 screw if needed).
  7. Finally, secure the shaft to the coupling with the set-screw.

Electronics Housing

  1. Place breadboard circuit assembled in Electrical Part into the electronics housing box as shown in the image.
  2. Using a mill and/or drill, create slots and holes for connectors (Arduino USB port, button jack, and toggle switch).
  3. See figure above for an example. Slot and hole positions will depend on your components and circuit.

Step 5: Electrical Part



The schematics of the circuit is shown in Figure 1 in this section, and it is also available on Github. A 5V power will be supplied from the power wheelchair to the Arduino Nano board. The Arduino Nano board is coded so that it will control the switch behavior and the motion of the DC motor. The design and the wiring of the circuit is explained in the Hardware section (hyperlink to the hardware section), if you are interested.

Breadboard Layout

A breadboard wiring picture from Fritzing or the circuit is shown in Figure 2 in this section, and the picture of the final breadboard is shown in Figure 3.

Arduino Code

The code used for this product is shown on the side, and you can download it here.

To upload the code to the arduino, download the Arduino IDE on the computer. Use the code "Rhonda_v4_onebutton.ino" that you have downloaded.

Each line of code has its line-by-line explanation inside the code file.

Upload the Code to the Arduino by (the interface is shown here):

  1. Connect the Arduino to the computer using the USB connector
  2. From the Tools Tab on the Arduino Interface:
    • Set the Board to “Arduino Nano”
    • Set the Port to the USB Port
  3. Press the upload (→) button
  4. Wait until the interface reads "upload completed."

The current speed is set at the maximum 255 in line 25 "analogWrite(motorPin, 255)" to rotate the motor, and minimum 0 in line 36 "analogWrite(motorPin,0)" to stop the motor. The speed range can be set between 0 to 255 as see fit for the motor speed.

The current rotation time is timed for the specific joystick stand mount we chose, but you can simply modify the code (line 52) to change the rotation time and adapt to the specific joystick arm you have. The time is in microseconds in Arduino. For example, if we want the rotation time to be 5 seconds, then you should set the time to be “5000” in Arduino.

Step 6: Step-by-Step Instructions Download

Step 7: Troubleshooting (Updated 12/12/17)

  1. Motor is not retracting arm.
    • Make sure switch is set to desired direction
    • Check to make sure set-screws are tightened
    • Check for any mechanical jams
    • Check connections between motor and circuit
    • Check circuit connections (test circuit with just motor, unattached to assembly)
    • Support joystick with some force: if the arm now retracts with support, your motor isn’t powerful enough! Check if the button you used is functional
  2. Arm is moving too far or not far enough.

Step 8: Video Documentation

Step 9: References

1. Learn and Make Your Own Cheap L293D Motor Driver (A Complete Guide for L293D)

Step 10: UPDATE 5/14/18

  • Machined new arm bars out of steel (compared to original aluminum) with a larger height to prevent beam deflection from loading
  • Switched to higher-torque motor (1497 oz-in)
  • Updated code which was not compiling
  • Tested revised device on client's wheelchair



    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest
    • Oil Contest

      Oil Contest

    3 Discussions

    My son has a powered chair and we also have to move this joystick out of the way for him to pull up to the table or when using a tray attached to his chair. Very cool idea! I should do something like this. Great write-up.

    1 reply

    Thanks for checking our project out and sorry about the late reply! Let us know if you end up trying it!

    Welcome to Instructables! That's a neat design :)