fig1 shows a patient 101 undergoing non - invasive neuromodulation therapy ( ninm ) using a neurostimulation system 100 . during a therapy session , the neurostimulation system 100 non - invasively stimulates various nerves located within the patient &# 39 ; s oral cavity , including at least one of the trigeminal and facial nerves . in combination with the ninm , the patient engages in an exercise or other activity specifically designed to assist in the neurorehabilitation of the patient . for example , the patient can perform a physical therapy routine ( e . g ., moving an affected limb , or walking on a treadmill ) engage in a mental therapy ( e . g ., meditation or breathing exercises ), or a cognitive exercise ( e . g ., computer assisted memory exercises ) during the application of ninm . the combination of ninm with an appropriately chosen exercise or activity has been shown to be useful in treating a range of maladies including , for example , traumatic brain injury , stroke ( tbi ), multiple sclerosis ( ms ), balance , gait , vestibular disorders , visual deficiencies , tremor , headache , migraines , neuropathic pain , hearing loss , speech recognition , auditory problems , speech therapy , cerebral palsy , blood pressure , relaxation , and heart rate . for example , a useful non - invasive neuromodulation ( ninm ) therapy routine has been recently developed as described in u . s . pat . no . 8 , 849 , 407 , the entirety of which is incorporated herein by reference . fig2 a and 2b show a non - invasive neurostimulation system 100 . the non - invasive neurostimulation system 100 includes a controller 120 and a mouthpiece 140 . the controller 120 includes a receptacle 126 and pushbuttons 122 . the mouthpiece 140 includes an electrode array 142 and a cable 144 . the cable 144 connects to the receptacle 126 , providing an electrical connection between the mouthpiece 140 and the controller 120 . in some embodiments , the controller 120 includes a cable . in some embodiments , the mouthpiece 140 and the controller 120 are connected wirelessly ( e . g ., without the use of a cable ). during operation , a patient activates the neurostimulation system 100 by actuating one of the pushbuttons 122 . in some embodiments , the neurostimulation system 100 periodically transmits electrical pulses to determine if the electrode array 142 is in contact with the patient &# 39 ; s tongue and automatically activates based on the determination . after activation , the patient can start an ninm treatment session , stop the ninm treatment session , or pause the ninm treatment session by pressing one of the pushbuttons 122 . in some embodiments , the neurostimulation system 100 periodically transmits electrical pulses to determine if the electrode array 142 is in contact with the patient &# 39 ; s tongue and automatically pauses the ninm treatment session based on the determination . during an ninm treatment session , the patient engages in an exercise or other activity designed to facilitate neurorehabilitation . for example , during an ninm treatment session , the patient can engage in a physical exercise , a mental exercise , or a cognitive exercise . in some embodiments , the controller 120 has pushbuttons on both arms . in some embodiments , a mobile device can be used in conjunction with the controller 120 and the mouthpiece 140 . the mobile device can include a software application that allows a user to activate the neurostimulation system 100 and start or stop an ninm treatment session by for example , pressing a button on the mobile device , or speaking a command into the mobile device . the mobile device can obtain patient information and treatment session information before , during , or after an ninm treatment session . in some embodiments , the controller 120 includes a secure cryptoprocessor that holds a secret key , to be described in more detail below in connection with fig9 a and 9b . the secure cryptoprocessor is in communication with a microcontroller . the secure cryptoprocessor can be tamper proof . for example , if outer portions of the cryptoprocessor are removed in an attempt to access the secret key , the cryptoprocessor erases all memory , preventing unauthorized access of the secret key . fig2 c shows a non - invasive neurostimulation system 100 . as shown , a mobile device 121 is in communication with a mouthpiece 140 . more specifically , the mobile device 121 includes a processor running a software application that facilitates communications with the mouthpiece 140 . the mobile device 121 can be , for example , a mobile phone , a portable digital assistant ( pda ), or a laptop . the mobile device 121 can communicate with the mouthpiece 140 by a wireless or wired connection . during operation , a patient activates the neurostimulation system 100 via the mobile device 121 . after activation , the patient can start an ninm treatment session , stop the ninm treatment session , or pause the ninm treatment session by manipulating the mobile device 121 . during an ninm treatment session , the patient engages in an exercise or activity designed to provide neurorehabilitation . for example , during an ninm treatment session , the patient can engage in a physical exercise , a mental exercise , or a cognitive exercise . fig3 a shows the internal circuitry housed within the controller 120 . the circuitry includes a microcontroller 360 , isolation circuitry 379 , a universal serial bus ( usb ) connection 380 , a battery management controller 382 , a battery 362 , a push - button interface 364 , a display 366 , a real time clock 368 , an accelerometer 370 , drive circuitry 372 , tongue sense circuitry 374 , audio feedback circuitry 376 , vibratory feedback circuitry 377 , and a non - volatile memory 378 . the drive circuitry 372 includes a multiplexor , and an array of resistors to control voltages delivered to the electrode array 142 . the microcontroller 360 is in electrical communication with each of the components shown in fig3 a . the isolation circuitry 379 provides electrical isolation between the usb connection 380 and all other components included in the controller 120 . additionally , the circuitry shown in fig3 a is in communication with the mouthpiece 140 via the external cable 144 . during operation , the microcontroller 360 receives electrical power from battery 362 and can store and retrieve information from the non - volatile memory 378 . the battery can be charged via the usb connection 380 . the battery management circuitry controls the charging of the battery 362 . a patient can interact with the controller 120 via the push - button interface 122 that converts the patient &# 39 ; s pressing of a button ( e . g . an info button , a power button , an intensity - up button , an intensity - down button , and a start / stop button ) into an electrical signal that is transmitted to the microcontroller 360 . for example , a therapy session can be started when the patient presses a start / stop button after powering on the controller 120 . during the therapy session , the drive circuitry 372 provides an electrical signal to the mouthpiece 140 via the cable 144 . the electrical signal is communicated to the patient &# 39 ; s intraoral cavity via the electrode array 142 . the accelerometer 370 can be used to provide information about the patient &# 39 ; s motion during the therapy session . information provided by the accelerometer 370 can be stored in the non - volatile memory 378 at a coarse or detailed level . for example , a therapy session aggregate motion index can be stored based on the number of instances where acceleration rises above a predefined threshold , with or without low pass filtering . alternatively , acceleration readings could be stored at a predefined sampling interval . the information provided by the accelerometer 370 can be used to determine if the patient is engaged in a physical activity . based on the information received from the accelerometer 370 , the microcontroller 360 can determine an activity level of the patient during a therapy session . for example , if the patient engages in a physical activity for 30 minutes during a therapy session , the accelerometer 370 can periodically communicate ( e . g . once every second ) to the microcontroller 360 that the sensed motion is larger than a predetermined threshold ( e . g . greater than 1 m / s 2 ). in some embodiments , the accelerometer data is stored in the non - volatile memory 378 during the therapy session and transmitted to the mobile device 121 after the therapy session has ended . after the therapy session has ended , the microcontroller 360 can record the amount of time during the therapy session in which the patient was active . in some embodiments , the recorded information can include other data about the therapy session ( e . g ., the date and time of the session start , the average intensity of electrical neurostimulation delivered to the patient during the session , the average activity level of the patient during the session , the total session time the mouthpiece has been in the patient &# 39 ; s mouth , the total session pause time , the number of session shorting events , and / or the length of the session or the type of exercise or activity performed during the therapy session ) and can be transmitted to a mobile device . a session shorting event can occur if the current transmitted from the drive circuitry to the electrode array 142 exceeds a predetermined threshold or if the charge transmitted from the drive circuitry to the electrode array exceeds a predetermined threshold over a predetermined time interval . after a session shorting event has occurred , the patient must manually press a pushbutton to resume the therapy session . the real time clock ( rtc ) 368 provides time and date information to the microcontroller 360 . in some embodiments , the controller 120 is authorized by a physician for a predetermined period of time ( e . g ., two weeks ). the rtc 368 periodically communicates date and time information to the microcontroller 360 . in some embodiments , the rtc 368 is integrated with the microcontroller . in some embodiments , the rtc 368 is powered by the battery 362 , and upon failure of the battery 362 , the rtc 368 is powered by a backup battery . after the predetermined period of time has elapsed , the controller 120 can no longer initiate the delivery of electrical signals to the mouthpiece 140 and the patient must visit the physician to reauthorize use of the controller 120 . the display 366 displays information received by the microcontroller 360 to the patient . for example , the display 366 can display the time of day , therapy information , battery information , time remaining in a therapy session , error information , and the status of the controller 120 . the audio feedback circuitry 376 and vibratory feedback circuitry 377 can give feedback to a user when the device changes state . for example , when a therapy session begins , the audio feedback circuitry 376 and the vibratory feedback circuitry 377 can provide auditory and / or vibratory cues to the patient , notifying the patient that the therapy session has been initiated . other possible state changes that may trigger audio and / or vibratory cues include pausing a therapy session , resuming a therapy session , the end of a timed session , canceling a timed session , or error messaging . in some embodiments , a clinician can turn off one or more of the auditory or vibratory cues to tailor the feedback to an individual patient &# 39 ; s needs . the tongue sense circuitry 374 measures the current passing from the drive circuitry to the electrode array 142 . upon sensing a current above a predetermined threshold , the tongue sense circuitry 374 presents a high digital signal to the microcontroller 360 , indicating that the tongue is in contact with the electrode array 142 . if the current is below the predetermined threshold , the tongue sense circuitry 374 presents a low digital signal to the microcontroller 360 , indicating that the tongue is not in contact or is in partial contact with the electrode array 142 . the indications received from the tongue sense circuitry 374 can be stored in the non - volatile memory 378 . in some embodiments , the display 366 can be an organic light emitting diode ( oled ) display . in some embodiments , the display 366 can be a liquid crystal display ( lcd ). in some embodiments , a display 366 is not included with the controller 120 . in some embodiments , neither the controller 120 nor the mouthpiece 140 includes a cable , and the controller 120 communicates wirelessly with the mouthpiece 140 . in some embodiments , neither the controller 120 nor the mouthpiece 140 includes an accelerometer . in some embodiments , the drive circuitry 372 is located within the mouthpiece . in some embodiments , a portion of the drive circuitry 372 is located within the mouthpiece 140 and a portion of the drive circuitry 372 is located within the controller 120 . in some embodiments , neither the controller 120 nor the mouthpiece 140 includes tongue sense circuitry 374 . in some embodiments , the mouthpiece 140 includes a microcontroller and a multiplexer . fig3 b shows a more detailed view of fig2 c . the mouthpiece 140 includes a battery 362 , tongue sense circuitry 374 , an accelerometer 370 , a microcontroller 360 , drive circuitry 372 , a non - volatile memory 378 , a universal serial bus controller ( usb ) 380 , and battery management circuitry 382 . during operation , the microcontroller receives electrical power from battery 362 and can store and retrieve information from the non - volatile memory 378 . the battery can be charged via the usb connection 380 . the battery management circuitry 382 controls the charging of the battery 362 . a patient can interact with the mouthpiece 140 via the mobile device 121 . the mobile device 121 includes an application ( e . g . software running on a processor ) that allows the patient to control the mouthpiece 140 . for example , the application can include an info button , a power button an intensity - up button , an intensity - down button , and a start / stop button that are presented to the user visually via the mobile device 121 . when the patient presses a button presented by the application running on the mobile device 121 , a signal is transmitted to the microcontroller 360 housed within the mouthpiece 140 . for example , a therapy session can be started when the patient presses a start / stop button on the mobile device 121 . during the therapy session , the drive circuitry 372 provides an electrical signal to an electrode array 142 located on the mouthpiece 140 . the accelerometer 370 can be used to provide information about the patient &# 39 ; s motion during the therapy session . the information provided by the accelerometer 370 can be used to determine if the patient is engaged in a physical activity . based on the information received from the accelerometer 370 , the microcontroller 360 can determine an activity level of the patient during a therapy session . for example , if the patient engages in a physical activity for 30 minutes during a therapy session , the accelerometer 370 can periodically communicate ( e . g . once every second ) to the microcontroller 360 that the sensed motion is larger than a predetermined threshold ( e . g . greater than 1 m / s 2 ). after the therapy session has ended , the microcontroller 360 can record the amount of time during the therapy session in which the patient was active . in some embodiments , the accelerometer 370 is located within the mobile device 121 and the mobile device 121 determines an activity level of a patient during the therapy session based on information received from the accelerometer 370 . the mobile device can then record the amount of time during the therapy session in which the patient was active . the mobile device 121 includes a real time clock ( rtc ) 368 that provides time and date information to the microcontroller 360 . in some embodiments , the mouthpiece 140 is authorized by a physician for a predetermined period of time ( e . g ., two weeks ). after the predetermined period of time has elapsed , the mouthpiece 140 can no longer deliver electrical signals to the patient via the electrode array 142 and the patient must visit the physician to reauthorize use of the mouthpiece 140 . in some embodiments , the mouthpiece 140 includes pushbuttons ( e . g ., an on / off button ) and a patient can manually operate the mouthpiece 140 via the pushbuttons . after a therapy session , the mouthpiece 140 can transmit information about the therapy session to a mobile device . in some embodiments , the mouthpiece 140 does not include a usb controller 380 and instead communicates only via wireless communications with the controller . fig3 c shows a more detailed view of the electrode array 142 . the electrode array 142 can be separated into 9 groups of electrodes , labelled a - i , with each group having 16 electrodes , except group b which has 15 electrodes . each electrode within the group corresponds to one of 16 electrical channels . during operation , the drive circuitry can deliver a sequence of electrical pulses to the electrode array 142 to provide neurostimulation of at least one of the patient &# 39 ; s trigeminal or facial nerve . the electrical pulse amplitude delivered to each group of electrodes can be larger near a posterior portion of the tongue and smaller at an anterior portion of the tongue . for example , the pulse amplitude of electrical signals delivered to groups a - c can be 19 volts or 100 % of a maximum value , the pulse amplitude of electrical signals delivered to groups d - f can be 14 . 25 volts or 75 % of the maximum value , the pulse amplitude of electrical signals delivered to groups g - h can be 11 . 4 volts or 60 % of the maximum value , and the pulse amplitude of electrical signals delivered to group i can be 9 . 025 volts or 47 . 5 % of the maximum value . in some embodiments , the maximum voltage is in the range of 0 to 40 volts . the pulses delivered to the patient by the electrode array 142 can be random or repeating . the location of pulses can be varied across the electrode array 142 such that different electrodes are active at different times , and the duration and / or intensity of pulses may vary from electrode . for oral tissue stimulation , currents of 0 . 5 - 50 ma and voltages of 1 - 40 volts can be used . in some embodiments , transient currents can be larger than 50 ma . the stimulus waveform may have a variety of time - dependent forms , and for cutaneous electrical stimulation , pulse trains and bursts of pulses can be used . where continuously supplied , pulses may be 1 - 500 microseconds long and repeat at rates from 1 - 1000 pulses / second . where supplied in bursts , pulses may be grouped into bursts of 1 - 100 pulses / burst , with a burst rate of 1 - 100 bursts / second . in some embodiments , pulsed waveforms are delivered to the electrode array 142 . fig3 d shows an exemplary sequence of pulses that can be delivered to the electrode array 142 by the drive circuitry 372 . a burst of three pulses , each spaced apart by 5 ms is delivered to each of the 16 channels . the pulses in neighboring channels are offset from one another by 312 . 5 μs . the burst of pulses repeats every 20 ms . the width of each pulse can be varied from 0 . 3 - 60 μs to control an intensity of neurostimulation ( e . g ., a pulse having a width of 0 . 3 μs will cause a smaller amount of neurostimulation than a pulse having a width of 60 μs ). fig4 a shows a method of operation 400 of a controller 120 as described in fig2 a , 2 b and 3 a . a patient attaches a mouthpiece 140 to a controller 120 ( step 404 ). the patient turns on the controller 120 ( step 408 ) using , for example , a power button . the patient places the controller 120 around his / her neck ( step 412 ) as shown in fig1 b . the patient places a mouthpiece 140 in his / her mouth ( step 416 ). the patient initiates a therapy session by pressing a start / stop button ( step 420 ). during the therapy session , the controller 120 delivers electrical signals to the mouthpiece 140 . the patient calibrates the intensity of the electrical signals ( step 424 ). the patient raises the intensity of the electrical signals delivered to the mouthpiece by pressing an intensity - up button until the neurostimulation is above the patient &# 39 ; s sensitivity level . the patient presses an intensity - down button until the neurostimulation is comfortable and non - painful . after the calibration step , the patient performs a prescribed exercise ( step 428 ). the exercise can be cognitive , mental , or physical . in some embodiments , physical exercise includes the patient attempting to maintain a normal posture or gait , the patient moving his / her limbs , or the patient undergoing speech exercises . cognitive exercises can include “ brain training ” exercises , typically computerized , that are designed to require the use of attention span , memory , or reading comprehension . mental exercises can include visualization exercises , meditation , relaxation techniques , and progressive exposure to “ triggers ” for compulsive behaviors . in some embodiments , the patient can rest for a period of time during the therapy session ( e . g . the patient can rest for 2 minutes during a 30 minute therapy session ). after a predetermined period of time ( for example , thirty minutes ) has elapsed , the therapy session ends ( step 432 ) and the controller 120 stops delivering electrical signals to the mouthpiece 140 . in some embodiments , the intensity of electrical signals increases from zero to the last use level selected by the patient over a time duration in the range of 1 - 5 seconds after the patient starts a therapy session by pressing the start / stop button . in some embodiments , the intensity of electrical signals is set to a fraction of the last use level selected by the patient ( e . g . ¾ of the last level selected ) after the patient starts a therapy session by pressing the start / stop button . in some embodiments , the intensity of electrical signals increases from zero to a fraction of the last use level selected by the patient ( e . g . ¾ of the last level selected ) over a time duration in the range of 1 - 5 seconds after the patient starts a therapy session by pressing the start / stop button . in some embodiments , the intensity of electrical signals increases instantaneously from zero to the last use level selected by the patient after the patient starts a therapy session by pressing the start / stop button . in some embodiments , the mouthpiece 140 is connected to the controller 120 after the controller 120 is turned on . in some embodiments , the mouthpiece 140 is connected to the controller 120 after the controller 120 is donned by the patient . in some embodiments , the patient calibrates the intensity of the electrical signals before initiating a therapy session . in some embodiments , a patient performs an initial calibration of the intensity of electrical signals in the presence of a clinician and does not calibrate the intensity of the electrical signals during subsequent treatments performed in the absence of a clinician . fig4 b shows a method of operation 449 of the non - invasive neurostimulation system 100 described in fig2 c and 3b . a patient activates a mobile device 121 ( step 450 ). the patient places a mouthpiece 140 in his / her mouth ( step 454 ). the patient initiates a therapy session by pressing a start / stop button within an application running on the mobile device 121 ( step 458 ). during the therapy session , circuitry within the mouthpiece 140 delivers electrical signals to an electrode array 142 located on the mouthpiece 140 . the patient calibrates the intensity of the electrical signals ( step 462 ). the patient first raises the intensity of the electrical signals delivered to the mouthpiece 140 by pressing an intensity - up button located within an application running on the mobile device 121 until the neurostimulation is above the patient &# 39 ; s sensitivity level . the patient presses an intensity - down button running within an application on the mobile device 121 until the neurostimulation is comfortable and non - painful . after the calibration step , the patient performs a prescribed exercise ( step 464 ). the exercise can be cognitive , mental , or physical . in some embodiments , the patient can rest for a period of time during the therapy session ( e . g . the patient can rest for 5 minutes during a 30 minute therapy session ). after a predetermined period of time ( for example , thirty minutes ) has elapsed , the therapy session ends ( step 468 ) and the circuitry located within the mouthpiece 140 stops delivering electrical signals to the electrode array 142 . in some embodiments , the calibration of the intensity of the electrical signals takes place before the patient initiates a therapy session . fig5 a shows a neurostimulation system 500 and fig5 b shows a back view of a controller 520 . the neurostimulation system 500 includes a controller 520 and a mouthpiece 540 connected via a cable 544 . the mouthpiece 540 includes an electrode array on a bottom portion thereof . the controller 520 includes an anterior portion 560 and a posterior portion 564 . the controller 520 also includes a mouthpiece port 516 , an intensity - up button 508 , an intensity - down button 512 , a power button 521 , an info button 524 , a start / stop button 504 and a display 528 . the mouthpiece 540 is in electrical communication with the controller 520 via the cable 544 . in some embodiments , the power button 521 includes a light emitting diode ( led ) indicator . in some embodiments , the port 516 is located on the mouthpiece 540 instead of the controller 520 and the cable 544 is permanently attached to the controller 520 . in some embodiments the port is a universal serial bus ( usb ) port and / or a charging port . fig5 c describes a method 200 of operating the neurostimulation system 500 shown in fig5 a and 5b . a patient activates the neurostimulation system 500 by pressing a power button 521 ( step 208 ). after activation , the neurostimulation system 500 enters an idle state ( step 212 ). while in the idle state , non - invasive neurostimulation is not delivered to the patient . if the neurostimulation system 500 remains in the idle state for a predetermined time period , the neurostimulation system 500 can shut down or enter a power - saving state ( e . g ., after idling for 10 minutes ). additionally , if the power button 521 is pressed while in the idle state , the neurostimulation system 500 shuts down . if the patient presses a start button ( step 224 ), an ninm therapy session begins and non - invasive neurostimulation generated by the controller 520 is delivered to the patient &# 39 ; s oral cavity via the mouthpiece 540 for a predetermined period of time . in some embodiments , the neurostimulation system 500 enters an intensity adjustment state when the patient presses a start button ( step 224 ). the patient then raises the intensity of the electrical signals delivered to the mouthpiece by pressing the intensity - up button 508 until the neurostimulation is above the patient &# 39 ; s sensitivity level . the patient presses the intensity - down button 512 until the neurostimulation is comfortable and non - painful . after the intensity adjustment is completed , the patient presses the start button again to begin an ninm therapy session . in one embodiment , the predetermined period of time can be in the user - selectable range of 20 - 30 minutes . additionally , the patient performs a physical , cognitive , or mental exercise during the ninm therapy session . the physical , cognitive , or mental exercise is performed simultaneously with the delivery of electrical signals from the controller 520 to the mouthpiece 540 . if the patient presses a pause button ( step 232 ) while neurostimulation is being delivered , the therapy session is paused ( step 233 ) and the neurostimulation system 500 ceases to deliver non - invasive neurostimulation to the patient &# 39 ; s oral cavity . in some embodiments , if the neurostimulation system 500 loses contact with the patient &# 39 ; s oral cavity ( e . g . determined by tongue sensing circuitry ), the therapy session is paused . if the patient presses unpause ( step 234 ), the treatment is resumed and non - invasive neurostimulation is again delivered to the patient &# 39 ; s intraoral cavity . if the patient presses the stop button while the neurostimulation system 500 is paused , or if there is no patient input for more than a predetermined time , for example , two minutes ( step 235 ) after the patient has pressed the pause button , the neurostimulation system 500 enters an idle state ( step 212 ) and a “ treatment ended due to pause timeout ” message is presented by the display 528 . if the patient presses the stop button ( step 240 ) while neurostimulation is being delivered , the neurostimulation system 500 enters an idle state ( step 212 ) and a “ treatment ended due to session stop ” message is presented by the display 528 . alternatively , if the neurostimulation system 500 delivers neurostimulation to the patient for the full predetermined period of time at step 240 , the system enters an idle state at step 212 and a “ full session completed ” message is presented by the display 528 . while the system is in the idle state at step 212 , a number of conditions can prevent the patient from initiating a therapy session . for example , if there is not enough charge remaining in the battery to complete at least one ninm therapy session , the controller 520 can block the patient from initiating the therapy session and a “ low battery ” message will be presented on the display 528 . in some embodiments , the controller can emit an audible sound to alert the patient that there is not enough charge remaining in the battery to complete at least one ninm therapy session . additionally , if the mouthpiece 540 is not attached to the controller 520 , the controller 520 can block the patient from initiating a therapy session and a “ no mouthpiece ” message is presented on the display 528 . in some embodiments , the neurostimulation system 500 delivers neurostimulation for a limited number of hours per day . for example , the neurostimulation system 500 can be configured to stop delivering neurostimulation after 200 minutes of use in a single day . in the idle state at step 212 , if the daily limit has been exceeded , the controller 520 can block the patient from initiating a therapy session and a “ daily limit reached ” message is presented by the display 528 . the patient can begin treatment the next day ( i . e ., after midnight ), when the daily limit is reset . in some embodiments , the neurostimulation system 500 delivers neurostimulation for a limited number of weeks . in the idle state at step 212 , if the calendar limit has been exceeded , the controller 520 can block the patient from initiating a therapy session and a “ calendar limit reached ” message is presented by the display 528 . for example , the neurostimulation system 500 can be configured to stop delivering neurostimulation 1 - 14 weeks after the patient receives the neurostimulation system 500 from a physician . to re - enable the neurostimulation system 500 after the calendar limit has been exceeded , the patient is required to visit a physician or a clinician . in some embodiments , a “ calendar limit approaching ” message is presented by the display 528 , warning the patient that the calendar limit will be reached soon ( e . g . in two weeks ). the “ calendar limit approaching ” message can be beneficial to patients by allowing them to schedule appointments with their clinicians prior to the calendar limit being reached . in some embodiments , the mouthpiece 540 can become damaged over time and require replacement . for example , the patient &# 39 ; s bites down on the mouthpiece 540 during each therapy session , slowly causing the surface of the mouthpiece to be damaged . this damage can cause the mouthpiece 540 to malfunction . the average time to failure can be statistically determined by testing a number of mouthpieces 540 over a number of therapy sessions and examining the mouthpieces for damage at the end of each therapy session . the average time to failure , once determined , can be programmed into the controller 520 . during the idle state at step 212 , if the average time to failure has been reached , the controller 520 can block the patient from initiating a therapy session and a “ mouthpiece expired ” message is presented by the display 528 . in some embodiments , a message is presented by the display 528 , warning the patient that the mouthpiece is set to expire soon . for example , the message presented by the display 528 can be “ mouthpiece expires in 14 days .” in some embodiments , the display 528 can present an “ authentication error ” message if a mouthpiece 540 cannot be authenticated , for example as described in fig9 a and 9b . in some embodiments , the neurostimulation system 500 tracks an activity level of a patient . for example , the neurostimulation system 500 can include an accelerometer that detects an activity level of the patient ( e . g ., at rest , walking , or running ). in some embodiments , the activity level can be recorded and stored on an external computer for analysis . for example , the recorded activity level data can be analyzed by a physician to determine an effectiveness of a prescribed treatment plan . in some embodiments , the neurostimulation system 500 sets an intensity level to 75 % of the last used intensity level when the treatment begins at step 228 . in some embodiments , data including time stamps , intensity levels , data received from the accelerometer , and data received from the tongue sense circuitry can be recorded and stored on an external computer or mobile device for analysis . in some embodiments , the port 516 can facilitate charging of the neurostimulation system 500 . for example , when the port 516 is connected to a charging source , the neurostimulation system 500 enters a charging state . in the charging state , a “ charging ” message is presented by the display 528 . additionally , in the charging state , an led can indicate a remaining battery charge . for example , the led can emit flashing red light if there is not sufficient battery charge for at least one ninm therapy session . if there is sufficient battery charge remaining to complete at least one ninm therapy session , the led can emit flashing green . when the battery charging is complete , the led can emit a solid green light ( e . g . a non - flashing green light ). while the neurostimulation system 500 is in the charging state , the patient cannot begin an ninm therapy session . when the port is disconnected in the charging state , the neurostimulation system 500 enters an idle state ( step 212 ). in some embodiments , an led included with the power button 521 can indicate a remaining battery charge . for example , the led can emit green light if there is sufficient battery charge remaining to complete two or more ninm therapy sessions . if there is sufficient battery charge remaining to complete one ninm therapy session , the led can emit yellow light . if there is not enough charge remaining for one ninm therapy session , the led can emit red light . in some embodiments , the controller 520 includes leds for providing visual indication , an audio indicator , or a vibratory indicator that can provide indications to the patient . for example , the leds , the audio indicator , and the vibratory indicator can provide an indication to the patient if electrical neurostimulation is being delivered to the mouthpiece 540 , if electrical neurostimulation delivery to the mouthpiece 540 has been disabled or cancelled , or if the ninm therapy session has ended . the indications can include a solid or flashing light emitted by the leds or a predetermined sound such as a ring , buzz , or chirp emitted by the audio indicator . the vibratory indicator can provide tactile feedback or other vibratory feedback to the patient . in some embodiments , the audio and / or vibratory indicator includes a piezoelectric element or a magnetic buzzer that vibrates and provides a mechanical indication to the patient . in some embodiments , the leds and / or the audio indicator provide an indication when an ninm therapy session is 50 % complete . in some embodiments , the leds and / or the audio indicator provide an indication when any button on the controller 520 is pressed by the patient . in some embodiments , the leds and / or the audio indicator provide an indication of the intensity level of the electrical neurostimulation . in some embodiments , the leds and / or the audio indicator provide an indication of the remaining ninm therapy session time . in some embodiments , the leds and / or the audio indicator provide an indication of the remaining stimulation minutes for the current day ( e . g ., before a daily limit is reached ). in some embodiments , the leds and / or the audio indicator provide an indication of the remaining stimulation minutes for the current calendar period ( e . g ., before a calendar limit is reached ). in some embodiments , pressing a start / stop / pause button while neurostimulation is being delivered pauses the therapy session ( step 233 ) and the neurostimulation system 500 ceases to deliver non - invasive neurostimulation to the patient &# 39 ; s oral cavity . fig6 a and 6b show a non - invasive neurostimulation system 600 . the non - invasive neurostimulation system 600 includes headband 618 , a controller 620 , pushbuttons 622 , a display 628 , a mouthpiece 640 , an electrode array 642 , and a cable 624 . the controller 620 is in electrical communication with the mouthpiece 640 and the electrode array 642 via the cable 624 . during operation , a patient rests the headband 618 along his / her ears and inserts the mouthpiece 640 into his / her mouth . operation of the non - invasive neurostimulation system 600 is similar to that described above in reference to fig5 a and 5b where similarly referenced elements have the same functionality ( e . g . controller 620 has the same functionality as controller 520 etc .). in some embodiments , the headband 618 maintains an orientation of the mouthpiece 640 within the patient &# 39 ; s mouth during an ninm therapy session . in some embodiments , the headband 618 maintains the position of the mouthpiece 640 within the patient &# 39 ; s mouth , even if the patient is in a horizontal orientation or is upside - down . fig7 a and 7b show a non - invasive neurostimulation system 700 . the non - invasive neurostimulation system 700 includes headband 718 , a controller 720 , an intensity setting wheel 722 , a mouthpiece 740 , an electrode array 742 , and a cable 724 . the controller 720 is in electrical communication with the mouthpiece 740 and the electrode array 742 via the cable 724 . during operation , a patient rests the headband 718 along an upper circumference of his / her head and inserts the mouthpiece 740 into his / her mouth . the patient can increase the intensity of the electrical signals delivered to the mouthpiece 740 by rotating the intensity setting wheel in a clockwise direction . the patient can decrease the intensity of the electrical signals delivered to the mouthpiece 740 by rotating the intensity setting wheel in a counterclockwise direction . operation of the non - invasive neurostimulation system 700 is otherwise similar to that described above in reference to fig5 a and 5b where similarly referenced elements have the same functionality ( e . g . controller 720 has the same functionality as controller 520 etc .). in some embodiments , the headband 718 is configured to allow the patient to wear his / her glasses during an ninm therapy session . fig8 a and 8b show a non - invasive neurostimulation system 800 . the non - invasive neurostimulation system 800 includes a controller 820 , a mouthpiece 840 , pushbuttons 822 , display screen 828 , and indicator light 832 . the controller 820 and the mouthpiece 840 are integrated into a monolithic package . the controller 820 is in electrical communication with the mouthpiece 840 and the electrode array 842 . during operation , a patient inserts the mouthpiece 840 into his / her mouth and the rigidly attached controller 820 rests just outside of the patient &# 39 ; s mouth . operation of the non - invasive neurostimulation system 800 is otherwise similar to that described above in reference to fig5 a and 5b where similarly referenced elements have the same functionality ( e . g . controller 820 has the same functionality as controller 520 etc .). in some embodiments , the controller 820 is in mechanical contact with the patient &# 39 ; s chin and is configured to mechanically secure the mouthpiece 840 during an ninm therapy session . in some embodiments , a display screen 828 is not included with non - invasive neurostimulation system 800 . in some embodiments , a display screen 828 is replaced with an auditory indicator that provides auditory messages to the patient . in some embodiments , the controller 820 and the mouthpiece 840 are each monolithic and connected at a connection point between the mouthpiece 840 and the controller 820 . in some embodiments , the mouthpiece 840 is removably attached to the controller 820 and can be replaced at predetermined usage intervals or upon wearing out . fig9 a shows a method of operation 900 of the non - invasive neurostimulation device illustrated in fig5 - 8 . initially a patient connects a mouthpiece to a controller or mobile device ( step 904 ). the connection can be a wired or wireless connection . a processor within the controller or mobile device generates a numeric sequence and transmits the generated sequence to the mouthpiece ( step 908 ). the numeric sequence generated at step 908 can be a sequence of random values , produced by a software pseudorandom number generator , or by a hardware random number generator . based on the received numeric sequence and a secret key shared between the mouthpiece and the controller , a processor located within the mouthpiece generates a first hash code ( step 912 ). the first hash code can be generated using an hmac ( keyed - hash message authentication code ) algorithm . in some embodiments , the first hash code is generated in accordance with an sha - 256 algorithm . the mouthpiece then transmits the first hashcode to the controller ( step 916 ). a processor located within the controller generates a second hash code based on the shared secret key and the numeric sequence ( step 920 ) and then compares the first hash code with the second hash code ( step 924 ). the numeric sequence generated at step 920 can be a sequence of random values , produced by a software pseudorandom number generator , or by a hardware random number generator . in some embodiments , the second hash code is generated in accordance with an sha - 256 algorithm . if the first hash code matches the second hash code , then electrical communications are enabled between the controller and the mouthpiece ( step 928 ). the patient then inserts the mouthpiece into his / her mouth bringing the mouthpiece into contact with the patient &# 39 ; s intraoral cavity ( step 932 ). electrical neurostimulation signals can then be delivered by the controller via the mouthpiece to the patient &# 39 ; s intraoral cavity ( step 936 ). fig9 b shows another method of operation 939 of the non - invasive neurostimulation device as shown in fig5 - 8 in accordance with an embodiment of the invention . initially , a patient connects a mouthpiece to a controller or mobile device ( step 940 ). the connection can be a wired or wireless connection . at the time of manufacture , a first hash code is generated based on a unique serial number and a secret key shared between the mouthpiece and the controller ( step 944 ). the first hash code can be generated by an hmac ( keyed - hash message authentication code ) algorithm . in some embodiments , the first hash code is generated in accordance with an sha - 256 algorithm . the first hash code and the unique serial number are stored in memory within the mouthpiece . the mouthpiece then transmits the first hash code and the unique serial number to the controller ( step 948 ). the controller generates a second hash code based on the received unique serial number and the shared secret key ( step 952 ). the second hash code can be generated by an hmac ( keyed - hash message authentication code ) algorithm . in some embodiments , the second hash code is generated in accordance with an sha - 256 algorithm . the controller then compares the second hash code and the first hash code . the controller only permits continued electrical communications with the mouthpiece if the second hash code and the first hash code match ( step 956 ). the patient then inserts the mouthpiece into his / her mouth bringing the mouthpiece into contact with the patient &# 39 ; s intraoral cavity ( step 960 ). electrical neurostimulation signals can then be delivered by the controller via the mouthpiece to the patient &# 39 ; s intraoral cavity ( step 964 ). the terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting of the inventive concepts . it will be understood that , although the terms first , second , third etc . are used herein to describe various elements , components , regions , layers and / or sections , these elements , components , regions , layers and / or sections should not be limited by these terms . these terms are only used to distinguish one element , component , region , layer or section from another element , component , region , layer or section . thus , a first element , component , region , layer or section discussed below could be termed a second element , component , region , layer or section without departing from the teachings of the present application . while the present inventive concepts have been particularly shown and described above with reference to exemplary embodiments thereof , it will be understood by those of ordinary skill in the art , that various changes in form and detail can be made without departing from the spirit and scope of the present inventive concepts described and defined by the following claims .
a system for providing non - invasive neuromodulation to a patient includes a mouthpiece and a controller . the mouthpiece includes an elongated housing , a printed circuit board , control circuitry mounted within the elongated housing , and a cable for connecting to a controller . the controller includes an elongated u - shaped element , an electronic receptacle , and a microcontroller . a method for providing non - invasive neurorehabilitation of a patient including connecting a mouthpiece to a controller , transmitting a numeric sequence to the mouthpiece , generating a first hash code , transmitting the first hash code to the controller , generating a second hash code , comparing the second hash code with the first hash code , enabling electrical communication between the mouthpiece and the controller only if the first hash code matches the second hash code , contacting the mouthpiece with the patient &# 39 ; s intraoral cavity , and delivering neurostimulation to the patient &# 39 ; s intraoral cavity .