Lazers are always fun, and we add up shiny reflective metal spoons to the mix!

This is laser-mouse, a.k.a. how to control your mouse using lasers and spoons. Two parts: laser pointer tracking using your webcam, and DIY capacitive touch sensors using spoons.

Inspiration

COVID-19. E-learning and home-based learning. Boredom. One of us has a drawing tablet that he uses to teach during the pandemic. Why not make one with lasers and webcams? To make it even better, use stuff we have at home, like spoons!

What it does

It is able to move your pointer and make inputs. Perfect to play rhythm games, to draw, and for general use. If you can use a tablet, you can use LAZERMOUSE.

How we built it

With blood, sweat, and tears. The project consists of two parts - the tracking of the laser by your webcam and the input of the buttons using the spoons. The laser tracking involves scouring through computer vision papers, a ton of documentation, as well as manual testing on different rigs. For the buttons we decided to go with the coolest idea we can use spoons in - and that is to build a capacitive sensor, delving down into the basics of electronic resistance. The team had to travel down to town and scour through shops to find parts which are not available by the organizers, and build a prototype until late at night, getting electrocuted several times in the process.

Challenges I ran into

  1. A paper seen by a webcam is rarely a perfect, aligned rectangle - sometimes a rotated quadilateral at best. We have to calibrate the position of the laser point on the paper in real time but fast enough.
  2. Using webcam poses positioning problems - often the direction of left and right, up and down are flipped when focusing on a piece of paper lying on a table. We had to realize this early and make suitable adjustments to the algorithm.
  3. It was our first brush with OpenCV and so we faced challenges in both finding out what methods were available we could use in our laser point tracking as well as understand the different methods available.
  4. [insert hardware challenges] breadboard suck lucily kwan helped. Thanks Noel!

Accomplishments that I'm proud of

We were able to set up the input of the buttons using the spoons as well as an Arduino micro which work pretty decently. We were also able to track the laser point using OpenCV, getting coordinates processed after rectifying perspective changes.

What I learned

Computer Vision - using Python OpenCV library, edge detection, blob detection PyAutoGui - to emulate mouse inputs

What's next for LAZERMOUSE

Improve accuracy and latency of the tracking of laser point such that we are able to use it day to day

Built With

Share this project:

Updates