PriMa: A low-cost, modular, open hardware, and 3D-printed fMRI manipulandum

Motor actions in fMRI settings require specialized hardware to monitor, record, and control the subjects behavior. Commercially available options for such behavior tracking or control are very restricted and costly. We present a novel grasp manipulandum in a modular design, consisting of MRI-compatible, 3D printable buttons and a chassis for mounting. Button presses are detected by the interruption of an optical fiber path, which is digitized by a photodiode and subsequent signal amplification and thresholding. Two feedback devices (manipulanda) are constructed, one for macaques (Macaca mulatta) and one for human use. Both devices have been tested in their specific experimental setting and possible improvements are reported. Design files are shared under an open hardware license.


Introduction
Motor actions are difficult to investigate in fMRI settings, since even small body movements in the scanner carry an inherent risk for motion artifacts. To circumvent this risk, an often utilized approach is to employ imagined instead of real movements in the task paradigm. However, imagined movement and actually executed movements show only partially overlapping activation patterns in the brain of humans ( Hanakawa et al., 2003;Lotze et al., 1999;Nair et al., 2003;Zabicki et al., 2017 ).
In the past, various experimental setups have been constructed to allow meaningful motor actions during fMRI data acquisition. Examples include the Grasperatus by the Culham lab ( Culham et al., 2003 ) and the pneumatic turntable by the Vanduffel lab ( Nelissen and Vanduffel, 2011 ). However, these manipulanda have been constructed for one particular experimental setup.
Also, only a few commercially available feedback devices exist, ranging from the classic four button bar to gamepads. However, even these standard products cost upwards of $1000 each and are not adjustable. There is therefore a strong need for MRI-safe devices that are adjustable to the experimental design while also cheap to implement and maintain.
In the last 40 years, 3D printing has risen from a niche application to a well-established production method ( Savini and Savini, 2015 ). In comparison to traditional manufacturing techniques, 3D printing places fewer constraints on the geometry of the part to be manufactured and allows for low cost production even in very low volume, since the process is highly automated and there is no upfront cost for specialized tooling. In addition, the additive design process provides an unprecedented design freedom that is not available in subtractive manufacturing processes. An intricate internal structure such as bended light fiber guides can be easily encased in a completely closed chassis.
Here, we present a fMRI-compatible manipulandum for hand grasping that is adjustable for human and non-human primate (NHP) experiments. The design is modular and based on 3D printing for manufacturing. We document the design process and demonstrate two concept designs: a human operable version that was tested in fMRI experiments and a NHP version that has been tested during task training with a macaque monkey. Finally, we discuss possible design extensions for future applications.

Materials & methods
Since the general scientific interest of our lab is about grasp processes in both human and macaques, we identified the following design requirements for the manipulandum: • modular design to adjust size for human and NHP applications • metal free to be MRI-compatible • allow testing of 2 grasp types and 2 hand orientations • enable measurement of reaction time • easily maintainable to decrease downtime for repairs and maintenance • robust against animal interference The cable connector consists of 3 main parts. The male connector (light gray) connects to the female connector (dark blue) and the whole assembly is locked by the sleeve (dark grey). (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) To avoid interference with the MRI measurement, all necessary control electronics had to be placed outside of the scanner in the adjacent control room.
We based the design of our manipulandum on an L-shaped form comprising one horizontal and one vertical bar with rectangular cross section (15x20mm for macaques, 30x35 for humans; see Figs. 3 and 4 ), to allow for two different grasps. Each bar can be grasped either with a whole hand power grip, by wrapping the hand around it, or with a precision grip, where two opposing faces are pinched with two fingers.

Ethics statement
All animal care and experiments with the animals were performed in accordance with German and European law and in agreement with the Guidelines for the Care and Use of Mammals in Neuroscience and Behavioral Research ( Council, 2003 ) and the ARRIVE Guidelines ( Kilkenny et al., 2010 ), and were approved by the Animal Welfare Division of the Office for Consumer Protection and Food Safety of the State of Lower Saxony, Germany (permission #14/1442 and 19/3132).
Subjects for the human evaluation experiment provided written consent, and the experiment was approved by the local Ethics Committee of the Georg Elias Müller Institute of Psychology of the University Göttingen.

Manipulandum for NHPs
Due to the requirement of measuring reaction times and success rate, a simple bar without any sensors would not suffice. We therefore designed buttons as touch/press sensors that can be 3D-printed as a single building block, in which the compliance of the 3D printed material (here: Nylon 12, printed with the multi jet fusion technique by Shapeways, http://www.shapeways.com/ ) enabled the elastic button movement (see Fig. 1 a). This also facilitated ease of repair, since each button can be replaced with minimal disassembly of the full device (see Fig. 3 a). We designed three different button types: a squaresized smaller button (size 8.5 x 9 mm), a rectangular large button (size 7x18 mm), and a dual square-sized double button combo (each button 17.6x15x3 mm large). To keep in line with the metal free design criteria, we used optical fibers as signal transmission lines. The buttons were designed to interrupt the light transmission between the input cable and the output cable (see Fig. 1 a). This light path interruption was then detected by a photodiode (see 2.4 control box).
The experiment required that the animal is in a defined starting position at the beginning of each trial. Therefore, we added a two button combo as hand rest buttons on a support structure, on level with the horizontal bar and behind the manipulandum from the animal's perspective (see Fig. 3 b). These buttons had to be pressed in order for the trial to start. Instructional cues are displayed on a screen in front of the animal.
To keep the animal from damaging the manipulandum, we ensured that no cables were in reach of the monkey's hand or mouth by routing the optical fibers inside the manipulandum. Due to the number and physical properties of the cables, they needed to be routed along paths with minimal curvature, which would be hard to create using traditional manufacturing techniques. Cables were held in place by clamps that were integrated into the ends of each bar.
We designed a mount to fix the manipulandum on the macaque fMRI compatible chair (Rouge Research Inc., Québec, Canada). This mount allowed free position adjustments of the manipulandum relative to the animal (see Fig. 3 b). Full assembly of the NHP manipulandum and support structure took about 4 hours.

Human manipulandum
The design of the human variant of the manipulandum closely followed the design considerations of the NHP version. Obviously, we could relax the robustness requirements, as human experimental subjects are less prone to destructive behaviour during experimental sessions. In the human manipulandum we also omitted the hand rest buttons, since space constraints were more prevalent and reliable hand rest positions could be achieved simply by auditory instruction and adequate training of the participants.
Furthermore, we adjusted the cross section of the bars (30x35 mm) and the bar length (104 mm) to be comfortable grasped by humans. Similarly, the size of the buttons was adjusted for human fingers with a size of the square buttons for precision grip of 12x12 mm and of the rectangular button for the power grasp of 14x35 mm (see Fig. 4 a). The human manipulandum was mounted on a frame of carbon fiber reinforced plastic (CFRP) using off-the-shelf plastic screws, nuts and plastic connectors. The frame rested on 3d printed feet designed to slot into the rail system of the patient bed of our Siemens Prisma 3T scanner (see Fig. 4 The full assembly of the human manipulandum and support structure took about 4 hours. Output fibers (dark blue) report the state of the button back to the control box, where they are converted to electrical (TTL) signals and conveyed to the PC (grey line). (b) Circuit diagram of the receiver end of the control box. For configuration of resistors and capacitor, see Table 1 . LED lights are permanently powered. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Table 1
List of the values for all resistors and capacitor in the control box.

Component Reference
Value 100 nF

3D Printable cable connectors
We needed optical fiber cables with a length of 5 m between the control box and the manipulandum. Although an uninterrupted cable to and from the control box and the buttons can be used, a cable-to-cable connector was designed to ease installation and allow easier maintenance of the manipulandum (see Fig. 1 b). We used a BNC connector inspired bayonet mount as the locking mechanism of the connector.
Cutting the cables to length, striping the insulation and mounting the connectors took about 2 hours in total.

Control box
The control box illuminates the input fiber using white high power LEDs and converts changes of light intensity measured at the output fiber to a TTL signal, indicating the state of the button (pressed: high, released: low: see Fig. 2

a).
This is done by first using a photodiode transimpedance amplifier to convert the light intensity to an analog voltage . The initial amplification is set by the value of 1 following 1 = − ℎ , where ℎ is the light-intensity dependent current produced by the photodiode. To allow the circuit to work at different light intensities, the transimpedance amplifier is followed by a variable gain amplifier that can be adjusted via a potentiometer. The gain range [ , ℎ ℎ ] available is dependent on the choice of the resistors 2 , 3 and the potentiometer 1 , following = 1 + 2 3+ 1 and ℎ ℎ = 1 + 2 3 (see Fig. 2 b for the circuit diagram). To reduce high frequency noise the signal is subsequently low pass filtered by a first order filter with a cutoff frequency of = 1 2 4 1 . For the values of the resistors and capacitor we picked see Table 1 , leading to a cut-off frequency for our filter of 159.15 Hz and a gain range from 1.044 to 11. Finally a Schmitt trigger is used to invert and threshold the signal, giving the desired digital TTL output. Additionally, the hysteresis of the Schmitt trigger prevents unexpected behavior when the analog voltage crosses the threshold during a button press. The box can be powered using a single 5V power adapter and the output is provided on a DB-25 connector with a parallel port interface compatible pinout. An additional BNC input connector is available to allow for easy synchronization with an MRI scanner or other recording systems that provide a synchronization signal.
Mounting the components on the PCB and assembly of the control box takes an estimated 10 hours of work.

Software
The control box returned a digital signal for each button with 'high' for button pressed and 'low' for button free (0-5 V; TTL logic). A parallel port connection can be used to read the state of the buttons, but support for parallel port cards in modern PCs is dwindling. We decided to use a DB-25 Pin breakout board to record with a simple USB data acquisition device (USB-5901, National Instruments) to read the button states into our LabView control software for experimental control and logging. The data acquisition device measured the states of the input with a sampling rate of 24 MHz.
We logged button presses with millisecond precision within LabView (National Instruments). The temporal precision of this recording was dictated by the time delay of the used low pass filter (0.7 ms) and the precision of the software and operating system, respectively. In our case, we used Windows 7 which is reported to be precise to 1 ms, resulting in a maximal temporal error of less than 2 ms.

Evaluation of the SNR influence of the manipulandum
We first performed a scan on a spherical Phantom (Siemens, Erlangen). Three runs of 2x multiband T * 2 weighted EPI (32 slices, 10% distance factor, 3 mm slice thickness, 1s TR, 37ms TE,192 mm FoV, 3x3 mm voxel size) with each run consisting of 778 volumes were recorded. The first with only the phantom, the second with the human manipulandum completely connected to the control setup and the third with the manipulandum removed, but the control setup connected to the light fiber cables. The last test was done to see if the signal quality was influenced by the inclusion of the control box and fiber cables, which required an open access port between the scanner and control room, reducing the radio interference shielding of the scanner.
The signal to noise ratio (SNR) for a spherical ROI (radius 16 voxels) centered within the phantom recorded with the EPI sequence was calculated by dividing the mean over all voxels with the mean of the standard deviations over all images of a run ( Dietrich et al., 2007 ) for each voxel. From this we calculated the relative difference in SNR between each pair of run as = | − | , with run 1 as the reference for runs 2 and 3, and run 3 as the reference for run 2, to compare all three conditions.

Manipulandum evaluation under experimental conditions
To test the manipulandum in the scanner under experimental conditions, a human subject was placed in the scanner and instructed to perform all four grasps when cued by a visual stimulus (go-cue). Time intervals between go-cues ranged between 6 to 16 seconds. While running this task paradigm, MRI data was recorded on a 3T Siemens Prisma scanner. We recorded 4 runs of 2x multiband T * 2 weighted EPI with the same parameters as above and consisting of 768 volumes, as well as one T1 weighted MPRAGE image (176 slices, 1 mm slice thickness, 1.9s TR, 3.57ms TE, 256mm FoV, 1x1 mm voxel size). All data was analyzed in SPM 12 ( https://www.fil.ion.ucl.ac.uk/spm/ ) and showed no signs of artifacts (see results).  The NHP version of the manipulandum is currently in use to train two macaque monkeys for an analogous fMRI experiment with a similar grasping paradigm.

Data availability statement
The design files are released under an open hardware licence (CERN-OHL-W) and can be downloaded from: https://github.com/NBL-DPZ/ PriMa (see Table 4 for a list of parts). The scans of the phantom are available in the same github repository. The scans of the human subject are not released due to data protection concerns.

Results
The NHP version of the manipulandum was designed and tested first, and is currently still in use for animal training outside of the scanner. We found that the system worked reliably with no failure during training. However, we discovered a few issues: 1. Using more than one fiber-to-fiber connector per cable led to a strong signal loss, probably due to an imperfect cable to cable alignment within the connector assembly. 2. The buttons turned out to be rather sensitive to residues from dried up reward fluids (juice) dripping into the manipulandum. Adequate placement of the reward system and a drip guard under the reward system are recommended.
Besides these limitations, the manipulandum worked reliably and required only small adjustments of the gain of the amplification circuit. However, if the amplification circuit reached its maximum gain, disassembly and cleaning of the button was required.
The results of the SNR comparison between all three tested conditions are given in Table 2 with the measured values given in Table 3 .
Overall the relative difference of SNR between all conditions utelizing the phantom was between 0.0040 (phantom & only control box and light cables connected vs. phantom & manipulandum fully connected) and 0.0089 (phantom & only control box and light cables connected vs. phantom only). This demonstrates the low influence of the manipulandum onto the MRI scanner. No visible artifacts were introduced by the presence of the manipulandum.
For the scanning of human subjects, the most prominent source of artifacts is head movement. It is therefore important to properly adjust the position of the manipulandum for the subject, so that all grasps can be executed exclusively with the opening and closing of the fingers and wrist rotations. With those adjustments, the human subject showed no head movement exceeding 0.58 mm between scans (mean 0.0566 mm, STD 0.0425mm over all four runs). This is well below the recommended exclusion threshold of 1 mm for human fMRI experiments.
We conclude that the manipulandum is safe to use, does only minimally impact the SNR of the recordings and can be grasped by the subject with only minimal head movement artifacts.

Discussion
Research of motor control in fMRI settings requires feedback devices that can be easily adjusted to the specific experimental design requirements. Currently available commercial options are restricted to classic button box designs, game controllers, and touch screens. Our design offers modularity and allows adjustment of the chassis for experimental needs. If buttons with different actuating forces are required, a simple design adjustment of the thickness of the compliant part of the mechanism and reprinting is sufficient. See supplemental material for the force response profile of our design. Buttons and casings can easily be implemented in different manipulandum designs. For example, in case a standard 4-button box does not fulfill the experimental needs, a 6-button box could easily be built with the existing button design (see Fig. 5 ).

Table 4
List of materials and costs for the human and macaque manipulandum. Part providers are detailed in our github repository ( https://github.com/SGatNBL/PriMa ). * 3D printed Parts.  The SNR analysis shows acceptable levels of SNR change (under 5%) which are probably caused by the requirement to open the shielded access panel to root the light cables through the access ports between scanner and control room.
While working with the human and NHP version of the manipulandum, we noticed a few shortcomings of the design: 1. The buttons are rather sensitive towards dirt and other intrusions, which is a problem especially for the NHP version, where cleanliness cannot be as easily maintained as in human settings.
2. The gain in the control box in the monkey setup needs to be adjusted and the buttons cleaned regularly due to the a both mentioned build up of residues. 3. Our current design needs a bundle of 12 optical fibers (NHP version: 16) to connect the manipulandum with the control box outside of the scanner room. This is rather unwieldy. Using one or several multifiber cables instead would be quite advantageous. 4. It should be noted that the current button design does not provide tactile feedback when operating the buttons. 5. During the testing of the human manipulandum, we noticed that the required depression depth for activation of the large buttons is not uniform across the button, especially if pressed with just one finger.
The biggest problem we encountered was the movement of the optical fiber cable within its jacket. On first try, we glued the jacket to the cable connector, however this provided an unreliable connection between both cables. We settled on checking this connection first when testing the manipulandum before scanning and did not experienced a failure during scanning yet. The current manipulandum body incorporates a clamp with a grip length of 1.5 cm to provide strain relief and prohibit movement of the light fibers within the buttons. Our early design of the NHP manipulandum did not provide sufficient fixation of the light fiber and we needed to adjust those 5 times in a time span of approx. 30 months. The current design is in use to train 2 animals without any problems occurring in the last 7 months. The walls of the dual buttons (green) are removed, the cable clamps (black) shortened and the whole assembly copied three times to result in the six button box (b), demonstrating the flexibility of our optical buttons to be adapted for different designs. The design files for this button box are included in the github repository, but it was not build and tested. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) The human manipulandum has been used to scan about 30 subjects (approx. 100 presses per button per subject), with the manipulandum failing only once. One button developed a fatigue fracture. The relevant part was reinforced and the manipulandum fixed the same day with replacement parts at hand.
Another possible improvement concerns the power of the light source used. We found that two fiber cable connectors in the whole light path (LED-button-detector) is the maximum possible. If more are included, too much signal is lost. This could be mitigated by utilizing stronger and more focused light sources, such as laser diodes, but this would also require further precautions with respect to laser safety.

Conclusion
In this work, we presented a fMRI safe design of a graspable manipulandum that is suitable for humans and NHPs. The 3D printable buttons allow for a safe and reliant feedback of the subject's actions. We also demonstrated an adjustment of the design for a six-button box comparable to commercially available feedback devices, which demonstrates the strength of our modular approach. Since design files are openly available for adjustments and 3d printing, customization for other fMRI experiments requiring motor responses are straightforward and can be achieved for a very affordable price.

Funding and conflict of interest statement
This work was funded by Deutsche Forschungsgemeinschaft (German Research Foundation), SFB 889, project C9. The Funding body had no involvement in the study design, collection, analysis, interpretation of the data, writing nor submission of this work.

Declaration of Competing Interest
None.

Supplementary material
Supplementary material associated with this article can be found, in the online version, at 10.1016/j.neuroimage.2021.118218