Computer-controlled electrical stimulation of facial muscles by facial neuromuscular electrical stimulation (fNMES): Hardware and software solutions

Background: Computer controlled electrical stimulation of facial muscles is a promising method to study facial feedback effects, though little guidance is available for new adopters. New Method: Facial Neuromuscular Electrical Stimulation (fNMES) offers a spatially and temporally precise means of manipulating facial muscles during experiments, and can be combined with EEG to study the neurological basis of facial feedback effects. Precise delivery of stimulation requires hardware and software solutions to integrate stimulators and a stimulus-presenting computer. We provide open-source hardware schematics and relevant computer code in order to achieve this integration, so as to facilitate the use of fNMES in the laboratory. Results: Hardware schematics are provided for the building of a bespoke control module, which allows researchers to finely control stimulator output whilst participants complete computer tasks. In addition, we published code that new adopters of NMES can use within their experiments to control the module and send event triggers to another computer. These hard-and software solutions were successfully used to investigate the effects of facial muscle activation on felt and perceived emotion. We summarise these findings and discuss the integration of fNMES with EEG and peripheral physiological measures. Comparison with existing methods: Our inexpensive hardware solution allows fNMES parameters to be computer controlled, and thus allows to stimulate facial muscles with high precision. This opens up new possibilities to investigate, for example, facial feedback effects. Conclusions: We provide tools and guidance to build a control module in order to precisely deliver electrical stimulation to facial muscles using a stimulus computer (while recording EEG or other peripheral


Introduction
Facial neuromuscular electrical stimulation (fNMES) is a relatively new addition to the Psychologist's toolkit, and a possible game changer for the study of facial feedback effects.Traditionally, the manipulation of facial muscle movement has been achieved through the use of props (such as biting a pen), the application of hardening gels that restrict movement, or simply asking participants to voluntarily pose a certain expression.Though such methods have been implemented in the study of how feedback from facial muscles can influence felt emotion and the processing of affective information (Coles et al., 2019), they offer a limited capacity to tightly control experimental parameters, such as the timing and magnitude of muscle activations.In contrast, fNMES involves the delivery of precise electrical stimulation to specific facial muscles via surface electrodes, which offers an unmatched (non-invasive) ability to control the facial movements of participants.This allows to more confidently establish which of the previously reported facial feedback findings can be replicated.
Beyond the clinical implementation of electrical stimulationfor example for muscle rehabilitation (Patsaki et al., 2017), pain management (Deer et al., 2020), or improvement of motor functioning (Marquez-Chin and Popovic, 2020) -there are a number of interesting scientific questions that are afforded when one can precisely control specific facial muscle movements.For example, fNMES can be used to probe the 'facial feedback hypothesis', which posits that proprioceptive feedback from facial muscles can influence affective state (Coles et al., 2019) and guide the interpretation of emotional facial expressions (Sel et al., 2015;Wood et al., 2016).We have recently used fNMES to stimulate bilateral zygomaticus major muscles (the main muscles involved in producing a smile) in order to induce a happiness 'bias' when labelling ambiguous emotional facial expressions (Efthimiou et al., 2024).In a separate study, we also found that stimulation to the depressor anguli oris muscles (those involved in pulling down the lip corners during a frown) and separately again to the zygomaticus major muscles, resulted in changes in mood that were congruent with the targeted muscles (Efthimiou, et al., 2023) Others have also used fNMES to modulate affective state (Zariffa et al., 2014), and to improve symptoms of individuals with major depressive disorders (Kapadia et al., 2019).In addition, fNMES offers the ability to provide proprioceptive inputs to the brain at specific times relative to, for example, visual inputs.As such, we are currently using fNMES to probe the time-course of facial feedback effects.That is, to study when in time proprioceptive inputs are implemented in the processing of facial expressions.
In a recent paper from our lab (Efthimiou, et al., 2023), we provide a comprehensive overview of the fNMES technique and describe a series of advantages that are afforded over the more traditional means of manipulating facial muscles.We acknowledge that fNMES is yet to be established as the dominant technique for controlling facial muscles and therefore very little guidance is available for researchers wanting to adopt fNMES in their studies.As such, the purpose of the current article is to make accessible the means of implementing fNMES into the psychology laboratory by providing hardware schematics (and relevant source code) for a control module (a digital-to-analogue converter; DAC) that allows for the precise control of marked medical device stimulators during experiments.In addition, we provide a concise description of some of the key fNMES stimulation parametersa more thorough description can be found in the paper mentioned above (Efthimiou et al., 2023), additional code that can be used to send event triggers, and discuss additional hardware and software components that are necessary for the implementation of fNMES in studies using EEG and peripheral physiology measures.

Key parameters of fNMES
Here we provide a concise summary of fNMES and the essential parameters.We encourage readers to refer to Efthimiou et al. (2023) for a more comprehensive overview.fNMES is a non-invasive technique where two adhesive pre-gelled electrodes are placed on the skin surface, over the muscle or nerve of interest.The positioning can be based on EMG guidelines (Fridlund and Cacioppo, 1986), or one could use a motor point pen electrode to identify the motor point of the muscle (Gobbo et al., 2014).The electrodes connect to the stimulator(s), which can maintain a constant current or voltage.Typically, constant current devices are preferred as they make tissue damage less likely (Nag et al., 2015).Several important parameters are specified below.In a research context, it is likely that the parameters pulse phase, width, frequency, and electrode size are kept constant.That is, they are decided prior to the data collection period and do not differ between testing sessions.Stimulation intensity, on the other hand, is likely to vary for each participant, or even on a trial-by-trial basis.Refer to Section 3 for guidance on how to build a control module in order to set these essential parameters.

Pulse Phase
There are two common phases implemented: monophasic (monopolar) and biphasic (bipolar).Monophasic waveforms stay in a single phase with a unidirectional pulse from baseline to positive or negativealthough this resembles direct current, periodic interruptions can be included.Biphasic waveforms, on the other hand, are bidirectional with both one positive and one negative phase.The biphasic waveform is frequently mentioned in research due to its safety advantages over the monophasic waveform.This safety is primarily because the biphasic waveform balances the electrical charge, significantly reducing the risk of tissue damage from electrolysis effects (Nag et al., 2015).

Waveform
The pulse shape is another factor influencing the effectiveness and comfort of fNMES.Ilves et al. (2020) investigated the effectiveness and comfort of four different waveforms (square, square wavelet, sine, and sine wavelet) and reported that all four were equally effective in producing contraction of the frontalis muscle and with equal levels of comfort, albeit some individual differences in preference.From the literature, a square wave is typically utilised and is the most common shape implemented in commercial devices (Pfeiffer et al., 2016).

Pulse Width
The pulse width/duration, or period of ion flow, is an important stimulation parameter for fNMES.It refers to the minimum amount of current that must be delivered over time to depolarise the axons of the facial nerves.This period is typically defined in microseconds; the longer the period, the more ions are allowed to pass.The selection of the pulse width is a critical parameter that requires careful consideration.Choosing a pulse width that is too short or too long can have significant impacts on the receiver's comfort and muscle fatigue (Behringer et al., 2016;Doucet et al., 2012).Currently, there is no universally accepted pulse width for stimulating facial muscles, as the optimal settings can vary based on the specific objective.For example, denervated muscles often need longer pulse durations and higher amplitudes for effective stimulation (Kurz et al., 2022).

Frequency
The frequency of fNMES, measured in hertz (Hz), is another important parameter that affects the comfort, quality of muscle contraction, and rate of muscle fatigue.It should be noted that in some devices the frequency is determined by the pulse delay, that is, the time between the end of one pulse and the start of the next.The pulse delay is the inverse of the stimulation frequency, with a shorter delay corresponding to a higher frequency.
Note.The formula quantifies the frequency of electrical stimulation, where F represents the frequency in Hertz (Hz), PW the pulse width in seconds, and PD the delay between pulses, also in seconds.
Although there is no consensus on an optimal stimulation frequency (between 1 and 250 Hz have been used), we suggest using a frequency range of 50-100 Hz to induce smooth muscle contractions without causing rapid muscle fatigue.(Efthimiou, Hernandez, et al., 2023).

Stimulation Intensity
The intensity of fNMES delivered with constant current stimulators is generally reported in milliamperes (mA).Typically, the higher the intensity of NMES, the more motor units are recruited, leading to stronger muscle contractions and afferent feedback (Carson & Buick, 2019;Insausti-Delgado et al., 2021).For facial NMES, between 3 and 9 mA are typically employed (Zariffa et al., 2014), although intensities largely depend on other parameters, such as waveform, pulse width, duration, and electrode size.In line with this, Ilves et al. (2019) investigated the tolerability, perceived sensation, and visible muscle contraction of fNMES at different intensities on four different facial muscles (orbicularis oculi, frontalis, zygomaticus major, and orbicularis oris), whereby intensity was increased in steps of.5 mA to a maximum of 10 mA.Participants started to perceive the stimulation at 1-1.5 mA (sensory threshold) and did not begin to experience discomfort until 7 mA were reached.Further, movement was observed in the forehead, cheek, and mouth at 2, 4, and 3 mA, respectively.In contrast, we typically do not obtain visible contractions of the zygomaticus major and depressor anguli oris muscles before reaching 15-20 mA (Baker et al., 2023;Efthimiou, et al., 2023;Efthimiou et al., 2024).

Electrode size
In addition to waveform parameters, the physical characteristics of the electrodes, particularly their size, are critical for effective fNMES delivery.When dealing with smaller muscles like those in the facial area, it is advisable to employ smaller electrodes.However, it is imperative to ensure that these electrodes are tested and confirmed to adhere to the international safety guidelines (as outlined in EN 60601-2-10:2000).
Said safety guidelines stipulate a maximum of 2 RMS mA/cm 2 be delivered to participants.Researchers must exercise caution to avoid surpassing this power specification.To validate that their chosen electrodes and parameters stay within this recommended limit, they can utilise a recently developed Shinyapp available at this link: http://t inyurl.com/ykhmxhz3.Some final advice for researchers.First, it should be noted that fNMES will not work in some individuals.Lieber and Kelly (1991) and Maffiuletti (2010) indicate that, in certain situations, regardless of stimulation parameters, a muscle contraction cannot be induced owing to anatomical variations in nerve branching.Further, in some cases, it is also recommended that training sessions be provided for participants to become familiar with the intervention (Lieber et al., 1996;Maffiuletti, 2010;Maffiuletti et al., 2009).For fNMES, this will help in addressing concerns such as involuntary muscle movement and pain (Efthimiou et al., 2022).Finally, for good practice, researchers should follow the guidance by Maffiuletti (2010) who suggested all studies report current characteristics (frequency, intensity, pulse shape and duration, duty cycle, and ramping), muscular contraction details (intensity, duration, NMES alone or superimposed), hardware characteristics (device and electrodes), and session details (tolerance, compliance, sessions per week/session).Indeed, as expressed in a recent review by Efthimiou et al. (2023b), of 134 studies applying electrical currents to the face, only eight provided adequate information to compute the safety criterion.

Setting and controlling fNMES parameters: building a bespoke DAC
Researchers interested in applying fNMES for prolonged periods (e. g., as a treatment) can use a commercial transcutaneous electrical nerve stimulation (TENS) unitnumerous retailers offer this type of handheld, battery-powered, economical device.Most TENS units, however, offer a limited range of stimulation parameters and cannot easily be coupled with (and controlled by) a stimulus-presenting computer.Other hardware is therefore required if the goal is to have precise control over the onset and intensity of fNMES on a trial-by-trial basis.To do so, some researchers have opted for custom-building their stimulators (Rantanen et al., 2016).Commercial devices also exist, however, such as the DS5 isolated bipolar constant stimulator by Digitimer (https://tinyurl.com/4vbhjsxk).Despite their higher cost, these commercial units have the advantage of providing safety limits and having CE markingindicating that they meet high safety, health, and environmental protection requirements.The DS5 by Digitimer also allows to set safety limits for both the current (max 50 mA) and voltage (max 100 V).
Controlling the stimulators from a computer, however, requires additional hardware and software (unless the stimulator already offers this functionality, e.g. the DS8R Biphasic Constant Current Stimulator by Digitimer).For example, the DS5 stimulator can take analogue voltage inputs, through which the waveform, pulse width, pulse amplitude, and stimulation frequency can be set with high precision.However, given that these parameters are typically set digitally by a computer program, a digital-to-analogue converter (DAC) is required to interface the stimulator with the PC.For that, some commercial solutions exist, e.g., by Cambridge Electronic Design Limited (http://tinyurl.com/ynxkozzqand http://tinyurl.com/yvd5t2f2).
Alternatively, the advent of microcontrollers, particularly the Arduino platform (https://www.arduino.cc),has revolutionised the landscape of electronic device development, enabling researchers to create sophisticated electronic systems without extensive technical expertise.On those grounds, a bespoke DAC can be built without spending more than a few hundred GBP in material costs (Pfeiffer et al., 2016).One can couple each DS5 stimulator with a dedicated in-house Arduino microcontroller, which acts as a DAC and can also send triggers to another device, such as an EEG-recording computer).The full schematics of our DAC design, created by Andreas Gartus, are available in Kicad format on GitHub (http://tinyurl.com/ywazefmz).
The Arduino firmware offers a rich set of features that empower users to control fNMES to their specific needs and research objectives.This firmware enables the generation of pulse trains with adjustable pulse width, repetition rate, and repetition period, providing precise control over these parameters.Additionally, the firmware supports both bipolar and monopolar stimulation modes, allowing for the delivery of both positive and negative pulses.To achieve enhanced precision and control over the output voltage, the firmware facilitates the integration of an external operational amplifier (OpAmp).This integration enables finetuning of the output signal, ensuring optimal stimulation effectiveness and minimising potential artefacts.It should be noted that the voltage depends on the settings of the stimulator, specifically the DS5 in this instance.The DS5 can convert voltages of ±1 V, ±2.5 V, ±5 V, and ±10 V, with three output options: ±10 mA, ±25 mA, and ±50 mA.However, our design has a maximum voltage limit of 1.5 V, so we utilized a 1 V input and a 50 mA output.Therefore, to compute mA the required voltage can be calculated by dividing the maximum input by the maximum output.In our scenario, this involves taking 50 mA and dividing it by 1000 millivolts (mV).In the example shown in Fig. 2, the DS5 receives a 400 mV analogue input, and puts out a 20 mA current (the DS5's output voltage is automatically adjusted within +/-100 V, to keep the current constant).
Further, to enable hands-free operation and automated stimulation protocols, the firmware supports serial communication for remote control and configuration of stimulation parameters.This feature simplifies the operation of stimulation devices and facilitates the implementation of complex stimulation protocols.The DAC is paired with a 20×4 alphanumeric I2C LCD (see Fig. 1), allowing researchers to monitor and adjust settings in real-time.Our aim is that this firmware serves as a valuable tool for researchers and practitioners working with fNMES, offering flexibility and control in a compact and user-friendly package.
Moreover, for interacting with the Arduino during the initial participant set-up, we have developed a Python graphical user interface (GUI; see Fig. 2) that can be accessed at this link: https://github.com/ThemisEfth/fNMES-Technical-Guide.This GUI operates on the control PC which allows for changing the parameters during the calibration phasea necessary step to determine optimal electrode positioning and visible muscle contractions.A video demonstrating how to install and use the GUI is also available at the above Github address.
The Python code (see Fig. 3) performs a conversion of user inputs, specifically millivolts, microseconds, and milliseconds, into hexadecimal commands.These inputs are then transmitted to the Arduino to initiate specific actions within the firmware, particularly in the DAC's control module.Each code generated has both a decimal and hexadecimal representation.This versatile code can also be integrated into experimental software such as PsychoPy (Peirce et al., 2019) and Psychotoolbox (Brainard, 1997).It enables the adjustment of key parameters on a trial-by-trial basis, making it adaptable for various experiments.For more detailed implementation examples, refer to an experiment on the Open Science Framework (OSF; http://tinyurl.com/ynt8rcka).
Finally, a webcam can be employed to monitor the safety of participants and the quality of muscle movements.This not only allows for the monitoring of correct electrode attachment throughout an experiment, but also enables the assessment of facial movement quality and quantification of muscle activation intensity.Video footage obtained through the webcam can then be subjected to Facial Action Coding System (FACS, Ekman et al., 2002) analysis, either by a trained coder or via   (Baltrusaitis et al., 2018) which offers real-time facial analysis of AU activity during calibration using a ready-made GUI.Additionally, it can be used for offline analysis of pre-recorded videos, providing a comprehensive evaluation of facial expressions.

Concurrent fNMES, EEG, and the measurement of peripheral physiology
The movement of facial muscles as controlled by fNMES is accompanied by proprioceptive feedback to the central nervous system.As such, researchers might also be interested in how such proprioceptive signals are integrated with other sensory information in the brain, and how they modulate our affective state.The measurement of neural oscillations using EEG, and the measurement of changes in the peripheral nervous system (e.g.heart rate, skin conductance), might therefore provide a rich insight into the effects of fNMES beyond behaviour.Below we describe the necessary components to achieve such measurements and detail several technical considerations and analysis techniques.

Technical infrastructure
In addition to the equipment detailed above (for application of fNMES), several components are necessary to achieve accurate measurements of the brain and body (e.g.EEG and heart rate measures) during fNMES within an experimental setting.In general, the fNMESessential equipment is independent of the recording system, except for delivering event triggers to the EEG amplifier.Arduinos have two output channels (one for sending stimulation triggers toward the EEG amplifier (orange), and one to initiate an associated stimulator).Task triggers (blue) are sent from the control PC via a USB2TTL8 converter (not shown) and integrate (via splitter cable, grey square) with stimulation triggers, before arriving at the EEG amplifier (trigger values are the sum of task and stimulation triggers, given they are received precisely at the same time).

EEG amplifier, electrodes, and sampling rate
Several factors should be considered when selecting an EEG system for the application of fNMES.Firstly, given that fNMES is electrical, one should take into consideration that the delivered current conducts through the skin surface and is observable across the scalp (see Fig. 5).In addition, it is possible that ambient electrical noise introduced by the stimulators (and other sources) would enter the EEG amplifier via induction through the electrode wiring.As such, it is recommended, at the least, to use a system with shielding applied to the electrode cables.
fNMES is capable of delivering high frequency stimulation (upwards of 250 Hz), as such, one should consider the rate at which EEG data is sampled to avoid aliasing.To sufficiently represent the induced stimulation artefact (for purposes of reducing it), one should have a sampling rate of at least double the stimulation frequency.Modern EEG systems offer extremely high sampling rates (above 2 kHz), however for most practical purposes, a sampling rate of 256 Hz should suffice (given that our recommended fNMES stimulation frequency is less than 128 Hz).

Recording of peripheral physiology
Given that one of the applications of fNMES is to modulate the experience and processing of affect, one could consider recording additional physiological measures such as skin conductance (SC) and heart rate (HR).Some (e.g.ANT neuro eego sports) EEG amplifiers have auxiliary inputs that allow for additional sensors, whilst other systems that record physiology (e.g.Biopac) have stand-alone amplifiers.The impact of fNMES stimulation artefacts on other physiological signals depends on the technology that is used to acquire them.For example, measurement of SC typically involves the quantifying of impedance between two electrodes attached to the fingertips.Given the distance between the stimulation site (the face) and the fingers, the fNMES current is barely (if at all) visible in the signal.The measurement of HR can be achieved through electrodes attached to the chest (Electrocardiography), but also indirectly via infrared absorption patterns through the skin of the finger (Photoplethysmography, PPG).PPG is an optical method and thus is not susceptible to (electrical) artefacts introduced by fNMES.As such, we would recommend using PPG as a measure for HR during fNMES (e.g. as in Efthimiou et al., 2023).

Event-recording
Most EEG experiments require the implementation of a trigger system so that task-related events can be placed into the continuous EEG recording.This can be achieved through serial (e.g.USB) and parallel (TTL) port communications.Traditionally, event triggers (decimal integers) are derived from specific combinations of high and low voltage states of pins in a parallel port, whereby specific combinations relate to unique task events.Modern computers rarely have parallel ports, and so there exists a number of USB to parallel converters that facilitate event marking in EEG.In addition to task-related triggers, one might wish to insert events into the continuous EEG when a stimulator(s) delivers stimulation.To achieve this, a splitter cable can be used that combines the task-related trigger input arriving from the USB-to-TTL adapter and the specified (fixed) trigger input arriving from the DACs (the DACs each have two outputs; one for driving the stimulators, and one to send stimulation event information).In the case of fNMES being delivered simultaneous to a stimulus/event occurring in an experiment, the resulting output from the splitter cable would arrive at the EEG amplifier as the sum of task-related and stimulation-related trigger values (given that both triggers arrive at the amplifier at the same time).

Manifestation of fNMES in EEG signals
As with other electromagnetic stimulation methods, fNMES produces clear artefacts, these are large amplitude, high frequency (frequency of stimulation) noise bursts in the EEG signal for the duration of stimulation.This artefact is summed with cortical oscillations, which potentially obscures accurate measurement of phenomena of interest such as ERPs.The spatial distribution of the artefact will depend on the EEG reference used, however, given a central reference (e.g.Cz), it is visible at all electrode sites, with frontotemporal electrodes displaying the largest magnitudes (above fNMES electrodes).Fig. 5a shows the average time series of 62 EEG channels during a 500 ms stimulation period at 70 Hz (average of 40 trials for one participant) and clearly shows the fNMES artefact.
Linear decomposition techniques such as independent components analysis (ICA) can derive components that capture the effects of the fNMES stimulation (Baker et al., 2023).Fig. 5c shows two such examples of ICA components during fNMES.The first represents a consequence of applied stimulation (a startle blink response, which typically occurs in many but not all trials with fNMES), and the other a more direct decomposition of the high frequency component (only appearing in all trials with fNMES).Following the removal of the fNMES artefact (described below and in detail in Baker et al., 2023), a somatosensory response to the fNMES can be observed across central channels at around 120 ms post-stimulation onset.Fig. 6a shows the standard deviation of all channels (mean of 40 trials for a single participant) and reveals the time of maximum deviation at 125 ms.Scalp topography at this time reveals a negativity over central electrodes and an associated positivity over occipital channels (identified cluster time series are shown in Fig. 6b).

Reduction of fNMES-related interference
It is common practice to remove EEG artefacts.Artefacts such as blinks, electrode movement, low-frequency drifts, and line noise, frequently pollute the EEG signal and can obscure accurate measurement of underlying brain dynamics.As mentioned above, fNMES introduces further noise into an EEG recording and has the potential to mask measures of interest.Baker et al. (2023) conducted a study which demonstrated the impact of fNMES on the measurement of visual event-related potentials (ERPs) and suggested a means by which fNMES-related artefacts can be reduced.In sum, condition differences were shown to be observed both without and with fNMES to bilateral depressor anguli oris (DAO) muscles, even without the active reduction of the fNMES artefact.Although Baker et al. (2023) demonstrated that an active reduction was not necessary in their specific case (albeit artefact reduction facilitated the graphical presentation of the data), this should not be assumed for other experimental settings, whereby the removal of the fNMES-related interference might indeed be necessary.Fig. 5b shows the effect of simply applying a 30 Hz low-pass filter to the data, which although removes the high frequency component of the signal, results in a residual DC offset during the stimulation period.As such, direct comparisons between conditions that do and do not contain stimulation would necessarily include this shift.Baker et al. (2023) demonstrated the effectiveness of using ICA for the derivation and removal of fNMES artefacts, which with the final addition of a low-pass filter, proves effective for removing the high frequency component without a resulting DC offset (see Fig. 5d).
The delivery of fNMES initiates a somatosensory response at around 125 ms post-stimulation onset (see Fig. 6a and b).This manifests as a central negativity and simultaneous occipital positivity (see Fig. 6b) for approximately 50 ms.The negativity is over somatosensory areas and is indicative of the initial processing of the sensation of fNMES.The occipital positivity on the other hand is the presumed projection of the opposite pole of the somatosensory generator.This resulting positive fluctuation at occipital sites co-occurs with early visual evoked potentials such as P1, which is observed approximately 100 ms following the presentation of a visual stimulus.As such, the visual P1 can become inflated due to the influence of somatosensory activations (see Fig. 6c).To avoid contamination of non-visual activations on the observation of P1, it is recommended that a number of trials which only contain fNMES (i.e.no visual stimulation) are presented to participants.By doing so, it is possible to compute and remove the average time series of trials that only contain fNMES, from the average of trials that contain visual stimulation and fNMES (from the same channels).This essentially subtracts the influence of somatosensory activations from the P1 waveform (see Fig. 6d).Others have applied a similar, yet reverse, logic to subtract visual responses from somatosensory responses to tactile stimulation (Fanghella et al., 2022;Galvez-Pol et al., 2020;Sel et al., 2014).

Additional considerations for analysis
As with any experiment, one should maximise the similarity of two conditions to be compared, except for the experimental manipulation (modulation of proprioceptive inputs in the case of fNMES).If the method described above and in Baker et al. (2023) to remove the fNMES artefact proves insufficient, then directly comparing conditions with and without fNMES necessarily involves confounding factors.Indeed, even if removing the artefacts invites a direct comparison, it might not be correct to assume that trials in which fNMES is delivered do not contain differences to trials without stimulation, beyond the (intended) manipulation of proprioceptive inputs.As an additional approach to address these unintended disparities, arithmetic methods can be employed.Take for example the investigation of the impact of fNMES on the perception of emotional facial expressions.One might be tempted to directly compare ERPs to a certain expression (say, happy) both with and without stimulation, with the expectation that fNMES will modulate a component relative to when there is no stimulation.A more suitable approach (to avoid unintended differences) might be to investigate differences between expressions (say, happy and neutral) first within each fNMES condition (e.g.without fNMES: happy vs. neutral, and with fNMES: happy vs. neutral), and then contrast these calculated differences across the fNMES conditions.This approach (i.e.difference of differences) allows for greater control over the inclusion of stimulation-related differences and emphasises the specific effect of fNMES on a certain emotional expression during more comparable conditions.

Conclusion and future directions
The purpose of the current article was to assist researchers in getting started with using fNMES in the laboratory.We provided bespoke hardware schematics and relevant source code for building a control module that interfaces with stimulators and a computer, so that researchers can efficiently and precisely control the facial muscle activations of their participants.fNMES offers a myriad of advantages over traditional methods to manipulate facial muscles (see Efthimiou et al., 2023).One such advantage is the configurability of an fNMES laboratory and the applications that are afforded.With the addition of more stimulators, for example, one could activate multiple sets of facial muscles simultaneously, either to produce more authentic emotional expressions or to produce unnatural expressions that provide conflicting proprioceptive input to the brain.The application of fNMES in a therapeutic framework should also be investigated.For example, akin to the use of TMS for the treatment of depressive disorders (Cosmo et al., 2021), a sustained intervention involving multiple fNMES sessions over some time might offer therapeutic benefits to individuals in certain clinical populations, such as those that present deficits in emotion recognition, and those with affective disorders.Repeated applications of fNMES (either independently, or with the concurrent presentation of visual stimulation), for example, could help exercise/re-establish how facial muscle activations contribute to emotional processing.
So far, work by us and others has mainly explored the impact of proprioceptive signals as induced by fNMES on mood (Kapadia et al., 2019;Zariffa et al., 2014), and on visual processing (Efthimiou et al., 2024).However, the influence of facial muscle configurations could extend beyond the visual system.For example, fNMES could be used to probe facial feedback mechanisms involved in prosody perception (Arias et al., 2018) or the interpretation of music.Additionally, one could use fNMES to study how the somatosensory system is modulated by visual or auditory stimulation (Galvez-Pol et al., 2020).
To conclude, we would hope that researchers consider adopting fNMES in their studies on facial feedback and embodied cognition and that by combining fNMES with measures of the brain and body, we can gain a more thorough understanding of how multisensory integration can aid us in comprehending the emotional world.

Fig. 1 .
Fig. 1.Block schematic of a DAC controller and LCD display.a) An Arduino Uno R3 board that receives stimulus parameters by USB from the stimulus PC.It can send digital stimulation triggers and analogue signals to control an attached DC stimulator.The analogue signals are generated by a digital-to-analogue converter (DAC, LTC1257) and amplified by an operational amplifier (OpAmp, LM6172) to achieve biphasic/bipolar output.b) 20×4 character LCD display connected to the Arduino by I2C bus.This allows researchers to monitor electrical stimulation parameters (pulse width, configuration, delay, voltage, and number of cycles delivered) in realtime.The frequency of stimulation is calculated by the number of pulses (35) and pulse delay (14 ms).OA EN refers to OpAmp enabled.For monopolar stimulation, both OA EN and OA DIS (disabled) are possible.Be aware that for bipolar pulse mode pulse width refers to bipolar pulse width (i.e.comprising both the up and down phase of the pulse).

Fig. 2 .
Fig. 2. Screenshot of the GUI enabling communication with two DAC units (e.g. for bilateral stimulation of a facial muscle).The GUI provides comprehensive control over fNMES parameters (number of pulses, pulse delay, width, and voltagewhich will be converted to current by the stimulator), facilitating dynamic adjustments during the calibration phase.The GUI displays an example of 70 Hz biphasic stimulation parameters at 400 mV or 20 mA.

Fig. 3 .
Fig. 3.A snippet of Python code that interacts with a DAC by converting and sending user input commands.The Pulses_DAC1 function takes user input for the number of pulses to generate and converts it to an integer.It then creates high and low byte values for the serial command, which are sent to the DAC to set the pulse repetition time.

Fig. 4 .
Fig. 4. Technical configuration for simultaneous fNMES and EEG.Stimulation parameters are sent via USB cable to two Arduino microcontrollers (DAC1 and DAC2).Arduinos have two output channels (one for sending stimulation triggers toward the EEG amplifier (orange), and one to initiate an associated stimulator).Task triggers (blue) are sent from the control PC via a USB2TTL8 converter (not shown) and integrate (via splitter cable, grey square) with stimulation triggers, before arriving at the EEG amplifier (trigger values are the sum of task and stimulation triggers, given they are received precisely at the same time).

Fig. 5 .
Fig. 5. Manifestation (and reduction) of fNMES noise in EEG.(a) Mean of all EEG channels (62) for a single subject (mean of 40 trials in which 70 Hz fNMES was delivered) to lower facial muscles.(b) The effect of applying a 30 Hz low-pass filter.Although the high frequency component is reduced, a DC offset during the stimulation period (0-500 ms) is still observed.(c) Exemplar ICA components derived from trials containing fNMES.(d) The same time series as seen in a, with the two exemplar ICA components removed, and with the application of a 30 Hz low-pass filter.

Fig. 6 .
Fig. 6.Somatosensory activations during fNMES and their impact on the measurement of early visual ERPs.(a) Standard deviation of channel amplitudes across time (single-subject, mean of 40 fNMES trials with noise removed).Maximum deviation occurred at 125 ms post-stimulation onset.Topographic map shows voltage distribution at 125 ms and reveals a central negativity (presumed somatosensory generator) and co-occurring occipital positivity (presumed the opposite pole of the somatosensory generator).Note that no visual stimulus was presented here.(b) Mean activations of central (blue) and occipital (red) electrode clusters.(c) Mean activations of occipital electrode cluster during trials containing a visual stimulus (a face; onset at time zero).Trials (N=300) that also contained fNMES (magenta) present a larger visual P1, relative to trials (N=300) where no fNMES was delivered (black).(d) The same time-series as seen in c, following the subtraction of trials that only contained fNMES from trials that contained fNMES and a visual stimulus.