Zero Delay USB Encoder True Analog Joystick Modification.

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 !)


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.)


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:

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 !!

Be the First to Share


    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge
    • Fabric Challenge

      Fabric Challenge
    • Meatless Challenge

      Meatless Challenge



    11 days ago

    Hello, i hope you are well.

    i am so new to all this but really interested in making my first ever component a Sim racing button box but i really need a rotary knob of some sort, the name brand steering wheels have rotary encoders, is it possible to add an encoder or 2 to this board? If so are you willing or able to make a detailed account of how that is done? For me adding the buttons is simple and going to be great but the encoder is what will bring it all together, it would be brake bias, so it needs to just press a button over and over again to the right and a different button to the left. Brake bias moved to the front or rear of the car.

    I got super excited when i saw your article online as it had the knob but seeing it is a potentiometer, my spirits sank a little and no one seems to be putting rotary encoders on this board, so i feel it may not be possible.

    I hope you can help. Thanks


    2 months ago

    I've bought one of these and I wonder if anyone has any tips for using it with a C# program in Visual Studio 2022, WinForms. My project is a slotcar racing timer and my first build used the chip from a USB keyboard which in appearance is very similar (the black blob on the bottom is the CPU) and I use the Shift and Control keys to time and count laps and the input was easy to read using the key_down and key_up events. The problem with using a USB keyboard chip is that it's a pig to connect wires to the rubberised contacts, and it's limited to 2 lanes because Shift and Control are the only two keys that can be detected simultaneously (the ALT key proved to be a toggle and ignored every second press). I want to generalise it to 4 or 8 lanes, and this Zero Delay USB encoder shows promise. I can use the Windows Game Controller Setup Calibration and it detects simultaneous key presses, but when I look for C# examples of scanning the connected joysticks all I find are C++ and endless Microsoft pages of API's that make it look impossibly hard. Can anyone suggest a C# example for PC, Windows 11, Visual Studio 2022, WinForms that's going to make it obvious how to detect key presses, without being complex? Many thanks.


    Reply 7 weeks ago

    Ok, I've progressed with an understanding of how to add the Windows.Gaming.Input namespace (an API from UWP) into a C# Winforms program and can now see the RawGameController and verify that it has the name and buttons expected from the Zero Delay USB Encoder. I'm not ready to provide a tutorial on this, next I want to get the polling working to see what the state of each button is. I think all of the features should be useable. If anyone is interested leave me a reply and it will hurry me up.

    Roberto Andiarad
    Roberto Andiarad

    6 months ago

    Hello! I bought one of these boards to build a sim racing handbrake, and followed your instructions to activate true analog mode. However, when I move the potentiometer, all four axes move at the same time, even though I connected the pot to the x axis only.
    As you can see, my soldering skills may not be the brightest, but they get the job done. Do I need to add the other potentiometers to get full axis independence? Thanks in advance!

    Zero Delay Modded 20220209_101202.jpg
    Roberto Andiarad
    Roberto Andiarad

    Reply 6 months ago

    I found the problem: I added another potentiometer to z-rotation axis and they worked independently. With this in mind, I might be getting closer to a functional sim racing handbrake.


    Reply 5 months ago

    OK great.


    Reply 5 months ago

    Hi Sorry for the delay. I need to see a photo of the other side of the board to workout what you have done on that side please. Thanks


    Question 7 months ago

    Nice guide. I'm more interested to know it that possible to wire the CY-822A to the 5pin port. supposedly that 5pin port already provide analog up down left right, but most of the joystick i found from the market for this board is from sanwa (or some chinese knockoff brand) and the joystick already have 5 pin connector out of the box. I dont really like the huge arcade joy stick as the size is not nice to create compact button box for Race sim/flight sim cockpit. what i want to do is just use the 5 pin port as 8 direction input with the small CY-822A joystick, or just use it as 4 direction so i can easily navigation cockpit menu.


    Answer 6 months ago

    Hi there. Form what you describe it sound like you want to use digital mode to do the same as a "top hat" switch that you find on higher featured joysticks. The 5 pin connector should work for that but you would need to use switch type joysticks - not potentiometers. Potentiometer types will need 6 wires because you need +5 v on one end of the resistive track of the pot and 0v on the other end. The kind of joystick you suggest is more like the old Atari types - see link

    should be plenty of ideas there.



    Question 8 months ago on Step 5

    I've take a different route here, I am trying to wire in an old joystick socket so I can simply plug in an old joystick without needing to butcher it..(I'll probably make a terminator cable that simulates the old 10k resistor wiring when no joystick is plugged in too) However this is a problem, /you/ wire all 3 pins on a pot, and typical joysticks only wire middle and one side on the pots (on an old joy plug pin 1=+5 pin 3=X axis, pin 6=Y axis, 11 is joy 2 X axis, 13 is joy 2 Y axis) I've wired pin 3,6,11 and 13 to your suggested X, Y, Z, ZR and pin 1 to your suggested +5 VDD pin, but checking in the joystick control panel I get no action in analog mode. I also tried wiring the GND pin of the joy socket (pin 4) to your suggested GND location which obviously didn't work since that's meant for the joystick buttons normally. What do I need to do here? run a 10k resistor to GND for each axis or something?


    Reply 7 months ago

    Hi Nathan, the GND connection should be the same for all functions including the potentiometers.
    I believe the old windows joystick port (15 way) interface looks more for a resistance value which would work with the components on a sound card to control an oscillator which eventually gives a stick position once calibrated.

    Some info here....

    This USB device is different because it works by looking for a linear voltage swing between 0v to +5v which a correctly wired control would give you. Your old stick is never going to go down to 0 volts because it has no path to do so. Its all 5 volts - because although there's a resistive value it doesn't work as a potential divider which the analog circuit needs. It all floats around +5 volts so at best the windows joystick calibrator probably only shows the cross hair in a max or min position with little change when you move it.

    First of all (if it was me) before following my final suggestion below (assuming you are using the same model of interface (similar looking isn't enough)) I would want to be certain that you can connect a linear potentiometer to one of the inputs (with +5 and 0v on either end of the track) and select analog mode and that windows can let you calibrate your test control - and that you see you can operate the full range.
    Only when confident that bit is OK would I progress to the old stick you want to use.

    Your suggestion of connecting a resistor
    might have an effect if you connect from an axis connection to ground. However the way I see it if you use a 10k resistor and if the control is a 10K then at best you might have created something that will appear to give a swing from +5v down to +2.5v as a full range. If you experiment with lower values then the result would theoretically give a fuller range but the risk is that the lower you go the more risk of overloading the 5 volts supply - especially if you add more than one like this.

    It has to be worth a try with a 10k or slightly lower - and you never know the windows stick calibrator might be happy (fooled) with what it sees as a full range. I have a funny feeling that the "centre" point might not represent a joystick physical centre though.
    It all depends on what you are trying to achieve as to whether position is critical.

    Final suggestion
    For the old stick I think you have no choice but to open it up (carefully) and examine how the controls are wired.
    If they are wired with one end of the control to the wiper (so its a variable resistance only), you would need to break that link and make sure the wiper (central connection) is connected to an axis wire and the now disconnected end of the track is connected to ground assuming the other end is already +5 connection. (Make sure you dont connect +5 to 0v - there may be shouting!)
    That would give a voltage swing from +5v to 0v. Then you should be able to calibrate it if the USB device is toggled to analog mode. Some old sticks don't even connect the end of the track - and if thats the case you need to connect that to 0V to get the same effect.

    Hope this food for thought.. Cheers.
    PS.... the alternative is to try something like this device.....
    but that takes all the fun out of it !


    Reply 7 months ago

    This is what is going on inside. (see picture) also the buttons all go back to a common GND at pin 4 5 or 12 on the joy connector which may or may not be happy with the positive ground/common that the button inputs on the cy-822a use - some joysticks might use GND as a GND for whatever reason which would be a dead short to +5v (bad very bad). I did a few mess around tests and got one of the buttons and the joysticks internal autofire to work too.. so there is potential there.

    I also already own a rockfire converter (I have photos of the internals if you want, board is marked RM-203U) - they are functionally similar to the cy-822a but cant be customised, (at first I thought it was the same board since the modes seem to work similarly, i suspect the rockfire switch selector would be acting on the J1 J2 and J3 on the cy-822a - so J2 and J3 may actually enable 2 pin finctionality.. but totally different board internally - and rockfire has no turbo mode so probably diverges there - there is an 822a b and c variant for playstation amstrad etc so it may actually be based on a variant) but with all the optional strange modes on. Another downside with those is it only allows you to access the first 4 buttons, up side is the mode switches (much like the cy-822a) lets you switch between analog/hat, digital etc. and supports a few esoteric joystick port wirings for old winmans etc. It cant use the extended buttons or functions of sidewinders tho (which used some wierd almost midi type thing) but the hat works - which is likely why you can only use 4 bottons, as different joysticks wire in different switches, and there was probably compatibility trade offs with the mode selector to cater for them all.

    Wiring wise ive been pondering a few ways to do it:
    1: wire the resister between +5v and the x y z or zr input, and move the pin 1 from the pot to the GND side on the cy-822a, or vice versa. (wiper at gnd, pot pin 1 at X input)

    2: wire a VARISTER between the x y z or zr input and gnd, and leave +5 as you have it, and each axis to the related wiper then each axis can be manually adjusted to suit each joystick I may connect, but i suspect this will give same behavior as below.

    3: wire as I have it now, but with a 10k between the axis input and GND - ive messed with this by just holding a resister between the pins to see what happens, but you end up with an axis that only moves on one side of the calibration square for that axis - which you would think calibration would solve but nope *shrug*

    4: on some joysticks there might be an unused wire at pin 12 or 15 I could /add/ in the 3rd pins on the pots back to the plug there, but that means every joystick i want to try would need to be likewise modified, which would break its normal functionality if used on the rockfire. Since wipers do tend to eventually wear out on older joysticks I did want the option of an easy swap out plug and play.

    What I am actually trying to make is a fancy space ship style control panel.. although tallying up the costs so far - it would probably have been cheaper to buy a pre-made now lol. What will become the digital (hat) will likely be to navigate menus (like on elite dangerous when requesting landing permission) and the analog side will probably be lateral thrust controls (strafe up down left right) for landing. Or on games where it only allows you to map controls from a single joystick, the hat would become lateral, and the analog the main play stick. With 4 analogue axis, and 16 effective buttons including hat the cy-822a seems perfect for it.


    Tip 8 months ago

    I discovered another feature but I am not sure what it is for. If you fit the LED D3 and it's associated resistor R11 you get an indicator for another (unknown) function. The LED is toggled on and off by connecting the wire of the MODE switch that goes to the chip to +5V momentarily. +5V is the common of all buttons (except MODE and TURBO)


    Reply 7 months ago

    Hi There. Sorry only just seen this.
    You might be treading on dangerous ground there - just "trying" that. Anyway experimenting is where we learn !
    As the board has a Turbo and an Auto function I can only assume you might be triggering one of those. Does D3 light up when you connect those actual switch points (they might be only momentary connections needed) ?
    The difficulty here is that unless you have a game or software that understands those instructions its hard to know if they work or what they do.
    I presume "AUTO" is "autofire" which many years ago was a cheat feature which did the same thing as repeatedly pressing the fire button so that you didn't wear out your fingers ! Thats when the hardware was so slow it looked like a benefit - now its the other way round its probably a curse because your fingers would be faster - but if its for arcade game consoles it probably OK.


    Question 1 year ago

    I did this and generally it works great. Thanks for the Instructions.
    However, I have a huge deadzone on my potentiomter axes. When calibrating, It only shows an input once the voltage is higher than about 1.2V and will max out at round about 4.6V instead of recognising th whole 0-5V range. Any ideas?


    Answer 7 months ago

    Yep. I see the same centered range. I have to set my 10-bit ADC to have a centered range of about 552 values, in order to get it to sample within the 0-255 range that windows displays. It is probably because with a standard POT, the joystick makers don't want it to hit the limits (it would likely break the POT from the regular beating it would get in being a joystick), and they want the strong plastic/metal frame to take the beating instead.

    Very nice article, and very helpful. It helped me make a rotary joystick with a full 360degree angle (and wrapping for many further turns). Hopefully this will work for controlling an FRC robot better than a standard joystick.


    Answer 1 year ago

    It sounds like you have not carried out the modification correctly. Check the potentiometer wiper voltages when rotating from min to max. If the voltage is only changing at the limits then there is a problem with your changes. The level should change from a bit above 0 to at least 4.7 volts. Of course you may have a "clone" which has been changed.


    Reply 1 year ago

    Thanks for the quick reply.
    The voltage at the potentiometer shows the whole spectrum from 0 to 5.26V.
    It's just that the board doesn't seem to recognise the input until 1.2V is reached and maxes out at 4.1V (see pictures)


    Reply 1 year ago

    I think you are correct about the voltage issues. I think that the voltage is set for small trimmer pots that you would find in handheld controllers. These pots only turn about a quarter of a turn in each direction compared to a standard potentiometer with a 180 degree turn in each direction. That being said have you had any luck with the dead zone?


    Answer 1 year ago

    Hi there,

    I must admit I didn't analyse the voltage ranges with a meter as I was more interested in the end result in flight simulator - which when using virtually any value LINEAR value potentiometer produced the correct full range results.

    Any other type (LOG / ANTILOG) - including some of the tiny preset types might not give a full range as you would expect.

    Without calibration it can look like it hardly works at all.... but with it it works great for me.

    Its the calibration software on the PC that decides what full range for each pot looks like when you operate the pots from max to min positions etc.

    I tested it extensively as you can see with varied types of control before typing it all up and as stressed in the text - using the same PCB:

    - it is important to make sure the tracks are cut in the correct places to separate the inputs from each other and to eliminate any connection with those balance resistors or other controls you might have connected.

    - be sure the ends of the potentiometers are connected correctly - one end of the track to 5 volts - the other end to 0 volts and the wiper to the now isloated input track.

    - choose analog mode (green led) (you need a mode switch connected or momentarily link the mode switch contacts) and stick to it when calbrating the joystick in Wndows

    - make sure you have at least one working push switch connection available of the 12 inputs - because the calibration software needs to see a switch when it asks for it to progress t o the next step.

    If you change to a different USB socket you may well need to recalibrate again for that socket in analog mode but once done it tends to remain calibrated for that socket unless you calibrate a different setup at a later date.