OpenVR – 1 : Hardware

OpenVR – 0 : Story
OpenVR – 2 : Software

In an earlier post, I mentioned story of OpenVR project. I will guide you through building an OpenVR headset, in this post.

OpenVR hardware consists of several parts; electronics, case and lenses.


Before we begin building an OpenVR, let’s make a list of requirements.



  • Soldering Iron
  • Hot Silicone Gun
  • Arduino Software
  • Processing Software


Don’t try lenses on your eyes in sunlight, room light, anything other than a really close object. 

You can use tape instead of hot glue, if you are hesitant about placement of any part.

  1. Download Github Repository
  2. Sensor Unit
    IMU Test
  3. Assembly
    Display Test
    Sensor Unit Assembly
    Sponge Pad for Nose and Cheek Rest
  4. Calibration

1 – Download Github Repository

On repository page, click “Download ZIP” and then unzip the file.

or if you are a more unix-nerdy type, run following code in terminal

git clone


2 – Sensor Unit


2.A – Connections

GY-85 Arduino

2.B – Software

Open following arduino sketch located in extracted zip archive;


Connect arduino to computer using USB to TTL converter.

Upload arduino sketch to arduino.

2.C – IMU Test

While arduino is still connected to your computer, run following processing sketch located in extracted zip archive;

/IMU Calibration – Processing/Razor_AHRS_test/Razor_AHRS_test.pde

You should see 9DOF IMU represented as a box and it should rotate by how you move IMU.

It may be a little off, because we haven’t calibrated our sensor yet. We will do it after we complete assembly.

3 – Assembly

3.A – Lenses


The first and easiest is to place lenses. Gently place lenses onto holes on the 3D printed case. They should fit right into place since holes are specifically designed to hold the lenses.

Afterwards using hot silicone gun, glue lenses from their edges onto case carefully. Don’t pour too much silicone.

3.B – Display


We have the lenses on, but without a display, they are no good. Place the screen onto opening right in front of the lenses. I’m assuming you have the LVDS cable connected between the Screen and the Driver board.

Be very careful with the LVDS cable. They are pretty fragile and you wouldn’t want to wait for another shipment for weeks.

Glue the screen from screwing holes onto 3d printed case, using hot silicone gun.

Place the LCDPlace_1 onto back of the screen. This part will act as a separator between the screen and the driver board. Secure this part onto the screen using hot glue or tape.

I would suggest taping some bubble nylon onto this separator to increase heat insulation between driver board and screen. Because driver board gets very hot and you don’t want to damage the screen.

Then we need to place the driver board on the outside. Tape may not work for securing board because after several minutes of operation, heat from board loosens the tape. So you should probably use hot glue.

3.C – Display Test

DSC_8100Since we have both optics and display ready in place. We better test everything before taking further steps.

Now you should be able to watch a stereoscopic video using your OpenVR.

Connect driver board to your computer via HDMI, and connect power adapter to driver board.

You may see a blue screen waiting for a video signal. You may need to set HDMI as input source using buttons of the driver board.

Display acts just like a monitor. You should set your computer to duplicate its display onto HDMI.

Afterwards search for a stereoscopic 3d video on youtube then play it on full-screen. You should be able to watch it using your OpenVR now.

3.D – Sensor Unit Assembly


We are going to securely place both GY85 IMU and Arduino onto headset.

We will glue IMU onto headset like shown on the photo. We will pour some hot glue and then place and push IMU on it, before it cools.

Then we need to place Arduino onto headset. I would suggest gluing it sideways, because unused pins offers a surface for the glue. And it is easier to plug TTL side of USB to TTL converter, this way.

3.E – Sponge Pad for Nose and Cheek Rest


Carefully cut a linear piece from the sponge pad with a width of 1,5cm~. Then stitch the cut opening of cloth back together.

Then glue it onto plastic surface that rests on your forehead.

Repeat these steps for each plastic piece that rests on your face by carefully cutting pieces from sponge pad.

You should have a comfortable OpenVR, when you finish.

4 – Calibration

For calibration, please visit following page;




Thanks to Croccy22 on Thingiverse for his 3D Model.

17 thoughts on “OpenVR – 1 : Hardware

  1. Pingback: OpenVR – 2 : Software | Ahmet YILDIRIM

  2. Pingback: OpenVR – 0 : Story | Ahmet YILDIRIM

  3. guiaki

    I am running the same code as the example from the folder and this happens:

    Final_arduino_code.ino: In function ‘void read_sensors()':
    Final_arduino_code:427: error: ‘Read_Gyro’ was not declared in this scope
    Final_arduino_code:428: error: ‘Read_Accel’ was not declared in this scope
    Final_arduino_code:429: error: ‘Read_Magn’ was not declared in this scope
    Final_arduino_code.ino: In function ‘void reset_sensor_fusion()':
    Final_arduino_code:450: error: ‘Vector_Cross_Product’ was not declared in this scope
    Final_arduino_code:458: error: ‘Compass_Heading’ was not declared in this scope
    Final_arduino_code:462: error: ‘init_rotation_matrix’ was not declared in this scope
    Final_arduino_code.ino: In function ‘void compensate_sensor_errors()':
    Final_arduino_code:476: error: ‘Matrix_Vector_Multiply’ was not declared in this scope
    Final_arduino_code.ino: In function ‘void setup()':
    Final_arduino_code:541: error: ‘I2C_Init’ was not declared in this scope
    Final_arduino_code:542: error: ‘Accel_Init’ was not declared in this scope
    Final_arduino_code:543: error: ‘Magn_Init’ was not declared in this scope
    Final_arduino_code:544: error: ‘Gyro_Init’ was not declared in this scope
    Final_arduino_code.ino: In function ‘void loop()':
    Final_arduino_code:675: error: ‘output_calibration’ was not declared in this scope
    Final_arduino_code:683: error: ‘Compass_Heading’ was not declared in this scope
    Final_arduino_code:684: error: ‘Matrix_update’ was not declared in this scope
    Final_arduino_code:685: error: ‘Normalize’ was not declared in this scope
    Final_arduino_code:686: error: ‘Drift_correction’ was not declared in this scope
    Final_arduino_code:687: error: ‘Euler_angles’ was not declared in this scope
    Final_arduino_code:689: error: ‘output_angles’ was not declared in this scope
    Final_arduino_code:693: error: ‘output_sensors’ was not declared in this scope

    I can’t get it to work, these errors normally appear because of a missing library, I already tried to include the .ino in the rest of the folders, didn’t worked, created a .h to each of the .ino files and renamed the ino to cpp and didn’t work, I don’t know how to get rid of this problem, please help me.

    1. admin Post author

      You know when you try opening an INO file, Arduino IDE asks you if you would like to create a new folder for that specific file.

      If you click yes, it seperates that file into a new folder.

      If I remember correctly you should either press “No” then add other files as new tabs.
      If you click “Yes”, then add other files into new created folder and then open them all in new tabs.

      I hope it helps

  4. Xander

    do you think it would be possible to replace the suggested lenses with prescription ones, or instead of that, making it so i can wear glasses while using it, and if so, what would be the best way to do that?

  5. taylorlee9


    Great job with this one! and thanks for posting all your hard work :) Ive followed along and built my own VR headset. I am so close the having it all finished, I am just having one little issue with drift on the head tracking. I have it set to adjust for drift based on the magnetometer but it seems to have no affect. I even tried putting a magnet close to it to try and mess with the reading but it had no affect, so it seems like it isn’t doing anything with the magnetic field data. any idea what i may be doing wrong? plus I know from calibration that there is stable data coming from all three sensors.

    1. taylorlee9

      I’ve narrowed down the source of the issue to a problem with the accel z axis, It almost always reads out a value of 511 but when i flip the board over it will drop to a min of 422. When i use these in the calibration info I can at least get the values to settle and stop drifting when the board is still, but now its movement is really out of waco.

  6. Boolean Logic

    Hey man great diy project I was also thinking to make one for myself, totaly a nice piece of artwork but more importantly inspration.

    I have a question, I am not efficient on IMU Sensors. We are picking a IMU sensor 9 DOF or more and we are matching it with the Camera Class of whatever we wanna go in but is it only rotational or if I actually walk forward in a empty room will it catch me moving and process that,

    Would be glad if you answer me, thanks

  7. TeX

    Hi. I’m creating an “oculus style” diy and want to use your solution for head tracking. I’ve upload the arduino final code to my arduino pro mini but when i try to run the razor ahrs test (in processing 2) I got some error and the program stop to run. I’ve try freepie with mouse emulation script also and seems don’t fetch anything from the gy-85
    Perhaps I’ve for got something (the port and speed is ok)

  8. Mango

    Hello to the case you could not implement the choice of sensor MPU-6050.
    So as to make it easier to choose its hardware?

  9. sreenath kn

    I am very thrilled to do this so I bought the sensor and Arduino.I am not an expert so I am stuck .Could you please explain how to connect the USB to TTL converter and what kind of jumper wires should I buy(female..male).Are there any different types of usb-ttl converter(Anxious about any compatible issues!)I will use an android smartphone as a display by mirroring the pc monitor.

  10. Randy

    Where do you get or how do you make the driver board? I’m a bit new to this stuff and i want to try to build one of these.


Leave a Reply