YOU CAN TURN AN OLD OPTICAL MOUSE INTO A CAMERA

An optical mouse sensor already captures tiny images to track movement — this wires it to an ESP32 and streams the frames over Wi-Fi to your browser.

by Doctor Volt

FULL CAD BOM FIRMWARE DOCS

Open-hardwareElectronics

Built withESP32ArduinoRaspberry Pi3D printing

difficulty
●●●○○
time
an evening
license
GPL-3.0
repo
repo ACTIVE43 stars
1
Jump to section

COMPAREE VERDICT

This is a small hack for someone who already knows their way around an ESP32 and a soldering iron. You take an old optical mouse with an ADNS 2610 sensor, either remove its controller chip or lift sensor pins 3 and 4, and wire those two pins (data and clock) to a Waveshare ESP32 S3 Mini. A Raspberry Pi wide-angle lens (f=1.7mm) sits on a lens adapter in front of the sensor. The ESP32 reads the frames and sends them over Wi-Fi to a web page in your browser. Keep expectations low on image quality: in Doctor Volt's video the images are low resolution, grey and blurry, but a teapot, a toy car and a face are recognisable. The single biggest trap is the Arduino ESP32 core version — the code only compiles against 2.x, and the README does not explain how to switch. The README is short: parts, wiring and the Wi-Fi settings, with no photos of the pins or troubleshooting notes, so the video is your main visual guide. If you have flashed an ESP32 before and can handle fine soldering, it is a fun proof of concept that shows what a mouse actually sees.

GOOD TO KNOW

  • —Firmware and the lens adapter design are in the repository under the GPL-3.0 licence.
  • —The README names the parts (Waveshare ESP32 S3 Mini, Raspberry Pi wide-angle lens f=1.7mm or similar, lens adapter, an optical mouse with the ADNS 2610 sensor) but does not link to them or give prices.
  • —No step-by-step build guide — the README lists the wiring in text and assumes you can remove the chip or lift the pins without photographs.
  • —The README states the code only compiles against Arduino ESP32 core version 2.x.
  • —The web interface is code/data/index.htm, opened locally in the browser; it talks to the ESP32 over a WebSocket.

Parts to buy

3 items

From our check of the build. Exact quantities and part numbers are in the creator’s BOM.

  • Waveshare ESP32 S3 Mini moduleFind
  • Raspberry Pi wide-angle lens f=1.7mm (or similar)Find
  • Optical mouse with the ADNS 2610 sensorFind

BUILDS OF THE WEEK

Five open-source builds worth your weekend, every week.

Checked like this one: what’s really in the repo, what it costs, how hard it is. One email, unsubscribe anytime.

Can I build this?

PrintLens adapter: FreeCAD file plus threaded and non-threaded PDF drawings
BuyWaveshare ESP32 S3 Mini module, Raspberry Pi wide-angle lens f=1.7mm (or similar), an optical mouse with the ADNS 2610 sensor
ToolsSoldering iron, Visual Studio Code with the PlatformIO extension, Arduino ESP32 core 2.x
SkillsComfortable with flashing an ESP32, putting Wi-Fi credentials into code, and either removing a chip or lifting small pins
TimeAn evening by our estimate if you have flashed an ESP32 before; the README gives no build time.
Cost$ — the README gives no prices; besides an old mouse you need an ESP32 board and a small lens.
SafetyLow-voltage electronics only; normal care when opening the mouse and soldering.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

Videos

I Hacked a Mouse into a Camera!10:04

Doctor Volt's video (12 Jan 2024) with the build and the low-resolution, grey images the sensor produces.

More builds like this

All projects

Gallery

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Set up PlatformIO with Arduino ESP32 core 2.x(The README lists Visual Studio Code with the PlatformIO extension. The code only compiles against Arduino ESP32 core 2.x, not 3.0.)
  2. 2.Open an optical mouse and find the ADNS 2610 sensor(Pin 3 is the data line (SDIO) and pin 4 the clock. Either remove the controller chip or lift those two pins.)
  3. 3.Make the lens adapter and fit the Raspberry Pi lens (FreeCAD file plus threaded and non-threaded PDF drawings.)
  4. 4.Wire sensor pin 3 to ESP32 pin 2 and sensor pin 4 to ESP32 pin 1(The README gives the wiring in text only.)
  5. 5.Enter your Wi-Fi SSID and password in main.cpp, compile and flash the sketch (Then open the local file code/data/index.htm in your browser.)

Resources

Documentation, files and community threads for this build — we link straight to the original sources and never rehost the creator’s files.

KNOWN ISSUES

  • The code only compiles with Arduino ESP32 core 2.x. Core 3.0 (based on ESP-IDF 5.1) changed the API, and the README does not explain how to switch versions.
  • It only covers the ADNS 2610 sensor. Open the mouse and check the chip before you buy anything else.
  • The README says 'remove controller chip or extract Pin 3 and 4' but has no photos of which chip or pins. Find the sensor's pinout or follow the video before you start.
  • The web page connects to the ESP32 at mousecam.local. If your computer cannot resolve that name on your network, the page will not connect.
  • The images are genuinely low resolution and blurry. It is a proof of concept that shows what the sensor sees, not a usable camera.
  • The lens adapter is a FreeCAD file plus two PDF drawings (threaded and non-threaded). There is no ready STL in the repo, so you need FreeCAD or your own model to make the part.

Can I use any optical mouse?

No. The README says it works with optical mice that use the ADNS 2610 sensor. Other sensors are not covered, so check the chip in your mouse first.

Why does the compile fail?

The README says the code only compiles against version 2.x of the Arduino ESP32 core; the API changed in version 3.0. Build it with a 2.x core.

Where is the web interface?

The README tells you to open the local file code/data/index.htm in your browser. The page connects to the ESP32 over a WebSocket at mousecam.local, so the ESP32 has to be on the same Wi-Fi network.

Can I improve the image quality?

Not much. In the video the images are low resolution, grey and blurry, though a teapot, a toy car and a face are recognisable. A different lens may help framing, but the sensor itself stays the same.

Do I have to remove the controller chip?

No. The README gives two options: remove the mouse's controller chip, or lift pins 3 and 4 of the sensor. Either way those two pins then go to the ESP32.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion1

FROM THE COMPAREE TEAM

This only works with the ADNS 2610 sensor. Have you ever opened an old mouse to see which chip is inside — and what would you point this camera at first?

CompareeTEAM1d ago

Checked against the README and the code: the repository was last updated in May 2025 and the README still says the code only compiles against Arduino ESP32 core 2.x, without explaining how to switch versions. The images in the video are genuinely blurry and low resolution, but a teapot, a toy car and a face are recognisable. If you are deciding whether to build it, watch the video first — that is the image quality you will get.

Doctor Volt

Doctor Volt (GitHub michalin) published the mouse-to-camera hack in a YouTube video in January 2024 and put the ESP32 code and the lens adapter design on GitHub under GPL-3.0.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.