Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Problem with joysticks and Zero delay Encoder  (Read 385 times)

0 Members and 1 Guest are viewing this topic.

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Problem with joysticks and Zero delay Encoder
« on: February 22, 2021, 05:32:16 pm »
I decided to build a custom controller for KErbal Space Program.



Everything works correctly but I have a problem with the joysticks.
I thought about 3 joysticks. One up and down, for the throttle.
One Right Left for roll, and the 4 position one for everything else (yaw and pitch).
However, both the setup program and the game always recognize only 2 axes, so the third one (the 4-position one) becomes a duplicate of the other 2.
What am I doing wrong?
« Last Edit: February 22, 2021, 05:35:39 pm by nancy76 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8260
  • Last login:Today at 08:24:50 am
  • Designated spam hunter
Re: Problem with joysticks and Zero delay Encoder
« Reply #1 on: February 22, 2021, 06:32:17 pm »
I decided to build a custom controller for KErbal Space Program.



Everything works correctly but I have a problem with the joysticks.
I thought about 3 joysticks. One up and down, for the throttle.
One Right Left for roll, and the 4 position one for everything else (yaw and pitch).
However, both the setup program and the game always recognize only 2 axes, so the third one (the 4-position one) becomes a duplicate of the other 2.
What am I doing wrong?
Disclaimer: I'm not familiar with this game or the associated control requirements.

Which inputs are you using?
- The 2-pin joystick Up/Down/Right/Left inputs and the 5-pin joystick inputs are in parallel.
- That panel looks like it has 12 or 13 buttons and the 8 joystick inputs you described.
-- I don't see how you're going to fit all of those inputs on a single ZD encoder.



Assuming you are using the PC version of the program, the number of inputs shown on pages 40-46 of this PDF exceed the number of inputs available on a ZD encoder, despite a lot of overlap.
- Consider making a list of every input that you will need during gameplay so you know how many encoder inputs you need.
https://www.kerbalspaceprogram.com/files/KSPedia-PC.pdf

Seems like you would be better off using an IPac2, IPac4, or Ultimate I/O encoder from Ultimarc.   :dunno


Scott

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Re: Problem with joysticks and Zero delay Encoder
« Reply #2 on: February 23, 2021, 01:04:35 am »
Thank you for the advice! I will try to see IPac2 or IPac4 in the near future.
With the custom controller I only put in the keys I use the most. The rest I leave to the keyboard also because the others are little used.
However, my question wasn't how many keys I could associate, but why I can't get the third joystick to read both in the device configuration panel and in the game.


My connections to the board you posted are:
Left-Right 2pin to 2 position joystick
Up-Down 2pin to 2 position joystick
5pin to 4 position joystick
« Last Edit: February 23, 2021, 01:15:04 am by nancy76 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8260
  • Last login:Today at 08:24:50 am
  • Designated spam hunter
Re: Problem with joysticks and Zero delay Encoder
« Reply #3 on: February 23, 2021, 02:12:55 am »
my question wasn't how many keys I could associate, but why I can't get the third joystick to read both in the device configuration panel and in the game.


My connections to the board you posted are:
Left-Right 2pin to 2 position joystick
Up-Down 2pin to 2 position joystick
5pin to 4 position joystick
As I mentioned earlier, the four 2-pin joystick connectors (Up/Down/Right/Left) and the four inputs on the 5-pin connector (Up/Down/Right/Left) are connected in parallel -- meaning that they go to the same four encoder inputs (1 joystick), not eight separate encoder inputs. (2 joysticks)
- Pressing the "Up" 2-pin switch is electrically the same as pressing the "Up" 5-pin switch.
- Both switches connect to the same "Up" input so both give the same output.

If you look at the Windows Control Panel joystick properties for your ZD encoder it should have one joystick (white box with crosshairs) like this, but with more buttons.



Your ZD encoder won't have the POV hat or sliders like this one . . .



. . . and it won't have two sticks and a hat switch like this one.



Bottom line, what you need are the four Up/Down/Right/Left inputs you're using now and four other inputs for the other stick(s) so you have a total of eight inputs for the three sticks. (4+2+2=8)


Scott

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Re: Problem with joysticks and Zero delay Encoder
« Reply #4 on: February 23, 2021, 04:35:41 am »
Thanks....you are right! I was really foolish...(I just realized that you already indicated that they worked in parallel!!)
I looked at the images superficially from here:
https://imgur.com/gallery/W5gtA6U/comment/2039930751/1

I didn't see that he used the two joysticks by associating them with two buttons and not left-right / up -down

Thanks again for the exhaustive explanation. So I think I will have to buy as you said at least one IPac2 encoder, and at this point study a new configuration to associate new keys.
I take advantage of your kindnesshave...I need for the new configuration 36 inputs plus joysticks
With the IPac4(or IPac2 or Ultimate I/O encoder) could I configure the left/right/up/down pins not used by joystick as simple non-directional keys?
Can I buy them only from the site or are they also for sale on Amazon?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8260
  • Last login:Today at 08:24:50 am
  • Designated spam hunter
Re: Problem with joysticks and Zero delay Encoder
« Reply #5 on: February 23, 2021, 12:06:53 pm »
I need for the new configuration 36 inputs plus joysticks
36 inputs + 8 for the joysticks = 44 inputs.

IPac2 only has 32 inputs so the IPac4 (56 inputs) or Ultimate I/O (48 inputs) would be better choices.
- 12 "shifted" functions can be done on the IPac2, but for your application it's probably not worth the extra effort and possible confusion.

The IPac4 board is less expensive than the Ultimate I/O and it's easier to make a custom wiring harness.

The Ultimate I/O board is more expensive and you need to either buy pre-fab harnesses or crimp a bunch of Dupont pins.
- No idea if the Kerbal Space Program software can control the button LEDs.  If it can, the Ultimate I/O might be worth considering.

With the IPac4(or IPac2 or Ultimate I/O encoder) could I configure the left/right/up/down pins not used by joystick as simple non-directional keys?
Yes, each input can be configured via the WinIPAC V2 Configuration Utility to output a keystroke, mouse button or game controller button press.

Can I buy them only from the site or are they also for sale on Amazon?
T-Molding com is a reputable Ultimarc reseller that carries the IPac4 on Amazon.
https://www.amazon.com/I-PAC-Arcade-Controller-Interface-Cable/dp/B06XPQ6554/


Scott

Gilrock

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 617
  • Last login:March 06, 2021, 02:59:49 pm
Re: Problem with joysticks and Zero delay Encoder
« Reply #6 on: February 23, 2021, 01:40:57 pm »
I'll just add my recent zero delay encoder experience.  I built 2 bartops using them the past couple months.  One of them I pulled out of an older bartop I didn't like and so I used all the connectors along the bottom since they were the only cables I had and the joystick in the old one used that 5 pin input.  That worked fine having the joystick leaf switches connected to the button inputs.  Then for the second bartop I said hey I'll use those Up, Down, Left, Right 2 pin inputs.  The joystick inputs appeared to be working fine.  They would navigate menus and I was playing a couple Mame games.  But when I tried to play Dragon's Lair I was failing bad even on scenes I know how to play.  I remembered when I ran "jtest" on the Pi I got big numbers when moving the joystick like 32768 or 0 and then a couple times I noticed half that like 16536 even though I was configured as 4 way.  So I got the idea to move the inputs over to the button inputs on the encode and now Dragon's Lair works perfectly.  I guess those Left, Right, Up, Down inputs aren't meant to work with an on/off leaf type switch.  Anyways hope this might help someone else in the future.

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Re: Problem with joysticks and Zero delay Encoder
« Reply #7 on: February 25, 2021, 02:59:34 am »
I have ordered the IPac4. Thank you very much for the advice! I can't wait for it to be delivered!
One last thing...
If I wanted to buy a 3-axis joystick, really small, do you have one to recommend? (Would THIS one work? If so, how should I connect it?).
« Last Edit: February 25, 2021, 03:09:19 am by nancy76 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8260
  • Last login:Today at 08:24:50 am
  • Designated spam hunter
Re: Problem with joysticks and Zero delay Encoder
« Reply #8 on: February 25, 2021, 07:13:38 am »
If I wanted to buy a 3-axis joystick, really small, do you have one to recommend? (Would THIS one work? If so, how should I connect it?).
That analog 3-axis joystick won't work with the microswitch-only IPac4 encoder.
- You would need an analog encoder like an A-Pac, a U-HID/UHID Nano, or a 32u4 Arduino (i.e. one with A/D converter inputs) running a firmware like KADE miniArcade 2.0.

For small microswitch joysticks, use search terms "240v joystick" in Amazon and you'll find ones like this one or this one.
- Both use the same size base, switches, and restrictor plates.
- The second one has a taller handle with a green top-fire button.

 

There's also this one from Apem with a slightly different handle shape.



You should be able to put yaw/pitch on one stick and roll/throttle on a second stick if you want a 2-stick, 4-axis setup.


Scott

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Re: Problem with joysticks and Zero delay Encoder
« Reply #9 on: February 25, 2021, 07:49:03 am »
So, there is no joystick with X - Y - Z axes (Up-Down=Pitch - Right/Left=Yaw and Right Rotation/Left Rotation=Roll)?  :'(
(If you see the initial post I already have a 2-axis joystick)

Last thing and then I'll shut up forever....
Doesn't the ipac4 have a 5v output like the ZERO DELAY interface? If so, any quick tips for getting power for the LEDs?

« Last Edit: February 25, 2021, 09:13:11 am by nancy76 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8260
  • Last login:Today at 08:24:50 am
  • Designated spam hunter
Re: Problem with joysticks and Zero delay Encoder
« Reply #10 on: February 25, 2021, 10:14:43 am »
So, there is no joystick with X - Y - Z axes (Up-Down=Pitch - Right/Left=Yaw and Right Rotation/Left Rotation=Roll)?  :'(
Looks like somebody used a 3-axis analog + pushbutton stick in this 3d printable Kerbal controller . . .
https://www.thingiverse.com/thing:2784716

. . . based on this instructable.
https://www.instructables.com/KerbalController-a-Custom-Control-Panel-for-Rocket/

    or

You could use a mechanical rotary joystick like the Ikari Warriors SNK LS-30 or the Happ mechanical rotary joystick . . . that they stopped making about a year ago.   :banghead:
- Downside on these sticks is that they take up a lot of room under the panel and you'll need a rotary encoder.

    or

You could make a version of the Atari "Twist-to-Turn" joystick used in the Xybots cab. (see pages 37-38 of the manual here)

- Do a shaft replacement using a similar approach to this thread. (Happ Super uses the same style base as their mechanical rotary stick)
http://forum.arcadecontrols.com/index.php/topic,158253.0.html

- Below the actuator, use a shaft collar, 3d printed part(s), and microswitches.
-- I haven't designed or built this section, but it should be possible.

Doesn't the ipac4 have a 5v output like the ZERO DELAY interface? If so, any quick tips for getting power for the LEDs?
A quick glance shows 12 LED buttons on your panel.

12 LEDs * 20mA = 240mA

You aren't getting that from an IPac4 (AFAIK there's no 5v output pin or screw terminal) or an IPac2. (The three 5v pins are to power the six optical circuit LEDs and photodiodes.)

Your best bet is one of these three options:
1. Hacked SATA power/molex cable.
2. Hacked USB cable. *** Do not connect through an un-powered USB hub.  They are only rated for 100mA per port. ***
3. 5v@500mA (or greater) wall wart.


Scott

nancy76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:March 04, 2021, 12:24:39 pm
  • I want to build my own arcade controls!
Re: Problem with joysticks and Zero delay Encoder
« Reply #11 on: February 25, 2021, 12:26:58 pm »
Quote from: PL1

Looks like somebody used a 3-axis analog + pushbutton stick in this 3d printable Kerbal controller . . .
https://www.thingiverse.com/thing:2784716

. . . based on this instructable.
https://www.instructables.com/KerbalController-a-Custom-Control-Panel-for-Rocket/

I know it well, but it is based on ARDUINO programming and python programming with the KSP game.
Too difficult for me, I don't have the skills. I was looking for a joystick that plugs into the IPac4 interface and there is nothing else to do but connect the wires.

   
Quote from: PL1
You could use a mechanical rotary joystick like the Ikari Warriors SNK LS-30 or the Happ mechanical rotary joystick . . . that they stopped making about a year ago.   :banghead:
- Downside on these sticks is that they take up a lot of room under the panel and you'll need a rotary encoder.

too complicated to find and too expensive to purchase

Quote from: PL1
You could make a version of the Atari "Twist-to-Turn" joystick used in the Xybots cab. (see pages 37-38 of the manual here)

- Do a shaft replacement using a similar approach to this thread. (Happ Super uses the same style base as their mechanical rotary stick)
http://forum.arcadecontrols.com/index.php/topic,158253.0.html

- Below the actuator, use a shaft collar, 3d printed part(s), and microswitches.
-- I haven't designed or built this section, but it should be possible.


I bought IPac4 thinking it would make things easier for me...but it has become complicated  :banghead:

Quote from: PL1
A quick glance shows 12 LED buttons on your panel.

12 LEDs * 20mA = 240mA

You aren't getting that from an IPac4 (AFAIK there's no 5v output pin or screw terminal) or an IPac2. (The three 5v pins are to power the six optical circuit LEDs and photodiodes.)

Your best bet is one of these three options:
1. Hacked SATA power/molex cable.
2. Hacked USB cable. *** Do not connect through an un-powered USB hub.  They are only rated for 100mA per port. ***
3. 5v@500mA (or greater) wall wart.

Certainly the last option is the easiest. I have a Wart Wall at hand
output : 12V@1.5A
But if I search I can find others