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
    Location
    "Come fly the friendly skies" (KSNA)
    Posts
    58
    Post Thanks / Like
    Total Downloaded
    593.3 KB

    Barebone and budget minded DIY Headtracking (OperSource Approach)

    Important
    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 (https://www.arduino.cc/en/Guide/Libraries)
    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)
    https://learn.sparkfun.com/tutorials...ple-1-blinkies


    Software link;
    1. https://www.arduino.cc/
    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 (MinIMU-9-test.py). 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


    2. https://github.com/pololu/minimu-9-ahrs-arduino
    (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)

    https://sourceforge.net/p/facetrackn...25&page=2#2368
    https://sourceforge.net/p/facetrackn...read/9cbb2f4c/

    3. https://github.com/pololu/lsm6-arduino
    4. https://github.com/pololu/lis3mdl-arduino
    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;
    1. https://www.pololu.com/product/2072
    2. https://www.pololu.com/product/2738
    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
    (https://learn.sparkfun.com/tutorials...view-pro-micro)
    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.

    3. https://www.sparkfun.com/products/12640
    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.
    https://forum.pololu.com/t/minimu-9-ahrs-code/4010 (Look for Z Gain values)

    Capture1.jpgCapture2.PNGCapture3.PNGCapture4.PNG


    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.
    https://github.com/MHeironimus/ArduinoJoystickLibrary

    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:

    Jim_Remington
    (https://forum.pololu.com/t/state-of-...rs-for-25/8091)
    (https://forum.arduino.cc/index.php?topic=504435.0)

    Kris/Paul Greg (Never got it to work)
    (https://planetkris.com/2014/12/easie...-head-tracker/)

    Mikhail Z (Mikhail Zakaluzhsky)
    (http://zakamik-ru.blogspot.com/2014/...g-post_30.html)

    Furax49 (http://hatire.sourceforge.net/)
    v4friend (FaceTracknoIR)
    (https://sourceforge.net/u/v4friend/profile/)
    (https://sourceforge.net/projects/ftrgy86/files/)

    Moeburn and MHeironimus
    (https://www.youtube.com/watch?v=DCTt...gv3l0W8KSjW4vA)
    https://github.com/MHeironimus (HID/Joystick library)
    https://github.com/MHeironimus/ArduinoJoystickLibrary

    D.Falck and RobertTech (for the Awesome library)
    http://dfalck.xyz/arduino-quadcopter...usion-library/
    (https://richardstechnotes.wordpress.com/)

    And many other folks
    (https://sourceforge.net/p/facetrackn...read/eced1cb2/)
    (https://github.com/opentrack/opentrack/issues/139)
    (https://github.com/opentrack/opentrack/issues/139)
    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) https://theairtacticalassaultgroup.c...ad.php?t=28730 (Many thanks to OpenSource Contributer) 'S

  2. #2
    ATAG Member ATAG_Highseas's Avatar
    Join Date
    Feb 2016
    Location
    Peurto del Slade, UK
    Posts
    5,526
    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 STRIX Z370-E - i7-8700k - ASUS RTX 2080 Ti ROG STRIX OC GAMING - 32GB Corsair Vengeance DDR4 3000MHz -
    - CORSAIR 850W RMx Series PSU - Noctua NH-U14S CPU Cooler -
    - Virpil T50 Mongoos with Warthog Grip plus Extension Set -
    - TM Warthog Throttle -
    - Slaw Device 109 Cam Rudder Pedals -
    - HighseasPeripherals(tm) - 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

Bookmarks

Posting Permissions

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