This guy turned a computer mouse into a camera



Ever wondered if your trusty computer mouse could capture the world in more ways than just tracking your cursor? Well, Doctor Volt did, so he turned his old mouse into a camera. He shares the entire process in his latest YouTube video, and it’s one of the most fun projects I’ve seen in a long time!

Dissecting the mouse

The adventure begins with a surgical strike – dissecting the mouse. Thankfully, this isn’t a real rodent. The “beating heart” of the operation is the ADNS2610 optical sensor, a marvel of miniaturization with its 18×18 array of photodiodes. However, the original microcontroller is missing, so Doctor Volt finds a new solution.

Modifying the mouse

Enter the ESP32-S3 Mini board, a versatile microcontroller that will breathe new life into the sensor. With its wireless capabilities, Doctor Volt can control the camera remotely through a web interface. However, a new challenge arises: the ESP32 lacks the native bidirectional data pin needed for the sensor’s protocol. This calls for clever software trickery using PlatformIO in Microsoft Code.

Armed with soldering iron and pliers, Doctor Volt carefully extracts the clock and data pins from the original circuit board. These wires become the bridge between the sensor and the ESP32, along with power connections.

Reading the images and assembling the camera

Doctor Volt reuses the UI from his Blu-ray microscope project, adapting it to the mouse sensor’s 324 pixels. The Pixel Data register becomes the key, allowing the sensor to capture and send images pixel by pixel, packaged into a JSON array and wirelessly transmitted.

The ESP32 module replaces unnecessary components in the mouse body, but the focus needs adjustment. Out goes the original plastic disc, replaced by a wide-angle lens for a Raspberry Pi camera. Initial tests reveal grainy, interpolated images. However, we get the first pixelated glimpse of Doctor Volt, “possibly the first person ever filmed by a mouse sensor.” And that’s exciting, isn’t it?

At this point, stability and precision become the focus. Doctor Volt designs a custom lens assembly in Freecad and orders a 3D-printed version from PCBWay. This sturdy, smooth part houses the lens perfectly. And now, the final assembly, complete with a USB power cable and adjustable focus, is ready to capture its first real picture!

Taking pictures

Mounted on a mini tripod, the “mouse cam” stares at its first subject – a LEGO figure. Even though the image quality is undoubtedly crappy, you can recognize the LEGO guy’s little wrench, helmet; and even his face emerges from the low-resolution grid. Doctor Volt jokingly admits that the mouse camera isn’t YouTube-ready with its 3 frames per second limit, so he won’t use it to make videos… But it definitely stands as a testament to ingenuity, creativity, and resourcefulness.

Some folks in the comments noted that this is essentially how security cameras work – but I have to admit that I don’t know much about it. It made me chuckle to read that the “mouse camera” is “much better than many CCTV cameras these days.” Honestly, though, it is.

Anyway, if you’d like to make your own, Doctor Volt kindly shared the code on GitHub. Make sure to follow his YouTube channel, as he not only creates fun stuff but he also has a great sense of humor. And if you want even more of his content, you can support him on Patreon.

[via Hack a Day]

We will be happy to hear your thoughts

Leave a reply

Bean town discount store
Logo
Compare items
  • Total (0)
Compare
0
Shopping cart