Mouse Hacks

On June 8, 2013, I gave a presentation at FITC’s Spotlight: Hardware. It was a great event that covered many topics related to hardware and physical computing. As silly as it is, I presented what I think is one of the best ways to get into making physical interactive installations is by doing “mouse hack”.

A mouse is the quickest and easiest way to include digital interaction in real objects with the added bonus that mice are fairly inexpensive and people often have a few kicking around. The goal is to add a couple of wires that will be another way to perform a click. Because a mouse click is an “OS” level interaction, no or few programming skills required. Also, using a wireless mouse means you can create a wireless digitally enabled interactive object. If you do need to buy a mouse, $5.99 is the most inexpensive price I could find in the real world – I’m sure you can find cheaper online. The important thing to remember is that mice are inexpensive, so you shouldn’t be afraid of opening them and maybe screwing up.

Tools:
Mouse
Wire – anything will do, but hookup wire is the best
Wire Strippers – an exacto works – “automatic” wire strippers are the best
Screw Driver
Pliers (optional)
Solder (optional)
Solder Gun (optional, but highliy recommended
Electrical tape – so helpful

Soldering scares a lot of people, but it’s a great technique and will make the whole thing easier. I think this is the best video I’ve seen about how to solder:

Insert the battery into the mouse to make sure it works. If the mouse has one of those annoying on/off switches, turn the mouse on and then remove battery. These switches pop out and get lost, so you want to make sure that the mouse is on in case you can’t get the switch back in position.

Often the screws are hidden under LRF. (little rubber feet) Pull off the LRFs to reveal the screws, and set them aside. Unscrew the case and open up the mouse.

Take a photo to remember where things go. Sometimes it’s good to tape parts that look loose – the battery housing and mouse wheel, in my case. Look for the thing that might be a button – it’s marked SW1 on this particular mouse – presumably for “Switch 1″.

Put your hand over the mouse to make sure it’s the correct button – nothing bad will happen if you press the button.

Pull the circuit out. Things might pop out. Oh well.

There are two little nubs directly under the button. Touching these nubs together is the same as clicking the mouse button – nice!

Strip the wires. I like to tie a knot in them so they stay close together and are easy to work with.

Put the wire through the stripper and align it to the correct guage. If you don’t know, then eyeball it.

Use some pliers to wrap the stripped wire around the nub. Solder it into position. If you’re afraid of soldering, you can use electrical tape, but it won’t be as reliable.

By this point the on/off switch has probably fallen out. Worry about it later or throw it away. Good thing you made sure the mouse was turned on earlier.

Try your best to put some tape between the two wires – if they touch by themselves it will count as a click, so you want to avoid that. You can use hot glue if you have trouble – it’s not the best approach, but it’s the easiest.

Put your finger over the mouse to make sure you got the correct button – I’ve screwed this up a few times.

Shove everything back together

Cut a notch in the front so the wires have a place to come out of the housing.

Close the mouse, turn it on, plug it in and touch the wires together – that’s it.

You could embed these mice in:
Footplates, switches, fridges, cookie jars, medicine cabinets, pill bottles, exercise equipment, etc.

Counters

You can now use the mouse to count things. This can be done easily by creating a simple html page with a button. Positioning the mouse over the button and touching the two wires together counts as a click. This requires very little HTML:

<html>
<head>
<script type=”text/javascript”>
var countTotal = 0;
function countClick()
{
countTotal ++;
document.getElementById(“countOutput”).innerHTML = “<h2>Count Output: “+countTotal+”</h2>”;
}
</script>
</head>
<body>
<div id=”countOutput”><h2>Count Output</h2></div>
<button type=”button” onClick=”countClick()”>COUNT</button>
</body>
</html>

Click Count Demo

Tying the button click to something like a google analytics event would hypothetically allow you to permanently store your results online.

Why is this approach better than a physical count clicker? Storing data digitally, not requiring mechanical activation and being able to add this to almost any object are definite benefits.

Trigger

Audio or video can be easily triggered by a mouse click if the media player is in full screen mode. Quicktime, Youtube, Flash and VLC can all be setup to do this.

Still images can be triggered using Keynote/ Powerpoint or a picture viewing app. like irFanView

You can even make an html based presentation by using Javascript to hide the mouse and advancing a background image. In The Evolution of Type Demo with graphic by Mikaela Couch, the background advances with each mouse click. If the mouse wires were embedded in a physical object, such as a printing press, you could make pulling a lever the trigger action to advance the timeline display.

This entry was posted in Projects, Spotlight: Hardware. Bookmark the permalink.

One Response to Mouse Hacks

  1. This is awesome. I remember in the university we used mouse for different type of computer interaction. Specially the wheel around the ball. We used it to measure water level or any real time movement. Also the button were used to just send single events.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>