Model of Electrical Signal Conversion

The movement-sensing function of EcoPatch was described with a voltage-divider model that links mechanical deformation to a measurable electrical output. Deformation alters the resistance of the AgNW sensing layer, and the circuit converts this resistance change into an ADC-readable voltage.

Voltage-Divider Model

The AgNW sensor was treated as a variable resistor (Rs) connected between VDD and the ADC node. A fixed 1 kOhm reference resistor (Rref) connected the ADC node to ground. The output voltage follows Vout = VDD x Rref/(Rs + Rref), which can be rearranged to calculate sensor resistance as Rs = Rref(VDD/Vout - 1).

(Figure 1. Voltage divider circuit model)

(Figure 1. Voltage divider circuit model)

  • An increase or decrease in AgNW sensor resistance produces a predictable inverse change in the measured Vout for the stated circuit orientation.

  • The model uses VDD = 3000 mV and Rref = 1000 Ohm, matching the settings used by the Python acquisition program.

Model Assumptions and Use

The model assumes a stable supply voltage, a constant reference resistor, reliable electrical contacts, and an ADC voltage recorded in millivolts. It provides a transparent conversion pathway from raw voltage to resistance, allowing the mechanical response of EcoPatch to be compared across repeated deformation tests without treating voltage values themselves as the final sensor output.

Figure 1. Electrical acquisition configuration for the EcoPatch strain sensor. The microcontroller board supplies the voltage-divider circuit, and the ADC measures the output voltage.

Figure 1. Electrical acquisition configuration for the EcoPatch strain sensor. The microcontroller board supplies the voltage-divider circuit, and the ADC measures the output voltage.

Figure 2. Model inputs and outputs. (A) Hardware configuration providing the voltage-divider signal. (B) Resistance-versus-time output calculated from the measured voltage stream. Figure 2. Model inputs and outputs. (A) Hardware configuration providing the voltage-divider signal. (B) Resistance-versus-time output calculated from the measured voltage stream.

Figure 2. Model inputs and outputs. (A) Hardware configuration providing the voltage-divider signal. (B) Resistance-versus-time output calculated from the measured voltage stream.

Model Variables

Table 1 identifies the variables used to convert the EcoPatch voltage signal into sensor resistance.

Table 1. Variables and assumptions of the EcoPatch voltage-divider model.

Element Purpose Interpretation
Rs Variable AgNW sensor resistance Changes with mechanical deformation
Rref Fixed reference resistance Set to 1000 Ohm
VDD Circuit supply voltage Set to 3000 mV
Vout ADC-measured divider voltage Used to calculate Rs

Integrated Dry-Lab Simulation Framework

Three complementary models were defined to represent the EcoPatch system: an electrical sensing model, a hydrogel release model, and an ROS-reduction model. The models share parameters only where physically justified. For example, hydrogel thickness affects molecular transport, whereas the AgNW resistance model describes the independent electrical sensing layer.

Electrical Signal Model

For a voltage divider containing the strain sensor as the variable resistor, the output voltage is Vout = VDD x Rref/(Rs + Rref). The measured voltage can be converted back to sensor resistance using Rs = Rref(VDD/Vout - 1). A calibration relationship may then be introduced as Rs = R0(1 + GF x Ɛ), where R0 is the baseline resistance, GF is the experimentally determined gauge factor, and Ɛ is applied strain. A parameter sweep of Rref identifies the reference-resistance range that maximizes voltage sensitivity while avoiding ADC saturation.

Hydrogel Release Model

Transport of a dissolved bioactive compound through the hydrogel can be approximated with one-dimensional Fickian diffusion as illustrated in equation 1

\(\frac{dC}{dt} = \ D_{eff}\frac{d^{2}C}{dx^{2}}.\ \) (Equation 1)

Here, C is the concentration of the released compound, x is the distance through the patch thickness, and Deff is the effective diffusion coefficient within the alginate-PAAm network. The model can compare patch thickness, initial loading concentration, and Deff to predict cumulative release profiles. Stronger ionic crosslinking is represented as a lower Deff when experimental release data support that assumption.

ROS Reduction Model

A simplified reaction-diffusion model represents ROS balance at the wound interface as shown in equation 2:

\(\frac{dC_{ROS}}{dt} = \ D_{ROS}\frac{d^{2}C_{ROS}}{dx^{2}} + P_{ROS} - k_{scav} \times C_{ROS} \times C_{agent}\) (Equation2)

CROS is the local ROS concentration, DROS is the ROS diffusion coefficient, PROS is a source term representing continued ROS generation, Cagent is the local concentration of released bioactive agent, and kscav is an effective ROS-reduction constant. This framework supports sensitivity analysis of bioactive loading, release rate, and ROS-reduction activity without implying that a theoretical output alone proves therapeutic efficacy.

Table 2. Inputs and design questions for the proposed EcoPatch dry-lab simulations.

Simulation Parameters to vary Design question
Electrical sensing

R0, GF, Rref, VDD,

ADC resolution

Which circuit configuration resolves the expected resistance change?
Hydrogel release

Patch thickness, Deff,

initial loading

Which formulation supports the desired release duration?
ROS reduction PROS, kscav, Cagent Which delivery conditions most strongly reduce normalized ROS?
Sensitivity analysis All uncertain parameters Which assumptions require priority wet-lab measurement?

Illustrative Diffusion and ROS Simulation

This illustrative simulation shows two connected ideas in a simple way: first, a useful agent moves out of a hydrogel; second, the released agent can reduce ROS near a wound. Think of the 1 mm hydrogel as a thin, water-filled sponge. The numbers are examples for learning how the model behaves. They are not measurements from a patient or a prediction of treatment success.

Step 1 How the agent leaves the hydrogel

The release equation describes diffusion, which means that dissolved molecules naturally move from a region where they are crowded to a region where they are less crowded. In this example, the surrounding liquid continuously carries released molecules away. This is called a perfect-sink condition.

In the equation, Mt is the total mass of agent that has left the hydrogel by time t. M∞ is the total mass that would eventually leave after release is complete. Therefore, Mt/M∞ is the fraction released: 0 means none has been released, 0.50 means half has been released, and 1 means release is complete.

You do not need to calculate the infinite series by hand. It is a mathematical shortcut used by the computer to estimate release over time. The symbol n simply counts the terms in the series, and pi is the familiar circle constant.

Deff is the effective diffusion coefficient: it describes how easily the agent moves through the hydrogel network. A larger Deff gives faster release. L is the hydrogel thickness. A thicker hydrogel makes the path longer, so release is slower when the other conditions are the same.

Project illustration

This plane-sheet expression assumes that the agent can leave through both large faces of the flat hydrogel. Here, L is the total thickness of the hydrogel sheet. For this illustration, three possible Deff values were compared over 24 hours. The curve with the largest Deff should rise most quickly because the agent can travel through the hydrogel more easily. The curve with the smallest Deff rises most slowly.

The middle release curve was used as the input for a simplified ROS model:

\(\frac{dR}{dt} = \ P_{R} - k_{scav} \times A(t) \times R\) (Equation3)

This equation asks a simple question: as more agent becomes available, how much can it reduce the ROS level in this illustrative model?

Step 2 How released agent affects ROS

R is the normalized ROS level. Normalized means that the model uses a convenient comparison scale rather than an actual clinical concentration. For example, R = 1 can represent a chosen starting level. This keeps the example focused on whether ROS rises or falls over time.

P represents continued ROS production, such as ROS generated by an inflamed wound environment. A(t) represents how much released agent is available at time t. It starts low when little agent has escaped from the hydrogel and increases as release proceeds. The constant k describes how effectively the available agent removes ROS in this simplified model.

The first term, P, pushes the ROS level upward. The second term, k x A(t) x R, pulls the ROS level downward. This removal term becomes larger when more agent is available or when the ROS level is higher.

How the two models are connected

The diffusion model supplies A(t) to the ROS model. In plain language, the hydrogel must first release the agent before the agent can reduce ROS. Faster release can make the ROS-reduction effect appear earlier, while slower release can spread the effect over a longer time.

These curves are useful for comparing design choices, such as hydrogel thickness or diffusion rate. Real use would require wet-lab measurements to determine the actual diffusion coefficient, ROS production rate, and ROS-removal activity.

Figure 3. Illustrative theoretical simulation. (A) Cumulative release predicted for a flat 1 mm hydrogel sheet at three assumed effective diffusion coefficients, with release from both large faces. (B) Normalized ROS trajectory using the intermediate release condition as an agent-availability input. Parameters are theoretical and require wet-lab calibration.

Figure 3. Illustrative theoretical simulation. (A) Cumulative release predicted for a flat 1 mm hydrogel sheet at three assumed effective diffusion coefficients, with release from both large faces. (B) Normalized ROS trajectory using the intermediate release condition as an agent-availability input. Parameters are theoretical and require wet-lab calibration.

How to interpret Figure 3

Panel A shows how much agent has left the hydrogel. The horizontal axis is time in hours. The vertical axis is the cumulative released fraction: 0 means no agent has left, 0.5 means half of the releasable agent has left, and 1 means nearly all releasable agent has left.

The blue curve uses the smallest effective diffusion coefficient, so it rises most slowly. The orange curve uses the middle value, and the green curve uses the largest value, so it rises most quickly. This ordering is correct for a flat hydrogel sheet: a larger effective diffusion coefficient means that the agent moves through the water-filled hydrogel network more easily.

Panel B shows the normalized ROS level. The dashed line represents the no-patch case. It rises because ROS continues to be produced. The purple line represents the patch-mediated case. It falls because released agent becomes available and the model removes ROS. The vertical axis is normalized, so the graph compares trends rather than reporting a clinical ROS concentration.

Graph check: the release curves have the expected order for the three diffusion coefficients, and the no-patch ROS line rises from about 1 to about 2.2 over 24 hours, consistent with the stated source term of 0.05 normalized units per hour. The patch-mediated ROS curve falls toward a low plateau, consistent with an increasing agent-availability term. These are internally consistent illustrative results, but their numerical values require wet-lab calibration before they can represent a real wound.

Table 3. Illustrative parameter set used only to demonstrate the coupled diffusion and ROS model.

Parameter Illustrative value Calibration measurement
Hydrogel thickness, L 1 mm Measured patch thickness
Effective diffusivity, Deff 1 x 10-11 to 1 x 10-10 m2 s-1 Release profile in buffer
ROS source, P 0.05 normalized units h-1 Baseline ROS-production condition
Reduction constant, k 0.35 h-1 ROS assay across agent concentrations

Software for Real Time Resistance Monitoring

A Python-based data-acquisition and visualization program was used to convert the EcoPatch voltage-divider output into a real-time resistance signal. The nRF52840 sampled the divider voltage through its ADC, transmitted the values to a computer by USB serial communication, and the program calculated and plotted the AgNW sensor resistance continuously.

Data Acquisition Workflow

  • The nRF52840 reads the divider output voltage and transmits it to the computer at 115200 baud.

  • The program validates the selected serial port before continuous acquisition begins.

  • Each voltage value is converted into instantaneous sensor resistance and added to a moving real-time plot.

  • The resistance trace can be monitored during bending, stretching, or repeated deformation of the patch.

Voltage to Resistance Conversion

The AgNW sensor is the variable resistor between the supply node and the ADC node, while a 1 kOhm reference resistor connects the ADC node to ground. The program calculates sensor resistance using the voltage-divider relationship:

Rs = Rref(VDD/Vout - 1)

The calculation uses Rref = 1000 Ohm and VDD = 3000 mV. It displays absolute resistance in real time. After recording an unloaded baseline R0, the same workflow can also calculate relative resistance change, ΔR/R0, for comparison between deformation trials.

Key Software Settings

Setting Illustrative value Purpose
BAUDRATE 115200 Serial communication speed
VDD 3000 mV Supply voltage
R_REF 1000 Ohm Fixed reference resistance
WINDOW_SEC 10 s Moving display window
PLOT_INTERVAL 0.05 s Graph update interval
PORT_VALIDATION_SAMPLES 5 Samples checked before acquisition
# ============================================================
# Settings
# ============================================================
BAUDRATE = 115200
WINDOW_SEC = 10
VDD = 3000.0      # Supply voltage in millivolts
R_REF = 1000.0    # Reference resistor in ohms
R_MIN = 0
R_MAX = 10000
PLOT_INTERVAL = 0.05
Y_MIN_SLIDER_MAX = 50000
Y_MAX_SLIDER_MAX = 1000000
PORT_VALIDATION_SAMPLES = 5
PORT_VALIDATION_TIMEOUT = 3.0
# ============================================================
# Signal calculation functions
# ============================================================
def calculate_resistance(voltage):
  return R_REF * (VDD / voltage - 1.0)
# Add new calculation functions here.
#
# Example:
#
# R0 = 1000.0
#
# def calculate_deltaR(voltage):
#  return R_REF * (VDD / voltage - 1.0) - R0
#
# Then add it to SIGNALS:
#
# SIGNALS = {
#   "Resistance (Ohm)": calculate_resistance,
#   "Delta R": calculate_deltaR,
# }
SIGNALS = {
  "Resistance (Ohm)": calculate_resistance,
}

Core Calculation Function

The following function implements the voltage-divider conversion used by the real-time display:

def calculate_resistance(voltage):
    return R_REF * (VDD / voltage - 1.0)

The program plots calculated resistance by default. It can be extended to display ΔR or ΔR/R0 after baseline capture. This keeps the measurement pathway transparent: the ADC measures voltage, the software calculates resistance, and the resulting trace is used to evaluate movement-related sensor response.

Software Scope

The software supports prototype-stage real-time monitoring and parameter adjustment. Its calculation depends on a stable supply voltage, the stated circuit orientation, reliable electrical contacts, and valid serial data. Future versions can add automatic baseline capture, data-file export, timestamped trials, and direct relative-resistance calculations.

Code Explanation

The Python program receives voltage data from the microcontroller, converts each value into AgNW sensor resistance, and sends the result to the real-time plot.

Settings used before measurement

  • BAUDRATE = 115200 sets the USB serial communication speed. The nRF52840 and computer must use the same value.

  • VDD = 3000.0 stores the supply voltage in millivolts, and R_REF = 1000.0 stores the fixed reference resistance in ohms. Both values are required for the voltage-divider calculation.

  • WINDOW_SEC = 10 sets the time range shown in the moving graph. PLOT_INTERVAL = 0.05 requests graph updates every 0.05 seconds.

  • R_MIN and R_MAX define the accepted resistance range. PORT_VALIDATION_SAMPLES and PORT_VALIDATION_TIMEOUT help confirm that a selected port provides valid data before recording begins.

How calculate_resistance works

  • calculate_resistance(voltage) receives one ADC voltage measurement as its input.

  • VDD / voltage compares the supply voltage with the measured divider output. Subtracting 1.0 completes the rearranged voltage-divider relationship.

  • Multiplying by R_REF converts this ratio into the instantaneous AgNW sensor resistance. The return statement sends the calculated resistance to the plotting program.

  • The SIGNALS dictionary selects calculate_resistance as the default quantity shown by the user interface. It can later be extended to plot ΔR or ΔR/R0 after recording an unloaded baseline R0.