Monday, January 22, 2024
HomeIoTChanging an Optical Mouse Right into a Digital Digicam

Changing an Optical Mouse Right into a Digital Digicam



Again within the olden instances, once I was however a boy, our pc mice had balls. They have been mechanical units that measured the rotation of that ball in two axes. Then optical mice got here alongside and adjusted all the pieces. That they had higher precision, higher pace, and didn’t require cleansing. Even fashionable trackballs, like the type I exploit to save lots of my wrist, make the most of optical sensors. These optical sensors are just like what you discover in digital cameras, so Physician Volt did the pure factor and transformed an outdated optical mouse right into a functioning digital digicam.

An optical mouse sensor and a contemporary digital digicam’s CMOS sensor are alike on a superficial stage, as a result of they each output a 2D array of pixels. The optical mouse appears to be like at variations between frames to find out how far it moved and through which route. That’s why optical mice don’t work properly on very clean, uniform surfaces: the pixels all look the identical and it could’t see a distinction between frames. However an optical mouse doesn’t want a really excessive decision or colour to do its job, so these sensors don’t come near evaluating to even the most cost effective digital cameras from a long time in the past.

On this case, Physician Volt used the sensor from an older optical mouse that has a decision of 18×18 pixels. Utilizing his trusty oscilloscope, he reverse-engineered the sign output from that sensor. It spits out an array of hex values for every of the 324 pixels for each body. He then used an ESP32 growth board to learn that information and show it as a picture on an online interface he had already constructed for an additional mission.

The uncooked pixel output coming immediately from the sensor is nearly meaningless to human eyes, as a result of the decision is so low. So Physician Volt turned to interpolation to get higher outcomes. Interpolation algorithms create new information factors based mostly on restricted units and there are a number of totally different algorithms suited to particular functions. Physician Volt discovered that cubic interpolation labored properly on this case. It’s a bit just like the “improve video!” scenes in CSI exhibits and is ready to create a better decision picture based mostly on the low-resolution frames.

That labored for issues proper underneath the sensor, however Physician Volt wished to make use of this like a digicam. So he 3D-printed a mount for Raspberry Pi-style CS-mount digicam lenses. That permit the digicam deal with topics at an inexpensive distance.

The outcomes nonetheless aren’t nice — a Recreation Boy Digicam from the late ‘90s places this to disgrace. However it’s cool to see recognizable photos coming from a pc mouse.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments