Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
February 1st, 2020 at 6:25 AM
So I thought I'd post a thread about this because hey, it's nifty and pretty useful.
what you see here is the UJI or Ultimate Joystick interface.
It's a programmable logic controller that's specifically designed to take analog and digital inputs (which you set via resistors)>
up to 10 of them, and convert them into a generic joystick which works via USB.
originally designed to convert old hardware to new standards this wonderful little device can actually be used to design your own interface setups for stuff like custom flight cockpits, DIY joysticks, and other wonderful things, on the cheap no less.
you can get it here: https://backofficeshow.com/shop/ultimate...-interface
now while I haven't messed with one of these personally I've done similar work using Arduinos, raspberry pi's, and other hardware and can confirm that yeah this is a pretty great little device, just wish it had more inputs but what makes this one really special is that it's designed to reduce input lag by running at 40hz and responding faster than you can.
honestly I'm thinking about picking a few up to see how they work for some custom control interface panel upgrades.
just remember, the chip is write once so once you get it setup it's meant to stay, and you'll have to save a config file but once you do that you're good to go.
confirmed to work with most software that supports generic joystick inputs like elite dangerous, various racing games, emulators, etc.
hats off to those brilliant madmen across the pond, they once again lead the charge in making DIY more accessible.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
February 12th, 2020 at 4:28 AM
Quote:just wish it had more inputs
Dude it has EIGHT ANALOG lmao. A single joystick should be able to work with just four AFAIK, maybe even two (one for each axis) if you play with resistances enough (ie. negative X if voltage is below a certain point, positive X if voltage is above a certain point, same for Y), and maybe use one of the digital inputs as R3/L3 (like a console controller.)
I wish there were decent widely-used alternatives to serial though. After all the problems I had with my arduino hash cracking thing, I'd love to just forget about it and never hear the word again, not to mention that the only way to make it fast is by increasing baud rate which also increased its power consumption and increased the likelihood to drop a few bytes here and there.
#BringPSslash2Back
#BringRS232Back
#MakeUARTPortsStandardForTheFirstTime
Might be a cool little board but I mean even Arduino Nano has 8 analog pins and 22 digital pins while still (sort of) safely operating at a baudrate of 2 million, or 2mbps, and given they both use serial, I can't see the reasoning behind buying one of these over the nano, except for maybe the better form factor for someone building a physical controller.
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
February 12th, 2020 at 4:33 AM
(February 12th, 2020 at 4:28 AM)Lain Wrote: Might be a cool little board but I mean even Arduino Nano has 8 analog pins and 22 digital pins while still (sort of) safely operating at a baudrate of 2 million, or 2mbps, and given they both use serial, I can't see the reasoning behind buying one of these over the nano, except for maybe the better form factor for someone building a physical controller.
Well actually they do bring that up when discussing it.
the main thing is, this has almost no delay between button presses and action on the screen, it's far less input lag than using an Arduino solution because it's a dedicated device.
the reason I say more inputs is because It'd be nice to have once device with at least double what this has, not for your standard gamepad or flight stick, but for control consoles and such.
like, it'd be awesome to build a cockpit for Elite dangerous with all the inputs mapped to physical buttons and switches.
but then... I like physical buttons and switches with weight to them and an audible click...
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
February 12th, 2020 at 6:04 AM
Read over some of the docs for the programs they mention in the description (vJoy driver and vJoySerialFeeder)
I'm having trouble finding exactly how the 40Hz is determined and the manual isn't very helpful. Of course yeah 40Hz is decently fast, better than the framerate I get in most games on this old HP, but I still think that a cheap arduino clone can outperform it.
From what I've gathered, UJI only sends serial data. Of course it does, because there's no other real way to transmit data over USB. That data is read by vJoySerialFeeder and then fed to the device driver (vJoy) which then actually does something with that information (i.e. making your game display move on the x-axis or whatever.)
Now, there are 6 possible protocols that are supported by SerialFeeder, the only notable ones are IBUS, DSM, and SBUS, and from what I've gathered online, IBUS is the most commonly used one for people tinkering with joysticks and homebrew controllers, which is coincidentally what UJI lists as its protocol of choice. IBUS does all kinds of processing and formatting for making 'packets' as well as checksums so that the data can actually be verified and interpreted by the above programs, at least from what I can make out from SerialFeeder's GitHub files. I also see that the example Arduino sketch they use is using a baudrate of 115200 for actual data transmission, so I'm going to assume that's what SerialFeeder uses by default, and by extension, to ensure compatability with SerialFeeder, that's what UJI uses by default.
So let's do some math:
Code: #Converting bits to bytes
#Represents bytes transmitted in one second
115200 / 8 = 14400
#For a polling rate of 40Hz...
14400 / 40 = 360
Seems a little high for a single packet of data, and the ibus headers/source don't look like they're going to be transmitting that much data at once.
I can't imagine a packet of data contains more than like 20 bytes or so, just in general for checksums, analog values and whatnot.
So theoretically, the device should be able to send up to 720 IBUS packets as an approximation. Don't quote me on numbers since most of this is (educated?) guesswork.
So I'm assuming most of the delay comes from SerialFeeder actually passing the data to vJoy and then vJoy actually doing something. Don't know which one is slower, but my guess is SerialFeeder just because I'm biased against serial as a whole
And at that point, I can't imagine that an arduino device would somehow perform worse by any means. From what I can make out in the photo, the UJI uses a (PIC)16F688 (Microchip) processor which is only capable of 8MHz clock at most, half the speed of most Atmel ICs, including the 32u4 and 328p.
Yeah. More inputs and it could be a good choice, especially considering form factor, but 15 quid is quite the markup for canucks like me when a chinese nano clone costs 2$ lol
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
February 12th, 2020 at 2:57 PM
well you're not wrong.
then again honestly I'd like something like this which works over an updated parallel bus.
UPB?
more pins means more packets per second limited by the CPU right?
side note: my desktop has both RS232 serial and a LPT parallel port which run off the PCI-E bus via an add on card.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
February 12th, 2020 at 6:48 PM
(February 12th, 2020 at 2:57 PM)SpookyZalost Wrote: side note: my desktop has both RS232 serial and a LPT parallel port which run off the PCI-E bus via an add on card.
Thinkpad or something? Extremely based, I'm jealous.
Yeah you can get a lot more transfer if there was a better kind of port to actually connect the device to handle multiple pins.
Since your laptop has an RS232 port, maybe you can try to use the standard library RS232 arduino headers or something. Either that or just use raw UART or something along with a converter because either way, if you do most of the work on the device itself instead of having to wrap everything in IBUS over serial and wait for vJoy to parse and use data (and entirely eliminating the middleman of SerialFeeder) then your polling rate will probably be exponentially higher than 40Hz.
Looks like DirectX also includes Joystick drivers with some relatively open source documentation on how to use it. Seems it uses COM objects on the HID stack, so it'll probably also be a lot faster than vJoy, but IDK if it supports other ports than USB. In any case, would probably be much faster than the UJI 'stack' since it'll operate natively on Windows without the need for third-party tools.
But even I don't have any experience with DirectX since my graphics programming knowledge is next to zero from some guides I followed for OpenGL. And DirectX looks a lot more complicated. This is if you're hardcore, not really a weekend project xd
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
Posts: 2,682
Joined: Jun 2013
Reputation:
105
Location: Tycho City, Tycho Crater, Luna.
Items (1) ▼
February 13th, 2020 at 2:28 AM
(February 12th, 2020 at 6:48 PM)Lain Wrote: Thinkpad or something? Extremely based, I'm jealous.
well I do have an old thinkpad with both serial and parallel ports but for my desktop I picked up the add on card at microcenter, so far works in both linux and windows 8.1
(February 12th, 2020 at 6:48 PM)Lain Wrote: Yeah you can get a lot more transfer if there was a better kind of port to actually connect the device to handle multiple pins.
Since your laptop has an RS232 port, maybe you can try to use the standard library RS232 arduino headers or something. Either that or just use raw UART or something along with a converter because either way, if you do most of the work on the device itself instead of having to wrap everything in IBUS over serial and wait for vJoy to parse and use data (and entirely eliminating the middleman of SerialFeeder) then your polling rate will probably be exponentially higher than 40Hz.
Looks like DirectX also includes Joystick drivers with some relatively open source documentation on how to use it. Seems it uses COM objects on the HID stack, so it'll probably also be a lot faster than vJoy, but IDK if it supports other ports than USB. In any case, would probably be much faster than the UJI 'stack' since it'll operate natively on Windows without the need for third-party tools.
But even I don't have any experience with DirectX since my graphics programming knowledge is next to zero from some guides I followed for OpenGL. And DirectX looks a lot more complicated. This is if you're hardcore, not really a weekend project xd
this right here is how I use my parallel port to plug in old video game joysticks lol.
basically just programming the parallel port to act as a gpio and making a cable that sends the connection pins to the parallel bus since those old joysticks are just that, custom parallel connections and such, each button going to a different pin.
honestly I wouldn't know where to begin making a 25pin parallel version of the current USB 4.0 bus, but if it were possible the data speeds would be insane, enough to crush thunderbolt and possibly sata... the only problem is, CPU bandwith, you'd need one hell of a southbridge to run it, and any add in cards would have to use PCI-E X8 possibly up to X16 to maintain it.
the question is, what would you use such a parallel bus for?
linking motherboards?
neural interface?
maybe some kinda plug n play NPU?
personally I'd find some way to expand it into a ton of custom user interface controls taking advantage of the huge bandwidth to have near zero latency.
also just came up with something dedicated for the linking motherboards bit.
High Speed Parallel Fiber channel bus.
Specifically designed for linking 2 or more core systems together in a cluster configuration, possibly for a neural network.
probably already exists though... and way overkill for mere joysticks lol.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
Posts: 476
Joined: Feb 2019
Reputation:
38
Location: 9th Bliss Field
Items (3) ▼
February 13th, 2020 at 3:11 AM
(February 13th, 2020 at 2:28 AM)SpookyZalost Wrote: probably already exists though... and way overkill for mere joysticks lol.
Yeah gotta keep in mind the actual use-case lmfao, at that point it's like trying to overclock a mouse. Instead of thinking if you could or would, you need to think if you should.
I still find it incredible that HID and generic output devices can achieve <1ms delay. Guess that's the power of a full stack to manage it.
and now I'm gonna go delve into the linux HID stack source out of curiosity... See you next month
|