You need to understand the voltage divider!

In electronic design, the voltage divider is probably the most fundamental circuit motif. You would be hard pressed to find single circuit that doesn’t have one. But more importantly, it is a deeply useful concept for explaining the physiology of excitable cells, and for understanding the nature of electrophysiological techniques. I’ve talked about voltage dividers in several of my posts, but one of my readers said I should explain what they are so that’s what I’m going to do now.


Continue reading

2-Photon Excitation Spectrum of Red Retrobeads

In order to successfully combined in vivo 2-photon GCaMP6f imagining and red retrobeads, I need to know the 2-photon excitation spectrum for the beads. I couldn’t find the information online, and the lumafluor didn’t have it, so I produced a rough and ready estimate. First, the power of the laser was measured in the range of 740 to 940 nm, then a small sample of undiluted retrobeads was held in the bottom of a sealed capillary tube, and the mean pixel value of the center of this capillary was measured as the wavelength was changed. I have presented the data as both the raw pixel values (Arb.) and the pixel values normalized to the power at the sample (Arb/µW). Long story short: between 780 and 880 nm is where you want to

EDIT: I have adjusted the axis as per the comment. I was just going to use “brightness”, but more descriptive = more better, right?

Series Resistance. Why it’s bad.

At the very start of my Masters, my first experiments appeared to show that the histamine H3 receptor inhibited the release of GABA in the neocortex. It turns out, this was all lies. It was all lies because of series resistance, a concept I had vaguely heard of, but didn’t understand. If you’re just starting electrophysiology this post is for you. The hope is that by the end of this post, you will understand series resistance, and you’ll understand why it is extremely important to monitor it religiously, whether you’re performing voltage clamp or current clamp recordings.
Continue reading

Filtering by the cell != filtering by the network

Back in 2014 I read this paper, from Judith Hirsch’s lab. To my simple mind, it was a pretty complex model, but it had a cute little video of the thalamus reducing position noise from the retina. I’m not going to lie, I still don’t fully understand the original paper, but probably due to an urge to avoid doing experiments, I felt drawn to make simple integrate and fire model of the retina -> thalamus circuit to see if it filtered noise. The result were somewhat predictable, and I tucked them away. But then an opportunity came to fish them out of the proverbial desk draw, and then I noted something quite interesting: The way the individual cells filtered their input was the opposite of how the network filtered its input. It led me to publish this article. Below you can play with some of the simulations I used to produce the paper*.

Continue reading

Visualizing how FFTs work.

A lot of scientists have performed Fast Fourier Transforms at some point, and those that haven’t, probably are going to in future, or at the very least, have read a paper using it. I’d used them for years before I ever began to think about how they algorithm actually worked. However, if you’ve ever looked it up, unless math is your first language, the explanation probably didn’t help you a lot. Normally you either get an explanation along the lines of “FFTs convert the signal from the time domain to the frequency domain” or you just get this:

X_{(k)}\ = \sum_{n=0}^{N-1} x_{(n)} \cdot e^{-2 \pi i k n / N}

However, the other day I came across an amazing explanation of the algorithm, and I really wanted to share it. While I might not be able to get you to the point that you completely understand the FFT, I think think it might seriously enhance your understanding.
Continue reading

Extracting data from a scatter graph

I’ve already made a rudimentary script for extracting data from published waveforms and other line graphs. But what I’ve needed recently is to be able to extract data from XY scatter graphs. This is a slightly more complex problem because it requires feature detection of an unknown number of points. You can access the script here, and I’ll go over its use and some of the code in the rest of this post. Continue reading

Quick and simple analog visualization.

manometer2Sometimes you just need to get a notion about whether a signal is big, little or non-existent, rather than its exact value to 4 decimal places. In my case, I wanted a manometer, so I could tell how much pressure the students were apply by mouth when learning to patch cells. I could also imagine someone wanting to measure the DC value of a voltage that they were applying a digital high pass filter to, just to make sure it didn’t go out of the range of the DAQ. I’ve seen people use cheap multimeters for such task, In this case, I offer a solution, that is perhaps more modular, and certainly cheaper.

Continue reading

A cheap LoFi speaker – Impedance II

I needed to make a little speaker. The real reason? Because of a retro gaming session at work. However, there have been several times that I’ve needed a small cheap speaker that was suitable for delivering simple stimuli. I thought I would post a schematic and take this opportunity to give you an example of how Matlab can make impedance calculations easier, something I’ve talked a little about before.


Continue reading

Trying to make the worlds cheapest syringe pump/linear drive

99% of things you buy from scientific suppliers are violently overpriced. Peristaltic pumps for $2000 that only contain $50 worth of equipment. Homeothermic blankets should only cost about three fifty. But the one that has always annoyed me are syringe drivers. These are nothing more than a stepper motor, a lead screw and a bit of electronics. The budget ones tend to start at around $300, and they go up to ten times that. I’m not standing for that, and neither should you. So I wanted to make one myself.


Continue reading