Freeplay CM3 Slim with shoulder button upgrades
#21
A little off-topic, When testing the PS Vita 1000 Joystick at the first place I checked that wiring was correct but when going forward on my incoming built I noticed something "weird" about the joystick I received.
X and Y "potentiometer" are off-center, far far off (following value (X) come from ADC reading, not GPIO driver) :
min : 0x02C0 : 704
center: 0x077C : 1916
max: 0x09A2 : 2466

Sadly, there is no way to "correct" the problem via the GPIO driver itself, 'input_set_abs_params' function 'flat' argument (the last one) act only as a center dead zone.

Hipcat, did you encounter this problem in one of your build?
Reply
#22
(03-09-2019, 07:14 AM)Porcinus Wrote: A little off-topic, When testing the PS Vita 1000 Joystick at the first place I checked that wiring was correct but when going forward on my incoming built I noticed something "weird" about the joystick I received.
X and Y "potentiometer" are off-center, far far off (following value (X) come from ADC reading, not GPIO driver) :
min : 0x02C0 : 704
center: 0x077C : 1916
max: 0x09A2 : 2466

Sadly, there is no way to "correct" the problem via the GPIO driver itself, 'input_set_abs_params' function 'flat' argument (the last one) act only as a center dead zone.

Hipcat, did you encounter this problem in one of your build?

No I didn’t have any trouble with the PSP 1000 analog sticks. I am having some trouble with these Joy Con analog sticks now though. I’m trying to ge the correct values in for them. If I can get these to work I wonder if you’ll be able to use the same method to input your analog values. If I get these working I’ll let you know how and maybe it will help you. (It sounds like you know more about these things than I do though Smile
Reply
#23
PSP 1000 analog sticks work fine for me too.

I ordered a new PS Vita 1000 Joystick to check if it a malfunction or a normal behave.
If there is no problems, I will need to make modification to GPIO driver to allow a definition of axis center value. The only solution I see for this is to create our own 'input_set_abs_params' function but this may result in a little performance decrease...
Reply
#24
I disassembled PS Vita 1000 and PS Vita 2000 joystick and found some "weird" thinks:

PS Vita 1000: Use hall effect sensors with a ferromagnetic ring at each axis pivots, this hall effect sensor have a detection range of around 1mm, the joystick also embed a chip that convert hall effect sensor to analog. The only think that can wear out is the magnet itself, it will loss its "power" with naturally with time, the funny thing about this is that the joystick will work until the hall effect sensors can no more detect the magnets. I understand the cost of these devices now.

PS Vita 2000: use carbon pad with a copper pin running on it, it is a pure analog device. It is really a mechanical wear, these devices are really cheap to manufacture.
Reply
#25
(03-10-2019, 08:39 AM)Porcinus Wrote: I disassembled PS Vita 1000 and PS Vita 2000 joystick and found some "weird" thinks:

PS Vita 1000: Use hall effect sensors with a ferromagnetic ring at each axis pivots, this hall effect sensor have a detection range of around 1mm, the joystick also embed a chip that convert hall effect sensor to analog. The only think that can wear out is the magnet itself, it will loss its "power" with naturally with time, the funny thing about this is that the joystick will work until the hall effect sensors can no more detect the magnets. I understand the cost of these devices now.

PS Vita 2000: use carbon pad with a copper pin running on it, it is a pure analog device. It is really a mechanical wear, these devices are really cheap to manufacture.

You are really getting into it Smile I just mush things together and see what works, and you seem to actually be doing it the right way. Oh I see that I misunderstood PSP 1000 and the PS Vita sticks. No I didn’t see any issues like that with my Vita sticks either though. They just worked (after troubleshooting a bad connection in 1 for waaaay too long)
Reply
#26
I should receive the new one around Wednesday, I am pretty sure the current one is just defective, I will keep you update Wink
Reply
#27
(03-10-2019, 08:29 PM)Porcinus Wrote: I should receive the new one around Wednesday, I am pretty sure the current one is just defective, I will keep you update Wink

Cool. I’m stilll trying to get the system to recognize th correct values of the Nintendo Switch Joy Con controllers. Do you know a good way to do it? I have gotten the values for each axis by using 

jscal -c /dev/input/js0

In checking for the values the analog sticks read smoothly and there doesn’t seem to be any hardware issues.

I’ve tried adding the values to the mk_arcade_joystick.conf like this (not my parameter values)

Options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=79 y1addr=72 x2addr=75 y2addr=77 x1params=374,3418,16,384 y1params=517,3378,16,384 x2params=374,3418,16,384 y2params=517,3378,16,384 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,35,36,37,-1

But the analogs don’t register in the controller setup when I add the parameters this way. I’ve also tried setting them this way to test, but not all axis are recognized in the controller setup.

evdev-joystick --evdev /dev/input/event0 --axis 0 --minimum 374 --maximum 3418 --deadzone 384 --fuzz 16
Reply
#28
I just seen the driver has been updated 2 days ago, for some reasons, Github didn't notify me :/

Try "x1params=0,4095,16,0" and same parameters for Y, run 'modprobe -r mk_arcade_joystick_rpi && modprobe mk_arcade_joystick_rpi' to restart the driver, then run 'jstest /dev/input/js0' to see how the joystick behave, I am curious to see what are the lowest, center and higher value.

To found min and max, move the joysticks to there limits (left,right,up,down), run 2 SSH sessions, in the first one run 'dmesg -w' (leave it running), in the second one run 'modprobe -r mk_arcade_joystick_rpi' to kill the driver and read values from the session running dmesg. To restart the driver run 'modprobe mk_arcade_joystick_rpi'.
Reply
#29
Just found this, not sure it will help you but it can still be useful :
https://github.com/dekuNukem/Nintendo_Sw...ngineering
https://imgur.com/t/joycon/sxIab
https://imgur.com/QZCymI7
Reply
#30
I figured out a way to center ADC values for offcentered joystick (+linearity) but at a little cost of performance and accuracy, in my case minus direction will more than 2x less accurate than the positive side :/

I will modify the driver this afternoon to test out if it work.

I missed to ask what was your problem with the values you got, offcentered, unstable, nonlinear?

Edit: I just received the new joystick, offcenter and not linear...
Edit#2: I have a working driver prototype, no additional modification into mk_arcade_joystick.conf, just mk_arcade_joystick.c.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)