Theremoose - the Theremin Controlled Computer Mouse

by nanikgeorge in Circuits > Audio

3299 Views, 19 Favorites, 0 Comments

Theremoose - the Theremin Controlled Computer Mouse

theremouse thumbnail.jpg
_M2M8861.jpg
_M2M8866.jpg
_M2M8867.jpg
_M2M8869.jpg

This project was made in collaboration with Randy Glenn, be sure to check him out here: https://www.instructables.com/member/rglenn/

About a week ago I participated in a hackathon for terrible ideas here in Toronto (stupidhacktoronto.com). This is the result of that weekend.

We started off with a very different idea. One member of our team had a partially completed 3D printed plotter, and two gesture sensors, so our idea was to make a terrible etch-a-sketch, controlling the plotters with the gesture sensors. Unfortunately, halfway through the day after troubleshooting the motion sensors, and finally getting them to work with a raspberry pi and a tone generator, one of the motors on the plotter failed and melted it. Left with a melted plotter and a stupid gesture sensor theremin thing, we needed a new idea.

That's when it occurred to us, what if we used our stupid theremin as a computer mouse? And that's how our idea was born. You may be thinking, why call it the theremoose, when it is clearly a theremouse? Well, to truly understand, you will have to build one for yourself, but in principle, the name theremoose was settled upon because no mouse could make this much noise, the theremoose sounds like a moose. We are also Canadians, so everything must involve a moose.

Note: This is not a real theremin, as it does not operate using capacitance, rather simply using gesture sensors. But it still works like one! I guess you could call it a digital theremin?

Gather Materials

Photo 2018-10-20, 18 05 46.jpg
_M2M8862.jpg
_M2M8857.jpg
_M2M8864.jpg

We were extremely lucky that one of our team members is an awesome maker, and brought absolutely everything needed to build this project, and much more. But if you don't have the worlds most awesome electronics collection, you're going to have to source this stuff.

You will need:

  • Teensy v3.0
  • Teensy audio shield
  • amplified speakers of some kind
  • a giant push button with a built in LED (or without LED, but the LED makes it more fun)
  • many jumper wires
  • breadboards
  • 2x sparkfun gesture sensors (this is the newer version of what we used, everything is the same except for how it looks)
  • 4x LEDs
  • 5x transistors (PN2222A)
  • 5x 470 ohm resistors
  • some sort of a frame for the mouse (we used some wood, and a plastic cup, hopefully you can do better)

Wire Up the Gesture Sensors

Photo 2018-10-20, 20 36 59.jpg
Photo 2018-10-20, 20 37 07.jpg
gesture sensor modified.jpg
Photo 2018-10-20, 20 36 52.jpg

To me, this is the most fun part. Wiring everything up.

To start, we need to make some modifications to the right hand sensor only (this is the one that will move your mouse up and down):

  1. Remove the solder bridging the "I2C Pullup" pads.
  2. Bridge the "Addr" pads.

I have drawn a little diagram showing where these pads are found above.

Now that you have the right hand sensor modified, wire up both sensors to the Teensy board in the same way:

  1. Attach ground to ground (GND to GND).
  2. Attach VCC on the sensors to 3.3v on the Teensy.
  3. Attach the data pin on the sensors (DA) to pin 18 on the Teensy.
  4. Attach the clock pin on the sensors (CL) to pin 19 on the Teensy.

That's all, the sensors are wired up!

Wire Up Everything Else

Photo 2018-10-20, 20 36 49.jpg
Photo 2018-10-28, 17 45 47.jpg

Now that the sensors are wired up, let's attach everything else to the Teensy. There are instructions below, and a hand drawn schematic with the images above, hopefully that is enough to properly explain the wiring!

Button

Wire the button to pin 0 on the Teensy, and ground. Make sure that you wire the button naturally open (labeled NO and COM on our button).

To wire the LED, if you have an LED built into your button like we do:

  1. attach Teensy pin 1 to the base of your transistor
  2. attach the emitter to ground
  3. attach the collector to the anode of the LED
  4. wire the cathode of the LED to +3.3v on the Teensy, with a 470 ohm resistor in series

Indicator LEDs

These will provide feedback so that you know which way your mouse is moving, you know, in case you want to use your theremoose while not looking at the monitor. Okay, fine, we added them because no project is complete without light emitting diodes.

We added four LEDs, and each one is attached to a Teensy pin from 2 to 5, wire them up like this:

  1. attach the base of a transistor to one of the 4 Teensy pins above.
  2. attach the emitter to ground
  3. attach the collector to the anode of the LED
  4. wire the cathode of the LED to +3.3v on the Teensy, with a 470 ohm resistor in series

Speakers

Just plug them into the Teensy audio shield. It has an 1/8" audio jack.

That's all! There is nothing left to wire in this project.

Software!

code.JPG

The code for this project is linked below:

https://drive.google.com/file/d/1hLA2Aydn1qutxAOlt...

You should be able to download it from that link and open it in the Arduino IDE, upload it to you board, and have everything work just fine. But that's boring! Try experimenting with the code, and changing the parameters. We had a lot of fun experimenting with the types of waves that can be generated by the Teensy. We discovered that the saw-tooth wave was the most annoying. There is an image above of the parameter that needs to be modified to change the waveform.

Once the code is uploaded, when you plug your Teensy into the computer, it will act as a mouse! This can be annoying when you are trying to upload modified code, and someone is playing with it. When the Teensy is first plugged in, it can enter one of two modes. If you hold the big button down when it powers on, it will be in quiet mode (perfect for home use), if you simply plug it in, it will be in loud mode (perfect to clear out a coffee shop if you can't find a seat).

Mount Everything to Make It Useable

Photo 2018-10-20, 18 05 46.jpg

This is the step where you get to be creative! We made the frame for the theremoose using an extra piece of wood, mounting the sensors on either side of the computer, and using a red solo cup (filled with rocks) to hold the button, which will be used to click (we used the red solo cup because it is the perfect height to be hit with your chin).

I think that this was the perfect solution as we were at a hackathon, and making some sort of a frame for it was a last minute idea, but I also think that you can do better, so whatever you come up with, please share it with me!

However you decide to mount your theremoose, make sure you put the right sensor facing up and down, and the left sensor facing left and right. We found that this was the easiest to control.

You can see our system in the picture above.

You're Done! Have Fun!

Theremoose Playing More Minecraft
Theremoose Playing Minecraft
The theremoose being used to draw at full volume!
The Theremoose Playing Even More Minecraft
_M2M8868.jpg
_M2M8865.jpg
_M2M8858.jpg

The best way to teach you how to use this, is to show you a video. You can watch the videos above to see the theremoose in action. Here it is being used to play Minecraft and Minesweeper, but you don't only have to play games that start with "mine", the possibilities of the theremoose are endless!

If you build one of these, please let me know! And please also suggest the best use for this incredible, groundbreaking piece of technology.

We would also greatly appreciate it if you voted for us in the audio contest, because what other possible audio related invention could be better than the theremoose?

We had a lot of fun building this project, and we hope you do to!