DIY Raspberry Pi VR Goggles

11,434

24

18

About: I am a young teenager who loves building stuff.

These VR goggles are built using the Raspberry Pi Zero which makes them a bit lower-cost.

You can access USB on the side, which is four ports. It uses one battery and the screen is plugged directly into the Raspberry Pi for power, which takes away a USB port.

It may look like it just has a lot of wires on the top, but I am not much of an organizer, and there are only 3 wires.

Sorry if the images aren't that great, I didn't have very good lighting when I took them.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials

Here is a list of materials I used:

A micro-SD card (8-32 gigabyte, any will work (I think)),

Some Female/Female jumper Wires (If you don't have any or don't know where to find them here is a link to Adafruit for them: Female/Female Jumper wires),

Raspberry Pi Zero: Raspberry Pi Zero W on Adafruit

Elecrow 5" TFT Screen: TFT LCD screen (It works fine for a screen without any reviews) Or any 5" TFT lcd screen should work, I just used the configuration for this screen.

5V 1A Battery pack (I don't know where to find one, I am sure you could find some specifically for the raspberry pi zero)

3-Axis Gyroscope/Accelerometer: MPU-6050 on Amazon (I know it doesn't have the best reviews, but so far it has been working fine.)

Two micro USB to USB cables. (7" long or so should work)

A powered micro USB to USB hub: LoveRPi USB hub for Raspberry Pi zero

A small mini HDMI to HDMI cable. (If you just have a mini HDMI to HDMI converter, that will work too, That is what I use, but I don't have any cables shorter than 3' or so)

Tape,

Foam Double-Sided tape,

The following items can be optional, although if you don't use them, I would recommend using a cheap VR viewer you can get for your phone. (Please read through the entire instructable before purchasing a viewer though)

Lots of non-corrugated cardboard.

I had a template from a cardboard VR viewer template and lens that was from Radoishack® and you could probably find a template on google image search. Like this template: Template

I don't know where you could find the lens but this place: DIY VR Viewer Gives a pretty detailed descripion on how to make one.

Step 2: Tools

The tools you will need are just:

A hot glue gun,

An X-acto Knife,

And Scissors.

Step 3: Making the Viewer.

For making the viewer, I glued the template to my cardboard (If you don't have enough cardboard, cut the template in half without cutting any of the actual lines and such). After I glued the template, I cut out the cardboard in the places the template told me to, and folded it in the places it told me to.

After I was done with that, I glued the separate pieces together were I was supposed to, and slid a phone in to test it. It worked fine with its first test.

Step 4: Setting Up Your Raspberry Pi

You will need to download Raspbian Stretch: Stretch Image

Click Download ZIP for Stretch With Desktop.

Once the download is finished, You can follow the instructions here for installing the image:

Installing the Raspbian Image

Once that is done, plug the SD card into your Raspberry Pi Zero and boot it up!

Your Raspberry Pi should boot up into the desktop, but if it boots into the login screen :

the username is: pi

and the password is: raspberry

Once you are in, get yourself comfortable with how it works and where everything is.

Now we will move onto installing Pi3D.

Step 5: Installing Software

You can get pi3D from here:

https://github.com/tipam/pi3d

This will give an explanation of how to install it from the command line on the Raspberry Pi.

You can install the library for the sensor by simply running:

sudo pip install mpu6050

Once they are installed, you can move onto the next step.

Step 6: Attaching the MPU6050

The image above is a schematic of where you should attach the MPU6050 Pins to the Raspberry Pi Zeros GPIO pins.

Once you have them connected, you can move onto the programming.

Step 7: Programming

There is a file attached that has the program for the VR goggles. Open it in Geany Programmer's Editor and press F5 to run it and to make sure it works, then test out the gyro sensor by rotating it and making sure it is aligned with the rotation of the image. To close out just press Esc on the keyboard and the terminal should show up saying "Press Enter to continue" If you did everything correctly, you should have a screen that is rotated depending on the gyro sensor!

But that's not all... I am going to show you how to make the rest of the VR goggles!

Step 8: Putting It All Together.

These are some pictures of the different holes and boxes I cut out to make things fit.

I put the screen in the slot where a phone would go, and the battery pack went right in front if it. I used tape to attach the gyroscope, and the double-sided tape to attach the USB hub. The Raspberry Pi was attached with foam tape and the battery I just slid into the compartment I had made for it.

The head straps were not included, I fashioned those with some elastic and an old headlight band.

Step 9: Conclusion

Now that it is done, you can test it out! Plug the screen's power into the USB hub and plug the USB hub into the Raspberry Pi Zero. If you aren't quite sure what the different ports are on a Raspberry Pi Zero, there is an image above that tells about the different ports.

Make sure the HDMI is connected between the Raspberry Pi and the screen. Plug the Raspberry Pi power into the battery and turn it on!

Raspberry Pi Contest 2017

Participated in the
Raspberry Pi Contest 2017

First Time Author Contest 2018

Participated in the
First Time Author Contest 2018

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    18 Discussions

    None
    harrymkomo

    Question 4 months ago

    is it possible to make a version where you just have the Arduino and sensors with a bluetooth module to make this work with something like vridge and psmove service

    None
    marf.7endermin

    Question 5 months ago

    hey I have a file named gyro.py that already takes in data from the mpu6050 but how can I drop it into your program?

    1 answer
    None
    CalebN16marf.7endermin

    Answer 5 months ago

    It takes the data from the mpu6050 in the program I have too, so why would you need a separate one?

    None
    themrtwistersballoons

    5 months ago

    So, judging by the comments from everybody else, this is a stand alone style vr system/ head set. With no connection to accessories like motion controls, or PC connection? It's an awesome build, and was hoping to be capable of putting together something that I could play several semi big title games with, one of them being beatsaber. A lot of others being art type programs. Its a great weekend project though. Got most of the items in a wish list on wish now, for much less than Amazon's asking prices.

    1 reply
    None
    CalebN16themrtwistersballoons

    Reply 5 months ago

    Yes, it is a standalone vr headset. But to play games like that I would recommend using a faster processing unit. The raspberry pi zero wouldn't be able to run beatsaber from my perspective. It may be able to run art type programs, that is if a controller is connected to it. So if you are wanting to run high end games, I would recommend getting a designated virtual reality headset such as an oculus rift or htc vive.

    None
    Jo BobN

    Question 9 months ago

    glGetError 0x506
    What can i do?
    Thanks for any reply.

    4 answers
    None
    Jo BobNJo BobN

    Answer 9 months ago

    Sorry, so Mad... I've forgot, vnc-viewer is'nt supported... Testes IT with 3,5" HDMI Display and works fine. But to small for Google Cardboard :'-(

    None
    CalebN16Jo BobN

    Reply 9 months ago

    You could try adjusting the Google cardboard viewer, mine didn't work the first few tries either. Hope you get it working!

    None
    Jo BobNCalebN16

    Reply 8 months ago

    The lenses now have a smaller distance and fits to the screen, the screen is to far away from the lenses. I Tried tu pull out the tile in the middle, but now the quality is not really nice :-[

    None
    CalebN16Jo BobN

    Answer 9 months ago

    Where is that error coming from? Do you have pi3D downloaded?
    the script that you are using needs to be in the pi3D library, I may have forgot to clarify that.

    None
    CalebN16Makerdanger

    Reply 9 months ago

    (Sorry, just saw your comment) Cool! Could you possibly post some pictures of it? I was wanting to try the same thing.

    None
    UselessDood

    Question 1 year ago on Introduction

    Would you be able to use it to receive input from a pc, making it a vr headset? Either a wired or BT/WIFI connection would be fine.

    2 answers
    None
    CalebN16UselessDood

    Answer 1 year ago

    I am not quite sure how I would do that, it is a good idea though.

    None
    UselessDoodCalebN16

    Reply 1 year ago

    The android app Riftcat might help. That said, you'll need to get android working.

    None
    Swansong

    1 year ago

    That's a fun way to make some :)