Author Topic: Question by interface USB-3  (Read 2008 times)

0 Members and 1 Guest are viewing this topic.

Offline alex 54Topic starter

  • Newbie
  • Posts: 5
  • Country: il
Question by interface USB-3
« on: September 16, 2018, 08:38:36 am »
Hello,i want to ask a question by interface USB-3
I'm a beginner programmer, I'm sorry if the question sounds silly, because the information on the Internet is not enough for this issue.
I recently made a USB 2 gaming device (the picture is attached), and it turned out very successful mainly because of the high 0.8 ms, the polling frequency of this device.
Then I decided to explore the possibilities of the USB 3 interface.
Purpose: to achieve the fastest transfer of information (which is only 8 bytes in size) to the program (game).
Technically, i can do it like,but will the USB 3 device have some advantage over USB 2 in the speed of information transfer from the microcontroller to the program (game), taking into account the latency of Windows?

Sincerely, Alex 54.


« Last Edit: September 16, 2018, 08:43:52 am by alex 54 »
 

Offline timgiles

  • Regular Contributor
  • *
  • Posts: 236
  • Country: se
  • Programmer, DB architect
Re: Question by interface USB-3
« Reply #1 on: September 16, 2018, 09:07:31 am »
The latency caused by windows itself wont change, at least once the hardware USB chips have received the data, passed through to the motherboard USB device driver and then in to the windows OS/application stack. The length of time to transmit/receive the data will of course be shorter but for a gaming device (is this emulating a HID device like a keyboard, joystick, mouse?) I dont see that you will be transmitting much data or very many packets per second - so I am not sure the reduction in total latency will prove to be significant. Seems like a sledgehammer to crack a nut. Also USB 3 implemented on your device requires differential pairs routing with much more stringent trace length matching requirements...
 
The following users thanked this post: alex 54

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Question by interface USB-3
« Reply #2 on: September 16, 2018, 12:46:41 pm »
I can't read Russian, but doesn't the picture show your device operating only at USB full speed? Going to high speed should allow for a decent latency reduction and be easier to implement.
 
The following users thanked this post: alex 54

Offline wraper

  • Supporter
  • ****
  • Posts: 16865
  • Country: lv
Re: Question by interface USB-3
« Reply #3 on: September 16, 2018, 01:19:09 pm »
Not only USB3 won't provide any advantage for input devices, I'm sure you aren't even utilizing potential of USB2.0. I'm pretty sure you are using USB full speed mode (12mbps). Anyway most programs cannot really utilize 1000Hz HID report rate anyway.
Quote
I recently made a USB 2 gaming device (the picture is attached), and it turned out very successful mainly because of the high 0.8 ms, the polling frequency of this device.
Then I decided to explore the possibilities of the USB 3 interface.
It's 1000 reports per second really (1000 Hz polling rate). You cannot do more with HID.
 
The following users thanked this post: alex 54

Offline alex 54Topic starter

  • Newbie
  • Posts: 5
  • Country: il
Re: Question by interface USB-3
« Reply #4 on: September 17, 2018, 06:44:05 am »
Dear gentlemen, thank you for participating in the discussion of the topic.
I'll tell you why I asked a question about USB-3.
When I made the USB-2 gaming device shown in the picture above,
I managed to implement in it all the maximum parameters for this class.
The first 30 minute combat sortie (I play a serious simulator) showed an undoubted advantage over other players. The picture below, = S = Alex it's me.
Testing the gaming device showed that this result was obtained
due to the high polling frequency of the device (the higher the polling frequency, the smoother control, and therefore less speed loss, the main advantage in combat).
The polling frequency of my device is maximal for USB-2, based on the test program it is 1250 Hz.
Maybe it happened because I used a high-quality microcontroller XMega, with hardware support for USB, I do not know.
But not every gaming device has a similar parameter.
That's why I was interested in USB-3, because if I could double
parameter 1250 Hz, it would turn out not a device but a bomb.
I felt that the frequency of 1000 Hz for a HID was selected for a reason,
but I wanted to investigate the question on USB-3 and get an answer why it is impossible to change the parameter of interest to me.
And one more interesting fact about the made device USB-2:
Due to the fact that I used as  sensors incremental
encoders, it was possible to realize auto-calibration and also the guidance system which has an accuracy of 0.0009 degrees, all this is not only my merit, my leader of this project is a very talented person.
 

Once again many thanks to all, with respect, Alex 54.

« Last Edit: September 17, 2018, 06:55:34 am by alex 54 »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Question by interface USB-3
« Reply #5 on: September 17, 2018, 06:53:20 am »
Here's a fun idea: get a friend, or get the computer, to run a truly double-blind test where the experiment is: "can alex 54 perform better at combat simulator with 1000 Hz polling vs 500 Hz polling?"

Do it properly (i.e., you, Alex, cannot know whether the controller is set to 1000 or 500 Hz polling while playing the game nor while noting down your scores), and do the stats properly (is 1000 Hz better with 95% confidence?)

The above will be much, much easier that tricking windows into accepting USB 3 (even if you're starting with zero knowledge of statistics) for a HID joystick device, the results might surprise you, and will guide you as to whether USB3 is a worthwhile next step. I'm happy to helps with the stats.
 

Offline alex 54Topic starter

  • Newbie
  • Posts: 5
  • Country: il
Re: Question by interface USB-3
« Reply #6 on: September 17, 2018, 07:59:00 am »

Quote
Here's a fun idea:

Hello, thank you for an objective observation.
I would like to cite several reasons from which I draw the conclusion about the superiority of the high polling frequency:
1. The virtual plane began to be controlled more sharply (this can be seen from
visualization of the steering wheel and rudders compared to another gaming device)
2. I consider the test program FregMeter as objective.
3. Personal feelings and effectiveness (this, of course, subjective argument)
But in one you are certainly right, the parameters of the gaming device should be tested in relation to a particular game.
It is possible that 500 Hertz in some other game is flying, running, shooting more comfortably,as a gamer with a perennial experience i know this.

Sincerely, Alex 54.
« Last Edit: September 17, 2018, 08:02:38 am by alex 54 »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Question by interface USB-3
« Reply #7 on: September 17, 2018, 08:22:58 am »
I felt that the frequency of 1000 Hz for a HID was selected for a reason,

Indeed. - Because 1000Hz is USB "start of frame" token rate which means frame rate. You can't "answer" to information requests at 2000Hz frequency when request rate is just 1000Hz. note that USB (HID) device is answering party of polling.

Before you continue - you better read some USB specs. Start with wikipedia, then usb.org
« Last Edit: September 17, 2018, 08:42:47 am by ogden »
 
The following users thanked this post: alex 54

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Question by interface USB-3
« Reply #8 on: September 17, 2018, 08:57:43 am »
1. The virtual plane began to be controlled more sharply (this can be seen from
visualization of the steering wheel and rudders compared to another gaming device)

Nope nope nope. You can't glean information on whether 1000 Hz vs 500 Hz makes a difference by comparing completely different devices that different are in thousands of ways, only one of which is polling rate. 500 Hz is still audio frequency, you categorically cannot tell the difference between physical motion being reproduced at a rate of 500 times per second vs 1000 times per second. Your screen is probably only refreshing only 60 or maybe 120 times per second for a start.

Modify a single game controller to operate at either 1000 Hz or 500 Hz. Only then can you even start to attribute anything you see to such a specific explanation. Doing so is vastly easier than applying USB 3 to your project.
 
The following users thanked this post: wraper

Offline wraper

  • Supporter
  • ****
  • Posts: 16865
  • Country: lv
Re: Question by interface USB-3
« Reply #9 on: September 17, 2018, 09:08:15 am »
Doing so is vastly easier than applying USB 3 to your project.
Not to say in still will be the same 1000Hz polling rate, just complicated and expensive.
 
The following users thanked this post: alex 54

Offline timgiles

  • Regular Contributor
  • *
  • Posts: 236
  • Country: se
  • Programmer, DB architect
Re: Question by interface USB-3
« Reply #10 on: September 17, 2018, 09:34:02 am »
I initially thought you might be using a chip powered 'device' to feed inputs at an above human rate. Seeing that this is not the case, I have not read or seen any evidence, even from professional gamers, that they have super human powers. There will come a point where you might be able to improve the number of polls, but, if your game is running at 120fps, then I doubt very much that the game engine is running 10 times faster than this.

The game will be receiving inputs and processing these. So it stands to reason that this is ultimately the delay to which you and your device can work up to. Any faster than that and it does not matter. The game will not respond any faster as it simply can not.

Can you prove the game engine is running at 2000Hz? I really do not think it is.

As others have said. Your screen shot in no way shows that the device is working in USB 2 mode.
 
The following users thanked this post: alex 54

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Question by interface USB-3
« Reply #11 on: September 17, 2018, 09:46:00 am »
Doing so is vastly easier than applying USB 3 to your project.
Not to say in still will be the same 1000Hz polling rate, just complicated and expensive.

Exactly!

You can't exceed 1000Hz HID limitation no matter which USB interface you use. You shall drop HID as such, implement isochronous transfer in USB FS, write your own mouse driver that receive isochronous stream and present it to operating system as mouse. Then you possibly can go up-to 8KHz rate, on USB 2.0 1.1 FS (USB 3.0 is unnecessary overkill w/o any gain - as said above). But good luck doing that! Even hi-end gaming hardware manufacturers are sticking to HID, 1KHz & standard drivers.

Actually it is confirmed zillion times that humans do not see difference between 500Hz and 1000Hz mouse rate, so maybe you shall consider some other project.
« Last Edit: September 17, 2018, 09:57:58 am by ogden »
 
The following users thanked this post: alex 54

Online mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Re: Question by interface USB-3
« Reply #12 on: September 17, 2018, 11:52:25 am »
He seems to ignore completely that once the input is received by the game, the game has to crunch data and render the frames, the video card has to send the frame to the monitor and then the monitor has to actually display the image on the screen ... all this process can take a few milliseconds, in any case much more than 1ms you get with 1000 hz polling rate.
Yeah, not worth going over 1000 hz polling, even 1000 hz is unlikely to be anything more than placebo.
 
The following users thanked this post: alex 54

Offline alex 54Topic starter

  • Newbie
  • Posts: 5
  • Country: il
Re: Question by interface USB-3
« Reply #13 on: September 17, 2018, 02:01:22 pm »
Thanks to everyone for clarifying the topic, as mentioned above, I'm a beginner
in the development of gaming devices, so gaps in this area
understandable.
Well, it remains only to wait for the output of the quantum computer.

Sincerely, Alex 54.
  ;D
 

Offline alex 54Topic starter

  • Newbie
  • Posts: 5
  • Country: il
Re: Question by interface USB-3
« Reply #14 on: September 18, 2018, 01:07:16 pm »
Quote
I can't read Russian, but doesn't the picture show your device operating only at USB full speed?
                                           
Hello, the device I made works in FS mode.
But as it turned out from the further discussion of this topic, the translation
on HS does not make sense, due to the high latency of the rest of the system as a whole.
But nevertheless your idea is very successful, thank you for participating in the discussion.

Alex 54.
« Last Edit: September 18, 2018, 01:11:52 pm by alex 54 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf