Introduction: Zero Delay USB Encoder True Analog Joystick Modification.

When I discovered these cheap CY-822A / USB Joystick X1 - Game Control Board USB Joystick Encoders on Ebay and Amazon I was puzzled by their description and construction.

A lot of people like to make their own input devices and controllers and these are a cheap way to get started - but just switches are not always what you want.

Despite the Analogue description its a very Digital device.

The Good News is that the Analogue feature is buried inside - you just need to let it out. I tried asking the manufacturers.... but as expected the reply is still yet to arrive.

I bought a couple of these as cheaply as possible to play with just to experiment with, and I was surprised at the results.

This instructable is a description of what worked for me on this specific model of encoder.

(IMPORTANT: Since publishing this Instructable I have also experimented with other similar modules from different manufacturers. One in particular, the ARC-968 controller whilst very similar has the sneaky difference that all 12 of the switch connector sockets are oriented the opposite way round. If you decide to experiment with other modules pay close attenton to the connectors as you may need to rethink some connections if interfacing with other electronics. Also out of 3 of these I bought one of them even had the USB socket fitted the wrong way round which luckily I spotted and fixed before I connected it up. Always double check !)

Supplies

CY-822A / USB Joystick X1 - Game Control Board USB Joystick Encoder

Linear Potentiometers of your choice to suit the controller project you are working on. 20K - 200K ohms

Suitable wires to complete your project

Patience and ingenuity

Soldering tools and the ability to use them in a tidy fashion.

Basic understanding of electronic components.

Step 1: Why Are They Advertised As Analogue / Digital Devices?

As far as I could see all of the switch kits they came with were On/Off switches - and that to me is 'Digital' only. If you toggle the MODE option between Analog / Digital you only switch between Up / Down / Right / Left action on the X-Y axes or turn on the Top Hat view movement.

You can see that activity in Windows Game Controller Setup Calibration.

So wheres the Analogue action in that?

True Analog Joysticks contain potentiometers - the type of joysticks you would use for Flight and Driving simulators.

Why are some components missing from the PCB?

Two of four possible LEDs are missing, and some 5 volt output sockets, but they are not so important.

Of more interest are the empty locations for 4 twin banks of resistors - but only 1 bank has a pair of resistors fitted. Typically from pictures you see of these boards only R1+R2 are present - but R3 to R8 are missing.

Some photos have R7+R8 fitted instead of R1+R2. They are both the same value resistors - usually 10K ohms each.

Step 2: Windows Game Controller Gives the Game Away !

Is the number 4 a coincidence - considering most flight joysticks have 4 variable inputs?

If you plug this encoder into a Windows PC and run the Game Controller calibration program you will see 12 Red buttons 'lights' matching the 12 sockets on the edge of the pcb.

It doesn't however tell you anything about the status of the Auto / Mode / Clear / Turbo inputs - mostly internal functions I think.

If you make the contact on any combination of the 12 switch inputs you will see the corresponding number light on the Windows test program - even if you switch between Analog and Digital modes with the Mode option on the encoder.

However you also see the 4 variable X+Y axes cross hairs in a box and 2 coloured Z Axis and Z Rotation just as you would with a real analogue joystick.

Note that all of these are in their centered positions - so they are all balanced and stuck there.

As supplied the X and Y axis and Hat View settings can only ever go to maximums and minimums using the Sanwa socket and/or AU, AD, AR, AL two pole switches when operated.

These are all the same input - just different connectors - examine the tracks - you'll see.

Step 3: Resistors and Tracks

So from experimentation I have discovered that this "balance" is achieved by the presence of the 2 x 10K ohm resistors.

The Balance resistors are in effect a fixed 20K potentiometer (10K + 10K) - in its central position. They are wired in series between the +5V and Zero volts pin of the USB connection from the PC. At the junction of the 2 resistors the voltage will be 2.5 Volts.

The manufacturers save money on the resistors by linking them all together. - all of the junctions of R1+R2, R3+R4, R5+R6, R7+R8 are all linked together on the rear of the PCB by very fine tracks.

Now, the quick and dirty point of this Instructable is that to make the "Analogue" part of this encoder do its stuff, you need to unsolder and remove these Balance resistors and replace with linear potentiometers and carefully cut the appropriate tracks between the pairs with a fine blade.

There are 3 links in total.
If you don't you won't have independent controls.

ONLY CUT THE TRACKS BETWEEN THE CENTRAL SOLDER PAD PAIRS WHERE THE RESISTORS WOULD HAVE BEEN ! Any other tracks go to the chip hidden under the Black Blob - and you DO NOT want to cut those.

With experimentation I have successfully added 4 linear potentiometers (in my testing 2 x 100K for X+Y axes, a 20K for Rudder control and a 300K slider for Throttle) to fly in FSX.

The values don't appear to be critical but linear potentiometers will always work best for this type of activity.

I just tested with what I had to hand - an old Maplin joystick in a plastic box with 2 push switches, a simple potentiometer and a slider control on a pcb which used to be the temperature selector out of an old kettle base unit. No such thing as scrap - just parts waiting for a new project !

Don't just cut the tracks, fit potentiometers and expect it to work in Windows - its unlikely to work correctly UNLESS you run the calibration program. Windows has to understand what you fitted and the ranges these components provide at their full ranges.

Step 4: Setting Up

Once all controls are connected its essential to
1 - Use the MODE option to select analogue mode - which turns on the Green LED (left) on the encoder pcb.

2 - Use Game Controller calibration so that windows can establish the midpoints of all the controls you used.

If you only want to you some but not all 4 channels then you need to make sure the unused ones still have balance resistors fitted otherwise if your game or other software is looking at the values it could have a negative effect on the desired effect. Without any resistors you will see the values dither about in the calibration program.

If you seperated all the channels by cutting the tracks you can just fit new pairs of 10K resistors.

If you happen to wire the ends of the poentiometers the wrong way round you may be able to invert the control function in the game you are playing to save rewiring if the game allows it.

The wiper (centre) of the potentiometer must always go to what was the junction of the balance resistors.

Then either end of the potentiometer are wired to +5 v and 0 v respectively.

Mostly I just soldered the wires to the rear of the PCB. You need to be carefull and tidy here - but its your design so careful planning is time well spent !

One VERY important thing to note is that with the encoders, the Common track running around the edge of PCB is NOT zero (0) Volts - its the +5 volts USB supply from your computer - so you don't want to be connecting it to Ground in any contructions you might be dreaming up !!

Step 5: Overall View of Potentiometer Connections

As shown these connections all worked for me once calibrated.

Don't forget you can still connect switches to the Up/ Down/ Left/ Right/ sockets as they work POV Hat functions when you select Analog mode (if your program supports it.)

IMPORTANT CALIBRATION NOTES>

You must plug USB lead into the PC and wait for the RED LED to light up - this confirms USB recognised and its set to DIGITAL mode.

You must switch it to Analog mode FIRST before calibrating.

You must have a switch (normally open) connected to at least ONE of the TWELVE input connections (shown on the first picture - but NOT shown on my illustration above) because the Calibration program asks you to press a button on the controller at certain steps and it MUST be one of those 12.

Also when calibrating, don't switch between Analog and Digital part way through because the calibration program will stop looking at your controls.

If you accidentally do it - just start the calibration again after selecting Analog Mode again (Green LED will be ON).

Once calibrated Windows should remember your new device. If you replace the components connected for different resistive values, recalibration is needed.

And lastly everytime you connect your device it reverts back to Digital mode (Red LED ON) so you need to set Analog with the mode switch before Flight or driving !!

UPDATE::: Feb 2021 ******

Modification to Start in Analogue Mode:

I have been advised by other users (they deserve the credit! ) that if you change the position of the Resistor at position J1 to the upper location instead of how it was supplied (digital mode) the module will automatically start in Analogue mode - so you dont need to construct my fancy solution (link below). You probably wont ever need a mode switch either - the choice is yours.

I have done that modification myself and it works - so thanks to all who reported it!

If however you insist that you want to make something which will mimic you pressing the Mode button once after a short delay then the link is below.

This is the link:

https://www.instructables.com/id/ZERO-USB-JOYSTICK...

This modifcation pcb could have uses for other projects or functions on this pcb for the adventurous amongst you. Please note that not all of these switch options - Auto / Turbo / Mode etc function the same. From memory I think some switch high and some switch low. Always check with a voltmeter to understand its actions.

Have Fun !!