Hardware configuration: Difference between revisions
No edit summary |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Need to put lots of stuff here about how we tricked-out our GE console with a new CPU, more RAW, and more storage for mrraw. We also configure its network to turn off GE's firewall (PNF) so that NFS exports work over the eth0 (192.*) interface. There is a VPN firewall between it and the internet, so the PNF firewwall is redundant. We connect its eth0 port to a gigabit switch that connects to all our servers and workstations in the CNI (we call this the "CNI private network"). One of the GE VPN router's LAN ports is also connected to this switch, so the console can get out to the internet through the 192.168.0.1 gateway. All incoming traffic is blocked there. (We did have to add a rule to the Stanford firewall to allow the GE mother ship to talk to our scanner.) | Need to put lots of stuff here about how we tricked-out our GE console with a new CPU, more RAW, and more storage for mrraw. We also configure its network to turn off GE's firewall (PNF) so that NFS exports work over the eth0 (192.*) interface. There is a VPN firewall between it and the internet, so the PNF firewwall is redundant. We connect its eth0 port to a gigabit switch that connects to all our servers and workstations in the CNI (we call this the "CNI private network"). One of the GE VPN router's LAN ports is also connected to this switch, so the console can get out to the internet through the 192.168.0.1 gateway. All incoming traffic is blocked there. (We did have to add a rule to the Stanford firewall to allow the GE mother ship to talk to our scanner.) | ||
=Labjack (for recording biopac data)= | =Labjack (for recording biopac data)= | ||
| Line 16: | Line 14: | ||
=Legacy Hardware Information= | =Legacy Hardware Information= | ||
== EEG == | |||
[[EEG| This page]] provides some description about running EEG/fMRI sessions at CNI. However the EEG equipments have been retired since 2024. | |||
== USB-1208 HID trigger == | == USB-1208 HID trigger == | ||
'''NOTE: this trigger system is deprecated and has been removed. Please convert your scripts to use the [[#USB-to-Serial Port Trigger]].''' | '''NOTE: this trigger system is deprecated and has been removed. Please convert your scripts to use the [[#USB-to-Serial Port Trigger]].''' | ||
At the CNI, we have a [[http://www.mccdaq.com/usb-data-acquisition/USB-1208-Series.aspx USB-1208]] HID device from Measurement Computing installed and wired into the scan trigger through pin 14. This device is supported by the PsychToolbox [[http://psychtoolbox.org/PTB-2/daq.html DAQ Toolbox]]. If you have PsychToolbox configured, just plug in the USB cable labeled "Matlab Trigger" and you can send a TTL pulse to the scanner by pulsing pin 14. See the VistaSoft [[http://vistalab.stanford.edu/trac/vistadisp/browser/trunk/exptTools2/experimentControl/StartScan.m StartScan]] function for example Matlab code. | |||
== Serial Trigger == | |||
=== Windows PC === | |||
On (older) Windows, you might need to install a driver the first time you connect the serial trigger. Download the [[Media:CNI_serial.inf|CNI Serial driver]] and be sure that the file name has the correct extension. (Windows will probably add a ".txt" to the file name, which causes the driver manager to fail to recognize it as an inf file. Change your folder settings to not hide file extensions and edit the file name to remove the ".txt". In Windows 7, go to Windows Explorer and press the Alt key to show the menu, and click on Folder Options via Tools menu button. Click on View tab and remove the check from Hide extensions for known file types, and then press OK. Now you can see and edit the file extensions.) Then, go to the Windows 'device manager' and open the device properties for the unrecognized USB device. Find the 'update driver' button and browse to the directory containing the .inf file that you downloaded. Check the port settings and make sure the port is COM1, COM2, COM3 or COM4. If not, use the 'advanced' button under the "port settings" tab to change the com port to one of these. (This is an E-Prime limitation.) | |||
=== OS-X System === | |||
Some older Matlab versions for OS-X system don't support the Matlab 'serial' command. If that happens to be you, don't lose hope! You can set up a simple python script to do the triggering. First, get the trigger working in python. In a terminal, try this: | |||
wget http://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz#md5=cde799970b7c1ce1f7d6e9ceebe64c98 | |||
tar -xzf pyserial-2.6.tar.gz | |||
sudo mv pyserial-2.6 /Library/Python/2.3/site-packages/ | |||
wget https://raw.github.com/cni/widgets/master/python/startScan.py | |||
chmod a+x startScan.py | |||
sudo mv startScan.py /usr/local/bin/ | |||
Then, in Matlab, you can call this python script with: | |||
unix('/usr/local/bin/startScan.py /dev/tty.usbmodem123451'); | |||
== CNI Touch-pad == | == CNI Touch-pad == | ||
[[File:cni_touch.jpg|thumb|x80px|CNI touch-pad.]] | [[File:cni_touch.jpg|thumb|x80px|CNI touch-pad.]] | ||
We designed and built this MR-compatible touch pad. It uses a [http://www.magictouch.com/addon.html KEYTEC] [http://www.atmel.com/Images/doc8091.pdf 4-wire resistive touch] glass connected to a [http://www.pjrc.com/teensy/ Teensy 2.0] with [https://github.com/cni/widgets/blob/master/touch/touch.pde custom firmware]. The CNI Touch Pad connects to a host via USB and will show up as a serial port on your machine. It will continuously stream the absolute position of the subject's touch using a simple serial protocol. Here is [[codeserialport|some sample code]] to get coordinates in Matlab. | We designed and built this MR-compatible touch pad. It uses a [http://www.magictouch.com/addon.html KEYTEC] [http://www.atmel.com/Images/doc8091.pdf 4-wire resistive touch] glass connected to a [http://www.pjrc.com/teensy/ Teensy 2.0] with [https://github.com/cni/widgets/blob/master/touch/touch.pde custom firmware]. The CNI Touch Pad connects to a host via USB and will show up as a serial port on your machine. It will continuously stream the absolute position of the subject's touch using a simple serial protocol. Here is [[codeserialport|some sample code]] to get coordinates in Matlab. | ||
==Subject Physio Data== | |||
Legacy content for NIMS - At the CNI, we attempt to do the basic processing on the physio files generated by your scans. The files are read and regressors are computed. These regressors can be used to regress out the physio noise, or they can be used to de-noise the raw data. For details, see [https://github.com/cni/nims/blob/master/nimsproc/nimsphysio.py nimsphysio.py] in the NIMS repository. | |||
== Subject Positioning Accessories == | |||
Also, there is a [http://www.magconcept.com/ Mag Design and Engineering] bite-bar holder on the 8-channel and 32-channel coils (both built by Ben Krasnow). We have a 200deg water source in the control room (the Cuisinart coffee machine) and are planning to get a little microwave for heating things like bite bars and EEG electrolyte. | |||
Some labs have expressed interest in a vacuum pillow system for subject positioning. From: Ashley Shurick (Gross lab) is familiar with the SecureVacTM Immobilization System from Bionix Radiation Therapy. The system at NYU uses a customized pillow measuring 50 x 70 cm with 12.5L of fill. However, the size should depend on the head coil used, as pillows come larger or smaller, with more or less fill. They also have a vacuum pump system to remove air from the pillow, helping prevent movement. We are currently looking int this. | |||
==Eye Tracking Setup== | ==Eye Tracking Setup== | ||
===EyeLink Data Transfer=== | |||
We looked for a way to automatically reap data from the eyelink, which runs [http://www.datalight.com/products/rom-dos/ rom-dos]. The coolest idea we had was to build a data streaming device out of two teensy's that presents itself to the eyelink as a USB flash drive, so when it saves the data files there, they actually stream to our server. But we think there might be some way to transfer files over the serial port using the archaic [http://en.wikipedia.org/wiki/ZMODEM zmodem] protocol that rom-dos supports. | |||
===IR Illuminator Technical Details=== | ===IR Illuminator Technical Details=== | ||
We found that the standard IR light source from SR Research did not adequately focus the light onto the subject's eye, so we built a small MR-safe IR source using a single high-power IR LED epoxied to a non-metallic heat sink. The illuminator is mounted on the head coil using a loc-line stalk and can be positioned to nicely illuminate the target eye. It's powered from the same 5v source that powered the original SR illustrator (and that powers the camera) via a simple circuit based around a 1.8v linear regulator (it turns out that 1.8v drives this LED with just the right amount of current). The circuit was just the standard "typical application" circuit for a fixed voltage regulator, with a 100uF capacitor on the input and one on the output. We did have an issue with the RF pulses from the scanner causing some flicker in the illuminator, so we added a pair of 1000uF capacitors in parallel with the 100uF caps, and that minimized the flicker to a level that didn't interfere with eye tracking. | We found that the standard IR light source from SR Research did not adequately focus the light onto the subject's eye, so we built a small MR-safe IR source using a single high-power IR LED epoxied to a non-metallic heat sink. The illuminator is mounted on the head coil using a loc-line stalk and can be positioned to nicely illuminate the target eye. It's powered from the same 5v source that powered the original SR illustrator (and that powers the camera) via a simple circuit based around a 1.8v linear regulator (it turns out that 1.8v drives this LED with just the right amount of current). The circuit was just the standard "typical application" circuit for a fixed voltage regulator, with a 100uF capacitor on the input and one on the output. We did have an issue with the RF pulses from the scanner causing some flicker in the illuminator, so we added a pair of 1000uF capacitors in parallel with the 100uF caps, and that minimized the flicker to a level that didn't interfere with eye tracking. | ||
| Line 68: | Line 94: | ||
===Resonance Technology Goggles=== | ===Resonance Technology Goggles=== | ||
The old [http://www.mrivideo.com/eye-tracking.php MReyetracking system] from Resonance Technology | The old [http://www.mrivideo.com/eye-tracking.php MReyetracking system] from Resonance Technology has been deprecated. This system used the [http://www.arringtonresearch.com/viewpoint.html ViewPoint] software from Arrington Research. For more details on the old eye tracker, see the [[eye tracker]] page. | ||
==Power switch for peripherals== | ==Power switch for peripherals== | ||
Latest revision as of 20:56, 11 February 2026
GE console
Need to put lots of stuff here about how we tricked-out our GE console with a new CPU, more RAW, and more storage for mrraw. We also configure its network to turn off GE's firewall (PNF) so that NFS exports work over the eth0 (192.*) interface. There is a VPN firewall between it and the internet, so the PNF firewwall is redundant. We connect its eth0 port to a gigabit switch that connects to all our servers and workstations in the CNI (we call this the "CNI private network"). One of the GE VPN router's LAN ports is also connected to this switch, so the console can get out to the internet through the 192.168.0.1 gateway. All incoming traffic is blocked there. (We did have to add a rule to the Stanford firewall to allow the GE mother ship to talk to our scanner.)
Labjack (for recording biopac data)
The labjack UE9 is connected to the CNI private network and thus can be accessed from any of the CNI workstations, including the linux box next to the GE console. To configure the labjack for your network, install the labjack driver and the labjack python module. Then, connect your machine to the labjack via usb, fire up python, and try:
import ue9 d = ue9.UE9() d.commConfig(IPAddress='192.168.0.12', Subnet='255.255.255.0', Gateway='0.0.0.0') d.reset()
Then, once the labjack comes back up, it should be ready to ping, command, stream, etc.
Legacy Hardware Information
EEG
This page provides some description about running EEG/fMRI sessions at CNI. However the EEG equipments have been retired since 2024.
USB-1208 HID trigger
NOTE: this trigger system is deprecated and has been removed. Please convert your scripts to use the #USB-to-Serial Port Trigger.
At the CNI, we have a [USB-1208] HID device from Measurement Computing installed and wired into the scan trigger through pin 14. This device is supported by the PsychToolbox [DAQ Toolbox]. If you have PsychToolbox configured, just plug in the USB cable labeled "Matlab Trigger" and you can send a TTL pulse to the scanner by pulsing pin 14. See the VistaSoft [StartScan] function for example Matlab code.
Serial Trigger
Windows PC
On (older) Windows, you might need to install a driver the first time you connect the serial trigger. Download the CNI Serial driver and be sure that the file name has the correct extension. (Windows will probably add a ".txt" to the file name, which causes the driver manager to fail to recognize it as an inf file. Change your folder settings to not hide file extensions and edit the file name to remove the ".txt". In Windows 7, go to Windows Explorer and press the Alt key to show the menu, and click on Folder Options via Tools menu button. Click on View tab and remove the check from Hide extensions for known file types, and then press OK. Now you can see and edit the file extensions.) Then, go to the Windows 'device manager' and open the device properties for the unrecognized USB device. Find the 'update driver' button and browse to the directory containing the .inf file that you downloaded. Check the port settings and make sure the port is COM1, COM2, COM3 or COM4. If not, use the 'advanced' button under the "port settings" tab to change the com port to one of these. (This is an E-Prime limitation.)
OS-X System
Some older Matlab versions for OS-X system don't support the Matlab 'serial' command. If that happens to be you, don't lose hope! You can set up a simple python script to do the triggering. First, get the trigger working in python. In a terminal, try this:
wget http://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz#md5=cde799970b7c1ce1f7d6e9ceebe64c98 tar -xzf pyserial-2.6.tar.gz sudo mv pyserial-2.6 /Library/Python/2.3/site-packages/ wget https://raw.github.com/cni/widgets/master/python/startScan.py chmod a+x startScan.py sudo mv startScan.py /usr/local/bin/
Then, in Matlab, you can call this python script with:
unix('/usr/local/bin/startScan.py /dev/tty.usbmodem123451');
CNI Touch-pad

We designed and built this MR-compatible touch pad. It uses a KEYTEC 4-wire resistive touch glass connected to a Teensy 2.0 with custom firmware. The CNI Touch Pad connects to a host via USB and will show up as a serial port on your machine. It will continuously stream the absolute position of the subject's touch using a simple serial protocol. Here is some sample code to get coordinates in Matlab.
Subject Physio Data
Legacy content for NIMS - At the CNI, we attempt to do the basic processing on the physio files generated by your scans. The files are read and regressors are computed. These regressors can be used to regress out the physio noise, or they can be used to de-noise the raw data. For details, see nimsphysio.py in the NIMS repository.
Subject Positioning Accessories
Also, there is a Mag Design and Engineering bite-bar holder on the 8-channel and 32-channel coils (both built by Ben Krasnow). We have a 200deg water source in the control room (the Cuisinart coffee machine) and are planning to get a little microwave for heating things like bite bars and EEG electrolyte.
Some labs have expressed interest in a vacuum pillow system for subject positioning. From: Ashley Shurick (Gross lab) is familiar with the SecureVacTM Immobilization System from Bionix Radiation Therapy. The system at NYU uses a customized pillow measuring 50 x 70 cm with 12.5L of fill. However, the size should depend on the head coil used, as pillows come larger or smaller, with more or less fill. They also have a vacuum pump system to remove air from the pillow, helping prevent movement. We are currently looking int this.
Eye Tracking Setup
EyeLink Data Transfer
We looked for a way to automatically reap data from the eyelink, which runs rom-dos. The coolest idea we had was to build a data streaming device out of two teensy's that presents itself to the eyelink as a USB flash drive, so when it saves the data files there, they actually stream to our server. But we think there might be some way to transfer files over the serial port using the archaic zmodem protocol that rom-dos supports.
IR Illuminator Technical Details
We found that the standard IR light source from SR Research did not adequately focus the light onto the subject's eye, so we built a small MR-safe IR source using a single high-power IR LED epoxied to a non-metallic heat sink. The illuminator is mounted on the head coil using a loc-line stalk and can be positioned to nicely illuminate the target eye. It's powered from the same 5v source that powered the original SR illustrator (and that powers the camera) via a simple circuit based around a 1.8v linear regulator (it turns out that 1.8v drives this LED with just the right amount of current). The circuit was just the standard "typical application" circuit for a fixed voltage regulator, with a 100uF capacitor on the input and one on the output. We did have an issue with the RF pulses from the scanner causing some flicker in the illuminator, so we added a pair of 1000uF capacitors in parallel with the 100uF caps, and that minimized the flicker to a level that didn't interfere with eye tracking.
Parts list:
- IR LED with 45 deg lens
- non-metallic (composite) heatsink
- 1.8v linear regulator, such as AP1084
- little aluminum heatsink for the regulator
- 2 1000uF capacitors
- 2 100uF capacitors
- Various Loc-Line pieces
Here are some pictures of the very crude, "dead-bug" style circuit. Note that we neatly tucked it into the original eyelink IR illuminator case and we used an old cat-5 cable to connect the regulator with with IR source. The IR source was mounted to the plastic heat sink using thermal epoxy.
-
Assembled unit.
-
Close-up of the circuit.
-
Another shot of the circuit.
-
Close-up of the LED, lens, and heatsink.
-
Another shot of the LED assembly.
-
Circuit. Note that we added 1000uF caps in parallel with C1 and C2.
We've recently added a small enclosure. You can get the stl file or the scad code from our github 3d models repo.
Troubleshooting
If you normally set-up the eye tracker in the back of the room using the large screen and this does not work, it may be because the setup is in a different mode (where the eye tracker screen is projected on the little screen at the front of the scanner above the bore). Have a look at the figures at the right to correct the issue.
-
Video switches are at the back of the GE console computer.
-
Check that this is on “GE Display”.
-
And this little blue switch is on #1.
Resonance Technology Goggles
The old MReyetracking system from Resonance Technology has been deprecated. This system used the ViewPoint software from Arrington Research. For more details on the old eye tracker, see the eye tracker page.
Power switch for peripherals

The stimulus displays, audio system, and the fORP response system are best kept turned off when not in use. We've found this to be particularly important for the LCD display, which can act up when it's been left on for too long. To make it easier to turn all these devices on and off, we have installed two switches on the column to the right of the GE console. Please turn all the equipment off when you finish scanning. The switches toggle the power and glow blue when the power is on.
Behind the scenes, these push buttons each control a Furman MP-15 power relay, one in the equipment room that controls power to scan room devices and one in the console room. The switched labelled "LCD" toggles power to devices in the scanner room and must be on to use the LCD display. The switch labelled "fORP" toggles the devices in the console room and must be on to use the fORP response system. The goggles and audio system require both switches to be on because they have a component in both the control room and the scan room.