A Mega Piece of Kit

I have exciting news for my loyal readers: I have finally completed the prototype for my EasyTTL Mega controller! This is a 4-channel optogenetics TTL driver, which I plan to use for in vivo optogenetics experiments.

I’ve mentioned parts of the development of this project before. But, for those who haven’t read the previous blog posts, the idea behind it was to make an optogenetics TTL driver that is simple and easy to use. I get so annoyed by the unnecessary complexity (and associated costs and difficulties) inherent in most neuroscience research equipment. As such, I have produced a massively simplified device that is controlled by the user with knobs (teehee) and switches.

The EasyTTL Mega (Figure 1) is a 4-channel optogenetics TTL driver built on an Arduino Mega core1. The Arduino Mega is a robust open-source microcontroller board with a massive array of I/O pins. I have given it four TTL outputs, each individually switchable by tactile toggle switches. The stimulation settings are determined by three dials: one for the flash duration, one for the frequency of stimulation and one for the brightness. The flash settings have been taken from a decade of optogenetics literature and experiments by yours truly, and covers 99% of flashing paradigms that I have seen.

My prototype 4-channel optogenetics TTL driver.

Being a good scientist, I needed to test the system, so I connected a couple of the outputs to an oscilloscope and turned on the pulsing. First, I checked the pulse durations (Figure 2), which are consistently accurate across the range.

Confirming accurate timing from my optogenetics TTL driver.

Next, I tested the range of flashing frequencies (Figure 3), which are also bang tidy.

Confirming accurate frequency timing from my optogenetics TTL driver.

Finally, I needed to check the brightness control (Figure 4). A quick note: the brightness control is based on pulse width modulation, which means that the laser or LED controller can be set to a constant current. However, the frequency of the PWM is 980 Hz for TTL outputs 1 and 2, but only 490 Hz for TTL outputs 3 and 4. What this means practically is that there will be a threshold flash duration below which the PWM makes the brightness unstable from one flash to the next, and this will be worse for the pins 3 and 4 which run a slower PWM.

Investigating the PWM dimming function on my 4-channel optogenetics TTL driver.

Based on my recording of the PWM outputs, the dimming control is unusable for flash durations of 1 ms on all outputs, and 2 ms or less on outputs 3 and 4. Despite my earlier misgivings, I think the 2 ms flash on outputs 1 and 2 looks fine. I’ve put the EasyTTL Mega in the shop, in case anyone wants one for their own research.

1. https://store.arduino.cc/products/Arduino-mega-2560-rev3

Leave a Reply

%d bloggers like this: