Head Mouse - Game controller or disability aid

FeaturedContest Winner
Picture of Head Mouse - Game controller or disability aid

My kids wanted to have a head controlled mouse for playing Minecraft - they wanted to move their heads and have the field of view move. I decided that was a challenge I couldn't resist, so I decided to build a movement controlled mouse using an arduino and a gyroscope chip.


A-Star 32U4 Micro - a tiny Arduino Leonardo clone

LSM9DS0 Breakout board - a combined gyroscope, accelerometer and magnetometer

A 3.3V to 5V logic level converter

10k resistor

push button switch

strip board

I started off prototyping with an Arduino Uno, and but it doesn't have the ability to be a HID controller at the same time as being able to load the firmware via USB. I tried reading the sensors via the serial port, but that's just not the same as a genuine mouse because you always need a client piece of software running, which isn't elegant, nor is it always convenient. However, the Arduino Leonardo does have the ability to act as a mouse or a keyboard, so I decided to use one of those. In fact, what i decided to use was a clone of that. There is a fantastic clone board called the A-Star 32U4 Micro, which is tiny - just 1" x 0.6", and it's half the price, so it's a winner all round for this project,

For the gyroscope, I chose the LSM9DS0 chip which is a combined gyroscope, accelerometer and magnetometer, giving me the choice of being a bit more sophisticated about detecting movement. I don't have the facility to make my own circuit boards or to surface mount chips, so I bought it on a breakout board.

The LSM9DS0 runs with 3.3V outputs, but the processor needs 5V inputs, so a logic level converter for the SCL and SDA lines is required too.

Finally, it's a good idea to be able to turn the mouse operation of the device on and off without unplugging it - that way if you make a mistake, you can re-program it without the mouse feature running wild.

Remove these adsRemove these ads by Signing Up
1-40 of 94Next »
millmore (author) 2 days ago
It's certainly not the only multi-sensor out there that is arduino compatible, but I haven't found any others that work well. I did try a GY-521 Module MPU-6050, and didn't have a lot of luck - it wasn't very stable. But others might work better.
tmalau3 days ago


I have a problem with LSM9DS0, can i change with my

GY-88 Motion Sensor 10-DOF (Accellerator+Gyroscope+Barometer+Magnometer)

millmore (author)  tmalau3 days ago
I haven't tried it myself, but I imagine you could.

Just out of interest, what problem did you have?

i cant find LSM9DS0 on my country (Indonesia). But i'm still trying to find it. Do you have an opinion what i can use to change LSM9DS0. It could be nice. Thanks for ur replay

SiddheshA21 days ago

Instead of the A-Star 32U4 clone I'd like to use the original Arduino leonardo. What changes will i need to make now?

I successfully made it with a Leonardo, and needed no changes. The pin numbers are even the same as the clone board!

Could you if possible send me the pin diagrams of your circuit? As somebody with no previous experience of Arduino or breakout boards I'm having a lot of problem making this device. Email ID:

Hi SiddheshA, here's a diagram of the circuit with the Leonardo. One thing that my son and I tripped up on was forgetting to connect the 3.3v output from the Arduino to the connection running between LU on the logic board and VDD (3.3v) on the breakout board. I also has a problem initially with my solder joints on the breakout board -- I had cold solder joints (Dull, not shiny, didn't flow nicely down to the pin collar) and the board wouldn't respond to any of the test scripts. Check those solder points! Good luck!

Screen Shot 2014-09-06 at 18.44.07.jpg
millmore (author)  SiddheshA21 days ago
I don't believe you'd need to make any programming changes to make it work. The board is much bigger, so you'll need a bigger case, and you'll need to build a shield for the sensor and logic level converter to plug in to it rather than PCB mounting everything.

The reason I didn't do this is that the end result will be significantly bigger (twice as long, three times wider, twice as thick), and more expensive. Obviously if you have one lying around it makes sense, but otherwise it's not the best plan.

I'm a third year Engineering student in Mumbai and I have chosen this as my project topic. As interesting as i find this, the problem is i have absolutely zero experience with Arduino programming and using any kind of breakout board. Will it all still work if i simply follow your instructions? Or can you please provide me further details about the things i need to take care of as a newbie on using these boards? Any kind of help will be hugely appreciated :)

fox4926 days ago

Excellent project!!!

the clicks, I don't know if it has been said before but an idea: you can
use the sound propagated through the skull of a chock between the teeth.

millmore (author)  fox4926 days ago
That's a really interesting idea, You could probably distinguish between single clicks and double clicks pretty easily too if you are listening for sound.
fox49 millmore26 days ago
Any idear for the sensor?

This is for sound to ear :
but i think a simillar system can be used. (in France soldiers are using a skull bones comunication device that detect vibration of the skull by the speaking soldier and make skull vibrate for the listening soldier. I think it's the same device that do both functions)
DanielH11 month ago

excellent project, has helped me a lot, do you possible this mouse communicates with a board whose system is android think?

millmore (author)  DanielH11 month ago

Yes, this works as a standard mouse, and can be connected to an Android system. I've plugged it in to my phone using a USB to go cable, and it worked great.

Thank you very much

djimenez91 month ago

Thank you so much for this project, Im trying to edit a little bit the code, but I dont know where the methods for Mouse are, I would apreciate your help.

Nevermind, I found them in the web of arduino leonardo.

millmore (author)  djimenez91 month ago
Good. It's the Mouse.move line in mouseMoveGyro that moves the mouse.


soapdude2 months ago

Awesome and simple project for the electronics beginner!
Do you have any tips or suggestions as how to reduce drag of the mouse? I often find myself having to move the mouse to the side or the top of the screen to readjust the location of the mouse with respect to my head! Thanks in advance!

millmore (author)  soapdude1 month ago
Yea, I know what you mean - it's the same as moving your mouse too far left or right - you need to pick the mouse up and move it back again. Not so easy to do with your head. One thing I did experiment with earlier on was having the direction of the mouse output as a serial stream from the arduino, and have a simple PC app to listen to that and turn it in to a mouse location on screen. It worked well and is immune to over pointing, but it needs the client side app to work, which I didn't like so much.
srcompany7772 months ago

I think it's a good project, but I have a challenge for you to do it with a wirlis

photoace124 months ago
By the way, how much did this all cost?
millmore (author)  photoace124 months ago

I'm in the UK and bought everything from The gyroscope chip is the most expensive part of this - that cost £22. The arduino was £10, the logic level converter was £2. Everything else was scraps I had lying around, so that cost me about £35 in total. In the US you can get the same for about $50 from sparkfun. The gyroscope means it's not a cheap mouse, but it's fun.

you are paying a lot over the average price for your chips, on ebay you can get the 3 axis gyroscope / Accelerometer chip @ £2.50

item number 221428586941

or if you have time to wait from the Philippines @ £0.99

item number 121190957975

millmore (author)  Poppy Ann4 months ago

The first one is £3.85 now, but even so, that's a lot better value! It's not the same chip, but I've ordered one to see how it behaves in practice. If it works as well it would cut the cost to about £18. Thanks very much for the info.

Would you kindly update your instructable if that gyro-chip works?

Also, great job on the ible!

you are right they have gone up in less than 24 hours, i am thinking of building one to use on a quad copter i am building to operate the camera as the only other way of doing it is to use 2 more potentiometers on the transmitter and it is hard enough using the two sticks to operate it without letting go of one of them to try and operate the camera, i am lucky as i bought a few of the sensors when i first tried playing with a arduino and some of them were only $0.99 from china at the time i just bought a couple of everything so i would not have to wait if i wanted to build something as i hate waiting for things to arrive once i have decided to try building an item.

AlanMarrec3 months ago

I try to make the same things but with GY-521, I'm a beginner in Arduino World, so someone has any advices for me ?


imzsan3 months ago

I want use GY-85 9DOF IMU sensor as it is quite cheaper than LSM9DS0

, but I do not know if the code can run on it .

Grateful if you can reply me

millmore (author)  imzsan3 months ago

I imagine the code would be different. You should google for an arduino library for it.

imzsan millmore3 months ago
imzsan3 months ago

thank you for sharing that amazing mouse!

I live in China, Where can I get the

A-Star 32U4 Micro except Cool Components? Also, I can not find this on sparkfun

millmore (author)  imzsan3 months ago

Fortunatly the manufacturer has a list of distributors worldwide;

imzsan millmore3 months ago

A-Star 32U4 Micro is based on Atmel’s ATmega32U4 AVR microcontroller, then I find this board which is also based on it, and it is half price of

A-Star 32U4 Micro. Can it be the substitute for A-Star 32U4 Micro? How can I build the circuit by using it? There is no pin 11, 3.3V and 5v on the following pic .

imzsan imzsan3 months ago

Finally I find this one, hope it will work

imzsan millmore3 months ago

thanks a lot

imzsan imzsan3 months ago

I find it ! lol

area363 months ago

Warning I built one of these and they are amazing, but they do not work on ps3/wii/xbox GAMES. They do work on stertup screen but not on the actual games. For that you may need an Eagle Eye or to boot your computer in Ubuntu. Cheers!

1-40 of 94Next »