A Mouse Becomes A Camera

If your pointing device is a mouse, turn it over. The chances are you’ll see a red LED light if you’re not seriously old-school and your mouse has a ball, this light serves as the illumination for a very simple camera sensor. The mouse electronics do their thing by looking for movement in the resulting image, but it should be possible to pull out the data and repurpose the sensor as a digital camera. [Doctor Volt] has a new video showing just that with the innards of a Logitech peripheral.

The mouse contains a microcontroller and the camera part, which fortunately has an SPI interface. The correct register to query the sensor information was deduced, and as if my magic, an image appeared. An M12 lens provided focus with a handy 3D printed mount, and the board went back into the mouse case as a housing. The pictures have something of the Game Boy camera about them, being low-res and monochrome, but it’s still a neat hack.

If you’d like to give it a go you can find the code in a GitHub repository. You might find it worth finding a gaming mouse though, for the much higher resolution sensor.

Continue reading “A Mouse Becomes A Camera”

An Optical Mouse Sensor For Robotic Vision

Readers with long memories will remember the days when mice and other similar pointing devices relied upon a hard rubber ball in contact with your desk or other surface, that transmitted any motion to a pair of toothed-wheel rotation sensors. Since the later half of the 1990s though, your rodent has been ever significantly more likely to rely upon an optical sensor taking the form of a small CCD camera connected to motion sensing electronics. These cameras are intriguing components with applications outside pointing devices, as is shown by [FoxIS] who has used one for robot vision.

The robot in question is a skid-steer 4-wheeled toy, to which he has added an ADNS3080 mouse sensor fitted with a lens, an H-bridge motor driver board, and a Wemos D1 Mini single board computer. The D1 serves a web page showing both the image from the ADNS3080 and an interface that allows the robot to be directed over a network connection. A pair of LiPo batteries complete the picture, with voltage monitoring via one of the Wemos analogue pins.

The ADNS3080 is an interesting component and we’d love see more of it. This laser distance sensor or perhaps this car movement tracker should give you some more info. We’ve heard rumors of them being useful for drones. Anyone?

Disassembled Mouse Keeps Track Of Gas Meter

After building devices that can read his home’s electricity usage, [Dave] set out to build something that could measure the other energy source to his house: his gas line. Rather than tapping into the line and measuring the gas directly, his (much safer) method was to simply monitor the gas meter itself.

The major hurdle that [Dave] had to jump was dealing with an ancient meter with absolutely no modern electronics like some other meters have that make this job a little easier. The meter has “1985” stamped on it which might be the manufacturing date, but for this meter even assuming that it’s that new might be too generous. In any event, the only option was to build something that could physically watch the spinning dial. To accomplish this, [Dave] used the sensor from an optical mouse.

The sensor is surrounded by LEDs which illuminate the dial. When the dial passes a certain point, the sensor alerts an Arduino that one revolution has occurred. Once the Arduino has this information, the rest is a piece of cake. [Dave] used KiCad to design the PCB and also had access to a laser cutter for the enclosure. It’s a great piece of modern technology that helps integrate old analog technology into the modern world. This wasn’t [Dave]’s first energy monitoring system either; be sure to check out his electricity meter that we featured a few years ago.