PiVR has been developed by David Tadres and Matthieu Louis (Louis Lab).

1. Build your own PiVR

It doesn’t take long and it isn’t too hard to build PiVR. See this timelapse video where a PiVR setup is being 3D printed, the PCB soldered and then built.

1.1. Standard and High Powered version

PiVR comes in two versions:

  1. The Standard version: LED strips are used for both the backlight and stimulation light. We have measured around \(2{\mu}W/mm^2\) for red light intensity and around \(8000 Lux\) when measuring white light intensity. Please see the Bill of Materials for components you must buy to build the setup.

  2. The High Powered Version: The stronger LEDs require not only a different arena but also dedicated LED drivers which provide a constant current. We have measured light intensities in the order of \(40 - 50{\mu}W/mm^2\) for the red LEDs.

    The detailed instructions to build a high powered PiVR version will be uploaded shortly.

1.2. Building the Standard version

Warning

You will be handling sensitive electronic equipment. As you might be electrically charged, always touch something metallic that is connected to the ground before unpacking anything from an electrostatical shielding bag. A radiator will do fine.

Note

You can of course change the order of how to build the different parts. I build them in this order as there are necessary delays such as installing the operation system on the Raspberry Pi.

Note

We used an Ultimaker 3 with a Ultimaker Print Core AA (0.8mm) to print the PLA and a Ultimaker Print Core BB (0.8) to print the PVA support material. STL files were converted using Ultimaker CURA software.

  1. 3D print each part in the folder PiVR/Hardware/3D printer files. We used an Ultimaker 3 and printed with Standard PLA. We used PVA as support material. For best results print Casing, CameraHolder, TowerBottom and TowerTop with support material.

    1_3D_printed_parts.jpg
  2. Obtain the Printed Circuit Board (PCB). Find the blueprint in PiVRHardwarePCB. I have used the software Fritzing to design the board. I have used the company Aisler.net to print the circuit boards.

    2_0_PCB.jpg
  3. Get the following items to solder the PCB board:

    Important

    Before touching electrical components always touch something metalic that is connected to the ground. For example a radiator.

    1. Four (4) Transistors: 30N06L

    2. One (1) GPIO Header

    3. One (1) Barrel connector, 5.5mm Jack with 2.1mm center pole diameter

    4. Four (4) Barrel connectors, 3.5mm Jack with 1.35mm center pole

    5. Four (4) \(10k{\Omega}\) resistors

    6. Break off a 5 pin stretch from the Breakaway Headers. This can be done using scissors or pliers.

    2_7_PCB_components.jpg
  4. Solder the components on the PCB. See this section for detailed soldering instructions.

    Important

    The correct orientation of the GPIO header and the Transistors is crucial for PiVR to work correctly.

    3_solderedPCB.jpg
  5. Cut off the excess wire of the resistors and the Transistors, e.g. with scissors.

    4_PCB_removed_wire.jpg
  6. Unpack the Touchscreen, remove the stand-off screws. Attach the monitor cable that came with the Touchscreen and the 4” 5 pin cable.

    Important

    The monitor cable must be inserted in the correct orientation. When you look into the receptacle you’ll see that only one side has connectors. Make sure that you insert the cable’s connectors on the same side.

    Important

    Note the orientation of the 4” 5pin cable! Left is (+) while Right is (-).

    6_Touchscreen.jpg
  7. Place the Casing on top of the Touchscreen (it will only fit in the shown orientation). Organize the 4” 5pin cable and the monitor cable as shown in the picture. Use the M2.5x10mm screws to fix the casing to the touchscreen.

    7_2_Casing_on_Touchscreen.jpg
  8. Prepare the SD card: Format the SD card using SD Formatter and load with NOOBs installation files as instructed here:

  9. Connect monitor cable with the Raspberry Pi (with inserted SD card). Again, make sure you insert the cable in the correct orientation. Use M2.5x10 screws to attach the Raspberry Pi to the Casing.

    8_0_Raspberry_monitor_cable.jpg
  10. Attach the PCB board on the right side of the casing using M2.5x10mm screws. Plug the 4” 5pin cable into the PCB in the correct orientation

    10_PCB_RPi_on_casing.jpg
  11. Use the GPIO Ribbon cable to connect the PCB board with the Raspberry Pi. Thread the long camera cable through the slit as shown in the image below. Connect it to the Raspberry Pi Camera port.

    12_Casing_stuffed.jpg
  12. Slide the CasingBackside (with attached pedestal) into the casing.

    13_Backside_attached_to_Pedestal.jpg
  13. TODO show an image how you put the casing backside on casing

  14. Drop a 2.5mm nut in each hole in the TowerPedestal. Use the M2.5x10 screws to attach the TowerBottom to the Tower Pedestal

    14_TowerPedestal_attached.jpg
  15. Using a hammer, drive the dowel pins into the TowerBottom. Then attach the TowerTop to it. In principle you can stack more TowerTops on top.

    15_TowerBottom_Dowel.jpg
  16. Attach the 800nm Longpass Filter to the Camera using Parafilm. It is best to wear gloves for this step.

    16_Camera_with_LP_filter.jpg
  17. Thread the camera cable from the Casing through the slit in the TowerBottom and through the slit of the Camera Holder.

    Important

    Note the orientation to avoid having to curl the camera cable in the camera holder

    17_Threading_of_Cam_cable.jpg
  18. Attach the Camera Cable to the Camera in the correct orientation. Then screw the camera to the Camera Holder using the M2.5x10 screws. It is not necessary to fixate the screws with nuts!

    18_Camera_attached_to_CamHolder.jpg
  19. Drop a 2.5mm nut in the hole in the Camera holder and use it to fasten the M2.5x10 screw. Then attach the CameraHolder to the Tower.

    19_PiVR_complete.jpg
  20. Plug the 5V power source into the micro USB slot of the Raspberry Pi(right side). After a couple of seconds the monitor should display a colorful image. Then the operating system installation will commence. Select the Recommened OS.

    20_Install_Raspian.jpg
  21. On the first startup the OS asks a couple of questions. The most important one is the language - make sure you choose the correct Keyboard layout. Make sure the Raspberry Pi is connected to the internet and download the PiVR installation file

  22. Open the terminal. Then change directory to the ‘Downloads’ folder (or wherever you downloaded the file) and type:

    bash install_PiVR.sh
    
    21_install_PiVR_software.jpg
  23. Now the arena will be built. In the folder PiVR/Lasercutter_Files/ you can find two vector graphic files that can be used to Lasercut a 20cm or 30cm arena, circular holes for M8 screws and small lines indicating the distance of 1cm on each side. For one arena you will need two acrylic plates.

    22_Arena_overview.jpg
  24. Cut the 850nm (infrared) LED strips to the desired length (e.g. 20cm on a 20cm Arena) and attach them to the arena. You can choose the horizontal distance yourself. I usually use a distance of 3cm.

    Important

    It will make soldering much easier if you make sure the (+) and the (-) between the LED strips is consistent!

    Solder (+) to (+) from one side of the arena to the other

    23_soldered_arena.jpg
  25. Attach the female Barrel Jack to a convenient copper dot on the LED strip. Then fix the Female Barrel Jack using a Hot Glue gun. Make sure you are leaving space for the M8 screw to pass through.

    Important

    Usually the red wire of the Barrel Jack indicates (+)!

    24_arena_barrel_jack_attached.jpg
  26. If you want to add a Stimulation LED strip (e.g. Red Stimulation light), just attach it in between the infrared LED strips, solder it as you did the 850nm LED strips and attach the female Barrel connector at a convenient location and fix it using the hot glue gun.

    25_arena_second_strip.jpg
  27. After inserting the M8 screws into the holes, thread a M8 nut on each of the screws about 2cm in. Put the second plate on top of the first and fasten it by threading a second M8 nut on top of the plate. Make sure the top plate is completely level by using a spirit level!

    26_second_plate_fastened.jpg
  28. To connect PiVR with the arena a cable needs to be constructed. You will need two 5.5mm Male Barrel Jack, two 3.5 male solderable Barrel Jacks and around 20 Gauge wire.

    27_cables_overview.jpg
  29. Start by cutting a reasonable long piece of the wire, e.g. 50cm, but this depends on your application. Attach one side of the cable to the 3.5mm barrel jack. You may solder it, but be careful to only use minute amounts of solder. Then solder on the 5.5mm barrel jack on the other side, fixing it using the shrinking tubes.

    28_cable_done.jpg
  30. Start the PiVR software by double clicking on the shortcut on the Desktop. Under ‘Options’ Select ‘Optimize Image’.

    29_Starting_Software.jpg
  31. Connect the 12V power source (make sure you have an appropriate Ampere rating for the amount of LEDs you use!) to the 5.5mm Input on the setup. Do not plug it into the wall socket just yet!

    Warning

    Do not plug the 12V power source into the wall socket while you are handling the arena wires.

    Then connect the 3.5mm cable with the appropriate receptacle closest to the 5.5mm plug. Then plug the other side into the IR LEDs on the arena.

    Now you can plug in the 12V power source into the wall socket.

    30_connecting_IR_cables.jpg
  32. Turn the camera on (‘Cam On’). Then move the ‘Backlight Intensity’ slider to something like 400‘000. You should see how the image on the top left of the screen lights up.

    Note

    Since the camera has a 800nm Longpass filter you shouldn’t see anything in the camera preview as long as the infrared light of the arena is off, unless you have a strong source of infrared radiation around, e.g. the Sun.

    30_1_testing_IR.jpg
  33. Connect a second 3.5mm cable just below the first. The other side goes into the first Stimulation Light in the arena.

    31_connecting_redlight_cable.jpg
  34. When moving the slider labelled ‘Channel 1’ the stimulation LED should light up.

    31_1_testing_channel1.jpg
  35. If these tests have been successful, congratulations, you’ve built your own PiVR

1.3. Detailed PCB soldering instructions (Standard Version)

Warning

Important! Make sure that the pins are not connected due to imprecise soldering!

  1. I prefer to solder the components on the PCB board in this particular sequence as I find it easiest to keep the components in place. Otherwise there is no reason to not solder components in any sequence you prefer!

  2. To solder the PCB board you will need the following elements:

    1. Four (4) Transistors: 30N06L

      2_1_transistors.jpg
    2. One (1) GPIO Header

      2_2_GPIO-Header.jpg
    3. One (1) Barrel connector, 5.5mm Jack with 2.1mm center pole diameter

      2_3_Jack5_5.jpg
    4. Four (4) Barrel connectors, 3.5mm Jack with 1.35mm center pole

      2_4_Jack3_5.jpg
    5. Four (4) \(10k{\Omega}\) resistors

      2_5_resistors.jpg
    6. Break off a 5 pin stretch from the Breakaway Headers. This can be done using scissors or pliers.

      2_6_Headers.jpg
  3. Take one of the small barrel plug and place it into the leftmost possible spot on the PCB board as shown.

    S_1.jpg
  4. Flip the PCB board while holding the small barrel plug in place. By placing it on the table, it should not move and allow you to easily solder the three pins of the barrel plug to the PCB as shown.

    S_2.jpg
  5. Continue to solder the other three small barrel plugs, one by one, onto the the PCB board.

    S_3.jpg
  6. Next, place the GPIO header in exactly the orientation shown in the image below onto the PCB board.

    S_4.jpg
  7. Flip the PCB board with the GPIO header around. As it now stands on the table it should be easy to solder. You do not have to solder every single pin to the PCB (minimum is shown on top picture) but it is recommended to solder more, ideally all. Be sure the solder between the pins does not touch

    S_5.jpg
  8. Place the 5-pin stretch of breakaway headers into the holes on the far right on the PCB. Make sure to place them in the correct orientation as shown in the picture.

    S_6.jpg
  9. Flip the PCB with the 5-pin stretch of breakaway headers around and solder the header to the PCB board.

    S_7.jpg
  10. Now to the resistors. Place a resistor in the indicated position:

    S_8.jpg
  11. Flip the PCB board around. If the resistor falls out, just fixate it by bending the wire as indicated here. Then solder it the the PCB board.

    S_9.jpg
  12. Do the same for the other three resistors.

    S_10.jpg
  13. Now take the large barrel connector and place it on the PCB at the indicated position

    S_11.jpg
  14. Flip the PCB board around and solder the large barrel connector to the PCB board.

    S_12.jpg
  15. Next, take one of the transistors and place it exactly as shown onto the PCB board.

    S_13.jpg
  16. Flip the PCB board around and solder the transistor to the board. Make sure the solder of the different pins does not touch the contact of one of the other pins! Warning: Transistors are more heat sensitive compared to the other components you have used so far. Make sure to not let them heat up too much!

    S_14.jpg
  17. Do the same for the other three transistors.

    S_15.jpg
  18. You must get rid of the elongated wiring of the transistors and especially the resistors as not doing so will 1) increase risk of shorting components and 2) it will physically be very hard to put the PCB board into the casing. While it is probably best to use the shown wire clipper, it is also possible to do that using normal scissor.

    S_16.jpg