Results 1 to 2 of 2

Thread: Barebone and budget minded DIY Headtracing (EDTracker approach)

  1. #1
    Supporting Member Kwings714's Avatar
    Join Date
    Apr 2017
    "Come fly the friendly skies" (KSNA)
    Post Thanks / Like
    Total Downloaded
    1.59 MB

    Barebone and budget minded DIY Headtracking (OperSource Approach)

    See download section for Joystick sketch/software (Oct 2018)

    Sit still for like 5 to 8 seconds when plugin the USB. The IMU need to take sampling values for the Magnetometer and calculate for the Tilt Compensation.
    Ideally, with the headphone/tracker at the intended operating position (on your head and adjusted)
    The little octopus will be very jumping. That is drifting and the Tilt Compensation values was not obtained probably.

    Hi All,
    Here is my budget DIY HeadTracker ($30 or less, supposedly) I've been using/testing flight for about two months now.
    Required only eight solder joins.

    Required components;
    $2.75 Micro USB cable (small and very flexible)
    $15.95 MinIMU-9 v5 Gyro, Accelerometer, and Compass (3 DOF)
    $8-19 Leonardo Pro Micro ATmega32U4 5V/16MHz (Cloned US shore)

    1. Soldering iron and the Will to learn
    2. DIY Obsession
    3. If you can installed CLOD and conf files manipulation you shouldn't have any difficulty installing
    Arduino open source and the required libraries
    3a. Library installation tutorial (
    4. The Sparkfun blinkies tutorial is a good example to get familiar with the Arduino Pro Micro and Arduino environment. (Load, Compile, Upload sketch, and Serial Monitor)

    Software link;
    1a. To view the IMU data, With the Arduino Application running, under Tools, Serial Monitor. Make sure the correct Board and the COM-PORT are set/and or selected if needed.

    1b. To quickly visualize the output of the AHRS, you can run the Python test program ( Also be sure to change to the correct com-port if you get an error message when try to run the Python program.

    Python AHRS.jpg

    (A slight modification to the original AHRS code in order to work with OpenTrack or FaceTrackwithnoIR.
    I wlll upload the modified code later and will link it here)

    4a. Use the Calibration to obtain the calibrated values.
    (be patience when calibrating, repeat if drift is still exhibiting)
    4b. The little Octopus will be very jumpy (OpenTrack started)

    Hardware sample link;
    2a, The advantage of using the Pololu minIMU-9 over other IMU is that the SCL(Clock) , SDA(Data) and GND (Ground) pins coincide with the Arduino Micro Pro Pinout
    and you only need one wire to connect the VIN (2.5V-5V) to the VCC on the Arduino Micro Pro. When the components side facing down.
    2b, The Y Axis has to be facing either forward or backward (not left/right) when mounted on your headset. This is due to the Gimbal Lock (±90° Y axis rotation not 180° like X and Z axis)
    2c, IMPORTANT, avoid mounting the IMU directly on the exposed metallic headband of your headset. Its may cause magnetic interference with the IMU and MAY be contributing to the drifting issue. Hot Glue at the .99C store seem to do the trick for me.

    3a) There are 3.3V and 5 volt version
    3b) Order the 3.3v version if you are planning to incorporate HC-05 BlueTooth later on (I am still working on this version)
    3c) You can find many other clone of "Pro Micro ATmega32U4 5V 16MHz/3V 8MHz on Amazon, Ebay or Aliexpress "

    4. Here is the software required link (https://theairtacticalassaultgroup.c...earchid=859201)

    5. The IMU hardware/Software will self center if one of the three axis exceeded its range of rotation, 180° (X and Z) or (±90° for Y), so try to refrain from hitting the center button on OpenTrack shortcut. (Yes, even folks that have used other tracking device)

    6. Let me know if you have/or find any issue(s), concern, comment or question? link to trouble shooting Pololu IMU. (Look for Z Gain values)


    Part Two (This library, AHRS_Joystick only work with the Pololu minIMU-9 v3 and v5 only). Don't forget to un-comment and comment the correct IMU version.

    The Arduino (Pro Micro, Mega 32U4 chipset) can be turn into a Windows joystick device, automatically detected once plugin. You need Matthew Heironimus joystick library installed.
    Which can be install from the library manager(recommended method) or manually.

    1. Make a backup copy of your existing AHRS and calibration values. (It not a bad idea to obtain new calibration once very full moon)
    2. Download the Joystick Part_2 in the Download section, Compile and Upload the Sketch.
    3. If all go well, You will see New hardware has been detected and USB driver will be installing.
    4. Calibrate your new devices axis within Windows.
    5. Remember to wait for 7-10 seconds for the device initiated and calculate the offset/tilt compensation values.
    6. Change the input device to Joystick input and start in Opentrack.
    7. Check your Axis Assignment if the the little Octupus is not moving. See picture
    8. You no longer need to Start the Arduino and the Serial Monitor, just plug and play.Joystick as an input device.JPGNew Axis assignment Maybe Required.JPG

    Part three (MPU9250 Joystick library) to be continue

    Credit and Thanks to:


    Kris/Paul Greg (Never got it to work)

    Mikhail Z (Mikhail Zakaluzhsky)

    Furax49 (
    v4friend (FaceTracknoIR)

    Moeburn and MHeironimus
    ( (HID/Joystick library)

    D.Falck and RobertTech (for the Awesome library)

    And many other folks
    Attached Images Attached Images
    Last edited by Kwings714; Oct-30-2018 at 10:07. Reason: Z gain values. Axis
    Weapons of choice
    MS Force Feedback 2, Saitek Rudder, Nvidia GTX 1080 (Reference Design), AMD Ryzen 2200g (3.95 Ghz OC Game Mode) Asrock B450 iTX/AC, 16G GSkill 3200 Mhz @14 CAS
    OpenTrack and DIY Head-Tracker (Wire) (Many thanks to OpenSource Contributer) 'S

  2. #2
    ATAG Member ATAG_Highseas's Avatar
    Join Date
    Feb 2016
    Peurto del Slade, UK
    Post Thanks / Like
    Total Downloaded
    571.41 MB

    Re: Barebone and budget minded DIY Headtracing (EDTracker approach)

    I love these kind of threads.

    Those arduino boards are great!

    - ASUS ROG MAXIMUS Z790 HERO - i9-13900k - ASUS ROG STRIX RTX 4090 OC - 32GB Corsair Dominator Platinum DDR5 5600MHz -
    - CORSAIR 1200w HX Series PSU - Corsair H100x Hydro Series CPU Cooler -
    - Big Screen Beyond -

    - Virpil T50 Mongoos Flight Stick -
    - TM Warthog Throttle -
    - Slaw Device 109 Cam Rudder Pedals -

    Highseas Peripherals
    - Engine Switch Panel - Munitions Switch Panel - Throttle Quadrant Trim Box - Helicopter Collective - Analogue Brake Lever -

    Operated by a 1972 Standard Issue Talking Monkey

  3. Likes Kwings714 liked this post


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts