## 2 Materials and Methods
### Methodology  
The proposed system features a scalable configuration that allows for the modification of the previously designed filtering stage based on the type of signal to be acquired, as well as the adjustment of the ADC resolution. This flexibility enhances the characteristics of acquired biopotentials, when required by the study, by providing direct access to the filtered and amplified signal output. The system allows for the easy modification of the ADC acquisition card (Arduino Mega 2560) and includes a scalable configuration for increasing the number of electrodes used in acquiring various biopotentials, tailored to specific study requirements. The biopotential acquisition process is as follows: based on the study, the appropriate filtering module (Filtering Block) for the desired bandwidth is selected. Next, the system gain is adjusted, and the ADC resolution can be configured as needed. The signal is acquired using a silver/silver-chloride (Ag/AgCl) electrode with a 24 mm diameter, 220 \(\Omega\) impedance, and an offset voltage of 0.2 mV [50]. Figure 1 presents the block diagram of the proposed system, comprising the following components:1. **Signal Amplification Block**: This stage employs two instrumentation amplifiers. The first amplifier pre-amplifies the signal with a fixed gain of 200, preventing saturation when working with different biopotentials, making the system adaptive and reducing common-mode noise. The second amplifier provides an adjustable gain of up to 10,000 to accommodate the low amplitude of biopotentials. This gain can be modified via hardware using a precision potentiometer to provide gains of 1, 50, 500, 2000, 5000, and 10,000. 2. **Signal Filtering Block**: The signal obtained from the amplification block is mounted on a DC component with an amplitude of 20 to 50 mV; this is due to the impedance produced by the contact between the skin and the electrode. For this reason, a passive first-order high-pass filter with a cut-off frequency \(f_{c}=3\) mHz to \(-3\) dB and unit gain is proposed for removing the DC component, followed by a notch filter with a cut-off frequency of 60 Hz, which is used to reduce noise from the electrical grid. Finally, various band-pass filtering modules are implemented to acquire specific biopotential signals (EEG, ECG, sEMG) based on the application, which the user can modify [51]. 3. **Offset Block**: An offset voltage is added to the resulting signal to compensate for the DC component produced by skin and electrode contact, allowing for compatibility with the voltage levels of the Arduino Mega 2560 board. 4. **Analog-to-Digital Conversion Block**: This block utilizes the Arduino Mega 2560 [52] for data acquisition and further signal processing. The Arduino board is also used as an interface to MATLAB (R2023a), and the entire system is implemented to perform the physical tests; no modules were simulated using MATLAB. 5. **Shielding controller**: This block is responsible for minimizing common-mode interference, as well as a reference point for obtaining biopotentials; the power line noise is usually not a pure 60 or 50 Hz sine wave but is distorted with artifacts. Therefore, a major advantage of using a RLD (Right-Leg Drive) circuit to attenuate the main hum is that the common-mode signal recorded by the right-leg electrode is actually correlated with the noise in the biopotential recording. The TL082 operational amplifier, which has a low total harmonic distortion of 0.003% and a CMRR of 86 dB, is used to attenuate the common-mode signal recorded by the right-leg electrode. The configuration is based on an Active Shield [53]; the configuration includes an RLD inside the same shield where the lines used for the electrodes are located, also interconnecting through a coupling layer to the ground plane of the device, increasing the CMRR. Figure 1: Block diagram of the proposed system, where **(A)** Signal Amplification Block, **(B)** Signal Filtering Block, **(C)** Offset Block, **(D)** Analog-to-Digital Conversion Block, and **(E)** Shielding controller.