TTL pulse recording for fMRI data collection

16,295

Circuit Image

This web page outlines the installation and usage of ezlog data logging software. This software enables the measurement of the timing of various events, facilitating synchronization of different stimuli. Specifically, the software is designed to provide a detailed report on the timing of visual, auditory, or tactile stimulation in relation to brain imaging. By collecting functional MRI scans sensitive to blood flow changes, brain regions involved in specific tasks can be identified. The software logs the time each brain image is acquired alongside the timing of stimuli perceived by participants. The tutorial is divided into four sections: Hardware, which details the creation of a cable that connects the scanner and stimulus presentation computer to a logging computer. This cable should connect various recording devices capable of generating a TTL (transistor-transistor logic) pulse. A diagram illustrates a cable connecting the parallel ports of two computers and a scanner. It shows a coaxial connector linking to the scanner, compatible with the TTL output of Philips Intera scanners with system release 10 or later. The stimulus presentation computer outputs through pins 2 and 5, recorded on the input pins of the data logging computer. The zero-volt ground lines (shown in black) connect all devices, with pins 18 and 25 on a computer's parallel port serving as ground lines. The scanner must be configured to generate pulses with EPI sequences. For Philips scanners, the `Dyn` (Dynamic) page of the sequence protocol should have the `Dyn. Sync. Pulse` set to TRUE, which may increase the volume acquisition time (e.g., recorded volume duration increased by 15ms). The pulses from the scanner should exceed 1ms in duration, as the software checks the parallel port every millisecond, potentially missing brief pulses. For instance, the Philips Intera generates a 0.05ms pulse by default. The input to the parallel port must be an electrical TTL pulse, not the optical pulse from modern Siemens scanners. Additional hardware may be necessary to connect the scanner to a PC, whether the PC is running this software or another application like EPrime. Two inexpensive circuits designed by Bob Rorden and Phil Moore are provided, which can be powered by a battery or small power supply. The author disclaims responsibility for any damage resulting from the implementation of these circuits. However, if constructed correctly, both designs allow for electrical isolation between the scanner and hardware, preventing potential damage to the scanner from the PC. Both circuits ensure that the signal between the scanner and PC is an optical pulse rather than a direct electrical signal. If the scanner generates an electrical signal, a PC815 photocoupler is used for isolation. For these circuits, the `OUT` pin connects to the data logging computer's pin 11, and the circuit ground connects to pin 19. For all Philips scanners and Siemens EPI scanner sequences prior to 2002B, the circuit for an electrical signal is recommended. For recent Siemens systems, the circuit for an optical signal should be used. The Siemens manual `Triggersignal outputs programmed by sequences` offers additional details and an alternative circuit for converting an optical pulse to a TTL pulse, though the described circuit is less costly and extends the duration of the optical pulse.

The ezlog data logging software is a specialized tool designed for use in neuroscience research, particularly in studies involving functional MRI (fMRI). The software's primary function is to synchronize the timing of various sensory stimuli with brain imaging data, allowing researchers to analyze how different stimuli affect brain activity. The ability to log precise timing information is crucial for understanding the temporal dynamics of brain responses to stimuli.

The hardware setup involves creating a custom cable that connects a stimulus presentation computer with a scanner and a data logging computer. This setup requires careful attention to the electrical characteristics of the signals being transmitted. The TTL pulse is a standard method for digital signaling, which allows for reliable communication between devices. The detailed instructions for constructing the cable emphasize the importance of ensuring that all devices share a common ground to avoid signal integrity issues.

The use of photocouplers, such as the PC815, is a critical aspect of the circuit design, as they provide electrical isolation between the scanner and the logging computer. This isolation is essential to protect sensitive equipment from potential damage due to electrical surges or incorrect voltage levels. The circuits designed for both electrical and optical signals cater to different scanner models, ensuring compatibility across a range of equipment.

In summary, the ezlog data logging software and its associated hardware setup offer a robust solution for synchronizing sensory stimuli with brain imaging data. The detailed instructions provided for constructing the necessary cables and circuits ensure that researchers can implement the system effectively while minimizing the risk of damage to their equipment. This comprehensive approach facilitates accurate data collection and enhances the reliability of findings in neuroscience research.This web page describes how to install and use my ezlog data logging software. This software allows you to measure when different events happened, allowing you to synchronise the timing of different stimuli. Specifically, my software is designed to get a detailed report of when visual/auditory or tactile stimulation occurred relative to brain imag

es. By collecting functional MRI scans that are sensitive to changes in blood flow, we can identify the brain regions that are involved with certain tasks. My software will measure the time when each brain image was acquired as well as logging the time of the stimulus that the participant perceived.

This tutorial is broken into four secions: Hardware: you need to create a cable that connects your scanner and stimulus presentation computer to a computer that will log the times of stimuli and scans. You need to create a cable that can connect the different devices that you wish to record. Each device should be able to generate a TTL (transistor-transistor logic) pulse. The diagram on the right illustrates a cable designed to connect the parallel ports of two computers together, as well as connecting to a scanner.

This picture shows a coaxial connector plugging into the scanner, matching the TTL output found on Philips Intera scanners with system release 10 or later. Note that the stimulus presentation computer sends outputs through pins 2. 5, and these are recorded on the input pins of the data logging computer. In addition, note that the 0volt ground lines (shown in black) connect all devices (on a computer`s parallel port, pins 18.

25 are all ground lines). Make sure your scanner is set up to generate pulses with your EPI sequences. For Philips scanners, you go to the `Dyn` (Dynamic) page of the sequence protocol and set the `Dyn. Sync. Pulse` to TRUE. Note that this may increase the acquisition time of your volumes (e. g. we recorded the duration of each volume increased by 15ms). The pulses generated by your scanner should have a duration longer than 1ms. My software only checks the parallel port every millisecond, so it will typically miss very brief pulses. For example, by default the Philips Intera generates a 0. 05ms pulse. Furthermore, the input to the parallel port needs to be an electrical TTL pulse (not the optical pulse generated by modern Siemens scanners).

Therefore, you may need to build extra hardware to connect your scanner to a PC (regardless of whether the PC is running my software or something else such as EPrime ). Below are two very inexpensive circuits I have built myself (they were designed by my dad, Bob Rorden, Phil Moore suggested using the inexpensive IF-D95T).

These can be powered by a battery or a small power supply. I am not responsible for any damage that may result from other people`s implementation of these circuits. However, note that if correctly constructed both designs allow the scanner to be electrically isolated from your hardware.

This should ensure that your scanner can never be damaged by your PC. Specifically, both circuits make sure that the signal between the scanner and the PC is an optical pulse, not a direct electrical signal. For example, if the scanner generates an electrical signal, I use a PC815 photocoupler to isolate the two systems.

For these circuits, you should connect the `OUT` pin the data logging computer`s pin 11 and the circuit ground to the data logging computer`s pin 19 (as described in the previous section). With all Philips scanners and Siemen`s EPI scanner sequences prior to 2002B you will want to use the circuit for an electrical signal.

For recent Siemens systems, you should use the circuit for the optical signal. The Siemens manaul `Triggersignal outputs programmed by sequences` includes more details, as well as an alternative circuit for converting an optical pulse to a TTL pulse (my circuit is less expensive and also lengthens the duration of the opti 🔗 External reference