Patent Publication Number: US-2022226635-A1

Title: &#34;smart&#34; electrode assembly for transcutaneous electrical nerve stimulation (tens)

Description:
REFERENCE TO PENDING PRIOR PATENT APPLICATION 
     This patent application claims benefit of pending prior U.S. Provisional Patent Application Ser. No. 62/438,914, filed Dec. 23, 2016 by Neurometrix, Inc. and Shai N. Gozani et al. for SMART ELECTRODE FOR TRANSCUTANEOUS ELECTRICAL NERVE STIMULATION (Attorney&#39;s Docket No. NEURO-85 PROV), which patent application is hereby incorporated herein by reference. 
    
    
     FIELD OF THE INVENTION 
     This invention relates generally to Transcutaneous Electrical Nerve Stimulation (TENS) devices that deliver electrical currents across the intact skin of a user via electrodes to provide symptomatic relief of pain. More specifically, this invention relates to apparatus and methods to manage utilization of the electrodes used in TENS therapy and to control stimulation for delivering pain-relieving therapy. 
     BACKGROUND OF THE INVENTION 
     Transcutaneous electrical nerve stimulation (TENS) is the delivery of electricity (i.e., electrical stimulation) across the intact surface of a user&#39;s skin in order to activate sensory nerve fibers. The most common application of TENS therapy is to provide analgesia, such as for the alleviation of chronic pain. Other applications of TENS therapy include, but are not limited to, reducing the symptoms of restless leg syndrome, decreasing nocturnal muscle cramps, and providing relief from generalized pruritus. Electrical stimulation is delivered to the body tissue through electrode-skin interfaces created when electrodes are placed in contact with the skin. 
     A conceptual model for how sensory nerve stimulation leads to pain relief was proposed by Melzack and Wall in 1965. Their theory proposes that the activation of sensory nerves (Aβ fibers) closes a “pain gate” in the spinal cord that inhibits the transmission of pain signals carried by nociceptive afferents (C and Aδ fibers) to the brain. In the past 20 years, anatomic pathways and molecular mechanisms that may underlie the pain gate have been identified. Sensory nerve stimulation (e.g., via TENS) activates the descending pain inhibition system, primarily the periaqueductal gray (PAG) and rostroventral medial medulla (RVM) located in the mid-brain and medulla sections of the brain stem, respectively. The PAG has neural projections to the RVM, which in turn has diffuse bilateral projections into the spinal cord dorsal horn that inhibit ascending pain signal transmission. 
     Electrical stimulation is delivered to the body tissue through electrode-skin interfaces created when electrodes are placed in contact with the skin. TENS is typically delivered in short discrete pulses, with each pulse typically being several hundred microseconds in duration, at frequencies between about 10 and 150 Hz, through hydrogel electrode pads placed in direct contact with the user&#39;s skin. 
     To allow effective stimulation, good electrode-skin interface conditions need to be maintained. Many factors may affect the electrode-skin interface conditions. These factors include skin conditions such as dryness of the skin and temperature of the skin. Factors such as electrode on-skin time and TENS stimulation duration and intensity may also affect the rate of degradation of the electrode-skin interface conditions. Poor electrode-skin interface conditions may lead to inadequate electrical stimulation of the nerves, thus compromising the effectiveness of TENS therapy. 
     To ensure adequate electrode-skin interface conditions, TENS users often replace their TENS electrodes at a fixed time interval. While replacing the TENS electrodes at a fixed time interval may work for a majority of users, it may not be appropriate for some users who might have a drier-than-average skin condition or who might use the TENS electrodes less frequently during a particular period of time. Therefore, there is a need for a “smart” TENS electrode assembly to overcome these limitations. 
     Additionally, TENS therapy is delivered to relieve chronic pain. Certain users find it helpful to receive TENS therapy during the day and throughout the night. Chronic pain is known to interfere with sleep, and TENS therapy at night can reduce the pain and minimize its interference with sleep. Fixed TENS therapy dosages (in terms of the onset, duration, and intensity of the electrical stimulation) may not be appropriate for all nights, inasmuch as sleep quality and sleep patterns may vary from night to night. Therefore, there is also a need for a “smart” TENS electrode assembly to facilitate accurate sleep monitoring in order to tailor TENS therapy dosages based on actual sleep patterns each night. 
     Furthermore, it has been found that electrical stimulation intensity needs to be set at a level which evokes a strong but comfortable sensation in order for most chronic pain sufferers to receive the maximum TENS therapy benefit. The target stimulation intensity level I T  (resulting in a strong but comfortable sensation) may change with time for each user. The changes in the target stimulation intensity level may be related to circadian rhythm (e.g., time of day) or longer term trends (e.g., disease progression) or environmental conditions (e.g., weather), etc. Manual adjustment of the target stimulation intensity level can be inconvenient or impractical for some users. There is, therefore, a need to develop a “smart” TENS electrode assembly that can measure the effect of stimulation to facilitate automated TENS stimulation intensity adjustment in real time to maximize the effectiveness of every TENS therapy session. 
     In addition to the foregoing, modern electronics and intelligent algorithms have enabled TENS therapy settings to be more precise and personalized. Any variations in the TENS electrodes (e.g., in terms of their materials, sizes, shapes, etc.) could affect the intended delivery of electrical stimulation to the user. Therefore, there is also a need for a “smart” TENS electrode assembly that can uniquely identify its manufacturing origin, materials used, size, shape, and other characteristics that may affect the transmittal of electrical current into the body of the user via the electrode-skin interfaces. 
     SUMMARY OF THE INVENTION 
     The present invention comprises a novel “smart” electrode assembly comprising one or more conductive hydrogel electrode pads disposed on a layer of supporting material (i.e., a substrate) so as to form the “smart” electrode assembly. Each hydrogel electrode pad is electronically connected to a TENS stimulator via a connector. Integrated circuit (IC) components are placed on either (or both) sides of the supporting material (i.e., the substrate) which carries the conductive hydrogel electrode pads. Sensors of various types (e.g., thermal sensors, chemical sensors, moisture sensors, force sensors, accelerometers, gyroscopes, etc.) are also placed on either (or both) sides of the supporting material (i.e., the substrate) which carries the conductive hydrogel electrode pads. Data from the sensors is communicated directly to the TENS stimulator or stored on the IC components (carried by the supporting material) and later transmitted to the TENS stimulator. The IC components also store information characterizing various physical (e.g., size, shape, material composition, etc.) and temporal (e.g., date of manufacture, duration of use, etc.) aspects of the “smart” electrode assembly. Other information stored in the IC components may also include intended region or country of use (e.g., United States, European Union, China, etc.) to comply with regulatory requirements. Information stored in the IC components is also communicated to the TENS stimulator. The TENS stimulator integrates the information from one or more of the aforementioned sources and uses that information to modify stimulation settings, to alter behavior of the sensors, and/or to update the memory contents of the IC components. Note that the TENS stimulator can also use information from sources other than the on-board sensors and IC components to modify stimulation parameters, e.g., the TENS stimulator may also use user feedback, external information sources such as weather station forecasts, etc. to modify stimulation parameters. 
     The TENS stimulator can be permanently or releasably mounted on the layer of supporting material (i.e., the substrate) of the “smart” electrode assembly, or the layer of supporting material (i.e., the substrate) of the “smart” electrode assembly can be permanently or releasably mounted to the TENS stimulator. Regardless of the manner in which the TENS stimulator and the “smart” electrode assembly are mounted to one another, the TENS stimulator is electrically connected to the one or more conductive hydrogel electrode pads of the “smart” electrode assembly. Additionally, the TENS stimulator is configured to communicate with the components mounted to the layer of supporting material (i.e., the substrate) of the “smart” electrode assembly (e.g., the IC components, the sensors, etc.) with both read and write capabilities. Communications can be carried out in either an encrypted or unencrypted manner. 
     In one preferred form of the invention, there is provided apparatus for transcutaneous electrical nerve stimulation in a user, said apparatus comprising: 
     a stimulation unit for electrically stimulating at least one nerve using electrical pulses; 
     an electrode assembly connectable to said stimulation unit, said electrode assembly comprising a sensing unit, a storage unit, and a communications unit; and 
     a control unit connected to said stimulation unit and said communications unit, said control unit being configured for controlling operation of said stimulation unit based on information from said electrode assembly. 
     In another preferred form of the invention, there is provided apparatus for transcutaneous electrical nerve stimulation in a user, said apparatus comprising: 
     a stimulation unit for electrically stimulating at least one nerve using electrical pulses; 
     an electrode assembly connectable to said stimulation unit, said electrode assembly comprising a sensing unit and a communications unit; 
     a sleep determination unit configured to analyze sleep characteristics of the user; and 
     a control unit connected to said stimulation unit, said communications unit, and said sleep determination unit, said control unit being configured for controlling operation of said stimulation unit. 
     In another preferred form of the invention, there is provided a method for transcutaneous electrical nerve stimulation in a user, said method comprising the steps of: 
     applying an electrode assembly to the body of the user; 
     connecting a stimulation unit to said electrode assembly; 
     measuring at least one characteristic of at least one of said electrode assembly and the user; 
     determining stimulation parameters based on said at least one measured characteristic; and 
     stimulating at least one nerve using said stimulation parameters. 
     In another preferred form of the invention, there is provided a method for transcutaneous electrical nerve stimulation in a user, said method comprising the steps of: 
     applying an electrode assembly to the body of the user; 
     connecting a stimulation unit to said electrode assembly; 
     measuring at least one characteristic of at least one of said electrode assembly and the user; and 
     communicating the status of said electrode assembly to the user. 
     In another preferred form of the invention, there is provided a method for transcutaneous electrical nerve stimulation in a user, said method comprising the steps of: 
     applying an electrode assembly to the body of the user; 
     connecting a stimulation unit to said electrode assembly; 
     measuring at least one property of the user to determine sleep characteristics of the user; 
     modifying stimulation parameters based on said determined sleep characteristics of the user; and 
     stimulating at least one nerve using said stimulation parameters. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       These and other objects and features of the present invention will be more fully disclosed or rendered obvious by the following detailed description of the preferred embodiments of the invention, which is to be considered together with the accompanying drawings wherein like numbers refer to like parts, and further wherein: 
         FIG. 1  is a schematic view showing a novel TENS device with a novel “smart” electrode assembly formed in accordance with the present invention, wherein the novel TENS device is mounted to the upper calf of a user; 
         FIG. 2  is a schematic view showing the novel TENS device with the novel “smart” electrode assembly of  FIG. 1  in greater detail; 
         FIG. 3  is a schematic view showing the novel “smart” electrode assembly of  FIGS. 1 and 2  in greater detail; 
         FIG. 4  is a schematic view of the TENS stimulator and the electrode-skin interface of the novel TENS device of  FIGS. 1-3 ; 
         FIG. 5  is a schematic view showing an exemplary electrical stimulation pulse train generated by the TENS stimulator of the novel TENS device of  FIGS. 1-4 ; 
         FIG. 6  is a schematic view showing the on-skin detection system of the TENS device shown in  FIGS. 1-5 , as well as its equivalent circuits when the TENS device is on and off the skin of a user; and 
         FIG. 7  is a schematic view showing the data storage and communication links between the “smart” electrode assembly and the TENS stimulator. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The TENS Device in General 
     The present invention comprises the provision and use of a novel TENS device which comprises a TENS stimulator designed to be placed on a user&#39;s upper calf (or other anatomical location) and a “smart” electrode assembly designed to apply electrical stimulation from the TENS stimulator to at least one nerve disposed in the user&#39;s upper calf (or other anatomical location). A key feature of the present invention is that the “smart” electrode assembly measures and tracks factors such as skin temperature, skin condition (e.g., dryness), electrode on-skin time, electrode usage period, electrode-skin impedance, etc. These factors, together with manufacturer specifications such as material composition and the geometry of the hydrogel electrode pads of the “smart” electrode assembly, can impact the quality and life span of the “smart” electrode assembly which delivers the electrical stimulation current to the user for TENS therapy. 
     More particularly, and looking now at  FIG. 1 , there is shown a novel TENS device  100  formed in accordance with the present invention, with novel TENS device  100  comprising a TENS stimulator  105 , a strap  110 , and a “smart” electrode assembly  120 , with novel TENS device  100  being shown worn on a user&#39;s upper calf  121 . Smart electrode assembly  120  is disposed on the rear side of TENS stimulator  105  and strap  110  so that the smart electrode assembly is “underneath” the TENS stimulator and strap in  FIG. 1 . A user may wear TENS device  100  on one leg or on both legs (either one at a time or simultaneously), or a user may wear a TENS device  100  on another area of the body separate from, or in addition to, a TENS device  100  worn on one leg (or both legs) of the user. 
     Looking next at  FIG. 2 , TENS device  100  is shown in greater detail. TENS device  100  preferably comprises the aforementioned three components: stimulator  105 , strap  110 , and smart electrode assembly  120  (comprising, as will hereinafter be discussed, at least one cathode electrode and at least one anode electrode appropriately electrically connected to TENS stimulator  105 ). As shown in  FIG. 2 , TENS stimulator  105  may comprise three mechanically and electrically interconnected compartments  101 ,  102 , and  103 . Compartments  101 ,  102 ,  103  are preferably interconnected by hinge mechanisms  104  (only one of which is visible in  FIG. 2 ), thereby allowing TENS device  100  to conform to the curved anatomy of a user&#39;s leg. In a preferred embodiment of the present invention, compartment  102  houses the TENS stimulation circuitry (except for a battery) and user interface elements  106  and  108 . 
     In one preferred form of the invention, compartments  101  and  103  are smaller auxiliary compartments that house a battery for powering the TENS stimulation circuitry and other circuitry, and other ancillary elements, such as a wireless interface unit (not shown) of the sort well known in the art for allowing TENS device  100  to wirelessly communicate with other elements (e.g., a hand-held electronic device  860 , such as a smartphone, see  FIG. 2 ). 
     In another form of the invention, only one or two compartments may be used for housing all of the TENS stimulation circuitry, battery, and other ancillary elements of the present invention. 
     In another form of the invention, a greater number of compartments may be used, e.g., to enable TENS device  100  to better conform to the body and to improve user comfort. 
     And in still another form of the invention, a flexible circuit board is used to distribute the TENS stimulation circuitry and other circuitry more evenly around the leg of the user and thereby reduce the thickness of the device. 
     Still looking at  FIG. 2 , interface element  106  preferably comprises a push button for user control of electrical stimulation by TENS device  100 , and interface element  108  preferably comprises an LED for indicating stimulation status and providing other feedback to the user. Although a single LED is shown in  FIG. 2 , interface element  108  may comprise multiple LEDs with different colors. A wireless interface unit (not shown) of the sort well known in the art is preferably incorporated in compartment  102  to allow TENS device  100  to wirelessly communicate with other elements (e.g., a hand-held electronic device  860  such as a smartphone) as another form of user interface. Additional user interface elements (e.g., an LCD display, audio feedback through a beeper or voice output, haptic devices such as a vibrating element, etc.) are also contemplated and are considered to be within the scope of the present invention. 
     In one preferred form of the invention, TENS device  100  is configured to be worn on the user&#39;s upper calf  121  as shown in  FIG. 1 , although it should also be appreciated that TENS device  100  may be worn on other anatomical locations, or multiple TENS devices  100  may be worn on various anatomical locations, etc. TENS device  100  (comprising the aforementioned TENS stimulator  105 , strap  110 , and smart electrode assembly  120 ) is secured to upper calf  121  (or other anatomical location) of the user by placing the apparatus in position against the upper calf (or other anatomical location) and then tightening strap  110 . More particularly, in one preferred form of the invention, smart electrode assembly  120  is deliberately sized and configured so that it will apply appropriate electrical stimulation to the appropriate anatomy of the user regardless of the specific rotational position of TENS device  100  on the leg (or other anatomical location) of the user. 
       FIG. 3  shows a schematic view of one preferred embodiment of smart electrode assembly  120 . Smart electrode assembly  120  preferably comprises a layer of supporting material  124 . Supporting material  124  is a flexible, non-conducting structure which essentially behaves as a substrate for carrying the remaining components of smart electrode assembly  120 . By way of example but not limitation, supporting material (i.e., substrate)  124  may comprise a sheet of Mylar®. 
     Smart electrode assembly  120  comprises a plurality of hydrogel electrode pads mounted to supporting material  124 , with at least one of the hydrogel electrode pads acting as the cathode electrode for TENS stimulator  105  and at least one of the hydrogel electrode pads acting as the anode electrode for TENS stimulator  105 . In one preferred form of the invention, four discrete electrodes  152 ,  154 ,  156 ,  158 , each comprising a hydrogel electrode pad and each having an equal or similar size (i.e., an equal or similar size surface area) are provided. 
     Electrodes  152 ,  154 ,  156 ,  158  are preferably connected in pairs so that electrodes  154  and  156  (representing the cathode electrode of TENS device  100 ) are electrically connected to one another (e.g., via connector  155 ), and so that electrodes  152  and  158  (representing the anode electrode of TENS device  100 ) are electrically connected to one another (e.g., via connector  157 ). It should be appreciated that electrodes  152 ,  154 ,  156 ,  158  are preferably appropriately sized, and connected in pairs, so as to ensure adequate skin coverage regardless of the rotational position of TENS device  100  (and hence regardless of the rotational position of smart electrode assembly  120 ) on the leg (or other anatomical location) of a user. 
     Smart electrode assembly  120  preferably also comprises a sensing unit  130  mounted to supporting material (i.e., substrate)  124 . Sensing unit  130  preferably comprises one or more sensors for sensing temperature, moisture, galvanic skin response, chemical monitoring, etc. 
     And smart electrode assembly  120  preferably also comprises a digital unit  140  mounted to supporting material (i.e., substrate)  124 . Digital unit  140  comprises one or more IC components for storing data from sensing unit  130 . The IC components of digital unit  140  also contain information that specifies characteristics of smart electrode assembly  120  such as gel pad material type and geometric dimensions, manufacture date, electrode identification number, etc. 
     In addition, smart electrode assembly  120  preferably also comprises a communication unit  135  which contains electrical components which enable the transmission of data in sensing unit  130  and digital unit  140  to TENS stimulator  105  (and, if desired, enables TENS stimulator  105  to send instructions, new data, etc. to sensing unit  130  and/or digital unit  140 ). 
     In one preferred form of the invention, sensing unit  130  communicates with communication unit  135  via a communication link  146 , and digital unit  140  communicates with communication unit  135  via a communication link  145 . Communications between sensing unit  130  and digital unit  140  are preferably carried out through a communication link  147 . 
     Although the communication links  145 ,  146 , and  147  are visualized in  FIG. 3  as line connections, the actual communication links between the connected components can be wireless if desired. 
     Digital unit  140  may, optionally, contain a power source  149  (such as a button battery) to enable digital unit  140  and sensor unit  130  to operate when smart electrode assembly  120  is not connected to TENS stimulator  105 . 
     In the preferred embodiment shown in  FIG. 3 , sensing unit  130  and digital unit  140  are placed on the same side of the supporting material (i.e., substrate)  124  as that for the one or more hydrogel electrode pads (i.e., electrodes)  152 ,  154 ,  156 ,  158 . It should be appreciated, however, that sensing unit  130  and digital unit  140  can be placed on the opposite side of supporting material  124  if desired. Communication unit  135  can be placed on the same side of supporting material  124  as the other elements connectable to TENS stimulator  105 . 
     It should be appreciated that, in the preferred form of the invention, electrodes  152 ,  154 ,  156 ,  158  are not connected in an interleaved fashion, but rather are connected so that the two inside electrodes  154 ,  156  are connected to one another, and so that the two outside electrodes  152 ,  158  are connected to one another. This electrode connection pattern ensures that if the two outer electrodes  152 ,  158  should inadvertently come into contact with one another, an electrical short of the stimulation current flowing directly from cathode to anode will not occur (i.e., the electrode connection pattern ensures that the therapeutic TENS current is always directed through the tissue of the user). 
     Electrical current (i.e., for therapeutic electrical stimulation to the tissue) is provided to the electrode pairs  154 ,  156  and  152 ,  158  by connectors  160 ,  162  ( FIG. 3 ) which mate with complementary connectors  210 ,  212  ( FIG. 4 ), respectively, on TENS stimulator  105 . TENS stimulator  105  generates electrical currents that are passed through electrodes  154 ,  156  and electrodes  152 ,  158  via connectors  160 ,  162 , respectively. 
     In one preferred embodiment of the present invention, the skin-contacting conductive material of electrodes  152 ,  154 ,  156 ,  158  is a hydrogel material which is “built into” electrodes  152 ,  154 ,  156 ,  158 . In other words, in one preferred form of the invention, electrodes  152 ,  154 ,  156 ,  158  each comprise hydrogel electrode pads. The function of the hydrogel material on the electrodes is to serve as an interface between the electrodes  152 ,  154 ,  156 ,  158  and the skin of the user (i.e., within, or adjacent to, or proximal to, the portion of the user&#39;s body in which the sensory nerves which are to be stimulated reside). Other types of electrodes such as dry electrodes and non-contact stimulation electrodes have also been contemplated and are considered to be within the scope of the present invention. 
       FIG. 4  is a schematic representation of the current flow between TENS device  100  and the user. As seen schematically in  FIG. 4 , stimulation current  415  from a constant current source  410  flows into the user&#39;s tissue  430  (e.g., the user&#39;s upper calf) via an anode electrode  420  (which anode electrode  420  comprises the aforementioned electrodes  152 ,  158 ). Anode electrode  420  comprises a conductive backing (e.g., silver hatch)  442  and hydrogel  444 , wherein the conductive backing and hydrogel are disposed on supporting material (i.e., substrate)  124 . In other words, each of the electrodes  152 ,  158  comprises a hydrogel electrode pad disposed on supporting material (i.e., substrate)  124 . The current passes through the user&#39;s tissue  430  and returns to constant current source  410  through cathode electrode  432  (which cathode electrode  432  comprises the aforementioned electrodes  154 ,  156 ). Cathode electrode  432  also comprises a conductive backing  442  and hydrogel  444 , wherein the conductive backing and hydrogel are disposed on supporting material (i.e., substrate)  124 . In other words, each of the electrodes  154 ,  156  comprises a hydrogel electrode pad disposed on supporting material (i.e., substrate)  124 . Constant current source  410  preferably provides an appropriate biphasic waveform (i.e., biphasic stimulation pulses) of the sort well known in the art of TENS therapy. In this respect it should be appreciated that the designation of “anode” and “cathode” electrodes is purely notational in the context of a biphasic waveform (i.e., when the biphasic stimulation pulse reverses its polarity in its second phase of the biphasic TENS stimulation, current will be flowing into the user&#39;s body via “cathode” electrode  432  and out of the user&#39;s body via “anode” electrode  420 ). 
       FIG. 5  is a schematic view showing a pulse train  480  provided by TENS stimulator  105  during a TENS therapy session  482 , and the waveform  490  of two individual biphasic pulses, wherein each individual biphasic pulse comprises a first phase  491  and a second phase  492 . In one form of the invention, each pulse waveform is charge-balanced across the two phases  491  and  492  of the biphasic pulse, which prevents iontophoretic build-up under the electrodes of smart electrode assembly  120  that can lead to skin irritation and potential skin damage. In another form of the invention, the individual pulses are unbalanced across the two phases of the biphasic pulse, however, charge-balancing is achieved across multiple consecutive biphasic pulses. Pulses of fixed or randomly-varying frequencies are applied throughout the duration of the therapy session  482 . The intensity of the stimulation (i.e., the amplitude  493  of the current delivered by TENS stimulator  105 ) is adjusted in response to user input and for habituation compensation, as will hereinafter be discussed in further detail. 
     In order to deliver consistently comfortable and effective pain relief to a user throughout both the day and the night, it may not be appropriate to deliver a fixed TENS stimulation level, since the effect of circadian or other time-varying rhythms can mitigate the effectiveness of TENS stimulation. Parameters impacting TENS stimulation effectiveness include, but are not limited to, stimulation pulse amplitude  493  and pulse width  494 , pulse frequency  495 , and therapy session duration  482 . By way of example but not limitation, higher amplitude and longer pulses (i.e., larger pulse charges) increase the stimulation delivered to the user (i.e., increase the stimulation “dose”), whereas shorter therapy sessions decrease the stimulation delivered to the user (i.e., decrease the stimulation “dose”). Clinical studies suggest that pulse charge (i.e., pulse amplitude and pulse width) and therapy session duration have the greatest impact on the therapeutic stimulation delivered to the user (i.e., the therapeutic stimulation “dose”). 
     Looking now at  FIG. 6 , an on-skin detector  265  may be incorporated in TENS device  100  to determine the on-skin time of the smart electrode assembly. On-skin time is defined as the time duration in which the smart electrode assembly is in contact with the skin, whether or not the therapeutic stimulation current is being delivered through the electrodes to the user. More particularly, a voltage of 20 volts from voltage source  204  is applied to the anode terminal (connector  212 ) of TENS stimulator  105  by closing the switch  220 . If the TENS device is worn by the user, then user tissue  430 , interposed between anode electrode  420  and cathode electrode  432 , will form a closed circuit to apply the voltage to the voltage divider circuit formed by resistors  208  and  206 . More particularly, when TENS device  100  is on the skin of the user, the equivalent circuit  260  shown in  FIG. 6  represents the real-world system and equivalent circuit  260  allows the anode voltage Va (from voltage source  204 ) to be sensed through the voltage divider resistors  206  and  208 . The cathode voltage measured from the amplifier  207  will be non-zero and close to the anode voltage (from voltage source  204 ) when TENS device  100  is secured to the skin of the user. On the other hand, when TENS device  100  is not secured to the skin of the user, the equivalent circuit  270  represents the real-world system and the cathode voltage from amplifier  207  will be zero. 
     Communications Between the Smart Electrode Assembly and the TENS Stimulator 
     Looking now at  FIG. 7 , TENS stimulator  105  comprises a control unit  171  and a stimulation unit  172 . Control unit  171  comprises an appropriately-programmed microprocessor which controls operation of stimulation unit  172 , whereby to regulate the stimulation current applied to the user by TENS stimulator  105 . It will be appreciated that control unit  171  communicates with various components of TENS device  100  so as to apply appropriate TENS therapy to the user, e.g., control unit  171  communicates with user interface elements  106 ,  108 , hand-held electronic device  860 , on-skin detector  265 , etc. 
     In accordance with the present invention, and as will hereinafter be discussed, control unit  171  communicates with communication unit  135  of smart electrode assembly  120 , whereby to enable control unit  171  to communicate with sensing unit  130  and digital unit  140 . 
     More particularly, information about smart electrode assembly  120  (such as electrode type and manufacture origin) is stored on smart electrode assembly  120  in a digital storage unit  142  of digital unit  140 . Digital storage unit  142  may comprise a non-volatile memory circuit such as ROM (i.e., read-only memory). Data from sensing unit  130  (such as data from a temperature sensor) is stored on smart electrode assembly  120  in a digital storage unit  141  of digital unit  140 . Digital storage unit  141  may comprise flash memory. Usage data (such as the “time stamp” of the first use of a given smart electrode assembly  120 ) is stored on the smart electrode assembly in a digital storage unit  143  of digital unit  140 . Digital storage unit  143  may comprise RFID (radio frequency ID) tags and one-wire devices. 
     The information stored in digital unit  140  is communicated between smart electrode assembly  120  and control unit  171  of TENS stimulator  105  via communications unit  135 . More particularly, in one preferred form of the invention, communication link  145  (which can be an implementation of industry standard communication protocols developed for the specific digital storage units  141 ,  142  and  143  of digital unit  140 ) communicates with digital storage units  141 ,  142  and  143  through a common interface (or bus)  144 , and communication link  145  communicates with communications unit  135 . 
     Additionally and/or alternatively, stimulation unit  172  of TENS stimulator  105  can communicate with the usage data in digital storage unit  143  of digital unit  140  directly via a communication channel  148 . 
     Information from sensing unit  130  (incorporated in smart electrode assembly  120 ) is transmitted directly to control unit  171  via communication link  146  and communication unit  135 , such as through a one-wire communication protocol. Wireless communication links such as RFID protocols can also be employed. Information from sensing unit  130  can also be stored on smart electrode assembly  120  in digital storage unit  141  of digital unit  140  via communication channel  147 , without the need to connect smart electrode assembly  120  to TENS stimulator  105 . This is particularly useful for smart electrode features like monitoring the storage environment conditions when the smart electrode assembly is not in use (i.e., when the smart electrode assembly is not connected to TENS stimulator  105 ). Power supply  149  (such as a button battery carried by smart electrode assembly  120 ) may be provided to enable smart electrode functionalities when the smart electrode assembly is not connected to TENS stimulator  105 . 
     In one preferred form of the invention, smart electrode assembly  120  is designed to communicate with TENS stimulator  105  connected to the smart electrode assembly only through an encryption protocol. In another form of the invention, a subset of the information contained in sensing unit  130  and/or digital unit  140  can be communicated to TENS stimulator  105  in an unencrypted protocol. In yet another form of the invention, a subset of the information contained in sensing unit  130  and/or digital unit  140  of smart electrode assembly  120  can be read by any “readers” but can only be modified by TENS stimulator  105  through an encryption protocol. 
     TENS Stimulation Control Based on Electrode Type 
     In one preferred form of the invention, a common mechanical and electrical connection interface is provided between TENS stimulator  105  and a series of smart electrode assemblies  120 , wherein each smart electrode assembly may have different characteristics. In this form of the invention, control unit  171  of TENS stimulator  105  is configured to determine the type of smart electrode assembly  120  connected to TENS stimulator  105  based on information stored on the smart electrode assembly. 
     In one preferred form of the invention, information about the electrode type of the smart electrode assembly is encoded in an integrated circuit (IC) chip (i.e., digital storage  142  of digital unit  140 ) that can be read by TENS stimulator  105  through communication protocols like 1-wire, I2C, or RFID. If the smart electrode assembly cannot be recognized, or if the smart electrode assembly does not belong to a set of supported smart electrode assemblies, TENS stimulator  105  may treat the electrode assembly as a special type of electrode assembly with a default set of characteristics. 
     In another form of the invention, TENS stimulator  105  may terminate electrical stimulation of the user when the electrode type is not recognized. 
     In yet another form of the invention, TENS stimulator  105  may cease to function until a specific smart electrode assembly is connected. 
     In yet another form of the invention, if the electrode type is not recognized, TENS stimulator  105  may cease to function until the TENS stimulator is reset by the manufacturer. 
     In one preferred form of the invention, feedback (such as a blinking LED) is provided to the user when the electrode array is not recognized by TENS stimulator  105 . 
     In another form of the invention, when the electrode assembly is not recognized by TENS stimulator  105 , no feedback is provided to the user other than that certain functionalities of TENS stimulator  105  have become unavailable to the user. 
     One aspect of electrode type is the gel characteristics of the hydrogel electrode pad. By way of example but not limitation, sweat-resistant gel absorbs less moisture and is therefore suitable for use during outdoor activities in humid weather. Standard gel contains more water to provide consistent and comfortable interface for everyday use. Because of the moisture content level of the gel in the hydrogel electrode pad, each type of electrode will have different electrode-skin interface characteristics when the hydrogel electrode pad is placed on the skin of the user. A higher electrode-skin interface impedance is expected from the hydrogel electrode pad which utilizes a sweat-resistant gel type. 
     In one form of the invention, based on the electrode gel type, control unit  171  of TENS stimulator  105  is configured to set the stimulation parameters of TENS stimulator  105  accordingly to compensate for the impedance difference of different gel types. 
     In addition to stimulation parameter adjustments, TENS stimulator  105  is also configured to adaptively predict the usage parameters. In one preferred form of the invention, remaining battery capacity (in terms of the number of therapy sessions available) is calculated and reported to the user based on the usage history of a standard gel type electrode. If a smart electrode assembly having electrodes with sweat-resistant gel is detected, the battery capacity (expressed in the number of therapy sessions available) can be adaptively adjusted to a smaller number due to the expected higher impedance of the sweat-resistant gel without accumulating actual usage history for the new gel type. 
     Another aspect of electrode type is the size of the hydrogel electrode pads. Given the same stimulation current intensity, smaller electrode-skin contact area will evoke a stronger sensation of the stimulation due to a higher current density (defined as current intensity divided by the contact area). If a user has calibrated their TENS stimulator to a particular level of stimulation intensity with a given smart electrode assembly having a particular electrode size, and then later switches to a smart electrode assembly  120  having a smaller electrode size, control unit  171  of TENS stimulator  105  is configured to automatically reduce the stimulation intensity to avoid producing an uncomfortable sensation for the user due to a too-strong stimulation density (i.e., due to the reduced electrode-skin contact area of the smaller electrodes of the new smart electrode assembly). Similar adjustments can be made when the user changes electrode type from a smart electrode assembly with smaller size hydrogel electrode pads to one with larger size hydrogel electrode pads to maintain the same stimulation sensation. 
     Another aspect of electrode type is the class of electrodes. As an example, different countries or regions may have different requirements for the electrodes. Those requirements may not be functional and could be just labeling. The same TENS stimulator can be distributed to multiple regions while still complying with regulatory requirements. To ensure that TENS stimulator  105  will “lock onto” (i.e., adapt to correctly function with) a specific class of electrodes, the TENS stimulator may be configured to operate with only a single class of smart electrode assemblies. When TENS stimulator  105  is connected to an electrode assembly of a class supported by the TENS stimulator, the TENS stimulator may be configured to automatically reduce its support class type to that specific class of the smart electrode assembly connected to the TENS stimulator. Any electrode assembly of a different class will prevent the TENS stimulator from delivering electrical stimulation through that electrode assembly. Additionally, auxiliary functions of the TENS stimulator, such as activity tracking and sleep monitoring, may also be disabled upon connecting to an electrode assembly of a class type different from the class type of the first-connected electrode assembly. 
     Electrode Usage Tracking 
     In one preferred form of the invention, the electrodes of smart electrode assembly  120  are preferably made of hydrogel-based materials. The adhesive and conductive properties of electrodes utilizing hydrogel-based materials degrade with usage and time. It is, therefore, advisable to replace smart electrode assemblies  120  based on usage time duration and interval. Usage time duration is the accumulative time the smart electrode assembly  120  is in contact with skin of the user. Usage interval is the elapsed time between the current time and the time of the first use of a smart electrode assembly. 
     With the prior art, a replacement schedule is often communicated to the user as a fixed usage interval, such as that the TENS electrodes should be replaced after every two weeks of usage interval. Such a fixed usage interval recommendation is generally based on a typical daily usage period under typical user conditions. This may lead to sub-optimal therapeutic results for some users whose electrode quality degenerates faster than that for the typical use conditions. Similarly, the fixed replacement schedule may cause some electrodes to be replaced sooner than necessary. 
     Accordingly, in one preferred form of the invention, smart electrode assembly  120  uses digital storage unit  143  (in digital unit  140 ) to store total usage time. The stored time is initialized to zero for new smart electrode assemblies at the time of manufacture. When the smart electrode assembly is thereafter connected to TENS stimulator  105  and placed “on skin”, control unit  171  of TENS stimulator  105  will start tracking usage time for that smart electrode assembly. TENS stimulator  105  then updates digital storage unit  143  on smart electrode assembly  120  with the accumulative on-skin time. This update is preferably done at a pre-determined time interval. In one preferred embodiment, the update interval is one minute. 
     For a therapy session of 60 minutes, the total usage time for smart electrode assembly is incremented by 60 minutes. Optionally, the duration of a therapy session is modified by a factor proportional to the stimulation current intensity passing through the smart electrode assembly. The modified duration is then added to the total usage time. Additionally, on-skin time without active electrical stimulation can also be added to the total usage time with a different (e.g., lesser) modification factor. In another form of the invention, digital unit  140  comprises electronics to track on-skin time of the smart electrode assembly  120  so that the total usage time of the smart electrode assembly is accurately tracked with or without connection to the TENS stimulator  105 . 
     In one preferred form of the invention, two distinct threshold values are set for total usage time. One threshold value is used to initiate a reminder (Threshold4Reminder1) to replace the smart electrode assembly and the other threshold value (Threshold4Unusable1) is used to mark that the smart electrode assembly is unusable. When the total usage time exceeds the Threshold4Reminder1 threshold value, TENS stimulator  105  is configured to initiate a user feedback to remind the user to replace the smart electrode assembly. The threshold values can be set and stored on the smart electrode assembly at different locations of the same digital storage unit  143 . The threshold value can also be set by the user on TENS stimulator  105  or through an APP on a device (e.g., hand-held electronic device  860 ) connected to the TENS stimulator. In one preferred form of the invention, the feedback to the user is in the form of a sequence of electrical pulses which have a pattern distinct from the pattern of normal therapy pulses. In another form of the invention, user feedback comprises a mechanical vibration. In yet another form of the invention, the user feedback is through a connected APP to display a visual or audio reminder on a device (e.g., hand-held electronic device  860 ) connected to the TENS stimulator. 
     When the total usage time exceeds the Threshold4Unusable1 threshold, TENS stimulator  105  updates a status value stored on digital storage unit  143 . Once the status is updated to “unusable”, no further electrical stimulation will be delivered through this particular smart electrode assembly by TENS stimulator  105 . In one preferred form of the invention, the threshold value Threshold4Unusable1 is 20 hours larger than the threshold value Threshold4Reminder1, and the threshold Threshold4Reminder1 has a value of 200 hours. 
     In one preferred form of the invention, the usage interval of each smart electrode assembly  120  is tracked similar to that of usage time. Upon first connection with TENS stimulator  105 , the “date stamp” (or its equivalent) of the first-time use of a smart electrode assembly  120  is stored in digital storage unit  143  incorporated in that smart electrode assembly. The total usage interval is updated based on the current “date stamp” and the first-time use “date stamp”. The total usage interval is compared with an alert threshold value (Threshold4Reminder2) stored in digital unit  140  of the smart electrode assembly. If the total usage interval is greater than the alert threshold, an alert is issued to the user for electrode replacement. The total usage interval is compared with a maximum usage interval threshold (Threshold4Unusable2). If the total usage interval is greater than the maximum usage interval threshold, TENS stimulator  105  marks that smart electrode assembly as unusable. 
     In one preferred form of the invention, the alert for smart electrode assembly replacement (trigged by either usage duration or usage interval) automatically generates an order with a supplier for a specified type and class of smart electrode assembly. 
     Storing the usage information on the smart electrode assembly itself, instead of storing usage information on TENS stimulator  105 , has some advantages. When a user has two TENS stimulators and uses them interchangeably (e.g., during recharging of device A, device B is used for TENS therapy), each stimulator will only “see” a portion of the electrode usage history. By storing usage information on the smart electrode assembly itself, it overcomes the incomplete usage history seen by each of the multiple stimulators. 
     Moisture Condition Tracking 
     In one preferred form of the invention, a moisture sensor (carried by sensing unit  130 ) monitors the dryness of the skin of the user at the location where smart electrode assembly  120  is in contact with the skin. Dry skin depletes the water in the hydrogel electrode pads more quickly than normal skin. Loss of water in the hydrogel electrode pads makes the gel pads less conductive and, therefore, would require more frequent replacement of the smart electrode assembly. The results of monitoring of skin dryness are used by TENS stimulator  105  to modify one or more values used to prompt users (e.g., via hand-held electronic device  860 ) for electrode replacement. Values include usage duration reminder threshold (Threshold4Reminder1), usage duration unusable threshold (Threshold4Unusable1), usage interval threshold (Threshold4Reminder2), and usage interval threshold (Threshold4Unusable2). 
     When a smart electrode assembly  120  is not placed on the skin of a user, its hydrogel electrode pads may be exposed to the elements of the storage environment. In one preferred form of the invention, a moisture sensor (carried by sensing unit  130 ) monitors the humidity of the environment where the smart electrode assembly is stored. Monitored ambient conditions are used by control unit  171  of TENS stimulator  105  to modify one or more values stored in digital storage unit  141  of smart electrode assembly  120 . Values include the usage interval threshold (Threshold4Reminder2) and the usage interval threshold (Threshold4Unusable2). In another form of the invention, feedback is provided to the user (e.g., via hand-held electronic device  860 ) to recommend that the smart electrode assembly be stored in a more controlled environment when monitored ambient humidity conditions are expected to adversely impact the electrode conditions. Examples of such a more controlled environment include a sealed bag to prevent excessive moisture loss from the hydrogel electrode pads. 
     Skin Temperature Tracking 
     Skin temperature changes are correlated with several physiological changes relevant to TENS stimulation. These include: temperature changes due to an increase in local blood flow as a result of electrical stimulation; temperature changes coinciding with sleep onset; and temperature fluctuations during various sleep stages. Clinical research also reports benefits of improved sleep outcome with the warming of a lower extremity. A skin-contact temperature sensor provided in sensing unit  130  of smart electrode assembly  120  can provide the precise skin temperature measurements needed to detect small changes in skin temperature associated with the aforementioned physiological changes. 
     It is known that electrical stimulation increases local blood flow. In one preferred form of the invention, the temperature sensor in sensing unit  130  of smart electrode assembly  120  monitors skin temperature. Monitored skin temperature results are used by control unit  171  of TENS stimulator  105  to determine the effect of the electrical stimulation. In one preferred form of the invention, the skin temperature at the onset of stimulation or immediately prior to stimulation is measured (T 1 ). After a fixed time period of TENS stimulation, e.g., 10 minutes, the skin temperature is measured again (T 2 ). If the temperature change (dT=T 2 −T 1 ) falls within a target range, e.g., 0.25 to 0.75 degree Celsius, then the TENS stimulation may be considered to be effective. If the temperature change dT is close to zero, then the TENS stimulation may be considered to be below a target intensity and control unit  171  may prompt the user (e.g., via hand-held electronic device  860 ) to increase the TENS stimulation intensity. If the change dT is too large, the stimulation intensity may be too strong and control unit  171  of TENS stimulator  105  may prompt the user (e.g., via hand-held electronic device  860 ) to reduce the TENS stimulation intensity. 
     In another form of the invention, adjustment of the stimulation intensity based on temperature change (dT) is made automatically by control unit  171  of TENS stimulator  105 . 
     In one preferred form of the invention, the aforementioned threshold value is a fixed value. 
     In another form of the invention, the aforementioned threshold value is a function of the skin moisture level and the skin temperature at the baseline (T 1 ). 
     In one preferred form of the invention, temperature change is also used to determine whether the TENS stimulation intensity is above an electro-tactile threshold. The electro-tactile threshold is the lowest stimulation current intensity that evokes an electro-tactile sensation of the user receiving the stimulation. The electro-tactile threshold has been used to set an optimal TENS stimulation intensity I T  that evokes a strong but comfortable sensation. When a user incorrectly identifies a threshold which is higher than the true electro-tactile threshold, therapeutic stimulation intensity based on the identified threshold will be set too high. 
     In one preferred form of the invention, skin temperature (T b ) is measured before any TENS stimulation current is delivered to the body via the smart electrode assembly. The stimulation current is then increased in a step-wise fashion to allow the user to identify the electro-tactile sensation threshold. Once the user identifies an electro-tactile sensation threshold, control unit  171  of TENS stimulator  105  stimulates the user at that intensity level for a period of time (e.g., 10 minutes). If the measured skin temperature Ts is higher than (T b +0.5) degree Celsius, the intensity indicated by the user is considered to be higher than the true electro-tactile sensation threshold. Control unit  171  of TENS stimulator  105  will then prompt the user (e.g., via hand-held electronic device  860 ) to repeat the process of identifying the proper electro-tactile threshold. 
     In another form of the invention, the identified threshold is considered to be higher than the true electro-tactile threshold level when the measured skin temperature Ts is higher than (T b +0.5) degree Celsius and muscle twitches under the electrode-skin contact area are detected by the TENS stimulator (e.g., via an accelerometer carried in sensing unit  130 , or via an accelerometer carried by TENS stimulator  105 ). 
     Skin temperature is known to fluctuate throughout the day. The nerve activation threshold (and thus the electro-tactile threshold) is known to be temperature dependent—the activation threshold is lower when the skin temperature is higher. Therefore, a TENS stimulation intensity optimized under one skin temperature condition will need to be adjusted when the skin temperature changes. In one preferred form of the invention, the skin temperature T C  monitored by sensing unit  130  on smart electrode assembly  120  is used by control unit  171  of TENS stimulator  105  to adjust the stimulation intensity I O  determined under a different temperature condition T O . If the current skin temperature T C  is higher than the original temperature T O , control unit  171  of TENS stimulator  105  adjusts the stimulation intensity I O  with a negative offset. Similarly, if the current skin temperature T C  is lower than the original temperature T O , control unit  171  of TENS stimulator  105  adjusts the stimulation intensity I O  with a positive offset. 
     Chronic pain can interfere with sleep and poor sleep can worsen the pain. Recent technological advances have made it possible for users with chronic pain to use TENS devices during sleep by overcoming safety issues which prevented other TENS devices from being used during sleep. A temperature sensor contained in sensing unit  130  of smart electrode assembly  120  can monitor skin temperature patterns when the user is asleep at night. 
     In one preferred form of the invention, the skin temperature is monitored during sleep. A TENS stimulator comprising an embedded accelerometer can sense the body orientation and movement to determine the timing of events like going to bed, falling asleep, and waking up. Research has shown that individual sleep onset latency (time between going to bed and falling asleep) can be improved with a temperature manipulation (e.g., by increasing foot temperature such as with footbaths prior to going to bed), but the amount of the temperature manipulation and sleep onset latency improvement varies from subject to subject. With continuous monitoring of skin temperatures and objective sleep onset latency measures, the specific relationship between sleep onset latency and skin temperature can be established for each user (i.e., a target skin temperature range can be established for improved sleep). When measured skin temperature is outside the target range, a prompt may be issued to the user (e.g., via hand-held electronic device  860 ) when the user first gets in bed. 
     After falling asleep, individual goes through different sleep stages in a sleep cycle: non-REM (rapid eye movement) stage 1 (NS1); non-REM stage 2 (NS2); non-REM stage 3 (NS3); non-REM stage 2 (NS2); non-REM stage 1 (NS1); and REM sleep (REMS). After REMS, the individual may return to NS1 and repeat another sleep cycle. During non-REM sleep stages, the body temperatures are lower than normal. The body temperature falls to its lowest during REMS stage. A series of body movements usually occurs during the transition from NS3 to NS2. Actigraphy-based sleep monitoring may be able to determine this transition. However, a lack of body movements in other sleep stages makes actigraphy-based sleep monitoring ineffective to identify these sleep stages inasmuch as body movements could also be due to poor sleep or the user being about to get up. Incorporating skin temperature measurements into actigraphy-based sleep monitoring increases sleep monitoring accuracy. 
     Accordingly, in one preferred form of the invention, temperature sensor measurements (from sensing unit  130 ) are used in a sleep classification algorithm incorporated in a sleep determination unit  173  incorporated in TENS stimulator  105 . Sleep determination unit  173  may be any suitable component capable of determining the sleep status of a user and modifying TENS therapy applied to the user based on the sleep status of the user. By way of example but not limitation, sleep determination unit  173  may be of the sort disclosed in pending prior U.S. patent application Ser. No. 14/253,628, filed Apr. 15, 2014 by Neurometrix, Inc. and Shai Gozani et al. for TRANSCUTANEOUS ELECTRICAL NERVE STIMULATOR WITH AUTOMATIC DETECTION OF USER SLEEP-WAKE STATE (Attorney&#39;s Docket No. NEURO-65), which patent is hereby incorporated herein by reference. This patent application discloses, among other things, determining the sleep status of a user based on the body movement of the user and modifying TENS therapy applied to the user based on the sleep status of the user. After sleep onset is detected by the actigraphy-based sleep algorithm incorporated in the aforementioned sleep determination unit  173 , the user enters NS1 and the user&#39;s skin temperature is expected to decrease. If body temperature stays low or trends lower, body movement is interpreted as a transition from NS3 to REMS instead of as a precursor for waking up or movement due to chronic pain discomfort. With temperature tracking, performance of the actigraphy-based sleep classification algorithm can be enhanced to discriminate different sleep stages within sleep period. 
     Thus, previously disclosed apparatus and methods for controlling TENS therapy during sleep based on body movement (see, for example, the aforementioned pending prior U.S. patent application Ser. No. 14/253,628) can be enhanced by using temperature information available from smart electrode assembly  120 . 
     In one preferred form of the invention, if leg movement is coupled with body temperature trending down, then control unit  171  of TENS stimulator  105  will cause TENS therapy stimulation to not be initiated. If leg movement is not coupled with body temperature trending down, then control unit  171  of TENS stimulator  105  will allow TENS therapy stimulation to proceed based on a prior schedule. 
     In another form of the invention, ambient temperature acquired by a temperature sensor incorporated in TENS stimulator  105  is used to determine sleep quality and to control TENS stimulation. Thermal environment is one of the most important factors that can affect human sleep (Okamoto-Mizuno et al Effects of thermal environment on sleep and circadian rhythm, Journal of Physiological Anthropology, 31:14, 2012). For example, mild cold ambient temperature increases slow wave sleep (NS3 sleep). Associations between sleep quality as determined by actigraphy and thermal environment can be determined for each user and thermal environment conditions that are associated with better sleep quality can be communicated to the user to improve sleep quality. 
     In another form of the invention, a combination of skin temperature (acquired by a temperature sensor in sensing unit  130  of smart electrode assembly  120 ) and the ambient temperature determined by a different temperature sensor incorporated in TENS stimulator  105  are used to determine sleep quality. Sleep quality determination results are, in turn, used to modify operation of TENS stimulator  105  via control unit  171 . Skin temperature changes are shown to be associated with different sleep stages, and skin temperature changes in the context of ambient temperature conditions can provide a more specific indication of sleep stages and stage-to-stage transition. For example, a decrease in skin temperature under a steady ambient temperature condition is a more accurate predictor of transition from NS3 to REMS sleep stage than the same skin temperature decrease in the presence of a drop in ambient temperature. 
     Monitoring ambient temperature where the TENS electrode is stored can also provide information regarding the expected quality degradation of the smart electrode assembly. Extreme temperature (too cold or too hot) can cause the hydrogel electrode pads of the smart electrode assembly to lose their conductive properties. Accordingly, in one preferred form of the invention, a temperature sensor in sensing unit  130  of smart electrode assembly  120  tracks environmental temperature when electrode assembly  120  is in storage (i.e., not on skin). The temperature history is read and processed by control unit  171  of TENS stimulator  105  after the smart electrode assembly  120  is connected to TENS stimulator  105 . When extreme storage temperatures are detected, the expected usage time remaining for the smart electrode assembly is modified to reflect the adverse impact of ambient temperature on the hydrogel electrode pads of the smart electrode assembly. In another form of the invention, feedback is provided to the user (e.g., via hand-held electronic device  860 ) to recommend that the smart electrode assembly be stored in a more controlled environment such as an indoor living space. 
     Galvanic Skin Response Sensor 
     A galvanic skin response sensor, provided as part of sensing unit  130  of smart electrode assembly  120  measures the skin conductance level or electrodermal activity (EDA) of a user. Such EDA patterns have been shown to be correlated with different stages of sleep. In particular, high frequency activities of EDA often occur in NS2 and NS3 stages of sleep (Sano et al, Quantitative analysis of wrist electrodermal activity during sleep, Int J. Psychophysiol. 94(3): 382-389, 2014). 
     In one preferred form of the invention, galvanic skin response sensor measurements (from the galvanic skin response sensor provided in sensing unit  130 ) are used in the sleep classification algorithm as a part of a sleep determination unit  173  incorporated in the TENS stimulator to determine sleep stages. Refined sleep stage determination results are then used by control unit  171  of TENS stimulator  105  to control operations of stimulation unit  172  of TENS stimulator  105 . 
     In another preferred form of the invention, determination results based on accelerometer, temperature, chemical, and galvanic skin response sensors are combined to improve the sleep stage determination outcome. 
     Electrode Quality Tracking 
     Properties of smart electrode assembly  120 , particularly the impedance and usage durations, can be stored in the smart electrode assembly and analyzed to predict the useful life of the smart electrode assembly before replacement is needed. 
     In one preferred form of the invention, the electrode history can be summarized in a quality index Q. The properties of the smart electrode assembly are updated and stored in digital storage unit  142  on smart electrode assembly  120  whenever control unit  171  of the TENS stimulator  105  takes a new measurement. The property attributes of measurements include first-time use impedance (impedance measured the very first time the electrode is used on the skin), impedance history (impedance measured during each TENS therapy session), stimulation current intensity used when making impedance measurements, and time stamps of the measurements. An average of the initial five sets of impedance values is calculated as baseline impedance (IMP B ). The most recent five sets of impedance values are averaged to obtain current impedance (IMP C ). An electrode array quality index is developed to quantify the electrode array condition. In one preferred form of the invention, the quality index Q ranges from 100 (best) to 0 (worst) and is defined as 
       100*exp(−IMP C /IMP B +1).
 
     Control unit  171  of TENS stimulator  105  uses the quality index Q to modify the stimulation intensity by adding an offset to the original target stimulation intensity level I T . In one preferred form of the invention, the offset is set to be (Q/100−1) dB. As a result of this offset, a lower stimulation intensity level is used when the electrode quality degrades. A lower quality index Q indicates lower conductive and adhesive properties for the hydrogel electrode pads of the smart electrode assembly (the lower adhesive properties can also mean the effective electrode-skin contact area is lower than that from a new smart electrode assembly). If the same stimulation current intensity is used, a higher current density (current intensity divided by electrode-skin contact area) will be passing through the electrode-skin interface, potentially causing discomfort for the TENS user. The quality index Q is also used by the TENS stimulator to modify one or more values stored in the smart electrode assembly to predict the useful life of the electrode assembly. Values include the remaining usage time and the remaining total usage duration of the smart electrode assembly. In one form of the invention, the threshold values are adjusted upwards if the quality index Q is above 80 after 10 days of total usage days. In another form of the invention, the threshold value is adjusted downward if the quality index Q is below 50 within 10 days of total usage days. 
     In one preferred form of the invention, information stored on the smart electrode assembly is transmitted (either directly or via TENS stimulator  105 ) to a central database for permanent storage via communication links such as Bluetooth link or wireless link. Such information can be used to identify types of electrode arrays that are more appropriate for the user based on the user&#39;s electrode array usage characteristics and history when a new order for electrode arrays is requested by the user. As an example, a user who tends to sweat more during the summer time (as measured by the moisture and temperature sensors of sensing unit  130  of smart electrode assembly  120 ) may be offered an electrode assembly comprising hydrogel electrode pads made of conductive gel that is less absorbent of water molecules. 
     Recommender System for Electrode Reorders 
     In one preferred form of the invention, information collected from multiple smart electrode assemblies used by the same user is transmitted to a central database for permanent storage via communication links such as Bluetooth link or wireless link. Such information can be used to identify electrode assembly types that are more appropriate for the user based on the user&#39;s electrode usage characteristics and history. A recommendation can be made to the user when a new order for electrodes is requested from the user. As an example, a user who tends to sweat more during the summer time (as measured by the moisture and temperature sensors of sensing unit  130  of smart electrode assembly  120 ) may be offered an electrode assembly comprising hydrogel electrode pads made of conductive gel that is less absorbent of water molecules. 
     MODIFICATIONS OF THE PREFERRED EMBODIMENTS 
     It should be understood that many additional changes in the details, materials, steps and arrangements of parts, which have been herein described and illustrated in order to explain the nature of the present invention, may be made by those skilled in the art while still remaining within the principles and scope of the invention.