Skip to content

Is it possible to show microseconds in results #21

Open

Description

@Vanri115

Those mice with optical switch has really fast response, and with 4k and 8k polling rates it reaches under 1ms.
As far as I have tested, OSLTT is capable of counting milliseconds but I haven't seen microseconds.
Is it possible to get MICE/KEYBOARD test results to show numbers under 1ms?
Thanks!

Activity

  1. changed the title [-]Possible to go beyond 1ms?[/-] [+]Is it possible to show microseconds in results[/+] on Sep 5, 2023
  2. Radyjko commented on Oct 4, 2023

    @Radyjko

    Hi there - go the same issue.
    With testing out displays it shows perfectly divided times (input, render etc.) but for mices and keyboards it's accuracy seems to be with 1ms being the smallest value you can get.
    Therefore - RN I'm testing few of the top gaming mouses and results are - copy/paste 1ms across all the board (where i know 4 sure that's not possible - 1000Hz with mechanical switch vs 8000Hz with optical should have at least a little difference)
    Are there any possible solutions to this issue?

    I've tried to walkaround this problem trying to measure far longer signal distance - with Audio trigger (mouse clikc) -> whole system to the screen color change (light sensor). Since it's so accurate and shows individual results while testing screen adding one more link to the chain would give me slightly bigger times overall, but also a possibility to separate mouse reaction (or to compare different results)
    But the software is not allowing me to set it up this way - Can we expect any fixes to this? Or is it the hardware limitation and the precision in this tests isn't gonna be any higher?

  3. andymanic commented on Oct 4, 2023

    @andymanic
    Contributor

    Hi guys - I believe I replied to @Vanri115 via email on this but I should note things here too.

    Regarding microsecond counts, currently it's not possible as the desktop app uses serial with a 1ms timeout to tell the latency tool it has registered the keypress. That adds between 1 and 2ms per run, and sets that as the effective noise floor, at least for the time being. I'd like to improve that, but it's not something I have the knowledge to improve on right now.

    To clarify the way it works: User clicks mouse -> latency tool detects audio spike -> latency tools steps into loop waiting for the desktop app to report the mouse click has been captured -> board times that difference.

    Perhaps if there's a way to syncronise clocks between desktop and microcontroller, the microcontroller could report a timecode to the desktop app, then the desktop app just subtracts the timecode from the time when it detects the mouse click down event? Not sure - like I said it's outside my knowledge at the moment. Would love to improve it though!

  4. Radyjko commented on Oct 4, 2023

    @Radyjko
  5. andymanic commented on Oct 4, 2023

    @andymanic
    Contributor

    That one is on the FAQs - yes I intend to support basically any combination of modes you'd want. It's a bit of work to make sure they all work. It's worth noting that the screen measurements are limited by the display's refresh rate, so you won't get much use out of mouse/keyboard measurements on a display.

  6. andymanic commented on Oct 5, 2023

    @andymanic
    Contributor

    As a follow up to this, I did some testing on the idea of syncing clocks between desktop and microcontroller. Unfortunately that doesn't seem possible with any degree of accuracy. The microcontroller's clock drifts from the system clock by about 6ms per 10s, but it's also somewhat unpredictable too so it can't just be corrected for. Even with syncing clocks between each click, you'd still have an unknown drift between the system and arduino clocks which would cause erroneous data. Perhaps with a hardware timer onboard that might be more reliable, but that'd need a hardware revision. Maybe something I can look at in the future. For now the click test has a hard limit at 1ms/1000Hz.

  7. Vanri115 commented on Oct 31, 2023

    @Vanri115
    Author

    Thank you for the newest update! It does seem to show microseconds now, but somehow every mice I try I get results of 0.02ms all the way. am I missing something?

  8. andymanic commented on Oct 31, 2023

    @andymanic
    Contributor

    Can you include some screenshots and/or results files so I can see what you mean?

  9. Radyjko commented on Oct 31, 2023

    @Radyjko
  10. Radyjko commented on Oct 31, 2023

    @Radyjko
  11. Vanri115 commented on Oct 31, 2023

    @Vanri115
    Author

    DAREU A950Pro-CLICK-1ms-RAWRESULTS-OSLTT.csv
    DAREU A950Pro-CLICK-20ms-RAWRESULTS-OSLTT.csv
    This is the rawresults file I just cooked. The mouse is on 4K mode, and I sat response time to 1ms and 20ms, but both results are nearly identical. I also tried other couple of mice and they are also getting 0.02ms.

    EDITTED---
    I've tested the mouse again and it reads latency correctly. But as I tried with other mice it still gets 0.02ms. I first thought it might be because of multiple mice were connected to PC, so I tried to use one at time but it sometimes work but most of the time it still gives me 0.02ms. I can't track down what really causing this issue.

  12. Radyjko commented on Nov 2, 2023

    @Radyjko
  13. andymanic commented on Nov 2, 2023

    @andymanic
    Contributor

    @Radyjko I think you're right. I assume there's some disconnect between when the sound is captured and when the signal is polled from the mouse. I have enabled support for soldering to the mouse, but obviously that isn't ideal. I'm not sure if there's anything I could do to improve this accuracy though as I believe it's an external/process issue, rather than something I can address in code. If you have any ideas though, I'm all ears!

  14. Radyjko commented on Nov 2, 2023

    @Radyjko
  15. Radyjko commented on Nov 2, 2023

    @Radyjko
  16. 17 remaining items

  17. andymanic commented on Nov 5, 2023

    @andymanic
    Contributor

    Further update: I've realized that most mice seem to have constant power to one side and ground that power when you click. That will still work fine with OSLTT, but it needs the firmware change I've made to work. I'm going to solder to a mouse today and test out the mode. Hopefully with it being a change-state interrupt that'll be much more consistent.

  18. Radyjko commented on Nov 6, 2023

    @Radyjko
  19. Vanri115 commented on Nov 6, 2023

    @Vanri115
    Author

    I just remembered that I heard optical switch have different pin assign. And I’m also curious that how you solder to the keyboard efficiently

  20. Radyjko commented on Nov 6, 2023

    @Radyjko
  21. Radyjko commented on Nov 6, 2023

    @Radyjko
  22. Vanri115 commented on Nov 6, 2023

    @Vanri115
    Author

    I thought XLAT is doing same thing that OSLTT is doing I suppose… so this is exactly why made me start to solder 2pin wire to mice. XLAT also demand to solder.

  23. Radyjko commented on Nov 6, 2023

    @Radyjko
  24. andymanic commented on Nov 6, 2023

    @andymanic
    Contributor

    @Radyjko XLAT looks pretty cool, I'll have to look up more about how that works.

    Further update on the 2 pin mode: I realised I made a mistake with the amount of resistance on the input side. It's way too low. If you solder a resistor in-line with the input lead, something like 1M ohm, the stability increases significantly. Alternatively you can replace R7 on the PCB - it's an 0805 SMD resistor.

  25. Vanri115 commented on Nov 6, 2023

    @Vanri115
    Author

    well yes XLAT does look promising. but I might wait for finalmouse to start selling them, because I could not find any case for STM32F746G…

    I soldered 1Mohm to input line but still getting big latency like 10-30ms. shoud I just wait for the newest update?

  26. Radyjko commented on Nov 8, 2023

    @Radyjko
  27. andymanic commented on Nov 8, 2023

    @andymanic
    Contributor

    @Radyjko I'm still working on making the interrupt mode work - with my current build the test doesn't work at all. Once I have it functioning again I'll send it over.

  28. Radyjko commented on Nov 9, 2023

    @Radyjko

    Hi guys!

    I've just built XLAT and it works damn good. U can customize it to check for power rise of fall as trigger.
    Unfortunately idk why it works only with mouses, keyboards are correctly recognized by USB, but keypresses don't work.
    BUT
    I was able to modify mine to do what i was looking for - measure time from the exact touch of the key to keypress registered
    I did it by connecting a 5V power adapter to the whole thing. Left key is covered with tin foil and connected to negative pole of adapter, and i'm striking key with metal rod connected to the positive end. When the ends meet voltage drops and that's the trigger.
    Roughly it looks like this:
    (work in progress ofc)
    Hi guys!

    I've just built XLAT and it works damn good. U can customize it to check for power rise of fall as trigger.
    Unfortunately idk why it works only with mouses, keyboards are correctly recognized by USB, but keypresses don't work.
    BUT
    I was able to modify mine to do what i was looking for - measure time from the exact touch of the key to keypress registered
    I did it by connecting a 5V power adapter to the whole thing. Left key is covered with tin foil and connected to negative pole of adapter, and i'm striking key with metal rod connected to the positive end. When the ends meet voltage drops and that's the trigger.
    Roughly it looks like this:
    (work in progress ofc)
    image

    Right now i have to check it for the consistency and compare few mouses.
    I'll let you know how it goes!

    Right now i have to check it for the consistency and compare few mouses.
    I'll let you know how it goes!

  29. andymanic commented on Nov 10, 2023

    @andymanic
    Contributor

    @Radyjko - I've confirmed that this mode actually works now so here you go. OSLTT.ino.bin.zip

    To be clear, this isn't a final release firmware as this has the interrupt style hard-coded as RISING, when at some point I'll be adding a UI option to choose between RISING and FALLING and adding some code to de-register then re-register the interrupt with the given mode. Still, if you want to test this, go for it. You should be able to use the OSLTTFlashTool.exe in the repo (I've changed it to use a file picker) to flash the custom file.

  30. Radyjko commented on Nov 23, 2023

    @Radyjko

    Hi,
    finally i've got some time to work on this, but i can't launch the FlashTool - it seems to not be opening.
    I've tried Admin, antivir disabled, win defender off etc - nothing seems to be working.
    Even on my 2nd pc I can't get this to launch.
    The only message i get is the admin prompt, and with the first launch defender smartscreen, where I click to run it anyway.
    When i try to open it it briefly shows in Task Manager thant disappears and nothing more happens

    I've asked friend of mine to try this and he managed to open it without any problem.
    Do you have any idea what may be the cause?
    Can you please help me?

  31. Vanri115 commented on Nov 28, 2023

    @Vanri115
    Author

    Hi, I think I figured out why I'm getting 0.2ms for the mouse click latency test.
    When I click the button it registers correctly, but when the sound is too small for mic to pick up, it hangs.
    I tried click really hard and let OSLTT count every single click it gives me correct result,
    but when I miss click one out of n, it hangs up and gives me 0.2ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions