Abstract
Background:
Accurate interpretation of electrophysiological data in cognitive and behavioral experiments requires the acquisition of time labels, such as marking the exact start of a condition or moment a stimulus is presented to a research subject.
New Method:
Here we present an inexpensive (~30 USD) device used as a central relay for multiple peripheral devices, such as a computer screen presenting an experiment, a pressuresensor push button, a multi-button responder, a pulse oximeter sensor, a light-emitting diode trigger for camera synchronization, and so on. We refer to this device as the Florida Research Open-source Synchronization Tool (FROST). FROST allows for easy hardware and Arduino-based firmware modifications that enable a standard platform for the integration of novel peripheral sensors.
Results:
With two examples, we demonstrate the application of this device during human research experiments: intracranial-electroencephalography (EEG) recordings in a patient with epilepsy and surface-EEG recordings in a healthy participant. We provide an example setup for a rodent experiment as well. We also demonstrate the timing delays of our device.
Comparison with existing methods:
There is currently a very limited number of existing open-source synchronization tools for electrophysiological research that enable customization with new device compatibility. We developed this tool to enable widespread replication for many applications through an open-source platform.
Conclusions:
The device can be easily adapted for research experiments beyond the included example cases. All materials are open-source at github.com/Brain-Mapping-Lab/FROST.
1. Introduction
Animal or human electrophysiology research experiments during cognitive-behavioral paradigms typically involve a primary data source and any number of secondary measurement instruments. These inputs are sampled at a specified rate for digital storage. For instance, a neuroscientific experiment in a rodent might include voltage recordings from an invasive electrode in the brain or muscle and a camera for video capture (Masimore et al., 2005; Tort et al., 2008). As another example, a human electroencephalography (EEG) study might involve a research subject wearing an EEG cap while responding to a computer task using a push-button or while walking in a virtual reality environment via a joystick (Peterson et al., 2018; Savostyanov et al., 2009; Vourvopoulos et al., 2019; Wirth et al., 2017). Time-aligning multiple sources of input —electrophysiology, video camera, additional peripheral devices, and so on — is necessary but not trivial.
A computer can store the states of an ongoing task, but the delay in that computational process may lead to inaccuracies relative to the real-time sequence of events (e.g., computational delays, refresh rate of the monitor, etc.). A light sensor placed on the computer monitor has been a common solution to this problem and should be a capability integrated into a synchronization device for research involving computerized tasks. Overall, the multitude of devices used during experiments are typically manufactured by different companies and may lack a shared communication protocol or a centralized repository that receives all input sources simultaneously. This can pose a major barrier to research and there is a need for a comprehensive solution to this problem.
A much-needed resource for these multi-source experiments is a tool to enable a single cohesive dataset containing all input sources aligned in time. Electrical biosignal acquisition systems (e.g., g.Hlamp amplifier, Guger Technologies, Linz, Austria) can simultaneously record from multiple sources of data but lack compatibility for diverse input sources and connectors. Existing platforms designed to work with these acquisition systems do exist and aid in aligning data, such as BCI2000 (Schalk et al., 2004) and Neuro Omega™ (Alpha Omega Engineering, Nof HaGalil, Israel). Therefore, it seems most pertinent to situate a synchronization hardware solution between the input sources and the acquisition system. If the primary measure of interest is electrical, such as a voltage recording, then with adequate data storage capabilities it is advantageous for all input sources to be aligned and recorded at the same sampling rate. This would avoid the need for techniques such as data interpolation, upsampling, or downsampling.
Critically, the solution should be flexible to accommodate the breadth of electrophysiological research. Suppose a human behavioral experiment requires a pressure-based push button. In this case, several questions arise, namely, how the pressure sensor’s analog input should be digitized and whether a certain pressure threshold should trigger an on-off button press. As another example, suppose a pulse oximeter digital signal is also needed and requires different threshold calibration from person to person. A solution to this acquisition/synchronization problem should entail the ability to handle these use cases in a user-friendly manner. The hardware should have input options for a variety of connector types and the firmware should be readily configurable through a simple do-it-yourself (DIY) platform. Finally, we believe the entire system – both the hardware and firmware – should be open-sourced.
Therefore, we set out to build the Florida Research Open-source Synchronization Tool (FROST) with circuit schematics freely available in standard formats for custom modification along with Arduino-based source code. Here we provide details regarding FROST’S hardware and firmware, highlighting areas where users may want to extend and adapt the capabilities of the presented platform. We include two real-world human research applications of this device demonstrating its capabilities as well as an example rodent experiment setup. All hardware and source code are freely available through github.com/Brain-Mapping-Lab/FROST. The circuit schematic and layout are available as Eagle files, all code is available as Arduino files, and further documentation is provided in a Wiki format.
2. Materials and Methods
2.1. Design overview
FROST transmits data to the electrical biosignal acquisition system in digital form, mainly because digital signals offer better isolation and reduce the possibility of injecting noise into the acquisition system. Our design includes the capability of reading from both analog and digital sensors. The proposed device may also send synchronization signals to other systems such as an electromyographic (EMG) acquisition system or to a video camera through an LED placed at the top corner of its field of view, intended for synchronization flashes. An important input to FROST comes from the monitor that displays the experiment – a light sensor placed on an alternating (and configurable) black/white square on the presentation monitor that is used to synchronize the moment when the screen is updated. Another input is a heart rate sensor. In addition, we developed a custom-made sensor, which was designed to be generalizable into three parts: one variable resistor-based sensor, a digital switch or push button, and a fixed resistor for sensor identification. FROST sends digitized signals to an acquisition system (e.g., g.Hlamp amplifier, Guger Technologies, Linz, Austria, has a limit of 8 bits). Figure 1a depicts a specific experimental setup that utilizes these features. All input and output components can be customized to accommodate different experimental setups or acquisition systems. Additional details throughout are provided in Appendix A and B.
Figure 1. FROST overview.

(a) Block diagram of a recording setup using FROST. The inputs can be analog or digital such as a heart rate sensor (green), light sensor from the presentation monitor (yellow), and push buttons (red), among others. The outputs can be customized to synchronize different systems such as the physiological acquisition system, an EMG system (blue), a light emitting diode (LED) to synchronize video recording, etc. (b) Picture of FROST with all the inputs described, including the heart rate sensor (c), light sensor (d), and push button (e). Power supply and computer communication are provided through the USB type B port.
The USB port (USB 2.0) supplies energy to the circuit with a direct current (DC) Pi filter to clean noise from the computer. The USB interface may also be used for multiple device classes, such as serial communication (COM), keyboard input, or Arduino programming if the bootloader is installed. Arduino is an increasingly popular device development platform with extensive training resources (Evans, 2011; McRoberts, 2010). It has been previously used by many research groups for applications such as robotics, brain computer interface, control, and telecommunications, among others (Acho, 2015; Aradjo et al., 2014; Bright et al., 2016; Wang and Chi, 2016).
2.2. Hardware
2.2.1. Microcontroller
The centerpiece of FROST is the microcontroller ATMega32-U4 (Microchip Technology Inc, Arizona, USA) (Figure 2a). This microcontroller receives all analog and digital inputs and executes custom firmware for synchronization of external devices. This hardware was conceived with full compatibility for an Arduino Leonardo bootloader, thus it can be updated via USB. The microcontroller includes digital inputs and outputs, analog to digital converters (ADC) for voltages ranging from 0 Volts (V) to 5 V, high precision timers (with an external crystal oscillator of 16 megahertz), universal asynchronous receiver/transmitter (UART), and USB communication. To upload the Arduino bootloader or other firmware, if desired, an in-system programming (ISP) device like the MK-II or AVR Dragon (Microchip Technology Inc, Arizona, USA) can be used.
Figure 2. Hardware overview.

(a) Block diagram of the hardware within FROST. Symbols are indicated below the schematic. An Atmega32-U4 microcontroller (black) receives and transmits all analog and digital information. The peripheral device (orange) consists of a variable resistor-based sensor, a digital input, and a fixed value resistor for peripheral identification. The pulse sensor (green) consists of an infrared light emitter and a phototransistor. (b) Picture of the top layer of the printed circuit board (PCB) with connectors and components populated with the associated circuit layout (c).
2.2.2. Constant current design
One of the biggest challenges in developing biomedical instrumentation is the noisy environment where these devices are used. In addition, in many real-world situations the sensors used in experimental applications are situated far from the controller hardware connected to the acquisition computer. For example, an accelerometer attached to a head-mounted device on a freely moving rodent might require a cable with excessive slack. Unfortunately, long cables are susceptible to artifacts from illumination or other devices in the environment. One way to reduce noise coupling is by increasing the current in these cables (Witt et al., 2014). In our design we use variable resistor-based sensors such as the light sensor which changes its resistance with light intensity changes (Figure 2a), or the force sensitive resistor used in the custom-made push button, in which the resistance applied is proportional to the applied pressure. Injecting constant current to those sensors has two beneficial effects: reducing external coupling noise and pushing the voltage on the controller towards the value of the sensor resistance. This voltage change, in turn, can be registered by the analog input of the microcontroller. To generate these constant currents, we use the Howland current pump circuit (Tucker et al., 2013) (Figure 2a) which is adjusted by the voltage in the input or by the resistors. Further information including the mathematical basis for FROST’S constant current design can be found in Appendix B.2.
2.2.3. Custom peripheral device
A port on FROST was designed to permit a custom peripheral device, such as a pressure-sensor push-button, a multi-button keyboard pad, accelerometers, or any other device compliant with the design. Namely, each peripheral device must include three components (Figure 2a). Firstly, a fixed resistor is used for device identification, allowing FROST to recognize many custom peripheral devices for plug and play design. The Howland current pump injects one milliamp that will create a fixed voltage with small variability in the device identification resistor (depending on the type of resistor used). When the microcontroller reads this voltage, according to the firmware, it can select to execute specific task functions for the type of device connected. With this functionality, the microcontroller can store multiple applications depending on which device is connected. Firmware modifications therefore may not be necessary each time a new peripheral device is used (e.g., for different experiments). Secondly, a one-bit digital input can be used as a switch. This design was chosen since most peripheral devices used in experiments require such responses. Thirdly, a variable resistor-based sensor (e.g., pressure, accelerometer, light, microphone, etc.) is connected to an analog input and digitized in 5 bits for transmission to the acquisition system, however this can be modified as desired. Further information about FROST peripheral devices is provided in Appendix A.
2.2.4. Heart rate detector
The heart rate detector uses a 2 V linear regulator as a DC offset reference to utilize the full dynamic range of the signal. Overall, this pulse detector circuit comprises two parts: an infrared LED that is placed on the top of a finger and a phototransistor that is placed on the opposite side of the finger (Figure 1c, 2a). The amount of light passing through the finger varies proportionally to the heart rate due to fluctuations in oxyhemoglobin. The signal coming from the phototransistor is adapted for compliance within the range from 0 to 5 V and sent to an analog pin on the microcontroller and digitized in 6 bits for transmission to the acquisition system. This analog signal is compared with an adjustable voltage. FROST exposes a variable resistor that can be adjusted to modify this threshold. Ultimately, a digital signal is also generated to represent the heart rate frequency with a single bit. This system could be easily adapted for other experiments, for example, a pulse oximeter placed on a rodent tail. Further information including the mathematical basis for the heart rate detector filters and signal conditioning can be found in Appendix B.1.
2.2.5. Additional external synchronization
FROST includes two additional 1-bit synchronization ports as shown in Figure 2A. One has been designed as a standard transistor-transistor logic (TTL) port and is mainly intended to synchronize EMG acquisition systems but can be easily adapted for other systems. The other port includes a 1 Kohm resistor in series to be connected to an external Light Emitting Diode that would be placed in the visual area of a camera. This setup can be used to synchronize the recorded video with the physiological data acquired using FROST. The logical behavior of these ports can be programmatically changed to be used in one pulse form (e.g. in the beginning of the task) or in multiple pulse form modes (e.g. when the push button is activated or with the hearth rate). It should be noted that this mode of synchronization with other external devices may require additional post-processing to align all data sources. For instance, this 1-bit synchronization pulse will be present in the recordings acquired with external systems but will need to be aligned with physiological signals acquired with FROST. This can be easily accomplished by measuring and adjusting for the time lag between FROST and the external system.
2.2.6. Multiple device synchronization
Certain applications may require more peripherals (inputs/outputs) beyond those supplied by FROST. In these cases, scalability can be achieved by modifying the hardware using additional microcontroller ports. However, it is more easily achieved by implementing a Daisy Chain configuration. In this configuration, we use multiple FROSTs that are interconnected by the camera synchronization port as shown in Figure 3. One of the FROST devices will take the role of primary-FROST and will configure its sync port as an output, whereas all other FROSTs in the chain will be secondary-FROSTs with their sync ports configured as inputs. The video synchronization port was selected for this application given that it includes an onboard 1Kohm inseries resistor that will protect the system in case more than one primary-FROST is inadvertently connected in the chain. The default firmware included with FROST allows automatic detection of a primary-FROST device, in which case the device that has the light sensor connected behaves as the primary device and will send the synchronization pulse to all other secondary devices, including the LED at the end of the chain that can be used for the video camera.
Figure 3. Multiple device Synchronization setup.

Multiple FROST devices can be connected in a Daisy Chain configuration, which includes the LED for camera synchronization (red connector). The light sensor is shown above primary-FROST and the LED is shown below SecondaryN-FROST. The blue connector is for the EMG synchronization and the black connector is for power supply.
2.3. Firmware
Figure 4 provides a generic firmware flow diagram. This firmware includes the potential for subroutines that execute based on the ID of the custom peripheral device (Section 2.2.3). Users may wish to load different firmware onto FROST for different experimental contexts, though this is relatively simple given that FROST supports Arduino USB bootloader for programming. In this section we provide an overview of this generic FROST firmware.
Figure 4. Firmware Overview.

The flow diagram of FROST firmware. After inputs and outputs are initialized, the resistor identification (ID) determines which subroutine to execute. If no device is detected, a default subroutine can be used such as heart rate analog output. The process is repeated to accommodate dynamic changes in the peripheral devices connected to FROST.
2.3.1. Overview
FROST firmware provides further customization and synchronization behavior. When FROST uses the Arduino bootloader, C++ can be utilized to provide additional functionality. To begin, the system initializes the input and output pins on the microcontroller as well as several states used throughout the firmware logic (Figure 4). Following initialization, the firmware executes an infinite loop that continuously reads analog inputs, writes light synchronization, checks peripheral devices, processes peripheral devices, displays LED-based alarms, and checks for debug mode.
2.3.2. Reading inputs
Analog inputs are received from all external connections, including the light sensor placed on the monitor, the heart rate, the peripheral device identification resistor, and the peripheral device variable resistance value. The readAnalogInputs function reads and stores the values from these sources for use in other areas of the code. We append adc (analog to digital converter) to the end of names representing variables that store digitized analog input data (e.g., light_adc and heartrate_adc).
2.3.3. Light synchronization
A key element of this synchronization system is the ability to synchronize with a computer monitor used for a research experiment. This utility is designed specifically for experiments involving repeated stimuli presentations (see Hardware) in which a small square in the corner of the monitor alternates with each graphics update, transmitting an analog signal that alternates between a high and low voltage. The writeLightsync function serves as an ADC, writing a digital high and low value when the light surpasses or returns to a specified threshold, respectively. This threshold can be easily modified as a global variable. This modification may be important for photoresistors with different rise times placed on monitors with varying luminosity.
2.3.4. Custom peripheral device
The custom peripheral device is processed in two steps: device identification and value digitization. Each such device intended for use with FROST should have a separate identification resistance value (Section 2.2.3). First, at every execution of the main loop checkPeripheral tests whether the identification resistance falls within prespecified ranges corresponding to different prespecified devices. This step thus initializes an identification variable that controls the logic of the firmware to handle different devices in specific customized ways. Separate control functions are called for different devices, such as processHeartRate or processPushButton. For instance, the process function for the custom push button checks whether the applied pressure to the button exceeds a certain threshold, and if so, generates a ‘space’ keyboard event (which can be modified). In turn this keyboard event can be used in a computer application running an experiment. Finally, for all custom input devices, analog values are digitized with a peripheralADCEncoder function. The bit resolution for this process depends on the tolerated number of digital inputs to the acquisition system.
2.3.5. LED-based alarm
As aforementioned, the synchronization box operates and executes regardless of whether external devices (e.g., the pulse oximeter or custom peripheral device) are plugged in. However, when the user intends to plug in peripheral devices, it is useful to receive immediate feedback confirming that the devices have been successfully plugged in and properly registered by the device. Therefore, we designed an LED-based alarm system consisting of an LED displayed on the outside of FROST through an alarmPeripheral function. This function can be modified for customized device-specific alarm systems. Although there is only a single LED, different flashing patterns can signify different connection statuses. For example, in the current design the LED flashes quickly if both the light sensor and the custom peripheral device are unplugged. With the current design of FROST, when the custom peripheral device is plugged in, the LED begins flashing more slowly; and when the light sensor is plugged in successfully, the light remains solid, to indicate that all systems are attached and running as expected. It should be emphasized that this behavior is completely customizable through additional firmware implementation of the alarmPeripheral function.
2.3.6. Debug mode
Finally, given the heterogeneity in peripheral devices, both analog and digital inputs, and ranges of input, we have included a debug mode easily accessed through the Arduino monitor. A “D” command provided to the Arduino IDE activates debug mode, in which output from all peripheral devices are printed to the monitor, including both analog and digitized input. This is particularly useful when adjusting thresholds for the light sensor, the heart rate, and the peripheral device variable resistor.
2.4. Timing Accuracy
To quantify the timing delays of this device we used the setup depicted in Figure 5. A signal generator injected a pulse into an input channel of FROST. An oscilloscope was used to measure the delay between this injected pulse and the connected output channel through the microcontroller. We repeated this procedure 10 times to obtain an average delay, which represents the on-board delay of input detection transformed into digital output.
Figure 5. Timing test setup.

GND=ground; CH=channel. The signal generator (left) injected a pulse into FROST (center), and the delay to the output was measured by an oscilloscope (right).
2.5. Use Case: Experiments
Here we describe two use-case examples for FROST. In Experiment 1 and 2, BCI2000 was used, which allows for additional state variables to be stored at the same sampling rate as the acquisition system which is connected to FROST. These states are generated programmatically in the code running the computer task and can help label the electrophysiological data (e.g., labeling different components of a single trial). Examples are shown below.
2.5.1. Experiment 1: Electrocorticography during a reward-processing task
A human patient with epilepsy had multiple intracranial-EEG (iEEG) grids placed on their cortex for localization of seizures (Figure 6). While the patient remained in the hospital, they participated in a behavioral task (Figure 6b) during acquisition from all iEEG channels. The task involved repeated presentation of colored rectangles indicating whether the participant should press a hand-held button or not, to either obtain rewarding points or not. FROST recorded any changes to the monitor with a light sensor as well as input from a pressure-sensor button.
Figure 6. Experiment 1 data output.

An epilepsy patient with iEEG electrodes (a) completed a simple Go/No-Go behavioral experiment on the computer (b). The acquisition system stored digitized electrode potentials (c) as well as the task substate and data from FROST: a light trigger and digitized pressure from a pressure-sensor button. Note that the light sensor square is alternating between black and white on each successive screen in (b).
2.5.2. Experiment 2: Electroencephalography during a reaction time task
A healthy human adult completed a reaction time task on a computer (Figure 7). The participant sat comfortably in a chair while wearing a 64-contact EEG grid (g.Nautilus, Guger Technologies, Linz, Austria). The participant was instructed to press a push button as quickly as possible when a blue square appeared on the screen. An EMG sensor (Trigno™, Delsys, Natick, Massachusets, USA) was placed on the dorsal thumb. FROST recorded any changes to the monitor with a light sensor as well as input from the button presses, a 1-bit digital heart rate signal, and an EMG trigger, which relayed the light sensor to the EMG unit.
Figure 7. Experiment 2 data output.

An adult with EEG electrodes (a) completed a simple behavioral reaction time experiment on the computer (b). The task involved pressing a button as quickly as possible when a blue square appeared on the screen. The acquisition system stored digitized electrode potentials (c) as well as the task substate, EMG signals from the thumb flexor, pressure from the custom push button, and a 1-bit digital heart rate signal. All data were sampled at the same sample rate.
2.6. Code Accessibility
All code is operating system-independent and freely available at github.com/Brain-Mapping-Lab/FROST with no restrictions.
3. Results
3.1. Timing Accuracy
Measured delays in FROST were 276.59 +/− 35.736 (mean +/− standard deviation) microseconds (us). The range was 125.3us to 444.7us. The code processes all inputs during each iteration and this timing accuracy is not dependent on the number of analog inputs. Thus, these delays represent efficient code and are within normal limits for the frequency of the oscillator of the microcontroller (16 MHz).
3.2. Use Case: Experiments
3.2.1. Experiment 1
Representative output from Experiment 1 (Section 2.5.1) is shown in Figure 6. Due to the utilization of FROST, all data are aligned seamlessly, eliminating the need to upsample or downsample specific channels to align them with the LFP. It can be seen that there is a small but noticeable delay between changes in the state of the task, as stored within the C++ code used to build the task, and the exact timing of monitor changes as measured by the light sensor placed in the top right corner of the monitor (Figure 6c).
3.2.2. Experiment 2
Similar to Experiment 1, the data in Experiment 2 (Section 2.5.2) are provided in Figure 7, which includes an EEG signal, the state of the behavioral experiment, output from an EMG sensor placed on the hand, pressure from a custom pressure-based push button, and a pulse recorded during the task.
4. Discussion
In this article we have described a new tool for synchronization across multiple inputs for electrophysiological research. The primary source code and hardware elements have been included, but further details, such as the full circuit schematic, can be found online at github.com/Brain-Mapping-Lab/FROST. The most notable strengths of this device are that by design it is general purpose, customizable, and open-sourced. We have demonstrated that the device works as intended through specific timing measurements and with two use cases (Figure 6 and 7).
The overarching goal of this device is to enable meaningful and convenient electrophysiological research. Most importantly, data collected during electrophysiological experiments can be considered meaningless without a clearly defined context, which requires either arduous manual logging or an additional input channel, as exemplified above, for storing states or labels. This may come from a computer running an application, or it may come from an external device such as an LED. In either case, a universal synchronization box such as that described here would permit these possibilities. Data collected from FROST enables much easier analysis without the need for extensive data conditioning or preprocessing of multiple data sources. For instance, in Experiment 1, it would be quite simple to epoch the data during moments when the participant was pressing the button by simply thresholding the pressure channel and isolating those moments from the LFP channel. As another example, in Experiment 2, determining the reaction time at each trial is provided by comparing the moments when the state channel switched from a 1 to a 0 and when the pressure channel exceeds a threshold. These types of epoching would be particularly difficult, and prone to inaccuracy, if the multiple data sources are not inputted to a single synchronization box.
Few existing tools provide similar functionality to FROST. For computer-based behavioral experiments, there are numerous resources available for designing computer tasks, such as EPrime®, PsychoPy (Peirce et al., 2019), and Psychtoolbox (Brainard, 1997) – and these may have specific compatibilities with peripheral devices that are used to interact with the computer during an experiment. FROST easily synchronizes with a computer through a light sensor placed on the monitor, and thus users may select any such platform to design their computerized experiments. Users may elect to generate computer events through Arduino code based on peripheral devices, such as generating a Space Key event when a button is pressed. There are also existing open-source tools for neuroscientific experimental devices and analyses (e.g., see OpenBehavior.com), though in contrast to FROST, these solutions are predominately geared towards animal research and are not designed primarily for electrophysiological applications. Nonetheless, such devices that experimenters use can be adapted for FROST as an input channel for synchronization as a peripheral device.
One important consideration about FROST is that this device may be used for human electrophysiological studies because the device is considered passive, and all digital components are isolated. For example in the cases shown here the subject only directly interacts with the pressure sensor and the heartrate sensor, which are both electrically isolated with plastic coating. Thus, no conductive material is exposed to the patient. The generated synchronization signals are separated from the physiological signals recorded by the biosignal acquisition system through the ground electrical isolation situated between physiological small signals and the TTL synchronization input.
There are several considerations for users that hope to use this device outside of the two typical human use cases. To begin, the hardware is intended to cover a wide assortment of applications for physiological recordings. Nevertheless, the microcontroller has its own restrictions such as the analog input, which supports a voltage from 0 to 5V. Since the FROST hardware injects a constant current to the analog sensors (e.g., from a push button, a keyboard, the heart rate, a force sensor, etc.) the resistance should be in the range to comply with the Arduino. If this is not the case for a novel peripheral device connected to FROST, the current should be modified to adjust the voltage range. These analog signals should also be slower than the frequency of the acquisition system. In the example firmware provided, for instance, we used the default sampling rate which is 9.6KHz multiplexed with 4 analog inputs. The effective sampling rate will be the time that it takes to complete a loop in the program, which in the example is less than 1ms. These can be improved by increasing the sampling rate in the microcontroller or also by implementing timer interrupts to execute some processes in parallel.
Although both examples depicted here involve human studies, FROST can easily be used for rodent studies too. For instance, an acquisition system can measure cortical electrode activity while an an anesthetized rodent’s whiskers are stiulating in response to an air puff(Figure 8). In this proposed example, a camera can record the movement of the whiskers using computer vision (CV)-based software. FROST would synchronize the acquisition system, the camera, and the air puff with the task. At the beginning of the task FROST would send a trigger signal to the acquisition system and also to a LED placed in front of the camera. This pulse would be used to align the video recording with the neural data. Every 10 seconds FROST would then emit another trigger signal to activate the air puff for 1 second. This signal would be duplicated to synchronize the acquisition system as well. In this case, FROST would also use a maximum of 6 bits to record the pulse obtained from the tail of the rat.
Figure 8. Experiment 3: Single-unit recording in rats.

This example shows a set-up for recording in rats during video acquisition and sensory stimulation. FROST synchronizes all the elements in the experiment, including the pulse sensor, camera, air puff, and the neural signals coming from the electrode array.
Beyond the human experiments presented here and this example rodent study, FROST can be easily adapted for other basic electrophysiological experiments. First, the board can be modified as a modular device to permit many more simultaneous data sources. Synchronization signals such as a light sensor can be transmitted between multiple synchronization boxes in a daisy chain design. Second, there are many acquisition systems that investigators around the world use for electrophysiological research studies. The primary connection between FROST and the acquisition system was designed in this iteration to be compatible with a g.HIamp amplifier. Users with other acquisition systems with different connection inputs will need to modify this connector. This step requires only basic electrical skills and we provide specific steps on the online website. Third, similarly, the connectors used with custom peripheral devices, such as a pulse oximeter or push button, may differ from those that we used here. The Appendix provides additional details on these devices for users that may want to customize them. Appropriate connectors would need to be installed. Fourth, although we have described FROST as a complete board in this article, some users may prefer a shield approach to enable easier and temporary modifications. We elected to use a complete board to ensure that FROST was cheap, stable, and durable, however we have provided instructions for a shield version of FROST at the online website for users who would prefer this approach. Although we provide extensive instructions and open-source materials related to FROST, an advanced skillset may be necessary depending on what extensions or customization users require, including Arduino programming, soldering, and circuit analysis.
Overall, we provide a novel universal device that fills an important gap for research groups around the world engaged in electrophysiological research. FROST is inexpensive, open-source, and easily updated if modifications are needed. The website includes numerous details on this device for individuals hoping to build it from scratch.
Highlights.
Neuroscientific electrophysiology experiments often require alignment of many sources of data.
FROST is a device that provides an open-source, Arduino-based solution to this common problem.
This new tool is designed to be compatible with numerous experimental research devices.
We provide two examples of data acquired using FROST.
FROST is easily customizable and scalable for specific research needs.
Acknowledgements
We are thankful to our funding sources and to everyone who provided feedback on this device and manuscript, including the entire Brain Mapping Laboratory, the Fixel Institute for Neurological Diseases, and the Wilder Center for Epilepsy Research at the University of Florida. We are also thankful for the two research participants that contributed data to this manuscript.
Funding sources:
NIH UH3 NS09553 (Gunduz), NIH R01 NS096008 (Gunduz), NSF PECASE 1553482 (Gunduz), NIH F30 NS111841–01 (Eisinger), NIH TL1TR001428 (Eisinger), Fulbright Scholarship (Gomez)
Appendix A:
FROST Peripheral Device Information
A.1. Customized push button with a pressure sensor:
In some tasks which require button presses, it may be important to not only measure the reaction time but also the amount of pressure applied to the button. We built a push button with these capabilities as shown in Figure A.1. For the pressure/force sensor we used a Flexiforce® sensor. This sensor reduces its electrical resistance in proportion to the amount of pressure applied. For the enclosure we used a ¾ inch water pipe with 15cm of length. The push button is model KFB3ANA1BBB from ZF electronics (Wisconsin, USA).
Figure A.1. Customized push button with pressure sensor.

Push button with pressure sensor attached to the top (a). Connections for the customized push button with the PS/2 connector to interface with FROST (b).
For connecting peripheral devices, FROST uses a PS/2 6-pin connector as a standard. It includes 2 grounds, one input for peripheral ID where a fixed resistor should be connected, an on/off-based device such as push button or switch, and a variable resistor-based sensor. In Table A.1 the pinout for any customized peripheral device and for the push button described here is presented.
Table A.1. FROST peripheral device pinout.
The function and connection at each pin are provided.
| Pin | FROST function | Push button function |
|---|---|---|
| 1 | Ground | Ground |
| 2 | Ground | Ground |
| 3 | Variable resistor-based sensor | Flexiforce® sensor |
| 4 | Not Connected | Not connected |
| 5 | On/off-based input | KFB3ABA1BBB button |
| 6 | Resistor ID | 1,65KOhm resistor |
A.2. Customized keyboard:
In this section we describe how to develop a keyboard as a peripheral device with only one FROST, using the analog input available as shown in Figure A.2. However as aforementioned in Section 2.2.6 we presented the daisy chain capabilities to use multiple FROSTs to accomplish the connection of more inputs. The basic scheme for a keyboard peripheral is a device with switches each connected in parallel with resistors with values that are base 2-logarithmically spaced. This ensures avoidance of redundancy, for instance, if multiple buttons are pressed simultaneously. In addition, a low-pass RC filter could be included to prevent mechanical bouncing noise.
Figure A.2. Customized keyboard.

It is integrated by multiple buttons with one side connected to the analog input and the other side connected through different resistor values to ground.
Appendix B:
FROST Circuit Analysis
B.1. Heartrate Bandpass Filter
This circuit serves to filter the output from the heartrate sensor. Using a NIR LED and a phototransistor, the subject’s heartbeat can be read as a signal based on the blood pulsing through their finger. The first filter this signal passes through is a band-pass filter, designed specifically to only let signals pass through that are in the relevant frequency range for determining heartbeat and is also able to amplify the signal voltage to readable levels. All other signals are attenuated, and we can read only the analog signal from the patient’s finger. The next figure shows a schematic of this circuit.

To simplify this circuit, a signal generator is put in place of the NIR LED/phototransistor system that would be generating the actual signal for the circuit. This does not change how the filter operates. In order to solve the transfer function of this bandpass filter (output voltage/input voltage), it is simplest to break up the band-pass filter into its high and lowpass components and to complete the analysis in the s domain using Laplace Transform for passive components such as resistors, capacitors, and inductors, which are as follows:
Using these transformations, we can evaluate the circuit with nodal analysis methods to find the transfer functions of the high pass part of the circuit and the low pass independently. Once these relationships are found, they can be manipulated to find the overall transfer function of the circuit (output/input). We first start by expressing all components in terms of impedance. Impedance for each component will be denoted as Z with a subscript that corresponds to the component’s labeled name. If we call Vt the output of the high pass filter (which happens to be the voltage at the input of the op-amp) and use the concept of voltage division, we then arrive at equation 1.
| (1) |
Then, the lowpass portion of the circuit is analyzed to find the relationship between Vt and Vo (Vo is the voltage read at the output of the op-amp). This voltage will be read as the analog heartrate of the circuit. By treating C2 and R2 as a single impedance Z3 and calling the other resistor of this filter (R3) Z4, we arrive at equation 2.
| (2) |
From here, we can break Z3 down into its parallel impedances and combine them to find its actual value.. To add the impedance of two components in parallel we do the following:
Rearranging this to solve for Z3, we arrive at equation 3.
| (3) |
This can then be plugged back into equation 2. At this point, the new version of equation 2 can be plugged back into equation 1 and solved in terms of Vo/Vi. Then, the Laplace can be applied to get the equation in terms of s and the value of our components instead of in terms of impedance. The relationships between impedance and the component values in terms of s are as follows.
The values for the resistors and capacitors can then be plugged in. The values for these are:
Using these values and rearranging the terms, we arrive at the final transfer function for the circuit, equation 4.
| (4) |
These values than can be utilized to make a Bode plot in MATLAB. The value of each coefficient is inputted and used to make the plot as follows:
>> H=tf([79.9 321300 0],[79.9 1817.5 2500]);
>> figure; bode(H)
Each value in H represents the coefficients of s (from the second to the 0 power), with the first being the numerator and the second being the denominator. From this we obtain the following plot of the magnitude and frequency response of the filter.

The second op-amp in this circuit serves as a comparator, only allowing voltage through when the filtered signal passes a specified voltage point, which in this case can be controlled by a potentiometer located in an accessible area of the enclosure thus can be modified for every subject. This reference voltage is specifically chosen so that the amplifier only outputs a signal when a heartbeat is detected, therefore giving us the digital signal for the heart rate instead of the analog signal output from the previous amplifier.

B.2. Howland Current pump
The second circuit for analysis is one commonly known as a Howland current pump. These circuits output a constant current with a constant input voltage regardless of impedance and load. The current output is a function of the input voltage and the resistors used by the amplifier. Studying this allows us to understand the modified Howland current pump being utilized in FROST which includes 2 operational amplifiers: one that serves as the current pump and the other serves as a follower circuit. These circuits reduce the effects of impedance by offering high input impedance into the circuit so that earlier components do not influence the output of the current pump. This current pump is adjustable because of the potentiometer being utilized.

When solving the Howland Current Pump circuit, it was assumed that:
The first step to analyzing the current through the load (denoted as Iload) is by examining the circuit through nodal analysis (a combination of Ohm’s Law and Kirchhoff’s current law). To start this analysis we must treat our op-amp as ideal. By doing this, we can assume the current entering the terminals of the op-amp is 0 A, and that the voltage at each terminal’s node is equivalent to each other. Because of the location of the load, this voltage is also the voltage across the load. This voltage will henceforth be denoted as VL. This allows us to generate equation 5 looking at the node on the inverting input of the op-amp.
| (5) |
Now that we have the voltage of our load in terms of the output of the amplifier and our resistors, KCL can be used at the node where the load is located. This is how we generate equation 6.
| (6) |
Solving equation 5 for Vo-VL, and plugging the result into equation 6, we can derive equation 7.
| (7) |
This leaves us with our final equation for the Howland current pump, which shows us that the current output by the circuit is not dependent on the impedance of the load, but on the supplied voltage and R3.
B.3. Modified Howland Current pump

The above circuit is the modified Howland Current Pump where the resistors are assumed to have the relationship
The difference between this and the previous current pump is the follower circuit and the variable resistor (potentiometer) that can be adjusted by the operator. By doing this, we can control the current coming from the pump. The follower circuit is what allows for Radj to be the controlling factor and offers high impedance with no additional gain added. Once again using ideal op-amps we can conclude that the current flowing through Radj is equal to that flowing through ILoad as seen in equation 8.
| (8) |
Because the voltage leaving the follower is the same as the voltage that came in, we can call the node between the output of this op-amp and R4 VL as well. This combined with the voltage at the nodes for the inputs of the op-amp (denoted as Vx) leads us to the relationship between Vx and VL outlined in equation 9.
| (9) |
When solved for Vx this becomes:
When taking the node of the inverting input and treating R1 and R2 as a voltage divider (which is possible because the current flowing through R1 is the same as that flowing through R2), we get equation 10.
| (10) |
Plugging equation 10 into equation 9 (solved for Vx and remembering the relationship between the resistors stated previously), we find:
This equation can be plugged back into equation 8 resulting in equation 10. This gives us the final relationship between ILoad and the circuit. It indicates that the current is not at all dependent on the impedance of the load but that it relies solely on the input voltage (5V) and the adjustable resistance controlled by the potentiometer.
Appendix C:
FROST Part List for Digi-Key and JLCPCB for one device
| Part | Value | Package | Digi-Key Part Number | Unit Price |
|---|---|---|---|---|
| C1,C2,C4 | 10u | 1206 | 399-3684-1-ND | $0.41 |
| C12 | 1u | 0805 | 311-1365-1-ND | $0.18 |
| C3,C6-C11,C13-C14,C17-C19 | .1u | 805 | 399-1168-1-ND | $0.15 |
| C5,C15-C16 | 4.7u | 1206 | 399-3698-1-ND | $0.41 |
| R1 | 50K | N6S | N6S25T0N-503 | $0.61 |
| R2 | 150 | 0603 | CP1-3533NG-ND | $1.17 |
| R3,R12,R13,R18,R20,R25-R28,R32 | 10K | 0603 | 311-10.0KHRCT-ND | $0.10 |
| R4 | 68K | 0603 | MCT0603-68.0K-CFCT-ND | $0.17 |
| R5 | 2.49K | 0603 | 541-2.49KSCT-ND | $0.17 |
| R6 | 499K | 0603 | 749-1661-1-ND | $0.17 |
| R7,R14-R16,R30,R33 | 1K | 0603 | MCT0603-1.00K-CFCT-ND | $0.17 |
| R8,R9 | TVS diode | SOD523 | ESD5B5.0ST1GOSCT-ND | $0.24 |
| R10,R11 | 22 | 0603 | A130081CT-ND | $0.10 |
| R17,R19 | 20K | 0603 | 541-2797-1-ND | $0.14 |
| R21,R23 | 5.1K | 0603 | P5.1KDBCT-ND | $0.34 |
| R22,R24 | 620 | 0603 | P620DBCT-ND | $0.35 |
| R29 | 10K | ST4 | ST4ETA103CT-ND | $1.36 |
| R31 | 100 | 0603 | RNCP0603FTD100RCT-ND | $0.10 |
| IC1,IC3,IC4 | 1MHZ | 8-SOIC | MCP6L02T-E/SNCT-ND | $0.31 |
| IC2 | Linear Regulator | SOT-23-5 | 576-4082-1-ND | $0.16 |
| F1 | Fuse | 1812 | MF-MSMF050-2CT-ND | $0.47 |
| L1,L2 | 30 | 0805 | MH2029-300YCT-ND | $0.10 |
| LED1 | Blue | 0805 | 160-1645-1-ND | $0.46 |
| LED2 | Orange | 0805 | 160-1413-1-ND | $0.28 |
| LED3 | Green | 0805 | 160-1423-1-ND | $0.26 |
| Q1 | crystal | HC-49 | 9B-16.000MAAE-B | $0.33 |
| U1 | 8bit 32kb | 44-TQFP | ATMEGA32U4RC-AU-ND | $3.98 |
| X1 | Connector | USB-B | ED2982-ND | $0.58 |
| X2 | 3.5mm | SJ1 | CP1-3533NG-ND | $1.17 |
| X3 | 3POS 2mm | B3B | 455-1705-ND | $0.19 |
| X4 | 6POS | 30306 | 3M15451-ND | $0.64 |
| X5 | 2POS 2mm | B2B | 455-1704-ND | $0.17 |
| X6 | 2POS 2mm | B2B | 455-1704-ND | $0.17 |
| X7 | 6POS 2mm | B6B | 455-1708-ND | $0.33 |
| X8 | 2POS 2mm | B2B | 455-1704-ND | $0.17 |
| X9 | 10POS 2.54mm | SBH11 | S9169-ND | $0.42 |
| Box Enclosure | Plastic | 1591S | 1591BSBK | $4.99 |
| Miscellaneous Connectors as Needed | NA | NA | NA | $10.00 |
| PCB manufacturing | JLCPCB offers 2 US$ for 5 boards + shipping | $4.00 | ||
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Competing Interests: There are no current commercial interests, however the authors and the University of Florida (Research Foundation) may have a financial interest in the use of this technology, some aspect of which may be commercialized in the future. There are no other competing interests.
References
- Acho L, 2015. A discrete-time chaotic oscillator based on the logistic map: A secure communication scheme and a simple experiment using Arduino. J Frankl Inst 352, 3113–3121. 10.1016/j.jfranklin.2015.03.028 [DOI] [Google Scholar]
- Araiijo A, Portugal D, Couceiro MS, Rocha RP, 2014. Integrating Arduino-Based Educational Mobile Robots in ROS. J Intell Robot Syst 77, 281–298. 10.1007/s10846-013-0007-4 [DOI] [Google Scholar]
- Bright D, Nair A, Salvekar D, Bhisikar S, 2016. EEG-based brain controlled prosthetic arm. 2016 Conf Adv Signal Process Casp 479–483. 10.1109/casp.2016.7746219 [DOI] [Google Scholar]
- Evans B, Evans B, 2011. Beginning Arduino Programming 1–16. 10.1007/978-1-4302-3778-5_1 [DOI] [Google Scholar]
- Masimore B, Schmitzer-Torbert NC, Kakalios J, Redish DA, 2005. Transient striatal ?? local field potentials signal movement initiation in rats. Neuroreport 16, 2021–2024. 10.1097/00001756-200512190-00010 [DOI] [PubMed] [Google Scholar]
- McRoberts M, McRoberts M, 2010. Beginning Arduino 1–19. 10.1007/978-1-4302-3241-4_1 [DOI] [Google Scholar]
- Peterson SM, Rios E, Ferris DP, 2018. Transient visual perturbations boost short-term balance learning in virtual reality by modulating electrocortical activity. J Neurophysiol 120, 1998–2010. 10.1152/jn.00292.2018 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Savostyanov AN, Tsai AC, Liou M, Levin EA, Lee J-D, Yurganov AV, Knyazev GG, 2009. EEG-correlates of trait anxiety in the stop-signal paradigm. Neurosci Lett 449, 112–116. 10.1016/j.neulet.2008.10.084 [DOI] [PubMed] [Google Scholar]
- Schalk G, McFarland DJ, Hinterberger T, Birbaumer N, Wolpaw JR, 2004. BCI2000: a general-purpose brain-computer interface (BCI) system. IEEE transactions on bio-medical engineering 51, 1034–1043. 10.1109/tbme.2004.827072 [DOI] [PubMed] [Google Scholar]
- Tort A, Kramer M, Thorn C, Gibson D, Kubota Y, Graybiel A, Kopell N, 2008. Dynamic cross-frequency couplings of local field potential oscillations in rat striatum and hippocampus during performance of a T-maze task. Proc National Acad Sci 105, 20517–20522. 10.1073/pnas.0810524105 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tucker A, Fox R, Sadleir R, 2013. Biocompatible, high precision, wideband, improved Howland current source with lead-lag compensation, leee T Biomed Circ S 7, 63–70. 10.1109/tbcas.2012.2199114 [DOI] [PubMed] [Google Scholar]
- Vourvopoulos A, Pardo O, Lefebvre S, Neureither M, Saldana D, Jahng E, Liew S-L, 2019. Effects of a Brain-Computer Interface With Virtual Reality (VR) Neurofeedback: A Pilot Study in Chronic Stroke Patients. Front Hum Neurosci 13, 210 10.3389/fnhum.2019.00210 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wang Y, Chi Z, 2016. System of Wireless Temperature and Humidity Monitoring Based on Arduino Uno Platform. 2016 Sixth Int Conf Instrum Meas Comput Commun Control Imccc 770–773. 10.1109/imccc.2016.89 [DOI] [Google Scholar]
- Wirth S, Baraduc P, Plante A, Pinede S, Duhamel J-R, 2017. Gaze-informed, task-situated representation of space in primate hippocampus during virtual navigation. Plos Biol 15, e2001045 10.1371/journal.pbio.2001045 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Witt T, Mena R, Cornell E, 2014. Single chip, 2-wire, 4–20mA current loop RTD temperature transmitter design, lecon 2014 - 40th Annu Conf leee Industrial Electron Soc 2380–2383 10.1109/iecon.2014.7048837 [DOI] [Google Scholar]
