Skip to content

Initial Testing of Assembled Miniscope

Daniel Aharoni edited this page Jan 31, 2020 · 1 revision

Once your Miniscope system is up and running, it is important to be able to test and debug all aspects of the system before moving to imaging in vivo. The sections below will discuss the procedures we use to validate Miniscopes we build before using them in experiments. As you become more comfortable with using Miniscopes some of the sections below can be skipped.

Testing the Coaxial Cable Connection

In our experience, the connection of the coax cable, either to the Rigid-Flex PCB or SMA connector, is by far the most common point of failure when building a Miniscope System. Take care when assembling these connections not to short the inner conductor to the outer shield. It helps to cover the solder joint as well as ~5mm of coax cable extending from the solder join in a semi-flexible epoxy, silicone, or glue (hot glue works well) to take the strain of cable movement off of the solder joint.

Once assembled, connect the Miniscope system to your computer and run the DAQ software. With the video streaming from the scope, move/twist/wiggle the coax cable with greater intensity that what you would expect an animal to apply, especially at the ends of the cable. If soldered correctly, the video stream should not drop out even with excessive movement and twisting of the cable.

If using the U.FL miniature coax connector to connect to the Rigid-Flex PCB, we suggest epoxying the cable to the PCB to remove any strain that would run to the actual connection. While these connectors are pretty robust, they are not designed to rotate once connected.

Testing the Stability of the DAQ Software

When running your Miniscope system on a new computer it is important to check the following

  • Stability of video stream: We have found some combinations of USB drivers, computer hardware, and Window's OS can lead to the video stream failing a few minutes after the software has connected to the scope (This is true with our previous version of the Minsicope DAQ Software. As we have new software that has not yet been tested across 100's of different computer configurations, it is still good to assume there may be unexpected issues that could arise with some configurations). This seems to mainly be an issue with Windows 8 and is independent of if you are recording the video to disk. To test the stability of your system:
  1. Connect a scope to the DAQ Box and then the DAQ Box to the computer.
  2. Open up the DAQ software and connect to the Miniscope.
  3. Leave the system running for 5 minutes. Do not click the 'record' button.
  4. If the video stream is still present (software hasn't crashed or video stream hasn't frozen) your system should not have any driver or OS issues.
  • Streaming video frame rate: The default frame rate of your Miniscope system is 30FPS but can be adjusted using the 'FPS' Slidebox in our DAQ software.
  1. Connect a scope to the DAQ Box and then the DAQ Box to the computer.
  2. Open up the DAQ software and connect to the Miniscope.
  3. Observe the current frame rate (displayed in the middle top of the video stream window). It should be stable within 1 FPS from the expected value. This is just an approximate measure of the frame rate, the frame rate of the recorded video should be extremely stable.
  4. You can also connect to a behavioral camera to add strain on your system. Generally the behavioral camera will have larger fluctuations in the displayed frame rate.
  • Write speed of video data: You want to make sure your computer is able to write the data to your HDD or SSD as quick (and hopefully much quicker than) as the rate at which you are acquiring it. Slow or encryted hard drives can be a source of problems here.
  1. Connect a scope to the DAQ Box and then the DAQ Box to the computer.
  2. Open up the DAQ software and connect to the Miniscope.
  3. Click 'record' and observe the "Filled Buffer" display at the top right of the video steam window. This text displays how full the circular frame buffer gets before being able to write data to the hard drive. Ideally this number should stay at or near '0' which minor fluctuations into single digits. If you notice this text turning red and getting close to the max buffer size, you can begin to lose frames during recording.

Imaging your Surroundings

An assembled Miniscope can image many house hold items (objects that fluoresce) by placing them Miniscope within about 1mm of the object and turning on the excitation LED. Some examples include white paper, clothing, and hair. You can also image objects that emit green light, such as a computer monitor.

Play around with adjusting the focus using the EWL slider in the Miniscope DAQ Software. You should clearly see portions of the object you are imaging go in and out of focus. If you do not see this you may need to reposition the EWL flex cable connection.

Checking for Light Leakage

When assembled correctly, no excitation light from the LED should leak onto the CMOS imaging sensor in your scope. The following steps will walk you through testing a scope for such light leakage. If you do find that your scope leaks light, the most common sources of the leak are the excitation or emission filter being scratched, placed in the wrong orientation, or significantly misaligned.

  1. Connect a scope to the DAQ Box and then the DAQ Box to the computer.
  2. Open up the DAQ software and connect to the Miniscope.
  3. Place the opening in the base of the scope against a black surface that won't fluoresce. You may be surprised at what materials weakly fluoresce green when blasted with blue excitation light. Black electrical tape is a good choice here.
  4. Turn the gain of the scope to its maximum value.
  5. Slowly turn up the excitation LED power from 0 to max power.
  6. As you increase the LED power watch the video stream for large increases in pixel brightness across large regions of your image. A small overall increase in pixel value of ~20 (the pixel values range from 0 to 255) is expected. You may also notice at max gain that some pixels become noisy. This is also normal but care should be taken in experiments to minimize this noise by limiting the gain or by correct these noisy pixels during offline processing of your data.

Imaging GFP/GCaMP and Resolution Calibration Slides

It can be helpful to image some other samples before moving to freely behaving animals. Some good choices here would be

  1. Brain slices expressing green fluorescence
  2. A resolution test slide with a piece of green fluorescing tape under it.