I have been faffing around with the Logitech 3d pro joystick PCB ( Printed circuit board) MCU ( micro control unit) for a good few years now.
In that time I have seen lots of wild spiking.
Even with no potentiometer voltage dividers.
( what the stick uses to sense the pitch roll yaw throttle ...)
I use hall effect sensors...
Here is some news for you.
Dirty pots can cause spiking. ( that nervous twitch that makes your inputs twitch and nervy...)
yes this is true.
BUT so CAN this:
LOSE INPUT WIRES.
( but my pots are clean!!! hang on tiger there is more to this story...)
So you have four analogue inputs soldered ( not crimped or push fit etc) to your joystick PCB. Great.
These connect the pots/hall effect sensors to the PCB...
You have four pots/hall effect sensors wired up and working. Great.
No spiking, solid as a rock. Greatness!
Unplug the PCB usb cable to your PC.
Un SOLDER one signal wire from your pot/hall effect sensor.
( all other solder joints are good, wetted out properly and 100% great)
This means you have one signal wire unconnected at one end and connect to the PCB input at the other end.... : -)
Now plug your PCB usb cable back in. ( like I did.)
now check for spiking.
What I found is that I was getting RANDOM spiking on ALL/OTHER inputs.
Reverse the process back to all inputs soldered back on. No spiking.
Ah... the penny drops.
The lose signal wire is UNGROUNDED or LOSE.
This means it can pick up stray RADIO FREQUENCY NOISE.
Which will be milli volts BUT enough to send the MCU a bit crazy.
( High frequency AC too...)
The connections to your Potentiometers or Hall effect sensors NEED TO BE 100%
to avoid a wire becoming lose and picking up stray RF or even stray magnetic fields.
A popular misconception is that you need to SHIELD your signal wires. This is not required!!!
Why? ( but but but screening is really like a good idea right?)
Because you are working in the whole volt spectrum of DC signal. ( 2.5 volts DC +/- 1.5 volts)
This voltage range is thousands of times larger that the millivolt range!
and so "noise" is so tiny as to be ignorable when the signal wires are connected 100% great.
BUT if an input wire come lose... the noise is the only signal and yes this will be a BIG issue. : - )
Especially when feeding analogue to digital convertors that have no filters to filter out bad input.
Dirty pots will cause spikes in that input AND other inputs.
The signal wire for a tiny moment comes lose and noise floods in and also capacitance blah blah blah etc.
Clean the pots AND make dead sure your connections are 100% great!
If you can I would suggest you SOLDER EVERY CONNECTION.
FYI the logitech pro has four analog inputs, these all need to be 100% great.
One lose input will spike the lot!
And breath.... gasp... reaches for ashtray and tin mug of brandy...