Welcome! Log In Create A New Profile

Advanced

Poor joystick calibration

Posted by curiousgeorge 
Poor joystick calibration
August 09, 2023 06:55PM
Hi Jaewon,

We have an issue with the results of our joystick calibration. At the moment we're connecting the joystick via usb and calibrating the joystick using a 9-point evenly spaced square calibration in monkeylogic. However when calibrated, the joystick position on the screen does not properly capture the physical position of the joystick.

I've attached a picture to better explain this. It is plotting the joystick position as I move it around its outmost physical boundary. As you can see the traced out position is uneven and it appears that the calibration transformation is affecting the left and right sides differently.

Is there anyway to fix or remedy this? What could be at fault here?

Thanks for your time.
Attachments:
open | download - joystick boundary post calibration.png (24.9 KB)
Re: Poor joystick calibration
August 09, 2023 07:34PM
For a USB joystick, you can safely assume that its output changes evenly and symmetrically for the entire field, so you can just use the Origin & Gain method. If you do the 2-D Spatial Transformation, you will likely get distorted calibration because there is no guarantee that you push the stick to the correct direction and degree.

On the main menu, choose the Origin & Gain method and click the reset button if it is activated. In the calibration tool, increase/decrease Gain X and Gain Y until you see the joystick cursor reach the edges of the screen (or the boundaries of any region that you want to use the joystick in). Leave the other parameters (Origin X, Origin Y and Rotation) to 0.
Re: Poor joystick calibration
August 10, 2023 05:01PM
Thank you for your response Jaewon.

I tried the steps that you recommended but there are still some issues:

Using the X and Y gain I can now use the joystick to reach everywhere on the screen. However the left and right (as well as up and down) outputs are not symmetric. For example with the same gain I go beyond the screen on the right side but reach 3/4 screen on the left side.

Also when resetting the calibration and recalibrating with origin X and Y of 0, the joystick is not centered on the screen. So if I were to leave the Origin X and Y to 0, everything would be translated/shifted.

This issue was consistent across a couple of joysticks of the same brand. We are currently using a 212 series joystick from PQ Control (model 212s15s8383).

I am waiting to receive a new joystick brand and setup in the next week, so I will update you here if the issue persists. But I am wondering if there's any way I can try to fix this issue at the moment.

Thanks
Re: Poor joystick calibration
August 10, 2023 05:41PM
Yours is an analog voltage joystick, not a digital one. Someone probably added a USB interface to it, so you can ask the person why the cursor is not centered when the stick is not moved.

It sounds like the custom USB interface adds an offset to the digital output. Then adjust Origin X and Y (either to the positive or negative direction) so that the cursor comes to the center when the stick is in the resting position.
Re: Poor joystick calibration
August 10, 2023 06:22PM
Hi Jaewon,

Centring the joystick in the calibration was not an issue, i already did that using the origin x and y.

The issue that remains is that the output is not symmetrical for left and right (and up and down). Is there anyway to fix that?

There is an ADC onboard on the joystick, so we only get a USB signal output. With an analog joystick you still recommend using the Origin and Gain method?

Thanks
Re: Poor joystick calibration
August 11, 2023 10:43AM
The output of voltage joysticks is also usually symmetrical, so I believe the issue is caused by the USB interface. The best thing is for the person who made the ADC to fix the problem. You can try removing the ADC and connecting the joystick to your NI board as well.

If you do not want to touch the hardware, try the 2-D Spatial Transform again. I would use just 5 points, like center, top-right, bottom-right, top-left and bottom-left.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.