Real-time signal processing via chemical reactions for a microfluidic molecular communication system

Signal processing over the molecular domain is critical for analysing, modifying, and synthesising chemical signals in molecular communication systems. However, the lack of chemical signal processing blocks and the wide use of electronic devices to process electrical signals in existing molecular communication platforms can hardly meet the biocompatible, non-invasive, and size-miniaturised requirements of applications in various fields, e.g., medicine, biology, and environment sciences. To tackle this, here we design and construct a liquid-based microfluidic molecular communication platform for performing chemical concentration signal processing and digital signal transmission over distances. By specifically designing chemical reactions and microfluidic geometry, the transmitter of our platform is capable of shaping the emitted signals, and the receiver is able to threshold, amplify, and detect the chemical signals after propagation. By encoding bit information into the concentration of sodium hydroxide, we demonstrate that our platform can achieve molecular signal modulation and demodulation functionalities, and reliably transmit text messages over long distances. This platform is further optimised to maximise data rate while minimising communication error. The presented methodology for real-time chemical signal processing can enable the implementation of signal processing units in biological settings and then unleash its potential for interdisciplinary applications.


Supplementary note 1. Mathematical notations
The mathematical symbols used in the paper are summarized in Supplementary Table 1, and the symbols describing and defining pulses are illustrated in Supplementary Figure 1.

Notation Physical Meaning
General Notation L CH The length of the propagation tubing connecting the transmitter and receiver pH r Revised pH of the solution obtained via the absorbance measured by the spectrometer, after conversion using Supplementary Equation ( 7

Bit interval α
The duty cycle, i.e., the fraction of the bit interval where the pump is turned on to inject signals T e The width of the transmitted pulse T o The observation time, i.e., the time between the injection of input Y and the observation of output O at the spectrometer T The width of the pulse generated at the receiver ∆T The transition time of a generated pulse to go from one state to the other T d The delay between the injection of Y and P in the software L d The difference in path length between the inlets of Y and P Supplementary Table 1: Notation table.
Supplementary Figure 1: Pulse definition.(a-b) Predicted theoretical pulses, based on (a) the transmission settings or (b) the prediction made on the effects of the propagation on the signal shape.The blue area highlights the transition period at the edge of the pulse.(c-d) Corresponding experimental measurements made (c) at the flow meter at the inlet of the transmitter or (d) by the spectrometer on the solution passing through the flow cell at the output of the receiver.All symbols presented in this figure are defined in Supplementary Table 1.

Absorption spectrum
The color of a Bromothymol Blue (BTB) solution results from the presence of two molecular forms of BTB in this solution: an acid form with a yellow color, HBTB, and a base form with a blue color, BTB − .The final color will be determined by the dominant species between these two forms, and can be expressed through the absorbance A(λ) of the solution at the wavelength λ given by the Beer-Lambert equation: where [HBTB] and [BTB − ] are the concentrations of HBTB and BTB − at steady state, l is the optical path length, and ϵ A (λ) and ϵ B (λ) are the molar attenuation coefficients of HBTB and BTB − at wavelength λ, respectively.According to [1,2], the wavelengths at which HBTB and BTB − reach their maximum absorption are 453 nm and 616 nm, respectively.
The ratio between [BTB − ] and [HBTB] inside a solution can be calculated from the pH of that solution using the equation where K C is the equilibrium constant of reaction HBTB pKa = 7.10 Due to this equilibrium between both forms, the values of [HBTB] and [BTB − ] are always dependent on each other, and the sum of [HBTB] and With Supplementary Equations ( 2) and (4), Supplementary Equation (1) can be rewritten to express the absorbance as a function of the pH of the solution As l, ϵ A , ϵ B , and K C are all constant, the color of a solution only depends on the total concentration of dye [BTB] Tot and the pH of the solution.Supplementary Figure 2a experimentally demonstrates that with an increase of the pH of the solution from 2 to 12 the solution color changed from yellow (acid form) to blue (base form), with a transition range appearing green (coexistence between acid and base forms).Experimental data also confirmed the wavelengths that reach the maximum absorbance reported in [1,2] (Supplementary Figure 2b).

Effective range for the measurement of the BTB concentration
The application of Supplementary Equation (5) to the absorbance measurement in a solution requires a proper definition of the effective measurement range of BTB concentration.The absorbance measured by a UV-Vis spectrometer can be defined as where I 0 is the light intensity collected by the spectrometer for a reference solution and I is the light intensity for the interested solution.In our experiments, the reference solution is a pure PBS solution.
From Supplementary Equation (6), when I is too low (high BTB concentration) or too high (low BTB concentration), a variation of I will lead to a small change in the absorbance, meaning the concentration change can be hardly detected by the spectrometer and leading to a nonlinear relationship between the BTB concentration and the absorbance.As a consequence, Supplementary Equations ( 1) and (5) are only valid for a given range of BTB concentrations.We measured this range experimentally by studying the evolution of the intensity collected by a spectrometer as a function of the total BTB concentration in solution [BTB] Tot (Supplementary Figure 3).By setting the intensity at 80% of the full resolution of the sensor for a pure PBS solution, the linear range was found as [1 × 10 −5 , 2 × 10 −4 ] mol L −1 .Supplementary Figure 3: Effective range for the measurement of the BTB concentration.The area highlighted in blue corresponds to the range in which the relation between the intensity and the concentration can be considered linear.

Absorbance-pH mathematical modelling
Although Supplementary Equation (5) correlates the absorbance of a solution with its pH, the [BTB] Tot is likely to vary not only from experiment to experiment, especially under a flow chemistry setup (e.g., our MIMIC platform), but also during a single experiment as it is impacted by the relative flow rate of the pump injecting BTB to the total output flow rate at all times.
To eliminate the impact of [BTB] Tot fluctuation, we consider the ratio of A(616) to A(453) and derive the expression of the revised pH of the solution pH r as It is clear that this equation removes the dependency of solution pH on both l and [BTB] Tot , which effectively prevents the measurement of the absorbance from being impacted by fluctuations from the flow and enables an indirect measurement of the solution pH using a UV-Vis spectrometer.

Determination of BTB constants
The calculation of the revised pH of a solution pH r via Supplementary Equation (7) requires to determine the parameters of ϵ A (453), ϵ A (616), ϵ B (453), ϵ B (616), and K C .The reaction equilibrium constant K C was taken from [1,2], with a value equal to 7.9 × 10 −8 mol L −1 .
The values of the molar attenuation coefficients ϵ A (453), ϵ A (616), ϵ B (453), and ϵ B (616) were measured experimentally through the measurement of the absorbance of solutions made at different BTB concentrations, ranging from 0.01 to 0.1 mmol L −1 .The pH of the solutions was set either to pH = 4.78 for the coefficients ϵ A (453) and ϵ A (616) of the acid form HBTB, or to pH = 10.88 for the coefficients ϵ B (453) and ϵ B (616) of the acid form BTB − .Experimental data are shown in Supplementary Figure 4.For each molar attenuation coefficient, its value is calculated by fitting the experimental data to the Beer-Lambert equation with l = 0.25 cm taken from the geometry of the flow cell used for the measurement (Ztype, FIAlabs, USA).At the pH values used for both measurements, we assume that the concentration of the dominant form of BTB in the solution is equal to [BTB] Tot , which can be revealed by Supplementary Equation (2).The fitting provides the following value for the parameters: the solution is expected to start from the pH of the pure Amp solution (i.e., pH=5.3) and slowly increase upon reaction until it reaches the expected pH of the O solution (i.e., pH=8.9).Therefore, we measured the pH values at the outlet of the tubing for different residence times by modifying either the tubing length L r or the flow rate Q r .The results are shown in Supplementary Figure 5.
As the pH only slowly converges toward the final value of 8.9, we set the value of the reaction time T χ as the value of T r when 95 % of the reaction has been completed, corresponding to a pH of 8.72.Using this method and the experimental results, we measured a reaction time in our tubing of T χ = 10 min.

Pulse detection
To localise the pulses, we first detect the pulse edges through where pH r (t i ) and pH r (t i−1 ) are the pH measurement sampled at time t i and t i−1 , respectively.When pH signed (t i ) < 0, a pulse edge is detected at time t i .Then, the pulses can be identified based on these pulse edges (Supplementary Figure 8).
6.4 Message transmission (Fig. 4a) Experiment description.Transmission of the message "Hi".Experimental setup.Full 6-pump version of the MIMIC platform, illustrated in Fig. 1a but with the transmitter modification presented in Fig. 5b.Distance between the transmitter and the receiver: 2 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in 4 phases, and the solution's pH, solution injection, and flow rates are summarized in Supplementary Table 5.
• Phase 1: Cleaning and baseline, 30-min duration.Running two pumps Sol, pump ThL, and pump Amp to remove signal Y from the platform and provide a baseline for the experiment.
• Phase 2: Transmission initialisation.Running the pumps to transmit two bit-1, indicating the start of a message.
• Phase 3: Message transmission.Running the pumps to transmit bit sequence "10010001101001" (ASCII) for the message "Hi".
• Phase 4: Signal collection, 60-min duration.Running two pumps Sol, pump ThL, and pump Amp to ensure the reception of all transmitted bits.
Specifically, the injection of bit-0 and bit-1 was performed as follows: • Bit-0 transmission: For the whole bit interval T b = 50 min, only running two pumps Sol, pump ThL, and pump Amp.
• Bit-1 transmission: -From the beginning of the bit interval until time αT b = 30 min (α is the duty cycle), running all the pumps.
-For the remaining (1 − α)T b = 20 min, only running two pumps Sol, pump ThL, and pump Amp as the guard interval.6.The pH values of the solutions can be found in Supplementary Table 5.
• Phase 1: Cleaning and baseline.Running two pumps Sol, pump ThL, and pump Amp to remove signal Y from the platform and provide a baseline for the experiment.
• Phase 2: Bit sequence transmission, during which bit-1 are repeatedly transmitted.
• Phase 3: Signal collection.Running two pumps Sol, pump ThL, and pump Amp to ensure the reception of all transmitted bits.7.

Speed factor
• Phase 1: Cleaning and baseline, 30-min duration.Running two pumps Sol, pump ThL, and pump Amp to remove signal Y from the platform and provide a baseline for the experiment.
• Phase 1: Cleaning and baseline, 3.75-min duration.Running two pumps Sol, pump ThL, and pump Amp to remove signal Y from the platform and provide a baseline for the experiment.
• Phase 2: Message transmission.Running the pumps to transmit three subsequences for a total of 100 bits.
• Phase 3: Signal collection, 10-min duration.Running two pumps Sol, pump ThL, and pump Amp to ensure the reception of all transmitted bits.
The bit interval T b remained fixed at 6.25 min, and the following values of α were used: • α = 0.6: The signal Y and the suppressor P were injected for a duration αT b = 3.75 min, with a guard interval of 2.5 min until the next bit.
• α = 0.92: The signal Y and the suppressor P were injected for a duration αT b = 5.75 min, with a guard interval of 30 s until the next bit.
• α = 1: The signal Y was injected during the whole bit interval while the suppressor P was not injected.
The decoded bit sequences for different α are illustrated in Supplementary Figure 11, and the corresponding typical bit errors are shown in Supplementary Figure 12.Supplementary Figure 11: Decoded bit sequences.Illustration of the complete input and decoded bit sequences to measure the BER (Fig. 6a), with the three subsequences illustrated one after the other.Each individual bit is represented by a rectangle, and the value of each bit is illustrated by the color of the band on the graph, with light and dark grey indicating successful transmission of bit-0 and bit-1, respectively.Orange indicates the detection of a bit-1 as a bit-0, and pink indicates the detection of a bit-0 as a bit-1.
6.9 Bit interval optimisation (Figs.6c, d) Experiment description.Measurement of the distortion appearing at high α values, optimisation of the bit interval.Experimental setup.Full 5-pump version of the MIMIC platform, as illustrated in Fig. 1a.Distance between the transmitter and the receiver: 2 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in 3 phases, and the solutions' pH, solution injection, and flow rates are summarized in Supplementary Table 9.
• Phase 1: Cleaning and baseline, 30-min duration.Running two pumps Sol, pump ThL, and pump Amp to remove signal Y from the platform and provide a baseline for the experiment.
• Phase 3: Signal collection, 60-min duration.Running two pumps Sol, pump ThL, and pump Amp to ensure the reception of all transmitted bits.
The bit interval T b varied from 1.25 to 90 min, while αT b kept constant to 20 min.

Supplementary Figure 2 :
Spectrum of the BTB Solution.(a) Evolution of the color of the BTB solution with the pH of the solution, ranging from pH 2 to pH 12 (from left to right).(b) Evolution of the absorbance spectrum of the BTB solution with the solution pH.The vertical dashed lines highlight the peak of maximum absorbance for the acid (453 nm) and base forms (613 nm) reported in [1, 2].

Supplementary Figure 8 :
Pulse detection.Presentation of the successive calculations used to detect the pulse edge times and thus the pulses from measured signals.(a) Measurement of the value of pH ⋆ , corresponding to the value of the revised pH r to which the detection threshold has been subtracted.(b) Multiplication of each value of pH ⋆ by the previous value in time, followed by detection of the time at which this product is a negative value.The dashed red lines represent the pulse edge times measured using Supplementary Equation (13).(c) Reconstruction of the pulses using the times detected in (b) and the average values between two consecutive times.6.2Signal thresholding (Figs.3c-e)Experiment description.Investigation of the reaction between Y and ThL.Experimental setup.Simplified architecture of the MIMIC platform, shown in Fig.3b: two inlets at the transmitter, (1) the Y pump and (2) the Sol pump, and three inlets at the receiver, (3) the inlet connected to the output of the transmitter, (4) the ThL pump, and (5) the Amp pump.The Amp solution was used in this experiment to allow us to visualise the effect of the ThL solution on the Y signal.Distance between the Y + Amp T junction and the UV-Vis spectrometer: 2 m.Solution injection.The Y injection flow rate Q Y (t) followed a triangular distribution in equation (7) in the Methods of the main text.The Sol injection flow rate Q Sol (t) was adjusted accordingly to maintain a 48 µL min −1 constant flow rate at the output of the transmitter.The solutions' pH and injection flow rates are summarized in Supplementary

6. 5
High speed and long distance communication (Figs.4c, d) Experiment description.Assessment of the capability of the MIMIC platform to communicate at high speed and over long distances, by sending bit-1 repeatedly.Experimental setup.Full 6-pump version of the MIMIC platform, illustrated in Fig. 1a but with the transmitter modification presented in Fig. 5b.Distance between the transmitter and the receiver: 25 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.In this experiment, only sequences of bit-1 were transmitted.Solution injection.The experiment was conducted in 3 phases and repeated four times using different speed factor N .The values of N , communication settings, and injection flow rates are summarized in Supplementary Table

6. 6
Waveform Design -Software control (Figs.5a, c) Experiment description.Control the width of the transmitted signal via Python software.Experimental setup.Full 5-pump version of the MIMIC platform, as illustrated in Fig.1a.Tubing length: L 1 = L 2 = 5 cm.Distance between the transmitter and the receiver: 2 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in the same 3 separate phases as the Signal suppression experiment 6.3, with the same solutions presented in Supplementary Table4.The duration of the second phase used in these experiments was 10, 20, 30, 40, and 50 min.6.7 Waveform Design -Geometry control (Figs.5b, d) Experiment description.Control the width of the transmitted signal by adjusting the microfluidic geometry.Experimental setup.Full 6-pump version of the MIMIC platform, as illustrated in Fig. 1a but with the transmitter design shown in Fig. 5b.Tubing length: L 1 = 5 cm.Different tubing lengths L 2 were used: 51, 105, 159, 213, and 267 cm, resulting in different path differences L d = L 2 − L 1 of 46, 100, 154, 208, and 262 cm.Distance between the transmitter and the receiver: 2 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in 2 phases, and the solutions' pH, solution injection, and flow rates are summarized in Supplementary Table

6. 8
Bit error rate measurement (Fig. 6a) Experiment description.Measurement of the bit error rate (BER) under different transmission settings.Experimental setup.Full 6-pump version of the MIMIC platform, as illustrated in Fig. 1a but with the transmitter modification presented in Fig. 5b.Tubing length: L 1 = 5 cm and L 2 = 105 cm.Distance between the transmitter and the receiver: 25 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in 3 phases and repeated three times for different duty cycles α with the same 100 bits transmitted.The solutions' pH, solution injection, and flow rates are summarized in Supplementary Table

Table 3 :
Signal thresholding.Composition and injection flow rate of the different solutions injected for the experiment in Figs.3c-e.When the pH of ThL solution was 7.58, it was replaced by a solvent solution.6.3 Signal suppression (Figs.3f, g)Experiment description.Investigation of the reaction between Y and P. Experimental setup.Full 5-pump version of the MIMIC platform, as illustrated in Fig.1a.Distance between the transmitter and the receiver: 2 m.Distance between the final T-junction at the receiver and the UV-Vis spectrometer: 2 m.Solution injection.The experiment was conducted in 3 separate phases, and the solutions' pH, solution injection, and flow rate are summarized in Supplementary Table4.
• Phase 3: Signal and suppressor injection, lasting until the experiment was terminated.Running pump Y, pump P, pump Sol, pump ThL, and pump Amp.

Table 4 :
Composition and injection flow rate of the different solutions injected for the experiment in Figs.3f, g.To output a constant flow rate at the transmitter during the whole experiment, the flow rate of the Sol pump follows Q Sol

Table 5 :
Message transmission.Composition and injection flow rate of the different solutions injected for the experiment in Fig. 4a.To output a constant flow rate at the transmitter during the whole experiment, the flow rates of the two Sol pumps follow Q SolY (t) = 24 − Q Y (t) and Q SolP (t) = 24 − Q P (t), respectively.

Table 7 :
Phase 2: Signal and suppressor injection, lasting until the experiment was terminated.Running pump Y, pump P, pump Sol, pump ThL, and pump Amp.Waveform Design.Composition and injection flow rate of the different solutions injected for the experiment in Figs.5b, d.To output a constant flow rate at the transmitter during the whole experiment, the flow rate of the two Sol pumps follow Q SolY (t) = 24 − Q Y (t) and Q SolP (t) = 24 − Q P (t).

Table 8 :
Bit Error Rate measurement.Composition and injection flow rate of the different solutions injected for the experiment in Fig. 6a.To output a constant flow rate at the transmitter during the whole experiment, the flow rates of the two Sol pumps follow Q SolY (t) = 192 − Q Y (t) and Q SolP (t) = 192 − Q P (t), respectively.

Table 9 :
Bit interval optimisation.Composition and injection flow rate of the different solutions injected for the experiment in Figs.6c, d.To output a constant flow rate at the transmitter during the whole experiment, the flow rates of the two Sol pumps follow Q SolY (t) = 24 − Q Y (t) and Q SolP (t) = 24 − Q P (t), respectively.