Tracking a car like it were a computer mouse


This is [Paul Mandel’s] Ground-truth velocity sensor. That’s a fancy name for a device which tracks the movement of a vehicle by actually monitoring the ground its travelling over. This differs from simply measuring wheel rotation (which is how traditional odometers work) in that those systems are an indirect measurement of motion. For us the interesting part is the use of an ADNS-3080 single-chip optical mouse sensor on the left. It’s cheap, accurate, and only needs to be ruggedized before being strapped to the bottom of a car.

[Paul] designed a case that would protect the electronics and allow the sensor to mount on the uneven underbelly of a vehicle. The optical chip needs to be paired with a lens, and he went with one that cost about ten times as much as the sensor. Data is fed from the sensor to the main system controller using the PIC 18F2221. One little nugget that we learned from this project is to poll a register that always returns a default value as a sanity check. If you don’t get the expected value back it signals a communications problem, an important test for hardware going into the vibration-hell that is automotive technology.

Robotic odometry from an optical mouse

One of the problems future engineers spend a lot of class time solving is the issue of odometry for robots. It’s actually kind of hard to tell how far a robot has traveled after applying power to its wheels, but [John] has a pretty nifty solution to this problem. He converted an optical mouse into an odometry sensor, making for a very easy way to tell how far a robot has traveled  regardless of wheels slipping or motors stalling.

The build began with a very old PS/2 optical mouse he had lying around. Inside this mouse was a MCS-12085 optical sensor connected to a small, useless microcontroller via a serial interface.

After dremeling the PCB and discarding the microcontroller, [John] was left with an optical sensor that recorded distance at a resolution of 1000dpi. It does this by passing a value from -128 to 127, rolling over every time the sensor moves more than 3.2 mm.

As far as detecting how far a robot has moved, [John] now has the basis for a very simple way to measure odometry without having to deal with wheels slipping or motors stalling. We can’t wait to see this operate inside a proper robot.

Ancient mouse teardown and repair

For a young geek in the 80s, the it computer was the IBM PCjr. On paper, it was a truly remarkable leap in technology. With a wireless keyboard, light pen, and optical mouse it was an impressive, if maligned, piece of hardware. There was a small problem with the optical mouse, though; it required a special mousepad. [Michael], a PCjr aficionado, decided to make his own optical mousepad. It works, and was a lot easier to build than finding a used one for sale.

The PCjr mouse used two photodectors – a red LED and photodector for the horizontal axis, and an IR LED setup for the vertical. Light is shot through two holes in the bottom of the mouse and reflects back onto the photodetectors. [Michael] emulated the old mousepad with a sheet of aluminum foil and a transparency with a printed grid pattern. Surely not as elegant as an original, but it does the job nonetheless.

This clever-for-its-day optical mouse setup wasn’t limited to the lowly PCjr. A number of old Sun workstations had a similar setup that used small dots on the mousepad. There were several generations of mousepads that were generally incomparable with each other (because one type of mousepad wasn’t proprietary enough for Sun), but we would assume a similar build would work for these forgotten mice.

Thanks to [josh] for sending this one in.

Patching into an optical mouse with a PIC

[MikyMouse] cracked open a couple different optical mice (or is it mouses?) in order to play with the data communications coming off of the chips inside. Once he figured out the protocol, it wasn’t too hard to grab the data for use in his own projects. The chip that controls the mouse is one of two he looked at, either an ADNS2051 or an ADNS2610. They run at 5V and use serial communications via SDIO and SCK pins. The clip after the break shows the test apparatus displaying coordinates of the mouse on an LCD screen. This seems like an easy and inexpensive way to get position data from your project. The only tricky part is going to be deciding when and how to to zero out the location.

Not interested in this type of mouse hack? Can we spark your curiosity with this mouse auto-fire project?

Continue reading “Patching into an optical mouse with a PIC”