Couple Ephys-recording with Miniscope

88 views
Skip to first unread message

Huaxing Han

unread,
May 16, 2025, 10:31:00 PMMay 16
to Miniscope
Hi all,
We're encountering issues when trying to perform LFP recordings using the Open Ephys system while imaging with the Miniscope v4. Running the Miniscope introduces a significant amount of noise into our electrophysiological recordings.  We've tried a few ways to ground the Miniscope but haven't had much success. If anyone has experience properly grounding the Miniscope or running it alongside ephys recordings, we’d really appreciate your advice!

Nat Kinsky

unread,
May 21, 2025, 4:16:55 PMMay 21
to Miniscope
Hi Huaxing,

I have attempted this also and seen the same issue. Like you, I have tried engineering away the problem, and nothing has worked.

According to Daniel Aharoni, the noise originates from the electrowetting lens (EWL), which "gets driven at around 5KHz with a 0 to 80V signal so no surprise it is showing up in your ephys channels... especially since the 2 traces running to the EWL aren't well grounded." See this post for more info. You may also see some line noise depending on your recording setup.

The good news is that, because the lens is driven in a narrow frequency band, you can clean up the recorded signal with a post-hoc notch filter at the EWL frequency and its harmonics. I have done this and successfully extracted single-unit hippocampal activity from a recording where there was no discernible signal during the actual recording.

See this Jupyter notebook for my solution, which uses the SpyKING CIRCUS engine to filter a .dat file recorded with OpenEphys. To the best of my knowledge, I am the only person to use and test this so far, so if you try it and have any issues, please let me know.  It was developed for the OpenEphys .dat file format but should work with a few tweaks for any data file format supported by SpyKING CIRCUS. 

3 seconds of unfiltered signal
Screenshot 2025-05-21 at 4.04.15 PM.png
Same snippet after notch filtering
Screenshot 2025-05-21 at 4.05.14 PM.png
Three important notes:
1) Be sure to run this on a copy of your data - SpyKING CIRCUS's filter overwrites the filtered data in place onto your existing file.
2) I've found that the frequency range of the noise can change over the first few minutes of the recording and that other bands of noise can pop up in well-used miniscopes, so be sure to filter those as well. The notebook above gives an example of how to do this.
3) I found that I am able to get an ok estimate of the signal using a splitter and 1250 Hz low-pass filter in the OpenEphys recording software. I still record the raw unfiltered signal for cleaning up later,  but it's nice to know what things look like during the recording.

Hope this helps,

Nat

Alexa Fryc

unread,
Jun 15, 2025, 8:53:33 PMJun 15
to Miniscope

This is a little risky… but it worked beautifully to remove this 5 KHz EWL-sourced noise from my hippocampal tetrode recordings, and may be worth it depending on your goals. Essentially, you’ll need to build a “reverse” Faraday cage surrounding the entire miniscope, including the base that inserts into the baseplate during imaging. For the main body of the miniscope, you can wrap it in a layer of copper mesh, with a thin wire extending to a common ground running alongside the coax cable.

The risky part comes with the base of the miniscope, since it fits tightly into the baseplate and you can’t really wrap anything around it. I tried silver conductive paint, but it didn’t eliminate the noise. Fortunately, this part is already metal, so you really just have to connect it to a ground. To do this, I tucked a super thin copper wire in this tiny gap between the metal base and the plastic architecture above it, soldered it (for extra stability), and then connected this wire to the copper mesh shield around the main body. I usually solder at least two wires on opposite sides of the base in case one breaks from experimental wear and tear. So far, the noise has not returned!

Note: soldering will slightly burn the plastic near the metal base, so I recommend using a scalpel tip to smooth out any rough spots before starting experiments.

If anyone's interested in trying this, happy to chat more here or over email!

Screenshot 2025-06-15 at 8.29.52 PM.png Screenshot 2025-06-15 at 8.34.29 PM.png
Reply all
Reply to author
Forward
0 new messages