Category Archives: Arduino

Using Digital Joysticks As Analog With The XBOX Adaptive Controller (XBOX AC)

A viewer recently asked about connecting a digital arcade joystick (ex. a Sanwa with the 5 pin Dupont type connector) to the X1 or X2 jacks on the XBOX Adaptive Controller.

What he was seeing was odd values — the XBOX AC would show “full left” and “full down” (or visa versa). This is because the X1 and X2 jacks require Analog input — in other words, potentiometers. (Or an equivalent.)

I provided him some technical details on why this is, and why it can’t be (easily) done with discrete resistors. I’m working on possible solutions. In the meantime, here’s the info. I hope it helps others.

I’ve been experimenting with the digital joystick for use with the XBOX AC X1/X2 analog ports. Due to the limitations of the joystick you have, I’m not sure if it will be possible.

The Technical Details:

The X1/X2 jacks on the XBOX AC are expecting analog (potentiometer) input. This means a resistance between VCC and X/Y and another resistance between X/Y and GND. In electronics, this is a voltage divider, which the XBOX AC uses to determine position. A simple On/Off will not work — it needs the proper values for both connections (VCC/GND), and both directions (X/Y).

The easiest solution is to use an analog joystick. One that has potentiometers (one for X, another for Y).

When you plug in the TRRS jack without the proper resistance values, the XBOX AC will see that as “all low” or “all high”. In other words, you’ll see the joystick go full upper-right, or full-lower-left, etc. That’s why you are seeing that strange behavior.

If you have the parts on hand, you can experiment with how this works. You would need a 10K potentiometer and a selection of resistors. In one of the photos I’ve attached, I use the potentiometer to control the X axis. 

In another photo, you can see two 4.7K resistors hard-wired to the jack. One is connected VCC to X, the other GND to X. This creates a voltage divider with equal values on each side. The result is that the “stick” appears centered.

To make a digital stick simulate analog, it should be possible to connect resistors in such a way that the XBOX AC thinks there is a potentiometer in the circuit. There would be three states for each axis (values are examples):

Centered X : GND — 4.7K — X — 4.7K — VCC

Negative X: GND — 10K — X — 0K — VCC

Positive X: GND — 0K — X — 10K — VCC

It’s more complicated, but possible. But — here is the problem with the 5 conductor SANWA type joystick: it uses a common ground for all four switches. In other words, all four aren’t completely independent. Resistance on one switch would affect the others, throwing them all off.

Normally, I would go one of two routes with this:

* Use a microcontroller (ex. Arduino) to convert the digital signals to pseudo analog and pass via the USB connector.

* Use a DAC (Digital to Analc og Converter) to convert digital signals to analog and pass via the X1/X2 connectors.

Both of those solutions require additional electronics skill and/or programming to accomplish. If you want to follow one of those paths, I can help you through it. But, it won’t be as simple as “wire up and go”. The easiest wiring would be to purchase an analog joystick.

XBOX ADAPTIVE CONTROLLER (XAC) WITH JoyCon Style Stick and ARDUINO

For those of you interested in using a JoyCon style replacement stick with Arduino (like I’ve done with the bigger “Playstation 2” style sticks), please take a look at the files on github.

3D Models (in OpenSCAD) and STLs can be found here:

https://github.com/nelsonii/joycon

Code for running the joystick can be found here:

https://github.com/nelsonii/XBOX-Adaptive-Controller/tree/master/JoyConStick_Converter_ForXBOXAC_v2D

A word of warning: The Joycon replacement sticks are more difficult to work with. They use small (0.5mm) carbon leads and require a connector and breakout board. I’ve yet to find an easily available breakout. Send me a note if you’re interesting in learning more.

Why The JoyCon Stick? A person I’m working with needed a lighter touch stick. The easily found “PS2” style sticks are too stiff. The stick works very well, but, boy, is it a pain to wire up.

Updated Timer Switch For AT Users

So, I’ve been following a thread on the ATMakers FB page about a Switched Bubble Machine. Lots of great info for a maker like me.

The latched and/or timed switches appear to have been around for quite some time. Me being me, I felt the solutions need to be revisited. During my research, two things kept popping up: cost and features.

So, I’ve got a working prototype which has all the features that I’ve seen so far (except machine learning–which is an excellent idea). Jack for input, another for output. Both 3.5mm-1/8″. Adjustment for duration and modes (passthru, timed, latched). User feedback, both visual and audio. Compact. And it runs on 2 AA batteries (and can run on 4, for extended use).

For the users: What features would you like to see in a smarter timed switch?

For the techies, it’s got a QT PY samd21. All parts sourced from Amazon or electronics suppliers (digikey, mouser, allied, etc). All current, and available, production parts.

Feedback is appreciated.

Custom Joycons In The Wild!

To those who’ve been following the adventures of the custom JoyCon style stick: They arrived safe-and-sound. I had a Zoom call with the gamer on Wednesday and they are working for him! He’s lost more strength in his thumbs, so is using the stick with his big toes. We’re now looking at more toe mounted options, along with some thumb-mounted devices which only require movement, not holding a stick. Thanks to all who contributed to get this out the door before Christmas!