Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Teensy 4 high speed mouse

  1. #1

    Teensy 4 high speed mouse

    Hello everyone,

    I modified an existing 1000Hz mouse and made it 8000Hz thanks to the Teensy 4 its USB high speed capable chip.
    The mouse also has hardware debounced microswitches similar to how a flip flop operates.
    Can't say going from a 1000Hz to 8000Hz polling rate changes much but it feels slightly more responsive.
    The mouse itself looks the same as before but without the RGB effects.

    Pinout, code and a more detailed description can be found on my github: https://github.com/Trip93/teensy4_mouse

  2. #2
    Member
    Join Date
    Sep 2021
    Posts
    74
    You must have tuned eyes.. mine are not better than 10..25 Hz and my brain is even slower...
    Where did you buy that 8000Hz display?
    Last edited by Mcu32; 10-27-2021 at 08:37 PM.

  3. #3
    You do not need an 8000Hz display to feel or see the difference if that is what you are trying to say.
    Games do feel slightly smoother and more responsive with 8000Hz polling rate but its nothing major.

    Here is a picture from blurbusters article which shows the gaps between cursor movement at different polling speeds from 125-1000Hz on a 120hz display.
    At 8000hHz those gaps are very small and mouse movement therefore feels slightly better. The more samples you feed on the input the better the harmonics will be later in the chain.

    Click image for larger version. 

Name:	2000hz-mice-needed-1024x890.png 
Views:	26 
Size:	521.5 KB 
ID:	26310

    https://blurbusters.com/faq/mouse-guide/

    Now of course probably almost nobody would go through all that trouble to slightly improve their mouse.
    But I was just interested if it was even possible to do this with a teensy4 and the answer is yes.

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,403
    Sure, your eyes will see it and your brain cells recognize it..

    Yes, there are some who believe in ghosts, gods, anti-aging pills, wonders, the need of special audio cables for 100$. And some think they see a difference with 8000Hz mice. I've seen a de-magnetizer for CDs. They all are right. Of course.
    Last edited by Frank B; 10-27-2021 at 09:35 PM.

  5. #5
    10 years ago some people also said that 4k and 1080p look the same or that 120Hz and 60Hz screens look the same.
    In another 10 years I guess we can have the same debate but we can replace the 8000Hz with 64000Hz.

  6. #6
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,403
    For sure!
    And when they are in the cinema they will be so bored by the 24Hz freeze frames that somewhere in the middle of the movie between frames they will play 3 games of chess or kill 35 enemies on their smartphone.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,212
    Whether it's really needed or not, this is still pretty awesome... especially the work to characterize with the actual performance with the sensors!

    Any chance you could share a photo of the modified mouse? Maybe even with some a screen using it to play a game wanting fast response? Your writeup is really good and I believe many people will find this really interesting (regardless of whether it's really needed or not) but to publish on the blog, a photo that shows the modified hardware in actual gaming usage would really help.

  8. #8
    Ok it is a bit of a spaghetti fest inside of the mouse but it was my first attempt. And I only had this thick silicon wire laying around.
    When the cover is closed you dont notice there is a teensy inside of the mouse at all. Except for the orange light from the LED.

    Click image for larger version. 

Name:	mouse_overwatch.jpg 
Views:	19 
Size:	98.8 KB 
ID:	26323

    Click image for larger version. 

Name:	mouse_bottom_open-min.jpg 
Views:	19 
Size:	71.6 KB 
ID:	26324

    Click image for larger version. 

Name:	mouse_top_open-min.jpg 
Views:	24 
Size:	108.1 KB 
ID:	26325

  9. #9
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,403
    Trip, that looks really good (and I love how you did it).
    BUT:

    PLEASE start this short code.
    Tell me that you see the different speeds of the LED. And hey, it starts with 125 Hz - that should be easy.

    Code:
    void setup() {
     analogWriteResolution(8);
     analogWrite(13, 127);
    }
    
    void loop() {
     analogWriteFrequency(13, 125); delay(1000);
     analogWriteFrequency(13, 250); delay(1000);
     analogWriteFrequency(13, 500); delay(1000);
     analogWriteFrequency(13, 1000); delay(1000);
     analogWriteFrequency(13, 8000); delay(1000); 
    }
    @other: You see a constant light - you don't see any difference, you just can't see it. Not even the difference between 8000 and 125Hz. Try it yourself.
    If you don't believe that the program works: Connect a scope.
    We could create a game from it: Random frequencies, and you hit the button when you think it's - let's say 1000Hz. You will loose.

    I just don't like that the Industry takes of money from people, students, gamers. Their pocket money.
    I know you can buy these 8000Hz things already. For a lot $$$.

    Edit: Don't support that industry. They take money whenever they see a chance. They tell you lies. Don't believe their lies. Think twice.
    You could have spent that money for a nice evening with your girlfriend.


    Trip, you made that really good - I believe you'll find better projects!
    Last edited by Frank B; 10-28-2021 at 07:45 PM.

  10. #10
    I cant see anything flicker indeed but it does not mean that you dont notice the difference when you actually play a game.
    Your experiment is a light source which you cant interact with and mine is an input device which translates physical movement from your arm to a monitor.
    The difference between 125Hz and a 1000Hz polling rate is quite big for me after a 1000Hz though I dont know. I swear it seems ever so slightly better to me but I am not sure if it is placebo or not.
    I could do a double blind with regards to polling rate. I can reprogram the DPI button to something which changes the polling rate to a random value if I click it.

    1. Press button that changes polling rate to some random value
    2. Play a game and guess which polling rate it is
    3. Check the Serial monitor to see what the actual polling rate is
    4. See if I am imagining things or that I can actually see or feel the difference

  11. #11
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,354
    I suspect linearly interpolating between the 1000SPS readings would be just as workable.
    Even if the sensor has low latency the difference between 1ms and 0.125ms to human senses is
    too low to register.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •