How to Build Your Xbox One Arm Cycle Adaptive Controller

by Aes-op in Circuits > Microsoft

866 Views, 0 Favorites, 0 Comments

How to Build Your Xbox One Arm Cycle Adaptive Controller

169814088_776332083003749_4710069464470735845_n.png

A how-to guide to fabricating/assembling the components of your Arm Cycle Adaptor and testing the final product.

For any support for this project, please contact Makers Making Change at this link: https://www.makersmakingchange.com/project/arm-cycle-gaming-interface/

Please note that it is assumed that the end user has an arm cycle available to use with the adaptor. The arm cycle used for this guide is the Sunny Health & Fitness SF-B0418. If the SF-B0418 is not used, another Arm Cycle can be used. It requires that it has mounting holes so that the Arm Cycle can be attached to the T-Slot bars. A 3D printed mount will also have to be designed to mount the encoder to that specific model.

Supplies

Tools required for this project:

• Soldering station/Soldering iron

• Small flathead screwdriver (for screw down terminals)

• Allen Keys (for fasteners and pivots)

• Phillips head screwdriver (for Arm Cycle housing screws)

• Universal Crank-puller to remove arm-cycle cranks (to allow for removal of Arm Cycle housing)

• A 3D Printer (Optional, parts can be printed to order online)

• Xbox Adaptive Controller

For this project, the following parts will need to be acquired:

Electrical Components

• 1x Adafruit MPU-6050 6-DoF Accel and Gyro Sensor w/ STEMMA QT Qwiic Cable

• 1x CUI Devices AMT103-V

• 1x PJRC Teensy 4.0 MCU Unit (Can be purchased directly from PJRC, saves shipping cost if ordered from Adafruit)

• 1x Custom PCB for Arm Cycle

• 4x TRS Audio Cables

• 1x Black Nylon Screw and Stand-off Set – M2.5 Thread

Mechanical Components

• 4x 2828 – 10 Series Anti Slip Tread by the FT

• 2x 1010 1” X 1” T-SLOTTED EXTRUSION 24”

• 2x 1010 1” X 1” T-SLOTTED EXTRUSION 8” (Company will custom cut, fee for cut ~$8 CAD, will give three 8” segments and charge for 24” length)

• 1x 1020 1” X 2” T-SLOTTED EXTRUSION 24” Length

• 4x 4136 10 SERIES 4 HOLE - TALL GUSSETED INSIDE CORNER BRACKET

• 2x 14011 2-HOLE PIVOT JOINT

• 12x 2015-PLAIN END CAP FOR PN 1010 BLACK W/ PUSH-INS

• 20x 3393 (3061 + 3382) Fasteners

• 8x 1/4” Disc Washers

• 4x Strong Springs

• Threaded bolt, nut, washer, and 2x “Tension” (rubber) bands (for encoder mounting)

Complete Total: ~$285.55 CAD Before Tax

Fabricating 3D Printed Parts

This device utilizes three different 3D printed parts to mount the electrical components. These include the encoder, IMU, and the PCB mounts. To print out the components, please do the following:

1. Locate the (.stl) files from the project GitHub page (Encoder_Mount_x.stl, IMU_Mount_x.stl, PCB_Mount_x.stl).

2. Open your preferred 3D printing “slicer” program (ex. PrusaSlicer).

3. Import the(.stl) into the slicer program and generate (.gcode) files for the printer.

4. Transfer the (.gcode) files to an SD card and plug the SD card into the 3D printer.

5. Using the 3D printer interface, select the corresponding (.gcode) files and begin the printing process.

Once the 3D prints are done, remove them from the build plate and continue to the next step.

Mounting the Encoder Inside Your Arm Cycle

MicrosoftTeams-image (1).png
MicrosoftTeams-image (4).png
MicrosoftTeams-image (2).png
MicrosoftTeams-image (3).png
MicrosoftTeams-image (5).png

This step will be dependant on the specific Arm Cycle that you intend to use for this build. In this guide we are utilizing the “Sunny Health & Fitness SF-B0418 Magnetic Mini Exercise Bike”, and therefore have modeled and printed our encoder sensor mount to be specific to this device. If you choose to modify a different arm cycle, a new internal encoder mount must be created.

To mount the encoder inside the Sunny Health & Fitness Arm Cycle please do the following:

Remove the Arm Cycle cranks:

1) Remove the plastic cover on the right arm cycle crank revealing a nut and surrounding threading.

2) Remove the nut using an appropriately sized socket wrench, and then thread on the universal arm crank puller.

3) Rotate the centre portion of the crank puller clockwise until it is tight against the main shaft of the arm cycle.

4) Using a wrench to hold the outer portion of the crank puller in place, use a separate wrench to rotate the internal portion until the entire arm has pulled free (Video for reference).

5) Repeat these steps for the left Arm Cycle crank and move on to the next portion of the assembly.

Remove the Arm Cycle Housing:

1) Locate and remove all 8x Philips head screws from the housing.

2) Gently pull on the Arm Cycle electronic display to pop it out from the housing and then pull apart the main body of housing to remove either half

3) The internal mechanical assembly should now be visible to you with the housing removed.

Assemble the 3D Printed Model and Encoder:

1) Locate the 3x 3D Printed components (Encoder_Mount_1.stl, Encoder_Mount_2.stl, Encoder_Mount_3.stl).

2) Slide the smooth gear shaft through the corresponding hole on both the other components.

3) With the Smooth gear in place slide the rectangular length attachment of one part into the corresponding hole on the other. This will connect the two, as the size is intended to create a pressure fit (See first image for clarification).

4) With the 3x 3D printed components connected, you can now attach the AMT103-V encoder using metric screws and following the AMT103-V Mounting Instructions. (Instructions located on page 7 of the datasheet)

Attach the encoder mount to the Arm Cycle internally:

1) Now that the Encoder mounting is properly assembled you can move on to mounting it to the Arm Cycle. On the right side, near the front of the assembly (with the resistance dial facing you), you should be able to find a mounting hole.

2) Slide the pronged 3D printed part onto the bottom of the metal bracing on the right side such that the hole on the part aligns with the mounting hole.

3) With the holes lined up, slide a bolt through all the holes, and secure it tightly with a nut and washer. At this point the smooth gear should be close to, if not touching the main wheel of the Arm cycle. This is how the rotational motion with be transferred to the encoder.

4) Lastly, attach rubber bands as seen in the three images above to add tension pushing the smooth gear directly against the surface of the internal wheel.

Final steps:

1) Plug in the encoder cable and ensure it exits near the bottom of the device. If desired, one can secure the cable to the device using a small piece of electrical tape (as pictured last above) to ensure a desired exit point.

Note: If using coloured jumper cables try and maintain a useful color scheme (Red = 3.3V, Black = GND, Yellow/Green = CH_A, CH_B, and White = Index pulse)

2) Return the plastic housing of the Arm Cycle by lining up both halves to their original point and securing them with the corresponding screws.

3) Pop the digital display back into its original location.

4) Re-attach both Arm Cycle cranks by placing them over the output shaft and tightening the corresponding nut on with a socket wrench. This will pull the arm crank back onto the shaft and should secure the arm crank tightly to the main body.

5) Lastly, return the plastic coverings on either side of the Arm Cycle cranks.

After following these instructions, you should have your Sunny Health & Fitness Arm Cycle back to its original condition with the encoder mounted internally and its cable exiting the bottom of the housing to allow for connection with the PCB in subsequent steps.

Assembling the Mechanical Adaptor

Attach Caps Steps.PNG
Building Base.PNG
Springs Step Illustration.PNG

Before beginning, ensure that all the mechanical components from the supplies section are present. Items used in each step are in bold lettering.

To begin,

1) Fill both ends of each 1010 Series 24” length with 2015 Plain End Caps. (As per first image)

2) Push a 24” length of 2828 Anti Slip Tread into the underside of each of the two capped 1010 lengths.

3) Cap each end of 1020 Series 24” length with 2x 2015 Plain End Caps

4) Loosely place the 1020 length on the two 1010 lengths. It should resemble a sideways “H” shape. Put 4x 3393 Fasteners along the right side of the 1020.

5) Bolt the 1020 length to the 1010s by attaching 2x 4136 4 Hole Gusseted Corner Brackets on each end of the 1020 length to the 1010 lengths. This will require 8x 3393 Fasteners. (As per the second image)

6) Take the 2x 14011 Pivot Joints and attach a 1010 Series 8” length to the top of both. This requires 2x 3393 Fastener.

7) Attach the bottom of the 2x 14011 Pivot Joints to the 1020 length in the center, spaced so the arm cycle will attach and center along the length. This requires 2x 3393 Fasteners.

8) Tighten the hex bolt on each of the 14011 Pivot Joints while holding them so that the 1010 length attached on the top is flat. This should lock the joints in place, stopping them from pivoting.

9) Attach Springs by using 8x 3393 Fasteners and the 8x 1/4" Disc Washers, attaching the ends of the springs to the top of the two 24" 1010 lengths and the bottom of the 8” 1010 lengths. (As per the third image)

10) Before placing your Arm Cycle onto the mechanical build, ensure that the previous step that involves mounting the encoder inside the arm cycle has been completed. Once you know that the encoder has been mounted, bolt the Arm Cycle to the top of the two 8” 1010 lengths using 4x 3393 Fasteners.

11) Loosen the bolts on each of the 14011 Pivot Joints so that the Arm Cycle will be held in place purely by the springs. Final adjustments may need to be made to the spring spacing to ensure the Arm Cycle is centered. This could be due to the weight distribution of your Arm Cycle not being completely being entirely centered.

Assembling the Electrical Adaptor

Wiring Diagram.PNG

Before beginning, ensure that all the electrical components from the supplies section are present. Items used in each step are in bold lettering.

To begin,

1) Mount the 3D printed IMU Mount to the 8” 1010 length attached to the front of the Arm Cycle (the side that does not have the built in electronic display built in) using 3393 Fasteners.

2) Mount the 3D print PCB Mount to right side of the 1020 length using the previously attached 3393 Fasteners.

3) Mount the MPU6050 to the IMU Mount using M2.5 Black Nylon Screws. Attach the Qwiic Connect Cable to the MPU6050 on the right side and feed the cable through the mount's attachable top. Now snap the top in place over the MPU6050.

4) Solder Breakaway Header Pins to the 2 sets of 14 pins on either side of your Teensy 4.0. Now solder the Teensy 4.0 to your Custom PCB. All other parts of your PCB have been SMT soldered to the board and should not require any extra work.

5) Mount the PCB to the PCB Mount using M2.5 Black Nylon Screws. Connect the MPU6050 and Encoder cables to the screw down terminals as indicated in the diagram above. You may need to extend the cables using Female-Male Dupont Wires. Alternatively, extensions can be soldered to the existing cables. Feed the Encoder and MPU6050 cables through their respective holes in the mount's attachable top. Now snap the top in place.

6) Label each of your 4x TRS cables with LT, RT, LR, and LL tags. Plug the labelled audio cables into the matching PCB Audio Jacks following the scheme in the above diagram.

Installing Software to Your Teensy 4.0

Step 4. AnnotatedPNG.PNG
Step 4 2.png
Step 4 3.png

Uploading the software package to your Teensy 4.0 will be require an IDE (Integrated Development Environment). For this guide PlaformIO will be focused on, but other IDEs such as Arduino IDE can be used.

1) Install Visual Studio Code (It is a free, open source code editor)

2) Go to the Extensions tab within Visual Studio (Keyboard Shortcut Ctrl+Shift+X), search "PlatformIO", click on the "PlatformIO IDE" extension and click the install button. This process is pictured above as the first image.

3) With PlatformIO installed, clone the project GitHub repository to your desktop. You can now open the "JY25 - Arm Cycle Controller" using the open project option in the PlatformIO home page as pictured above as the second image.

4) Plug your Teensy 4.0 into your computer using a usb micro b to usb 2.0 cable.

5) Navigate in Visual Studio Code to the main.cpp file in the src folder for the project. In the bottom left of the window, click the build button (looks like a checkmark) followed by the upload button (looks like an arrow pointing right) as can be seen in the image above.

6) Your Teensy 4.0 should now contain the software necessary to interface with the electrical components

Testing the Electronics

Gamepad Tester.PNG
20210325_184242 (1).jpg

To test the electronics, first ensure that the profile running on your Xbox Adaptive Controller recognizes the X1 and X2 as left analog stick left and left analog stick right respectively. The official support guide to customizing your Adaptive Controller profiles can be found here.

The steps to test are as follows:

1) Connect the audio cables from the PCB into their respective ports on the Adaptive Controller, the LT cable into the Left Trigger port, the RT cable into the Right Trigger port, the LR cable into the X2 port, and the LR Cable into the X1 port. Additionally, connect the micro b to usb 2.0 cable from the Teensy 4.0 into either the left or right USB ports on the Adaptive Controller. NOTE: The Xbox Adaptive Controller is required to be plugged into your Windows 10 PC/Xbox One Console to meet power requirements.

2) Using the properly connected Xbox Adaptive Controller, plug USB C to USB 2.0 Cable for the Adaptive Controller into your PC and open the Gamepad Tester site.

3) Verify a range to the strength of the signal sent to the triggers by watching the level of depression shown on the site when cycling the Arm Cycle forward and backward. When this is confirmed to be working, rotate the Arm Cycle full left and then right, and ensure that the Left analog stick on the site turns in the correct direction corresponding to the direction the Arm Cycle had been rotated.

If the outputs are correct, then your Arm Cycle Adaptive Controller is ready to be connected to your Xbox One or Windows 10 PC and be used to play games!

Using Your Xbox One Arm Cycle Adaptive Controller

169814088_776332083003749_4710069464470735845_n.png

Whenever you want to use your Arm Cycle Adaptive Controller, just plug the audio cables into the previously mentioned ports.

LT - Left Trigger Port,

RT - Right Trigger Port,

LL - X1 Port,

LR - X2 Port,

Then plug the USB C to USB 2.0 cable for the Adaptive Controller into your Xbox One series console or Windows 10 PC. Finally, plug the power cable for the Teensy 4.0 into the left or right USB 2.0 ports on the Xbox Adaptive Controller. You should now be able to play games with your Arm Cycle Adaptive Controller!

By pedaling forward, the controller will mimic pressing down the right trigger on a controller. When you cycle faster, you will accelerate faster in-game. Pedaling in reverse will produce the opposite effect, whereby you will slow down, stop, and then start reversing. The backwards acceleration is proportional to the speed with which the Arm Cycle is pedaled in reverse. Because of the short range of left stick x-axis movement; turning is sensitive and will require time to feel natural. If the "dead zone" (I.E. how far you are required to rotate before turning starts) does not feel comfortable, it can be adjusted in the code to decrease or increase the level of rotation necessary to begin turning.