Do-it-yourself projects and technology updates

DIY Mouse Modding

Filed under: Uncategorized — Greg Lipscomb on January 30, 2006 @ 8:28 am



Well, there may be some interest in modding a mouse, so it is important to understand how they work. You may want to control the cursor for some sort of a project. A rollerball mouse has has a ball that rolls on the desktop when you move the mouse. This movement turns a wheel that has small spokes in it. There are two different infrared LEDs, and two different infrared detectors per wheel, and there are two wheels per mouse. One wheel controls up and down, and the other one controls left and right.

Now the LEDs are always turned on, and when the wheel spins, it will block the beam of one LED going to the sensor, and then will block the other. If you call the first LED on a wheel LED 1, and the second LED 2, then in order for the cursor to go left, you would first block LED1, then block LED2, then unblock LED1, and then unblock LED2. If you wanted to go right, you would do the opposite. You would first block LED2, then LED1, then unblock LED2, then LED1. this is basically the same as generating two square waves that are 90 degrees out of phase with each other. You could program a microcontroller to generate this signal on two output pins, and could control the cursor with out having to move the mouse. I have played with this on an old mouse, and I connected a switch to each of the two sensors on a mouse wheel. When you press the switch it is the same as blocking that beam of light. You can manually move the cursor by pressing the two switches in the same sequence that I have just described. You can read more about this here. Below is a sample waveform. I plan on using this in an upcoming project that I am working on. (Who knows when I can get it done because of my really busy semester).

7 Responses to “DIY Mouse Modding”

  1. wdk Says:
  2. No mention of Gray Code?
    http://en.wikipedia.org/wiki/Gray_Code

  3. Greg Lipscomb Says:
  4. You are absolutely right. That is simply a binary form of what this is doing. Instead of thinking about the LED, you could use a binary number system, you would have 00 01 11 10 00, or if the other phase was leading, it would be 00 10 11 01 00. This would be important in microcontrollers. It gives you a way to create an algorithm to produce this simulated wave. Thanks wdk, I knew about this, but did not know the name of it.

  5. Greg Lipscomb Says:
  6. Hey,
    My mouse only had one sensor per wheel also, and has the three pins. For me, the center pin was high, and the outer two went to the two different sensors on the same component. It works the same way as the other one does.

    About the sin cosin relationship. That is true. I saw this on my oscilloscope, but you would not have to create a sin wave to control it. A simple square wave will control it because the internal circuitry is only looking for a high volt or a low volt. It does a sin wave because as the wheel is turning, it is not instantly removing all light from it, but is slowly doing it. But if you connect two switches two the two inputs for the switch, and you press them in this gray code manner, then it moves the cursor.

  7. Chris Says:
  8. Somewhere around here I have a mouse with 1 LED per wheel.
    Even though the mouse has been non-functional for years, I figure the sensors are worth holding on to, since they are similar to the sensors used in an atomic force microscope. (http://en.wikipedia.org/wiki/Atomic_force_microscope)
    I’ve always wondered how difficult it would be to build an AFM at home.

    A quick google search shows it’s easy to find instructions for building a scanning tunelling microscope, but I want something that works with nonconductive samples.

  9. Doodee Says:
  10. Thanks for sharing

  11. DeemyReurce Says:
  12. I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting! Look for some my links:

  13. Repair Your Credit Yourself Instantly. | 7Wins.eu Says:
  14. [...] How To Get A Credit Card - Instantly! | Articles Factoryhelqablog » Blog Archive » Good Credit Matters - Find Guides You Need to Improve Your Credit Score and Your Credit Rating 101 Legitimate Tips for Boosting Your Credit Score! at Fisheryu.net File Bankruptcy Now » Credit Repair - FixCreditKit.com - Do It Yourself Credit RepairBalance Transfer Credit Cards – 5 Critical Points to ConsiderDeadly Bloody Serious » Blog Archive » Nine Ways to Improve the Diskeeper Download and Support Experience» How to Avoid A Major 0% Balance Transfer Credit Card MistakeFresh Web Content » What Do Those Banking Terms MeanIs Biolustre A Bogus Buy? | The Beauty BrainsVisual Link Spanish Review | My Personal Review of the Visual Link Spanish Program » ResourcesHow to fix your credit card score | Financial Blog: car loans financing | Bad credit | Credit cards | Loan | Finance | Affiliate marketingCredit Reports for Free » Blog Archive » Free Credit Report, Entitled To It - Get Yours NowWhat Do Those Banking Terms Mean | Foreclosure How To BuyHow to hit a golf ball correctlySezWho Security Issue, Fix » SELaplana 100 Essential Resources to Achieve Personal Well-Being - Nursing School Search BlogThe Deadly Truth About Credit Repair!DIY Live » DIY Archive » DIY Mouse Modding [...]

Leave a Reply