Introduction#
In general, the Reiser Lab Github has thorough documentation for assembling and configuring the G4 arena. This guide is meant to help with supplementary information and tips. The section headers and organization of this guide match the section headers and organization of the github page, so that both can be used simultaneously. If you publish expleriments using G4 Arenas, please cite Isaacson et al. (2022) and link to the Reiser Github page.
Acquisition#
Arena
- The top board is optional, but strongly recommended for electrophysiology experiments as the additional capacitors dramatically reduce electrical noise. It is not necessary for 2P imaging or behavior-only experiments.
- Panel RESET - Based on the Reiser Lab schematics, the transistor that sets the panel RESET commands appears to be incorrectly configured. We have removed the transistor on our boards and that appears to solve the problem, but means that our display boards have no “reset” function (10/22/2021). This has not shown any adverse side effects so far.
- On the interconnect board, ensure that the RDIO connector itself is also soldered to the board and not just the pins, this helps with grounding and can otherwise cause electrical noise.
**Off-the-shelf items **Note: As of 11/2022, we have most of these items stocked in lab!
- Computer:
- The G4 display system can be run on most computers
- Requires 1 PCIe slot
- Note: These are very expensive. Be nice to them and keep track of them.
- Requires MATLAB 2021 or newer
- VHDCI cables:
- When assembling/using, ensure that the cable that connects the computer to the interconnect board is FIRMLY connected. Any loose connections can cause massive malfunctions of the arena.
- RDIO cable can be purchased from NI or Artisan Technologies (refurbished)
- The RDIO cable between the PC and interconnect board is limited to 1 meter, with no other lengths available. As such, we have configured an extension cable through Stonewall Cable Inc. that increases the total cable length to 3 meters without introducing any signal corruption. We have purchased several extras, but should we need more (Harvard Medical School HDPB68MF, Customer # 265738):
- NI Breakout box:
- Necessary connections can be made using two BNC-to-wire leads:
- Closed loop requires AI0 (signal pin J68, ground pin J34)
- Panel output to the DAC requires AO0 (signal pin J55, ground pin J21)
- RMIO cable and connector block can be purchased from NI or Artisan Technologies (refurbished)
- Enclosure (CA-1000) is not necessary and over-priced for what it is. Just cut something out of acrylic:
- Necessary connections can be made using two BNC-to-wire leads:
- Additional hardware:
- Ribbon cables: These cables are quite fragile so be very careful when removing them. The frames tend to rip away from the cables quite easily. Always use the latches. Always carry backups.
- Product #: FFSD-20-D-02.00-01-N (digikey)
- These cables MUST be kept short (2-3") to avoid signal corruption.
- Insulation: The arena boards, comm boards, and interconnect board should be covered with electrical tape to prevent incidental damage or contact
- Note: do NOT use tape other than electrical tape (e.g., do not use gaffer or duct tape) as these will conduct charge and produce display errors
- Faraday cage: Ensure that no exposed board components come into contact with the faraday cage (e.g. if you leave a column empty, ensure that the exposed components are wrapped in electrical/gaffer tape)
- Vertical stage: The VAP4 has been a good tool for raising and lowering the arena during experiments
- Acrylic base/top: for mounting the arena and holding the columns in place without a top board (for imaging), consider laser cutting an acrylic base (1/4") and circular frame (1/8"), respectively.
- Ribbon cables: These cables are quite fragile so be very careful when removing them. The frames tend to rip away from the cables quite easily. Always use the latches. Always carry backups.
Assembly#
Firmware
- This step is for burning/flashing the necessary firmware onto each individual comm board and LED driver panel.
- Prerequisites: You will need to use the custom Arduino IDE provided by the Reiser Lab. This IDE has the “PanelG4” option added as a target.
- IMPORTANT: However, you must use the modified HMS firmware files (hardware_v0p2 folder) and NOT the Reiser Lab firmware. Otherwise you will likely find several errors when running the panel drivers.
π panels_g4_firmware-master.zip
Turn Arduino into ISP: You do NOT need to do this! We have already programmed the Arduinos used by our lab and this only needs to be done once.
Programming a comm panel:
- First, set up the Arduino
- Open the Reiser Lab Arduino IDE file
- Go to
Tools>Boardand selectPanelG4- If you do not see this, check to make sure that you are using the custom programmer
- Go to
Tools>Boardand selectArduino as ISP(NOT ArduinoISP) - Ensure the correct COM port is selected (should detect the Arduino)
- Open the
comm.inosketch provided in the HMS firmware package - Next, attach a comm board to the board
- IMPORTANT: Ensure that the comm board is firmly plugged in. If the hardware is even slightly ajar, it will cause an uploading error that is hard to resolve.
- If you do get an error when uploading, disconnect the comm board and reset the Arduino, otherwise the error can persist across multiple boards for some reason.
- Go to
ToolsandBurn Bootloader - Go to
SketchandUpload Using Programmer
- IMPORTANT: Ensure that the comm board is firmly plugged in. If the hardware is even slightly ajar, it will cause an uploading error that is hard to resolve.
- Repeat for each comm board
- First, set up the Arduino
Programming a comm panel:
- First, set up the Arduino (above)
- Open the
driver.inosketch provided in the HMS firmware package - Next, attach a driver panel to the board
- You will note that there is a switch labeled 1-4. This corresponds to the 4 quadrants of the driver panel that must be programmed one at a time. Start with 1 flicked up and the rest flicked down.
- Go to
ToolsandBurn Bootloader - Go to
SketchandUpload Using Programmer
- Repeat for each quadrant of the driver panel, by flicking down the previous switch and flicking up the next until all 4 have been programmed
- Repeat for each driver panel
When testing LED driver boards:
- If 1 of 4 quadrant fails, the issue is likely due to firmware and said panel should be re-flashed
- If all quadrants fail
- Try switching the driver/comm combination to a working arena column, to test if it is a board issue
- Try switching the driver panel to a working comm board, to test if it is a comm board issue
- Check that you have flashed the HMS firmware and not the Reiser firmware
Software
- MATLAB: 2021 or newer is required
- Display Tools:
- After downloading the most recent Reiser Lab Display_Tools, it is strongly recommended to then replace said folder with the HMS Display_Tools package. This version resolves a few errors that can be difficult to pinpoint otherwise.
Panel_com#
- Initiate the connection: To initialize the arena connection, you MUST runΒ
connectHost.- This will take a moment to load and establish connection
- You can always confirm that the panels are working by runningΒ
'all_on'. For instance, I have a few lines of code at the start of every experiment:
disp('[NOTICE] Connecting to G4 display...');
connectHost; %required
Panel_com('all_on'); %turn on
checkPanels = input('[INPUT] Check display is working...');
Panel_com('all_off'); %turn offAt the end of a trial block/experiment, I typically runΒ
disconnectHostThe host is linked to your current session, so if you break mid-trial, try to switch from PControl to Panel_com, etc,Β
connectHostwill no longer work so you should be sure to close it and re-openIt is the most finicky party of the G4s and may take some getting use to
To generate patterns and functions:
- By default, all patterns and functions will be saved under
PControl_Matlab>Experiment- When first setting up, ensure that these folders are emptied. If there is a mismatch between how many patterns PControl thinks there should be versus how many patterns there actually are in the folder, it will throw an error
- These parameters are saved under
Experiment/currentExp.mat- To refresh this file, simply run
create_currentExp(exp_path)after generating your patterns and functions, respectively - Example script for generating patterns and functions:
- To refresh this file, simply run
- By default, all patterns and functions will be saved under
π generate_patt_and_func_G4.m
- Examples for generating patterns:
- Examples for generating functions:
- To load/run panel parameters:
- For open loop:
Panel_com('set_control_mode', 1);
Panel_com('set_pattern_id', pattN);
Panel_com('set_pattern_func_id', funcN);
Panel_com('start_display', time); %sec- For closed loop:
mode = 4; %closed loop = frame rate
mode = 7; %closed loop = frame index
Panel_com('set_control_mode', mode);
Panel_com('set_pattern_id', pattN);
Panel_com('set_pattern_func_id', funcN);
Panel_com('start_display', time); %sec- Example experiment functions:
π recordG4PanelsFictracEphys_court.m
π recordG4PanelsFictracEphys_menotaxis.m
Troubleshooting Tips and Tricks#
- Try all on/off, is this an issue with your pattern or with the arena?
- If all on/off is fine, it is either an issue with your pattern (e.g. wrong dimensions or stretch value) or an issue with one of the input channels
- If the entire arena is flickering
- Ensure the VHDI cable is securely fastened in place
- Ensure ribbon cable is both undamaged (e.g. are the connectors at either end firmly connected to the ribbon wires) and securely fastened
- Try removing individual panels (comm+driver) one at a time, perhaps one is malfunctioning and pulling too much power
- Note: an error at a single column/panel can cause an arena-wide error sometimes
- Try touching the boards with both palms, does the noise go away? This would suggest that something is distributing charge in a way it should not. Either a single panel or something touching the panels
- Ensure nothing is touching any exposed electronics on the board or on the panels themselves
- Faraday cage?
- Gaffers tape? (it conducts charge, only ever use electrical tape for insulation)
- The interconnect boards and ribbon cables are subject to the most damage from day-to-day usage and may need to be replaced over time. These parts are also the cheapest and easiest to swap out.
- In some cases, you may find that the arena only works in certain orientations of the board and cable (I.e. a certain amount of tension against the joints)
- In some cases, you may find that the arena performance is worsening over time and is particularly sensitive to moving the board and cable.
- If the arena was working and is no longer working, the issue is almost never to re-solder!
- Is there a chance that saline or other substances have gotten on the arena? It may be worth washing the PCB board and letting it dry for several days (ask Ofer for help)
- In general, the PCIe sends a command to the arena, which is displayed with minimal feedback. In other words if you are displaying a pattern in open loop, you may still get the correct output even if the panels are flickering or off. If you notice that your panel output is corrupted, this may indicate a software issue. Check to see if you are running out of memory, or consider re-installing the necessary Host and Panel_com software.