Introduction: QeMotion - Motion Tracking for Every Headset!

About: Tinkerer, nerd, gamer, numberphile. I also like mountain biking and rock/metal music.

Overview:

This device allows you to utilise your head movement to trigger events in basically any video game. It works by tracking the motion of your head (or headset it that regard) and triggering keyboard-presses for certain movements. So your computer sees this device as a standard keyboard. Later I'm probably going to add joystick and gamepad support.

The most commonly used movement which I've found suitable here (it's the reason I started this project in the first place) is leaning. In games like PUBG, Tom Clancy's Rainbow Six Siege, Insurgency and many other you can lean left or right to peak around corners without giving the enemy a big target area. I've found it quite hard to press the commonly used "Q" & "E" buttons because my fingers were already occupied with standard movement (wasd) and crouching...

Modes:

The software implements "modes" to choose between setups (motions and keypresses) for different games. The setups mentioned in "overview" (left and right lean for "E" and "Q") are already preprogrammed in mode 2. To switch between different modes you need at least one button on your Arduino (pin 14 is default for the mode button), but if you don't feel like it, you can simply define your default mode in the code. (Set mode = 2 for the mentioned setup)

Getting started:

This project can easily be done in an afternoon. Most of the parts I've used aren't neccessairy, you can get running with the Arduino, the sensor, some wire and a breadboard!

Alternatively to the Arduino Pro Micro you can use any Arduino with the ATmega32u4 controller, like the Leonardo for example. This controller is essential because it supports native USB. Otherwise it wont be able to act as a keyboard/joystick/gamepad.

Supplies

Essentials:

  • Arduino Pro Micro
  • MPU6050 Breakout Board
  • Wire

Optional:

  • Proto PCB
  • Buttons & LEDs
  • Original qeMotion PCB (coming soon)
  • 3D-printed parts

Step 1: Make Your PCB

It doesn't need all those LEDs and buttons. It doesn't even need the PCB. You can put everything on a breadboard if this is easier for you.

Essential connections:

Pin 3 (SDA) Arduino - SDA on MPU module

Pin 2 (SCL) Arduino - SCL on MPU module

Pin VCC Arduino - VCC on MPU module

Pin GND Arduino - GND on MPU module

Additional connections:

Buttons to pin 14 & 15

LEDs to pin 4,5,6,7,9,16 (you might use transistors for high-current LEDs)

qeMotion PCB: (coming soon)

This doesn't exist yet, but I'm probably going to design a custom PCB for this project which will be downloadable and maybe even purchasable.

Step 2: Make Your Sensor

You don't necessairly need to print a case for the MPU6050. I'm sorry I can't deliver a picture of the insides and the wiring, but during heat-shrinking of the PLA case, if fused together and I can't take it apart again. (Silly me...)

The wiring is as in the step above, just connect the SDA to the SDA pin 2 on the Arduino and the same for the SCL (pin 3). Power for the MPU module can be taken from the VCC pin and ground from any GND pin on the Arduino.

I've used an old USB cable because it has a nice shielding. I don't know if it is necessairy but keep in mind that the I2C protocoll is not intended to be used over such long cables but rather on a PCB.

Step 3: Print Your Case!

This is not necessairy, but if you have access to a 3d-printer you can use this design.

Step 4: Programm Your Arduino

  1. Connect the Arduino to your PC
  2. Find out what COM-Port it is connected to (you can find it in Windows Device Manager)
  3. Select COM-Port in Arduino IDE [Tools -> Port]
  4. Select your Board [Tools -> Board -> "Your board type"]
  5. Make sure you have all the neccessairy libraries imported
  6. Short RES to GND (this puts the Arduino in programming mode for some seconds)
  7. Upload your sketch!

The most recent code can be found in my github page:

https://github.com/lesterwilliam/qeMotion/blob/mas...

Attachments

Step 5: Show Us Your Version of QeMotion!

I'd be glad to see your version of the qeMotion project! Maybe you've had some great ideas and further implementations, share them ;)

Also, if you want to buy me a coffee more projects may appear faster ;)

https://paypal.me/AdrianSchwizgebel?locale.x=de_DE

Many thanks!