Home

Gergely Andor Maksay Wireless surface stimulator

image

Contents

1. RS232 RS232 MSP430 CC1000 connector Line driver microcontroller Wireless transceiver i button LED Antenna Figure 22 Block diagram of RS232 Wireless interfacing board About the microcontroller the wireless transceiver and the development tool please refer to Section 5 1 1 Power supply and current consumption The size of the interface board was not a critical factor This allowed me to use two bulky AA batteries which are situated on the back side of the PCB The limitations on CPU frequencies still apply see Section 5 1 1 the master clock is sourced from the 8 MHz DCO 36 5 2 2 Software description About the development tool and source files please refer to Section 5 1 2 The main program is now called main tx c Main function The program flow of the main function can be seen in Figure 23 I applied the very same software coding principles which were emphasized in section 5 1 2 The MSP430 initialises the clock the I O ports the peripherals Timer A0 for polling the button and the Universal Serial Communication Interface for receiving incoming serial data and the CC1000 wireless transceiver which is immediately set to power down mode The endless loop keeps the microcon troller in low power mode until an interrupt wakes it up Again the interrupt service routines use flags to communicate with the main loop where most in terrupt handling takes place Disable wa
2. Figure 14 Synchronous Manchester encoding 21 with permission of TI Return To Zero NRZ datastream into Manchester code before modulation which ensures that there will be at least one signal transition during each bit period and keeps the datastream DC balanced 21 Keeping the signal DC balanced helps to find the correct threshold value for the data slicer in the demodulator This threshold value is presented by an averaging filter which was set to be free running in the properly DC bal anced Manchester encoded datastream Nevertheless every data packet should start with at least four bytes of alternating 1s and Os otherwise the sensitivity for a given bit error rate BER would be greatly reduced The application s data rate center frequency frequency separation and preamble length together predict the sensitivity of the receiver which is 104 7 dBm for BER 10 The CC1000 has half duplex communication capability but in this project only simplex communication was required by the unidirectional data flow from the PC to the stimulator This could keep the embedded software simpler and it allowed for a more efficient power management see section 5 1 2 The data rate was set to be 9600 bit s but it could be amended to 38 4 kbit s or even 76 8 kbit s if we turned off Manchester encoding which uses twice as much bandwidth as NRZ In this application this was also unnecessary as very small amount of data is to be transmitted but
3. Like RehaStim the designed stimulator is meant to perform neuromuscular surface stimulation of the various muscles in the lower extremities which are involved in cycling movement The stimulation output is a series of constant current regulated pulses whose parameters are flexibly adjustable It was my intention to investigate how close the performance of a professional stimulator module can be approached with a simple low cost design Therefore I aimed to achieve the specified technical details of RehaStim shown in Table 1 minimum maximum current 0 126 mA pulse width 201 5 500 us frequency 1 Hz 140 Hz pulse form any number of channels 8 Table 1 Technical details of RehaStim stimulator Wireless interfacing with a PC was also implemented and a user friendly graphical user interface was created for the configuration of the basic stimulation parameters Section 2 will give an introduction to electrical muscle stimulation and the underlying biological basis with special emphasis on functional electrical stim ulation Sections 3 and 4 will describe the two most challenging design tasks in this project the high voltage generation and the wireless communication Sec tion 5 will provide the detailed hardware and software description of my design and Section 6 will analyse its achieved performance Section 7 is a User s Guide of the complete stimulation system with detailed description how the device
4. it was not implemented but it can be used for simulation purposes Figure 9a shows my Spice simulation as the circuit in Figure 6 reaches its steady state and Figure 9b shows the typical waveform of a single pulse in steady state The decline of the pulse top is an inevitable result of the capacitor s discharge process 15 Yloutput a Transient response of output stage VG 3V L 500 LH C 0 1 uF Rskin 5kOhm fs 10 kHz D 20 Tp 50us Ts 15ms biphasic pulses Blue current delivered through patient Green output voltage Vloutput t i T T t T T t T t 149 66ms 149 73ms 149 80ms 149 87ms 149 94ms 150 01ms 150 08ms 150 15ms 150 22ms 150 29ms 150 36ms 150 43ms b Closeup on a single pulse Vg 3V L 500 LH C 0 1 uF Rskin 5kOhm f 10 kHz D 20 Tp 50us Ts 15 ms Blue current delivered through patient Green output voltage Figure 9 Spice simulation of output stage 16 3 3 Selection of circuit components The discussion above assumed that all circuit elements are ideal which is not the case in practice Keeping the price of the final device down requires some sacrifices when it comes to selecting the right parts The following discussion examines what key component characteristics needed extra attention during this design step 13 e Switching frequency High switching frequencies must be generally avoided as switching losses drasti cally reduce the efficiency of the power conversion
5. should be operated 2 Neuromuscular stimulation A long time elapsed since Luigi Galvani first discovered that frog muscles twitch by the application of electrical current Today electrotherapy became a stan dard practice in medicine It is used to cure neurological diseases facilitate wound ailment recover muscle functions after spinal cord injury just to name a few This section will discuss the basic concepts of electrical stimulation with a brief introduction to the biology of nerve and muscle cells which is utterly necessary to understand the further discussion in this section After then func tional electrical stimulation the intended application field of the subject device will be introduced and the most important specifications of a common stimu lator will be examined Most of the presented information was gathered from 3 4 5 unless otherwise noted 2 1 Nerve and muscle cells Cells contain lower concentration of positive cations than the surrounding ex tracellular fluid which causes a potential difference between the two sides of the cell membrane The electronegative voltage of cells is called resting potential and it is sustained by active biochemical and electrostatical processes It is pos sible to reverse this voltage in nerve cells neurons and muscle cells muscle fibres by depolarising the cell membrane with sufficiently intense electric field current of sufficient duration The excitation of the cell m
6. D 20 It can be observed that voltage doesn t rise linearly due to the diminishing t7 o Figure 8 Spice simulations of rising output voltage if boost converter s load is removed 14 AV Voie uS 28 Where Tp is the pulse duration and Uo is the capacitor s output voltage before the pulse The stimulator s output stage in Figure 6 will find its steady state of oper ation if the net change in capacitor voltage between pulses is zero capacitor charge balance 13 thus the gained voltage between pulses equals the lost voltage during a pulse expressed in equation 28 If N switching cycles occur between two stimulation pulses N can be ex presses as 29 As a reminder Tp is pulse duration Tpulse is the time interval between two pulses T is the switching period of the boost converter The total inter pulse voltage gained can be calculated recursively using equa tion 25 272 Va Voi V s Vo 4 Vo1Va 22 O2 2 2 V2T2 7 Va Voz V o Vo2 4 Vo2Ve FE O3 2 2 V2T2 Ve Vo n 1 Ve Von 1 m 4 Vo w 1 Va i G ON 2 Using equation 28 steady state is achieved if Tp Von Voi VoneFe The above described method is an accurate way to determine output volt age of Figure 6 but it would be very demanding task for a microcontroller It requires lots of processing power and memory because of the recursive calcu lations Therefore
7. This technique called transcutaneous stimulation has the disadvantage that the skin electrode interface significantly heightens the impedance of the total system to be stimulated Furthermore a trained therapist is needed to accurately apply the electrode to the intended area In order to achieve maximal contraction force one electrode called active electrode typically the anode must be placed over the motor points where the largest concentration of motor units is situated The other electrode return electrode is typically placed on the muscle belly 3 Transcutaneuos stimulation might also be hurtful for pa tients as pain receptors are also stimulated Alternative to surface electrodes are the invasive percutaneous and implanted electrodes about which please refer to 5 There are many aspects of characterising neuromuscular stimulators They can be portable or line powered high voltage or low voltage their output can be constant voltage or constant current regulated but maybe their most important feature is the waveform they produce There is still active research to find the optimal waveform of the applied current In order to stimulate denervated muscle usually long 100 ms galvanic interrupted DC pulses are used Other applications use high frequency interferential or tone burst AC pulses Neuromuscular stimulation and in particular functional electrical stimula tion rather uses a low frequency lt 100 Hz far
8. and allows independent control for all stimulator boards in use The addresses can be static with the modification of the embedded software in each stimulator device or they can be dynamically distributed from the PC The latter solution would require the implementation of half duplex communication which could be easily done based of the currently running code The implementation of half duplex communication can offer further advan tages in future versions A more reliable wireless communication could be es tablished by handshaking the stimulator could send an acknowledge packet to notify the PC of the successful reception of a packet The packet could also contain an 8 bit checksum or CRC cyclic redundancy check which could ver ify the data integrity If needed request for retransmission could be sent to the PC In the current design monophasic or biphasic pulses can be produced with given frequency pulse width and current amplitude The flexibility of the pulse waveforms could be greatly enhanced if the PWM determining the pulse widths would be generated by the ISR of the Timer in continuous mode Although this requires additional processing and thus increased current consumption bursts of pulses could be produced with entirely arbitrary waveform only current amplitude would be fixed A buffer could contain the parameters of the pulses in blocks of 2 bytes one byte determining the pulse width and the next byte the space until th
9. are waiting to be sent This is assumed to be very infrequent thus power down mode current consumption profile was adapted current consumption MSP430 71 mA CC1000 70 2 pA in PD mode MAX3232 1 mA LED 5096 duty cycle 2 3 mA Table 7 Estimated power consumption of the stimulator This time the measured current consumption was unexpectedly high 7 6 mA while stimulating with the button LED flashes and 6 3 mA otherwise Even this gives about 400 hours of lifetime using typical AA batteries Stimulation The stimulator s stimulation capabilities were tested with a load of 1 kOhm As it was discussed in section 2 4 this is a typical value for well prepared skin surfaces The current amplitude was tested in the range of 5 100 mA The accuracy of the output current was found to be dependent on other stimulation parameters but generally higher current values could be more precisely set by the digital controller This is probably due to the fact that the microcontroller has no floating point unit and it handles fractions with difficulty expressed in high computational power therefore all calculation results were rounded to the nearest integers The accumulated error was more explicit while handling lower numbers this phenomenon affects the accuracy of all stimulation parameters It must also be mentioned that depending on pulse width the maximal current value of the decaying pulse top was som
10. down to an inter mediate frequency IF of 150 kHz The local oscillator signal of the mixer is generated by the frequency synthetiser The IF signal is then amplified and the unwanted frequency components are removed by an internal IF filter after which the demodulator recovers the digital data stream on the DIO line Data decision and synchronisation are also provided on chip the falling edge clock signal on DCLK will indicate valid data on DIO This can ease the workload of the microcontroller considerably since it can trigger external interrupts on signal transitions of DCLK In order to synchronise data precisely the CC1000 encodes the incoming Non 22 AY Texas INSTRUMENTS IS MI TXData 0 TXDataz1 f 433 05 MHz F 434 092 MHz 434 79 MHz i 4 b vco F 32kHz F_ 32 kHz AH B 83 2 kHz 888 ISM band Figure 13 Transmitted power spectrum of the FSK modulated system rough estimation 23 Transmitter side DIO Data provided by microcontroller NRZ DCLK Clock provided by CC1000 RF FSK modulating signal Manchester encoded internal in CC1000 Receiver side RF Demodulated signal Manchester encoded internal in CC1000 DCLK Clock provided by CC1000 DIO a Data provided by CC1000 NRZ ay TEXAS INSTRUMENTS
11. handling are fairly long and no interrupt nesting is supported As a result some interrupts may never be served TI recommends to handle all interrupts in the main loop the ISR should set a flag according to what action needs to be taken and only execute code which is urgent 24 The flowchart of the main function in Figure 18 demonstrates this concept 29 Disable watchdog timer Set Cpucbat 8 Mrz nfisise VO ports nmialbe and reset CC1000 Pogam registers of CC except MAIN Calbate VCO and PLL In CC1000 Enable extemalintemupts forCC1000 nkiallse stimulation parameters Cabulate values for timer egisters ntiallse ADC on LED intialisation completed StanWDT Wak for WOT to expire Clear Timer flag Execute Tmer nandier re Clear WDT Nagle Execute WOT nandier No o Ext mt flag set Ckarext nt fiag e Execute ext int mandier No Yes DLE SatewiDLE Prepare tor finding Presmbe anc UIF No RX State RX Prepae for ncoming data 30 to Low Power model Figure 18 Main function of wireless stimulation software The boost converter and Timer A1 The PWM for the switching transistor of the boost converter was generated with one of the MSP430 microcontroller s general purpose 16 bit timers Timer A1 It s Timer Counter register TAR was configured to increment from 0 up to the value in the first channel of capture compare registers TACCRO then jump back to zero
12. o 1 VaTon I Ton t Ip An L tr 0 ox 1 VaTon QT L Va Ton tee 8 To Because V changes in each cycle the current consumption of the circuit will change as well see Figure 9a It will peak before the pulse is delivered and the lowest amount of current will be required when the circuit is switched on 3 5 Closed loop control As mentioned at the end of chapter 3 2 no simple explicit equation was found for the output voltage of the stimulator device Even if this wouldn t be an issue the skin and tissue resistance of the patient under therapy varies in broad range For these reasons the presented device would not yet be capable to deliver current pulses with given amplitudes As a solution closed loop control Figure 10 will be introduced to regulate the output voltage of the boost converter Current through the skin will be measured across a resistor and fed back to the analog digital converter ADC of the microcontroller MCU The MCU will calculate the error signal apply the controller transfer function and generate a PWM signal to drive the switching transistor of the boost regulator as it was discussed in section 3 2 the output voltage increases as the duty cycle of the PWM is increased Since current will only flow through the resistor during pulses the sampling and updating of the PWM can only take place at the rate 18 desired current amplitude error PWM Controll
13. 0 The differential equation describing the relationship between inductor cur rent and voltage states dlr L 11 Vr dt 11 10 Integration over time and equation 9 shows that while T1 is on current in the inductor increases linearly 13 1 Vet I gt t 12 L z fva 12 where J is the current flowing in the inductor at the beginning of the switch ing cycle Because of the transient discontinuous mode of operation J 0 the induc tor transfers all of its energy to the capacitor in each cycle As soon as I drops to 0 D diode becomes reverse biased and stops conducting which avoids any further decline of I see Figure 7 The maximal current in the inductor is VeTon IL maz E 13 where D focos 14 fs When T1 is turned off Figure 5 Rjoad oo Vr Va Va 15 ig lr 16 Using equation 11 equation 13 and the fact that after T1 closes the initial inductor current is I Ir max 1 Ve Vo t Ir Io 4 Vrdt IL man 7 17 L T I L L 17 This is a linearly decreasing function as V gt Ve If tr o is the time after which I drops to 0 VeTon Va V t o 1 T L 0 18 Solving this equation yields VeTon ipo L 19 m zy 19 The waveforms of I and Vj are shown in Figure 7 11 Figure 7 Inductor current and voltage in a boost regulator no load Let s calculate the output voltage of the boost regulator Accordi
14. 2 SMD ceramic capacitor 5 6 pF C31 SMD ceramic capacitor 15 pF L inductor 220 mA 2 2 mH L41 SMD inductor 6 2 nH L101 SMD inductor high Q 33 nH L32 SMD inductor 68 nH T1 npn transistor T2 npn transistor T3 npn transistor T4 pnp transistor T5 pnp transistor T6 pnp transistor TT pnp transistor Csense ceramic capacitor 4T nF Q1 SMD crystal 14 7456 MHz R131 SMD resistor 82 kOhm R1 SMD resistor 33 kOhm R2 SMD resistor 33 kOhm R3 SMD resistor 33 kOhm R4 SMD resistor 33 kOhm R5 SMD resistor 510 Ohm R6 SMD resistor 1 kOhm R7 SMD resistor 1 kOhm R8 SMD resistor 510 Ohm Rsense SMD resistor 0 1 20 Ohm LED1 LED red D1 SMD diode 1A D2 SMD diode 1A uC MSP430F 2122 CC1000 CC1000 54 Wireless RS232 Interface board schematic RF_TRANSMITTER 55 Layout of Wireless RS232 Interface board Top Wireless RS323 Interface Board Bill of Materials reference description value C1 electrolytic capacitor 10 uF C2 ceramic capacitor 0 1 uF C3 SMD ceramic capacitor 0 1 pF C4 SMD ceramic capacitor 0 1 uF C5 SMD ceramic capacitor 0 1 pF C6 SMD ceramic capacitor 0 1 pF C9 SMD ceramic capacitor 0 1 pF C_Cl SMD tantalite capacitor 3 3 uF C C6 SMD ceramic capacitor 33 nF C CIO SMD ceramic capacitor 12 pF C CI1 SMD ceramic capacitor 220 pF C C12
15. 5 1 19 4 Wireless communication One of the most distinctive features of the surface stimulator in this project was that it must be controlled over a wireless communication channel from a PC There were several ICs as candidates for this task but finally Chipcon AS s subsidiary of Texas Instruments CC1000 transceiver chip was selected 4 1 CC1000 The following discussion will describe the relevant features of the chosen wireless transceiver based on 21 22 and 25 The layout of the wireless chip and its external components was made based on 23 it can be found in the Appendix The CC1000 features extremely low power consumption compared to its al ternatives due to Chipcons s 350 nm CMOS SmartRF technology Combined with the ultra low power MSP430 microcontroller to be discussed later it can provide extended battery lifetime which was crucial in my application Further more contrary to TI s newest sub 1 GHz CC1101 chip the CC1000 is available in a 28 pin Thin Shrink Small Outline Package TSSOP which can be soldered manually The CC1000 can transmit data in the ultra high frequency UHF radio band from 300 MHz to 1 GHz In Europe the 433 MHz and the 868 MHz ISM In dustrial Scientific and Medical bands are available for customer specific radio transmission without a licence 14 from which the 433 MHz band was selected as it allows extended working range and reduced power consumption see Ta ble 2 It
16. C1000 chip are far beyound the current implemen tation of the device It could be further exploited for various research projects For instance biosignals EMG EEG ENG could be acquired and transmitted to the PC wirelessly which could be processed as feedback to closed loop con trolled neuroprostheses This is one of the emerging technologies which might promise a breakthrough in the rehabilitation of paraplegics 5 50 9 Conclusion A transcutaneous neuromuscular stimulation system has been designed and im plemented The stimulator device can generate high voltage constant current regulated faradic stimulation pulses with flexibly adjustable current amplitude 0 100 mA pulse width 40 500 us and pulse repetition frequency 25 300 Hz These parameters can be configured remotely from a personal computer over a wireless link The entire system is operational including the stimulator board responsible for generating the high voltage pulses an interface board which di rects the commands from the PC to the stimulator over a radio frequency link and the Matlab software which interacts with the operator through a graphical user interface Even though the quality of produced waveform is inferior to professional commercial solutions like RehaStim decaying pulse top only one channel less flexible pulse waveform etc the wireless connectivity cheaper cost smaller size lighter weight and prolonged lifetime from battery make the
17. Hz PW 200us Tek M Pos 0 0005 Anm MEASURE MATH Pk Pk 150 MATH Min 400V MATH Max 176 MATH Freq 39 4042 MATH Period 10 06ms CHI Z 147V 39 4570Hz Trig d M 5 00ms MATH 1004 f High load high voltage monophasic pulses Rjoad 5kOhm 1 35 mA f 100 Hz PWpos 100us Figure 27 Oscilloscope measurements of stimulator output pulses 44 Working range The device could be safely controlled from distances up to 15 m although only limited tests were made Moving away any further might result in packet loss and the unreliable control of stimulation The working range could be easily extended by request if the output power of the CC1000 would be set to 10 dBm It must also be noted that the measurement was carried out indoors where the device will most likely be operated Possibly a better performance could be achieved outdoors due to mitigation of multipath fading 25 Board size The dimensions of the stimulator PCB are 5 7 x 4 3 x 2 cm It should fit comfortably on the stimulation body surfaces of interest For multichannel stimulation of various muscle groups at the same time several stimulator boards could be used Section 8 will provide more details about this idea Patient safety The stimulator is absolutely safe and can cause no harm to patients The worst case scenario is when the output capacitor is touched while it is charged to 300 V which drives 30 uC Q CU of charge though th
18. LED forward voltage drop 0 6V is operated with a 510 Ohm resistor with 50 duty cycle which gives us Iavg LED A 18 08 x 2 3mA The estimated current consumption of the stimulator output stage is very difficult to determine as it was discussed in section 3 2 An estimation using equation 32 for f 5 7kHz D 20 U 200V is Iavg boost X 1 6mA This results in the total current consumption of the stimulator board as 5 13 mA while stimulation is in progress and 1 23 mA otherwise The actual measured values were fairly close 6 4 mA during stimulation and 1 3 mA in standby The rated capacity of the 2320 battery is 220 mAh which leaves35 hours of estimated battery life with and 169 hours without stimulation The stimulated lifetime of the device could be extended to 53 hours just by simply removing the LED Practically these figures could be misleading as actual battery capacity strongly depends on the mean value and distribution of current discharge 26 Figure 7 on the other hand shows that the current drawn from the battery is very uneven which might shorten battery life Nevertheless it can be concluded that the estimated lifetime of the designed stimulator is highly superior to the RehaStim stimulator which can only run for 6 hours from a 6 V battery 41 Interface board The theoretical power consumption of the interface board was calculated sim ilarly as can be seen in Table 7 The CC1000 chip only wakes up if data
19. On the other hand increased switching frequencies also enable the converter to reach higher output voltages with lower duty cycles reducing the maximal current flowing in the inductors The time to reach steady state operation also becomes faster Empirically 5 7 kHz was found to be optimal e Transistor In a regular boost converter operating in continuous mode usually a MOSFET is suggested as it has superior switching times compared to bipolar junction transistors BJT In that case increasing the switching frequency can reduce the voltage ripple even with smaller inductors and capacitors For the stimulator output stage these issues were less relevant therefore a BJT was used which exhibits lower forward voltage drop and higher breakdown voltage at lower price This stimulator s output voltage was designed not to exceed 300 V and the transistor s breakdown voltage was chosen accordingly e Inductor It is crucial for the inductor to have a higher peak current rating than ir maz which can be calculated from equation 13 With improper design the inductor might overheat or saturate if duty cycles are pushed too high Lower induc tances cause output voltage to rise more rapidly see equation 25 because they also increase the total transferred charge in each cycle and thus also i maz For my design L 2 2mH was chosen with a peak current rating of 0 25 A The series resistance of the inductor also introduces losses although these
20. SMD ceramic capacitor 1nF C CI4 SMD ceramic capacitor 68 pF C171 SMD ceramic capacitor 18 pF C181 SMD ceramic capacitor 18 pF C41 SMD ceramic capacitor 8 2 pF C42 SMD ceramic capacitor 5 6 pF C31 SMD ceramic capacitor 15 pF L41 SMD inductor 6 2 nH L101 SMD inductor high Q 33 nH L32 SMD inductor 68 nH Q1 SMD crystal 14 7456 MHz R131 SMD resistor 82 kOhm R8 SMD resistor 510 Ohm LED1 LED red CONN 9 way D type connector MAX3232 MAX3232 CUE uC MSP430F 2122 CC1000 CC1000 57 JTAG programming interface board schematic 58 References 1 2 3 4 5 6 7 8 o 10 11 12 13 14 15 Centre for Rehabilitation Engineering Glasgow University http www gla ac uk cre Hasomed GmbH http www hasomed de Sheila Kitchen Electrotherapy Evidence based practice Eleventh Edi tion Churchill Livingstone 2002 Jaakko Malmivuo Robert Plonsey Bioelectromagnetism Principles and Applications of Bioelectric and Biomagnetic Fields Oxford University Press New York 1995 P Hunter Peckham Jayme S Knutson Functional electrical stimulation for Neuromuscular applications Annual Review of Biomedical Engineer ing pp 327 360 2005 Jay T Rubinstein Charles A Miller Hiroyuki Mino Paul J Abbas Anal ysis of Monophasic and Biphasic Electrical Stimulation of Nerve IEEE Transactions on biomedical e
21. WIRELESS SURFACE STIMULATOR GERGELY ANDOR MAKSAY August 21 2009 Matriculation number 0803879 Academic year 2008 2009 first supervisor Dr Bernd Porr second supervisor Dr Khaled Elgaid Abstract Functional electrical stimulation FES is the stimulation of peripheral nerves on innervated paralysed muscle groups with the purpose of facili tating a functional movement It is excercised in particularly to aid the rehabilitation of people with paraplegia For that application a low cost portable battery powered neuromuscular surface stimulation system was developed and implemented which is capable of delivering high voltage constant current controlled faradic pulse trains through surface electrodes The stimulation waveform is flexibly adjustable by the current amplitude 0 100 mA the pulse width 40 500 us and the repetition frequency of pulses 25 300 Hz These parameters can be remotely configured from a personal computer over a wireless sub 1 GHz radio frequency link The entire system consists of the stimulator board an interface board responsible for the wireless transmission of commands from the PC and the Matlab software which interacts with the operator through a graphi cal user interface The stimulator is microcontroller based and the output stage consists of a minimalistic modified boost converter Special efforts were made to optimise the device for low power consumption Besides it s intended application
22. adic pulse train which can be characterised with the amplitude of pulses the repetition frequency of pulses and the pulse duration 3 Because the electrode tissue interface has capacitive properties every delivered pulse builds up charge in the tissue which can be potentially harmful especially in case of implanted electrodes To prevent this sometimes another pulse with opposite polarity called reverse pulse is in duced to balance the net charge This type of stimulation is called biphasic while an unipolar pulse train is referred to as monophasic Biphasic stimulation is generally safer but the threshold current for activating muscle movement will be higher as the induced electric field will be more localised The solution is the application of pseudomorphic biphasic pulses which are prolonged and have lower amplitudes but still deliver the same amount of charge 6 Figure 1 displays a biphasic pulse with the definition of the pulse parameter terminology that will be used in the rest of this paper The strength of muscle contraction can be controlled by the parameters of stimulation 5 The current amplitude and pulse duration controls the total amount of in jected charge Increasing either of these parameters will result in larger electric field more and more motoneurons motor units will be affected increas ing number of muscle fibres twitch which contributes to the total force of the contraction this effect is know as spati
23. al summation If the time interval of the applied stimuli is shorter than the duration of the twitch then the exerted tension will rise additively until the upper limit tetanus of contraction is reached cumulative effect of stimulus repetition is known as temporal summation For this reason the stimulation frequency must be higher than the so called fusion frequency for a smooth contraction Amplitude Delivery pulse Duration of pulse Repetition frequency of pulses Figure 1 Waveform of biphasic pulses and nomenclature of pulse properties Note that pulse widths are unrealistically exaggerated for better demonstration reasons otherwise the response will be a series of twitches 4 It must be noted that increasing stimulation frequency also increases the rate of muscle fatigue For these reasons the repetition frequency of pulses is usually higher than 12 Hz but rarely exceeds 100 Hz 5 Muscles come in different size and shape which also determines the max imal force susceptibility to fatigue and the time for a twitch Thus the pa rameters of stimulation must be adapted to muscle type According to today s suggested practice slow muscles are trained with weaker but sustained tonic activation and fast muscles are rather trained with shorter but more intense phasic stimuli 3 2 3 Functional electrical stimulation FES Functional electrical stimulation is the stimulation of the peripheral
24. and it was used in commercial stimulators available off the shelf Let s substitute R joaa in Figure 3 by the skin and tissue resistance of the patient under therapy This setup would supply constant current through the skin and considering the high skin and tissue impedance discussedin section 2 4 almost unity duty cycle would be needed for current levels in the magnitude of milliamps Practically this is unattainable as the non zero inductor resistance drastically decreases the d c gain if D 1 12 Instead of this R oaa will be substituted according to Figure 6 D Tt I l nn c 1 ia EN Figure 6 Stimulator output stage With the newly introduced components it is possible to deliver current pulses for the patient who is symbolised in the schematic by Rskin Switching on transistor T2 opens transistor T4 and T6 If we keep transistor T3 closed current from the boost converter will flow through T4 Rskin and T6 to ground Opening T3 on the other hand determines a current path through T5 and T7 provided T2 is closed which delivers current to the patient with opposite polarity This setup enables the stimulator to transfer monophasic or biphasic current pulses according to how transistors T2 and T3 are driven It is very important not to open T2 and T3 at the same time as this would cause a Short circuit at the output of the boost regulator which could ultimately destroy the device Mi
25. are only dominant at high duty cycles Therefore in this design series resistance of the inductor is not a crucial point to consider e Diode For high switching frequencies the rectifier s reverse recovery time must be small as exhibited by Schottky diodes and Fast recovery rectifiers Forward voltage drop must also be kept low in order to achieve high efficiency power conversion Attention must be paid that the reverse breakdown voltage is higher than the maximum output voltage and iz mas which is also the maximal diode current doesn t exceed the peak current rating e Capacitor 17 Lower capacitances cause output voltage to rise steeper see equation 25 but they also cause a more rapid decline of pulse tops Apart from this high equivalent series resistance introduces losses and thus reduces efficiency Lastly the maximum voltage rating must be higher than 300 V or the appropriate maximal output voltage The selected components can be found in the Appendix under the section Bill of materials 3 4 Current consumption The current consumption of the stimulator in Figure 6 can be determined by calculating the average inductor current in one switching cycle T3 1 lt I gt lt I gt gua 30 0 Using Figure 7 we can calculate the area of the triangles instead of integra tion 1 lt Ir gt Ir max Ton T IL mazt 0 31 2T With equation 13 to determine 7 ma and equation 19 to determine ty
26. ble followed by 34 start of Frame identifier If a valid packet header is detected the program enters RX state otherwise after a couple of failed attempts the CC1000 is put to standby mode In RX state the microcontroller extracts data from the pack ets analyses them and acts accordingly turn on off stimulation or updates parameters The CC1000 chip provides data synchronisation An external interrupt can trigger on the rising edge of DCLK and apart from reading the valid data from the DIO line all further handling is done in the main loop see the whole algorithm in Figure 21 Read bit from CC 1000 in ISR Load next byte into shift register Decare Stop stimulstion resdstim parameters Starts timulation op pubes Calculate values Start pulses Turn off LED for timer registers Turn on LED Power a mode ea PresmbleEmor 2 Stsie RX Stat WDT Stop ti 1 and timer2 o cp timer t and timer2 EI No i Eror gt 10 2 Update timer parameters Y Start timert and timer2 Yes Restart counting Figure 21 Flowchart of the wireless communication handling Development environment The code for the microcontroller was written in C programming language and the development environment was the MSPGCC Toolchain an
27. both of these features might be useful if data acquisition functionality was to be added in the future see section 8 4 2 Antenna design The employed antenna is a meandering monopole radiator integrated onto the PCB similarly to a transversal helix antenna 16 suggests that such design should go as long as possible perpendicular to the ground plane otherwise parasitic capacitance to ground and inductance due to bends will be introduced 24 which reduce the efficiency Unfortunately considering this guideline would have meant an intolerable increase in circuit board area thus again the optimum working range was to be traded for reduced size The ideal length of a monopole antenna in free space must be one quarter of the electrical wavelength which is A Co 3 x 108 Le 4 4x f 4x434 x 106 17 3cm 35 Where L is the length of the antenna A is the electrical length Co is the speed of light in free space and f is the frequency of the signal The actual length of the antenna on the design was shorter approximately 13 cm which can be justified by the fact that PCB has a dielectric constant Er gt 1 subsequently light propagates slower which results in a shorter ideal antenna length see equation 35 Nevertheless the optimal length could only be determined by measuring the antenna impedance with a vector network anal yser and fine tuning the radiator length the matching inductor and matching capacitor va
28. cation Report SWRA046A ISM Band and Short Range Device Antennas 2005 Texas Instruments Inc MSP430F21z2 Mixed Signal Microcontroller SLAS578D 2009 Texas Instruments Inc MSP430x2xx Family User s Guide SLAU144E 2008 John Davies MSP430 Microcontroller Basics Elsevier Ltd 2008 MSPGCC The GCC toolchain for the Texas Instruments MSP430 MCUs http mspgcc sourceforge net Texas Instruments Inc CC1000 Single Chip Very Low Power RF Transceiver SWRS048A 2009 K H Torvmark Texas Instruments Inc 4 N009 CC1000 CC1050 Micro controller interfacing SWRA082 Texas Instruments Inc User Manual Rev 1 22 CC1000PP Plug and Play Module SWRUO060 Keith Quiring Texas Instruments Inc Application Report SLAA2944A MSP430 Software Coding Techniques 2006 K H Torvmark Texas Instruments Inc Application Note ANO015 SWRA076 RF Modem Reference Design Massoud Pedram Qing Wu Design considerations for battery powered electronics Design Automation Conference pp 861 866 1999 Kurt A Kaczmarek Kevin M Kramer John G Webster Robert G Rad win A 16 Channel 8 Parameter Waveform Electrotactile Stimulation Sys tem IEEE Transactions on Biomedical Engineering 1991 60
29. cing pulses in the 40 500 us range although by measuring PW 500 us the output capacitor discharged totally the voltage dropped to 0 by the end of the pulse This suggests that the entire pulse width spectrum cannot be utilised under all conditions low current amplitude etc The narrowest pulse width is also below the capability of RehaStim The frequency range of the stimulator was found most deficient The boost converter of the output stage didn t tolerate pulse repetition frequencies lower than 10 Hz and the accuracy of pulse amplitudes were found unacceptable with frequencies under 25 Hz see Figure 27c The conditions of this measurement were I 20 mA PW 200 us The maximal adjustable frequency with accurate current amplitude was 300 Hz see Figure 27d The rise time of the stimulator was also measured and it was found to be competitive with RehaStim 200 ns at PW 200 us I 20 mA f 50Hz I also carried out measurements with a higher 5 kOhm load resistor which intends to model unprepared skin impedances With the increased load the pulse tops became flatter larger RC time constant but the simulator couldn t output currents higher than 35 mA see Figure 27f This is the point where the inductor in the boost converter saturates and increasing the boost converter s duty cycle results in no further output voltage level gain Higher current outputs could be achieved by fine tuning the inductor used in the stimulator circ
30. crocontroller software guarantees that this condition can never happen From the boost converter s point of view it is indifferent what the path of current is as long as it flows through Rskin This however will not be the case during most of the time If both T2 and T3 are closed no pulses are currently delivered Ricaa will be high impedance through which the capacitor of the SMPS cannot discharge at all This prevents steady state operation the output voltage will rise after each switching cycle and the equations of continuous mode Equation 6 or discontinuous mode in 13 and 12 will fail No other literature was found to discuss the above described condition the following analysis is my own work although the inital equations were based on the description of dicontinuous mode of operation in 13 The following discussion presumes that the switching frequency fs of the SMPS is much higher than the frequency of pulse repetition fpuise and the time interval between pulses tpuise is much longer than the pulse duration Tp 1 fs T gt gt Foulse 7 gt gt T 8 tpulse Fpulse First let s observe the behaviour of the boost regulator in Figure 3 with no load Rjoad oo This condition can be described by a transient discontinuous mode of operation the inductor current falls to zero in each switching period When the transistor T1 is turned on Figure 4 Rjoad oo Vi Va 9 ic 0 1
31. dance should be in the magnitude of 1 kOhm However if the skin is not prepared abrasion of stratum corneum etc the total impedance can be several times higher 3 Stimulator output stage In the earlier discussion it became apparent that the low voltage of abattery cell will be insufficient to generate milliamp magnitude current pulses over the high resistance skin and tissue Some sort of electrical power supply is needed for voltage multiplication which is inexpensive small and has relatively high efficiency so little energy from the battery is wasted during the conversion Switched Mode Power Supplies SMPS satisfy these requirements 12 3 1 Boost regulators The following discussion is based on 13 and 12 and assumes ideal circuit elements SMPSs which convert DC voltage to DC voltage are classified as DC DC converters One of the simplest DC DC converter which can output higher voltage than its input is called boost regulator also known as boost converter Its schematic can be seen in Figure 3 Figure 3 Boost regulator In this circuit transistor T is operated as a switch it is turned on and off at high frequency When the transistor is on D doesn t conduct current and thus separates the RC network from the inductor Figure 4 The energy of the inductor builds up as increasing current flows through it At the same time the capacitor discharges through Rjoaa If we assume that the switching frequency is
32. de which means that it cannot be transmitted in a bandlimited channel Fortunately however most of the spectral components are found in a band near the carrier frequency as can be seen from Figure 13 21 The practical bandwidth of the power spectrum was estimated using Carson s rule 15 B 2 fp Fm 34 Where pis the frequency deviation Finis the modulation frequency The parameters of the system are stored in a control register block which can be read and modified by a 3 wire serial interface comprising of PDATA PCLK and PALE I used TI s SmartRF Studio software to calculate the contents of the configuration registers for my specified transmission band The operation of the CC1000 can be understood from its block diagram in Figure 12 According to their function we can distinguish three parts of the system 21 e The frequency synthetiser and FSK modulator e The receiver e and the transmitter The frequency synthetiser consists of a voltage controlled oscillator VCO and a phase locked loop PLL circuit which receives its reference signal from a stable external crystal oscillator running at 14 7456 MHz Apart from that all blocks of the PLL and VCO including the phase detector the charge pump and the frequency dividers N R are integrated on the chip with the only notable exception of the external inductor of the VCO This component was found very crucial to be precisely tuned to the center frequency otherwi
33. e human body This is well below the dangerous limit of 560 uC as calculated by 27 45 7 User s guide While reading the following guide please refer to Figure 28 showing images of the designed PCBs antenna Remote Stim LED a Stimulator board b RS232 Wireless interface board Figure 28 Front view image of the boards The following steps are required to set up the stimulator board for neuro muscular stimulation 1 Connect the interface board s 9 way D type connector standard RS232 connector to the RS232 serial port of the laptop or personal computer alternatively an USB serial converter can be used 2 Put the stimulator module s electrodes to the skin surface where the muscles to be stimulated are located Note that the stimulator is still in testing stage at present a 5 kOhm resistor is placed where the electrodes should be connected 3 On the PC laptop open Matlab and run Stimulator m The graphical user interface GUI displayed in Figure 29 will pop up 4 Set the serial port number in Matlab it can be checked in Control Panel System Hardware Device Manager under Windows or using the setserial command under Linux 46 stimulator Parameters Pulse waveform Serial port COM Pulse Amplitude 10 ms Pulse frequency 50 Hz Pulse shape Monophasic Biphasic Positive pulse width 100 us Stimulation control Negative pulse wid
34. e next pulse One bit of either of these bytes could be reserved to determine the phase of the pulse The Timer could circularly read this buffer and repeatedly measure the time until the next pulse transition This would also mean a reduction in accuracy compared to the hardware driven solution but it offers endless flexibility Although not directly related to FES muscle training often requires mod ulation mode stimulation where the pulse amplitude is gradually increased 3 for elevating muscle stress This could be also implemented with the above described modification although the digital controller needs certain number of pulses to set the desired current amplitude which limits the rate of current amplitude rise Apart from the channel multiplexing all suggestions so far could be eas ily implemented by sole software amendments with little effort The following suggestions require extension of hardware which results in size and current con sumption increase It must be carefully evaluated if it is worth this compromise The current design includes no voltage regulator which might result in the unpredictable operation of the device with sinking battery voltage A DC DC 49 converter IC could be adapted for this task As an alternative solution the MSP430 microcontroller s analog digital converter is capable of measuring the supply voltage and a low battery indicator LED could notify the user if needed The capabilities of the C
35. echnical details of RehaStim stimulator 1 Typical current consumption of the CC1000 21 20 Packet format 4 ncm anne 34 Data Field of Update packets rn 34 Source files of the software 2 2222 2 nn nennen 36 Estimated power consumption of the stimulator 42 Characteristics of the wireless stimulator in comparison with the specified technical details of RehaStim 2 43 List of Abbreviations AC ADC BER BJT CMOS CPU DC DCO EEG EMG ENG FES FET FSK GCC GDB GPIO GUI IC IF ISM ISR ITU JTAG LED LNA LPF MCU MOSFET NRZ PA PC PCB PD PD PLL PWM RAM RISC Alternating current Analog digital converter Bit error rate Bipolar junction transistor Complementary metal oxide semiconductor Central processing unit Direct current Digitally Controlled Oscillator Electroencephalogram Electromyogram Electroneurogram Functional electrical stimulation Flash emulation tool Frequency shift keying GNU compiler collection GNU debugger General purpose input output Graphical user interface Integrated circuit Intermediate frequency Industrial Scientific and Medical Interrupt service routine International Telecommunication Union Joint Test Action Group Light emitting diode Low noise amplifier Low pass filter Microcontroller unit Metal oxide semiconductor Field effect transistor Non return to zero Power amplifier Personal compute
36. embrane produces an action potential which propagates along the lengthy nerve fibre the axon to the subsequent nerve or muscle cell The links between muscle fibres and neurons are called motor units which consist of the neurons attached to several parallel muscle fibres An action potential on a motor unit causes a twitch on all corresponding muscle fibres There are many motor units in a muscle They activate with a relative phase shift and the resulting firing pattern determines the smooth muscular movement 3 4 2 2 Electrical stimulation in practice The above described physiological process is natural but the same effect can be triggered artificially by applying an electrical pulse train through the tissue The induced current causes electric field along its path which depolarises the membrane of motor units The result is a twitch of the muscle The stimula tion of innervated tissue is called neuromuscular stimulation which will be the intended application of the device presented in this document It is also possi ble to stimulate denervated muscles directly although the threshold charge for activating muscle fibres is significantly larger than that of neurons thus opin ions vary about its effectiveness This stimulation technique is called electrical muscular stimulation There are various ways how stimulation electrodes can be applied The sim plest and cheapest method is to place surface electrodes on the skin noninva sively
37. ency The two re maining channels can set the duty cycle for each PWM output Like Timer A1 Timer A0 is clocked from the internal 8 MHz DCO but this time the master clock is divided by 8 fsworx since the frequency of stimulation pulses is lower that the frequency of switching in the boost regulator The timer is operated in Up Down mode where the counter counts from 0 up to TACCRO capture compare register for channel 0 then back to zero Centered pulse width modulation Figure 19b allows the ADC to sample at the center of the pulse from the mean of the decaying pulse top avoid ing transients Another advantage of the Up Down mode is that as long as TACCR1 gt TACCR2 both outputs cannot switch on at the same time which protects the stimulator in Figure 11 from a short circuit caused by opening T4 T5 T6 and T7 at once The duty cycle can be calculated as 2TACCRO 2TACCRO D1 pjconp and D2 zracor 2 31 and the frequency of pulse repetition is fy Y eis The frequency of the sub master clock is 1 MHz and TACCRO is a 16 bit register which limits the lowest achievable pulse repetition frequency to 8 Hz This sets no major limitation to the device because functional electrical stimulation is rarely performed at frequencies below 12 Hz 5 It is possible to decrease this limit by sourcing the timer from the very low frequency oscillator VLO but it is not recommended because measurements suggested that the stim
38. er c Stimulator gt Measured current amplitude Figure 10 Block diagram explaining the closed loop control of the boost con verter L D t PWM channel 1 1i Polsce R5 n c PWM channel 2 Ri m Rj n J T5 R2 r Rein 2 34 SEE i R3 PWM channel 3 T R7 L tx3 l R4 Co Dprotection feedback to ADC Csense ji Figure 11 The complete output stage of the stimulator Rsense of the pulse repetition frequency fpuise This is not an issue the time constant of the controlled system is relatively high it might take several pulses until steady state is reached Figure 9a The final schematic of the stimulator s output stage can be seen in Figure 11 As current pulses flow through Rgense to ground a proportional voltage will appear on the input of the ADC Csense damps the rising overshoot from Usense the feedback for the ADC and Dprotection protects the microcontroller from high voltage spikes Sampling will take place in the middle of the pulse from the average of the exponentially declining pulse top This approach can drive close to ideal amount of charge through the tissue The upper level of ADC conversion full scale is 2 5 V and the maximal current amplitude is 125 mA thereforeRsense 20 Ohm was chosen The controller will be a digital integral controller Its software implementa tion will be explained in section
39. etimes multiple of the desired average level This is due to the fact that the digital controller samples the feedback in the middle of the pulse This approach provides more precise control of the injected charge than sampling the maximal current value but it cannot have control over the maximal current flowing through the body This is one of the serious limitations of this design compared to professional commercial solutions The stimulator was found capable of outputting current levels in the tested range while the pulse repetition frequency was 50 Hz and the pulse width was set to 100 us see Figures 27b and 27a 42 wireless stimulator RehaStim minimum maximum minimum maximum Current amplitude 0 100 mA 0 126 mA Pulse waveform monophasic or biphasic any Pulse repetition frequency 25 Hz 300 Hz 1Hz 140 Hz Pulse width AO us 5004s 20us 5004s rise time of pulse 1 us 2 us number of channels 1 8 wireless connectivity available not available Battery life 35 hours from 2 AA batteries 9 hours from 4 AA batteries Size 5 7 x 4 3 x 2 cm 15 5 x 6 5 x 13 5 cm Table 8 Characteristics of the wireless stimulator in comparison with the spec ified technical details of RehaStim 2 The measurement conditions can be found in the text The pulse duration was tested with the current amplitude of 20 mA and pulse repetition frequency of 50 Hz The output stage was found capable of produ
40. field the system is apt to be universally used for therapy and research ii Contents 1 2 Introduction Neuromuscular stimulation 2 1 Nerve and muscle cells 2 2 Electrical stimulation in practice 2 3 Functional electrical stimulation FES 2 4 Impedance model of skin 202 Stimulator output stage 3 1 Boost regulators 3 2 Output stage 3 3 Selection of circuit components 3 4 3 5 Closed loop control Wireless communication 4 1 CC1000 4 2 Antenna design Overall system description 5 1 Wireless stimulator 5 1 1 Hardware description 5 1 2 Software description 5 2 RS232 Wireless interface 5 2 1 Hardware description 5 2 2 Performance analysis User s guide Future development plans Conclusion Software description iii Current consumption oeoo 2 2l nn 20 20 24 26 26 26 28 36 36 37 41 46 49 51 List of Figures CONDOR WN e 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Waveform of biphasic pulses and nomenclature of pulse properties 4 Equivalent electrical model of electrodes skin and tissue 6 Boost regulator on ernennen 7 Boost regulator while transistor ison 8 Boost regulator while transistor is off 8 Stimulator output stage nn nennen 9 Inductor current and voltage in a boost regulator no bad 12 Spice simulations of rising output voltage if boost c
41. high enough and the capacitor has large capacitance V will be almost constant small ripple approximation Vi Va 1 Vo Rioad 2 ic Figure 4 Boost regulator while transistor is on When we turn off the transistor the magnetic energy of the inductor will be transferred to the RC network of the capacitor and the load Figure 5 With the previous assumptions regarding voltage ripple Vi Va V 3 4 io I Rioad Figure 5 Boost regulator while transistor is off According to the principle of Volt second balance 13 VeDTs Va Vo 1 D Ts 0 5 Where D is the duty cycle D TON 0 lt 1 Ton is the duration while T was on and Ts is the switching period If we solve equation 5 we can calculate the DC gain v BE D 6 G This equation states that the output voltage of a boost converter cannot be smaller than its input voltage Equation 6 is only true if the current in the inductor never falls to zero during the entire switching cycle If this condition is met the circuit is said to be in continuous mode of operation Otherwise the circuit will enter discontinuous mode and the equations describing its behaviour will be more complex Their derivation can be found in 13 and 12 3 2 Output stage In the muscle stimulator device a boost converter will be used to generate the needed voltage levels for a prescribed current amplitude It is a simple and effective solution
42. ind the best fitting equivalent circuit model but there is still no accordance how to model its nonlinear behaviour accurately One of the most common models is presented in Figure 2 9 It reflects that during neuromuscular stimulation three subsystems are connected serially e The boundary of electrodes and skin is of special importance because that is where the flow of electrons from the stimulator is transducted into ion flow in the tissue which can be regarded as electrolyte as charges are carried by ions At the boundary of every metal electrolyte interface there is a potential difference which is called the half cell potential The model also contains a series RC suggested by Warburg and the faradic leakage resistance Rr accounting for DC characteristics of the model 10 electrode electrolyt interface skin impedance tissue impedance Figure 2 Equivalent electrical model of electrodes skin and tissue e The skin can be modeled by a serial resistance and a parallel RC Cp and R can be practically eliminated by removing the outermost layer of the skin the stratum corneum 7 e The deep tissue can be modeled by the resistive R bulk tissue resistance Because of the complexity of the model and the lots of contributing nonlinear physical factors it is very difficult to estimate the total impedance between the two electrodes but 11 suggests that for practical FES applications the impe
43. is supplied from the pod therefore any on board battery must be deactivated Wireless communication The CC1000 wireless transceiver chip has a 3 wire serial configuration interface and a 2 wire serial data interface Five GPIO pins of the microcontroller are dedicated for handling communication with these interfaces using a technique called bit banging At the data rate of 9 6 kbit s the extra workload is neg ligible for a powerful microcontroller like the MSP430 22 A more detailed discussion about the CC1000 chip can be found in Section 4 1 Power supply The MSP430F2122 MCU s supply voltage spans from 1 8V 3 6V while that of the CC1000 wireless transceiver ranges from 2 1 3 6V With this in mind a 3V 2032 Lithium Battery was chosen as power supply which is situated on the back side of the PCB From such a battery the MCU can only run reliably with CPU frequencies at 8 MHz It must be mentioned that there is no voltage regulator on the design which means that the supply voltage will decline with the aging of the battery According to 17 both the MCU at 8 MHz and the CC1000 chip can work reliably with supply voltages over 2 2 V which was considered a fair safety margin With the MSP430F2122 s powerful RISC architecture I found 8 MHz of master clock frequency acceptable for this application and the reduction of processing speed also reduced the current consumption of the IC 5 1 2 Software description One of the high
44. ks and connecting neuroprostheses in a network 5 FES cycling The Centre for Rehabilitation Engineering at the University of Glasgow and Hasomed GmbH developed a tricycle system allowing cycling exercise with functional electrical stimulation of the leg muscles for people with paraplegia Daily physical excercise in form of cycling can offer numerous benefits includ ing improved cardiorespiratory health boosted metabolism better endurance recovery from muscle atrhophy and other secondary problems associated with the lack of movement improved endurance and general wellbeing RehaBike is based on a stimulator device called RehaStim which performs controlled stim ulation of the paralysed leg muscles based on the position of the pedals This project investigates a possible portable wireless stimulator solution in conjunc tion with this FES cycling project 2 1 2 4 Impedance model of skin In order to have accurate control over the injected charge and the resulting muscle response current regulated stimulation must be applied This requires basic knowledge about the electrical characteristics of the electrodes the human skin and tissue The total impedance that can be measured between the electrodes depends on a variety of factors such as current density repetitive pulse frequency elec trode size electrode separation electrode material temperature humidity and duration of stimulation 8 There has been enormous research to f
45. lights of the MSP430 microcontroller is the ease by which it can switch between active mode and low power mode 19 In order to utilise this feature I assigned most of the tasks to peripherals which trigger interrupts to 28 wake up the microcontroller from low power standby mode if needed The main tasks that had to be handled by software were the following e The PWM channels of the stimulator output stage could be generated en tirely by the two Timers the CPU only has to intervene if the stimulation parameters need to be updated The digital controller s algorithm could be also triggered by one of these Timers e The communication with the CC1000 chip could be triggered by the exter nal interrupts of the wireless transceiver benefitting from the data synchro nisation mechanism it employs In order to reduce the power consumption of the CC1000 chip it is kept in power down mode most of the time and it is woken up regularly to check for valid traffic This technique is called polling 22 As all regular timers were busy generating PWM for the out put stage I had to reconfigure the Watchdog Timer WDT to schedule the polling The WDT was also used for timing the blinking of the LED after system startup As we can see after the system initialisation the code architecture is completely interrupt driven according to the recommendation of TI 24 However the interrupt service routines ISR especially that of the CC1000 communication
46. low power low frequency oscillator VLO had to be used as clock source instead This algorithm requires a supporting communication protocol 25 which is given in Table 3 Each packet must start with a 100 bytes long preamble containing alternat ing ones and zeros When used with Manchester encoding see section 4 1 Chipcon recommends a minimal preamble length of 98 bits for best sensitivity 21 In order to comply with this it must be ensured that at least 98 preamble bits are received after the CC1000 chip wakes up subsequently the length of the preamble in time has to be 98 bits longer than the polling period 50 ms At the data rate of 9600 bit s this means the preamble must contain at least 578 bits The large safety margin was left due to the inaccuracy and thermal instability of the VCO its actual frequency may vary between 4 and 20 kHz 19 The end of the preamble is indicated by the Start of Frame identifier All data packets contain a command which depends from the Packet type Field the Start message initiates neuromuscular stimulation for the patient the Stop packet turns it off and the Update message updates all stimulation parameters with the contents of the Data field Table 4 The software responsible for handling communication with the CC1000 was written as a state machine with two possible states In IDLE state it monitors the incoming datastream looking for valid data packets Pream
47. lues until efficiency is maximalised 16 25 5 Overall system description The complete wireless stimulation system consists of the following blocks e Personal Computer Laptop The therapist can remotely configure the stimulator from a PC equipped with an RS232 serial port which issues the desired commands through the serial cable to the RS232 wireless interface board e RS232 Wireless Interface board It receives the commands from the PC through its serial interface organizes the incoming bytes into packets and transmits them to the stimulator wirelessly e Wireless stimulator It performs neuromuscular stimulation and receives the stimulation parameters over a radio frequency link from the RS232 Wireless Interface board To patient i i p Wireless RS232 wireless RS232 Stimulator Interface PC Figure 15 The wireless stimulation system Two circuit boards needed to be designed for this project that of the wireless stimulator and that of the RS232 wireless interface In the following sections they will be discussed independently 5 1 Wireless stimulator 5 1 1 Hardware description The block diagram of the wireless stimulator is shown in Figure 16 The micro controller handles configuration and data exchange with the CC1000 chip over a serial interface It controls the stimulator output stage with its PWM channels and processes the feedback It alerts the user with an LED if stim
48. n RS232 port is not available the stimulator can be directly started and stopped with the button on the interface board like a remote con troller Stimulation will occur while the button is pressed down with default parameters The Remote Stim LED on the interface board will start flashing to indicate that remote controlled stimulation is in progress Developer s guide Please refer to my notes about the development environment and development tools in section 5 1 Connect the FET tool to the USB port of your PC and to the 14 pin JTAG connector on your programming interface board find it in the appendix Remove RST JP from both boards and connect the RST TEST GND and VCC pins with the corresponding pins on the programming interface board watch out for the right pins on RST JP shown in Figure 28 with labeling The programming of the board can already be initiated 48 8 Future development plans One of the greatest shortcomings of the designed stimulation system is that it is not capable to produce a multichannel output which is utterly needed in FES Multiplexing the stimulation output is a possible workaround in future versions of the design however the small size of the stimulator board enables the application of several boards on the intended muscles This solution requires minor modifications in software The communication protocol Table 3 must be extended with a field that identifies the address of the stimulator
49. nerves with the purpose of facilitating some kind of functional movement It must be dis tinguished from therapeutic electrical stimulation which aims to improve tissue health and permanently restore sensory functions and the stimulation is not necessarily accompanied by actual movement 3 5 It was already mentioned that neuromuscular stimulation is only used to stimulate innervated healthy muscles Because of this most of the patients benefitting from this technology typically suffered spinal cord or head injury stroke cerebral palsy or multiple sclerosis Every movement involves the contraction of a variety of muscles and each muscle moves as the result of a very complex firing pattern of motor units There is still significant ongoing research toward the artificial imitation of nat ural muscle movement Neuroprostheses have been successfully tested for the upper and lower extremities the bowels and the respiratory system but even IFES devices used for substituting a neurological function 5 bladder control of patients could be recovered with FES Several systems un derwent clinical trials and are now available as commercial products Today the main concentration area of research is the closed loop control of stimulation with feedback from a combination of biopotentials including nerves ENG electroneurogram muscles EMG and the brain EEG Others are applying implanted stimulators powered and controlled by inductive lin
50. ng to the differential equation describing the relationship between capacitor current and voltage dV dt This means that the capacitor s output voltage rise in each cycle can be expressed as Ic C 20 Ts 1 AV Icdt 21 AES 21 0 From equation 10 and 16 we know that current only flows in the capacitor while T1 is off tr o tr o 1 1 1 IL maxtr o AV Iod gt iia Dee 22 Vos 1et 5 f Ira em 22 0 0 12 Substituting equation 13 for IL ma and equation 19 for t7 o NER 2LC Va Vo Let Vo be the output voltage V at the beginning of the switching cycle and Vo after it AV 23 Then V2T AV Vos Vor Eat _ 24 O2 O1 2LC Va ER Vo Solving this equation for Vo yields 2 V2T2 Ve Vor V Va Von 4 Vo1Va FE 25 02 2 This equation expresses that the output voltage of a boost regulator with no load rises consistently in each switching cycle from Vo to Vos Assuming the battery voltage Vc the duty cycle and the switching frequency thus Ton are constant during the operation of the boost regulator then the excess voltage gained in each cycle depends solely from Voi It can be shown that the gained excess voltage AV becomes smaller as the output voltage Vo rises From equation 23 VETn 2LC Ve Vo The reason for this is that as Vo rises it takes less and less time for the inductor current to drop to 0 t o thus the capaci
51. ngineering vol 48 pp 1065 1070 2001 A van Boxtel Skin resistance during square wave electrical pulses of 1 to 10 mA Med and Biol Eng amp Comput volt 15 pp 679 687 1977 J Patrick Reilly Applied Bioelectricity From Electrical Stimulation to Electropathology Springer 1998 Stephen J Dorgan Richard B Reilly and Carl D Murray A model for hu man skin impedance during surface functional neuromuscular stimulation Proceedings 19th International Conference IEEE EMBS pp 1770 1773 1997 T Ragheb L A Geddes Electrical properties of metallic electrodes Med ical and Biological Engineering and Computing pp 182 186 1990 Perkins TA Impedances of common surface stimulation electrodes 9th Annual Conference of the International FES Society 2004 H W Whittington B W Flynn D E Macpherson Switched mode power Supplies Design and construction Research Studies Press Ltd 1992 Robert W Ericsson Dragan Maksimovic Fundamentals of Power Elec tronics Second Edition Kluwer Academic Publishers 2004 International Telecommunication Union website http www itu int ITU R terrestrial faq index html Ferrel G Stremler Introduction to Communication Systems Third Edi tion Addison Wesley Publishing Company 1997 59 16 17 18 19 20 21 22 23 24 25 26 27 Matthew Loy Iboun Sylla Texas Instruments Inc Appli
52. o high current In either case it immediately stops the stimulation The flowchart of the algorithm can be seen in Figure 20 Istim 81921 stim 38 32 START Read ADC while in ISR eimorade tonade Open short circuit 1 stop stimulation new PWM old PWM error do not update yet Jerror 2 amp amp O lt new_PWM lt 0 60ld_PWM 2 Update PWM duty cycle Figure 20 Algorithm for implementing the digital controller 33 Field Length in bits Usage Preamble 800 Alternating 0s and 1s Start of Frame Identifier 8 synchronisation word it must be 0x33 Packet type 8 S for Start E for Stop U for Update packets Data 48 Only implemented for Update packets Table 3 Packet format Byte Index 1 current amplitude 2 MSB of pulse width positive pulse 3 LSB of pulse width positive pulse 4 MSB of pulse width negative pulse 5 LSB of pulse width negative pulse 6 pulse frequency Table 4 Data Field of Update packets Wireless communication In order to reduce power consumption the CC1000 chip is kept in power down mode and awakened at regular intervals looking for data The Watchdog Timer WDT measures the time until the CC1000 has to be woken up The polling period was set to 50 ms Such time intervals are too low for the 8 MHz DCO so the internal 12 kHz Very
53. onverter s load is removed nenn 14 Spice simulation of output stage 2 2 222 lll ln 16 Block diagram explaining the closed loop control of the boost COVETED lt 4 u ur ee ee lan 19 The complete output stage of the stimulator 19 Block diagram of the CC1000 21 with permission of TI 22 Transmitted power spectrum of the FSK modulated system rough ESTIA OM od bP bh ih a Ge DI 23 Synchronous Manchester encoding 21 with permission of TI 24 The wireless stimulation system 2 2 2 2 2 a 26 Block diagram of wireless stimulator 27 Functional block diagram of the MSP430F2122 microcontroller 17 with permission of TI 22222 mann 27 Main function of wireless stimulation software 30 PWM generation of Timer Aland Timer A2 31 Algorithm for implementing the digital controller 33 Flowchart of the wireless communication handling 35 Block diagram of RS232 Wireless interfacing board 36 Flowchart for Main function of Interfacing board 37 Flowchart of external interrupt handling in the main loop 38 Timer _ AO ISR for button polling 2 39 The USCI interrupt routine in main loop AO Oscilloscope measurements of stimulator output pulses 44 Front view image of the boards 46 Matlab program s graphical user interface 47 List of Tables o NI A 05 2 2 T
54. open source project to port the GCC GNU Compiler Collection toolchain for the MSP430 family It includes the GNU C compiler and its libraries the assembler the linker binutils and the debugger GDB 20 Source files Table 5 lists and describes the source code files of the software 35 File name Description main rx c Contains the main program cc1000msp c Function library for the CC1000 based on 22 cc1000 h Header file for cc1000msp c delay c Contains functions to delay program execution delay h Header file for delay c Table 5 Source files of the software 5 2 RS232 Wireless interface 5 2 1 Hardware description Figure 22 shows the block diagram of the RS232 Wireless interface board The MSP430 microcontroller described in Section 5 1 1 communicates with the RS232 port of the PC It creates packets from the incoming data and transmits them to the stimulator board over the wireless link Due to incompatibility of the voltage representation of logical values between the RS232 standard and the MSP430 a MAX3232 chip had to convert the incoming signal to the 3 V stan dard CMOS voltage level The incoming serial data is handled by the Universal Serial Communication Interface USCI of the MSP430 in UART mode The microcontroller must also monitor the state of the button and in case it was pressed act accordingly send commands to the stimulator operate LED
55. ower mode LPMO Thanks to a versatile clock system waking up from low power mode to active mode is extremely fast and easy compared to other microcontroller families 19 This MCU has up to 24 GPIO pins of which only six are needed five for interfacing with the CC1000 chip and one for the LED Some other pins were assigned to active peripherals such as the Timer and the ADC The MSP430F2122 has 512 Bytes of integrated SRAM and 4 kB of Flash memory The latter can be upgraded to 8 kB by replacing the chip to the MSP430F 2132 variant whose internal features match the MSP430F2122 except 27 for the extended Flash The MCU is available in a small 28 pin Thin Shrink Small Outline Package TSSOP which could be soldered manually at the university Development tool The MSP430F2122 was programmed and debugged with the MSPFET430UIF Flash Emulation Tool FET via 2 wire JTAG Spy Bi Wire communication I built a programming interface board its schematic can be found in the Ap pendix which included a standard 14 pin JTAG connector and all external components and signal connections which are only necessary for successful pro gramming but not for the correct operation of the device after the programmer was detached The stimulator and the RS232 Wireless interfacing board can be programmed after the MSPFET430UIF pod is connected to the JTAG connec tor andthe necessary connections are made with the programmed board The target board s power
56. presented stimulation system a competitive product in numerous applications Although it was specially designed for functional electrical stimulation its capabilities make it universally deployable in therapy as well as research 51 Appendix Schematic of stimulator board QNS QNS uzy WYO O 3SN3S4 L6SLINWIS ZL 46S LININJ FL QNS A 24 L6 LIS L quo L6V LAS cL l A 9H za DOA EXT ABE ASW QN5 3489 aur Tas m gene rl o e ion L oo o L E oh soo Lo SP lt e o YALLINSNVYL JH 1n0o 38 ZHIN 9SPL YT OLS 1 L6 LAWS LL Hw zZ DIA lt i SOA sviga 000122 QNS Hu 89 cel 52 Layout of stimulator Top Bottom 53 Stimulator Bill of Materials reference description value C1 400 V SMD capacitor 0 1 uF C2 electrolytic capacitor 10 uF C3 ceramic capacitor 0 1 uF C CI SMD tantalum capacitor 3 3 UP C_C6 SMD ceramic capacitor 33 nF C_C10 SMD ceramic capacitor 12 pF c_c SMD ceramic capacitor 220 pF C_C12 SMD ceramic capacitor 1 nF C CI4 SMD ceramic capacitor 68 pF C171 SMD ceramic capacitor 18 pF C181 SMD ceramic capacitor 18 pF C41 SMD ceramic capacitor 8 2 pF C4
57. r Printed circuit board Phase detector Power down mode Phase locked loop Pulse width modulation Random access memory Reduced instruction set computing vi SMPS TACCR TAR TI TSSOP UART UHF USB USCI VCO Switched mode power supply Timer_ A capture compare register Timer_ A register Texas Instruments Thin shrink Small Outline Package Universal asynchronous receiver transmitter Ultra high frequency Universal serial bus Universal serial communication interface Voltage controlled oscillator vii 1 Introduction The Centre for Rehabilitation Engineering at the University of Glasgow has been actively engaged in research on functional electrical stimulation FES with cycling for the rehabilitation of people with paraplegia In cooperation with Hasomed GmbH they developed a FES tricycle system named RehaBike which is based on the neuromuscular stimulator of Hasomed called RehaStim This paper aims to describe a stimulator device which I designed and built as a low cost alternative to RehaStim but contrary to RehaStim it is lightweight portable battery powered and most importantly it is capable to be controlled over a wireless link from a laptop or personal computer PC In addition I put enormous effort to minimising the power consumption of the stimulator as much as possible and reduce its size so patients will be able to directly mount the stimulator board to the intended application surface on their body
58. s drawback is the longer antenna required for the perfectly matched condition but with the adjusted output power of P 0 dBm sub optimal design should also comply with the specified working range the whole system should be kept in a room If extended reach will be needed one can easily increase the output power to 10 dBm but only at the cost of increased consumed power Nevertheless this rise shouldn t be significant as I put overwhelming effort in tailoring a current consumption profile which keeps the IC in power down mode during most of its operation time 433 MHz 866 MHz Receive mode 74 mA 9 6 mA Power down mode 200 nA Transmit mode P 20dBm 5 3 mA 8 6 mA Transmit mode P 5 dBm 8 9 mA 13 8 mA Transmit mode P 0 dBm 10 4mA 16 5 mA Transmit mode P 5dBm 14 8 mA 25 4 mA Transmit mode P 10 dBm 26 7 mA N A Table 2 Typical current consumption of the CC1000 21 The CC1000 uses frequency shift keying FSK to modulate the incoming 20 digital datastream into radio waves FSK systems vary the frequency of the carrier wave to represent binary ones and zeroes 8m t Acos 2rt fe fp 33 Where Sm t is the modulated signal A is the amplitude of the modulated signal f s the carrier wave frequency and fpis the frequency deviation One of the unpleasant property of the FSK modulation is that the modulated signals theoretical bandwidth is infinitely wi
59. se the PLL would not be able to lock This is only achievable with an inductor with L 33 nH featuring high Q factor and low tolerance It must also be noted that the PLL is very sensitive to temperature and supply voltage variations 21 Figure 12 Block diagram of the CC1000 21 with permission of TI for which it must be calibrated at startup This can be done automatically by issuing the appropriate command to the control registers In transmit mode the PLL multiplies the crystal oscillator s low frequency to generate the modulated radio signal by setting the frequency dividers of the PLL The configuration registers have to be previously programmed to contain the parameters of the FSK modulation such as f 434 092 MHz center fre quency and fp 32 kHz frequency deviation which is the maximum adjustable value Keeping the frequency separation high increases the sensitivity of the re ceiver but also broadens the bandwidth With a bitrate of 9 6 kbit s we can use Formula 34 to calculate the practical bandwidth of the system which is 83 2 kHz The resulting transmitted power spectrum can be seen in Figure 13 We can see that the whole occupied frequency region is within the ISM band The modulated signal is fed to the power amplifier of the transmitter whose amplification was set to 0 dBm by software As receiver the CC1000 follows the superheterodyn principle thus after a low noise amplifier the modulated radio signal is converted
60. see Figure 19a The counting was triggered by the rising edge of the 8 MHz digitally controllable oscillator DCO If the content of TAR equals TACCRI the second channel of capture compare registers a compare event occurs which updates the PWM output without the need for software intervention This provides very precise timing As it can be seen in Figure 19a the frequency of the output signal is deter mined by TACCRO and the duty cycle by TACCRI It was already mentioned that the boost converter s optimal switching fre 30 a ry TAR T TACCRO TACCR1 TACCRO PWM l channel gt t PWM channel2 PWM output Sampling of Sampling of ADC here ADC here a The output of Timer Alin Up mode b The outputs of Timer AO in Up Down mode Figure 19 PWM generation of Timer 1 and Timer A2 quency fsw was found to be 5 7 kHz This is a relatively low value in order to reduce switching losses and increase the resolution of the duty cycle that can be set The contents of TACCRx can be calculated as follows TACCRO lsxeuk _ 1 BEES 1 1400 and the duty cycle can be calculated as D TACCRI 1 TACCRO 1 Pulse width of stimulation current and Timer AO Timer A0 provides the timing of the negative and positive stimulation pulses It has three Capture compare registers but channel 0 TACCRO is lost for set ting the upper limit for counting which determines the frequ
61. t button triggered stimulation is in progress This feature enables the RS232 wireless interface board to be used as remote controller for stimulation Figure 25 shows the flowchart of the described algorithm 38 Button previously pressed Button still Button still not pressed pressed Disable USCI Interrupt Enable USCI Interrupt L Wake up CC1000 Wake up CC1000 Start sending message Start sending message start stimulation stop stimulation t Y Turn on LED Turn off LED Figure 25 Timer AO ISR for button polling Universal Serial Communication Interface and communica tion with the PC The Universal Serial Communication Interface USCT can be configured to work similarly like the common Universal Asynchronous Receiver Transmitter UART in embedded systems it can handle communication with the RS232 port of the PC Data are sent serially in frames each of which contains one byte of payload one low level Start bit and one high level Stop bit 8N1 format no parity bit The Baud rate was set to 9600 Bauds Contrary to the CC1000 wireless chip the USCI can receive and transmit frames of data independently by hardware software only has to read the appropriate registers when the USCT interrupt triggers The flowchart of the interrupt handler can be seen in Figure 26 39 START Load Byte into Buffer in ISR All bytes ofthe Packe
62. t received Disable USCI Interrupt Y Wake up CC1000 3 Start sending message END Figure 26 The USCI interrupt routine in main loop 40 6 Performance analysis Current consumption Almost all design steps focused on the reduction of current consumption of the boards It is crucial to assess how well this goal was accomplished The following section will provide theoretical current profiles of the two designed PCBs which will be followed by concrete measurements Stimulator board A failed attempt by the CC1000 to find valid preamble lasts approximately 2 ms With the polling period of 50 ms we can conclude that the chip spends about 96 of its lifetime in low power mode If a valid packet is detected it takes maximum 95 ms to receive it 912 bits at 9600 bit s Using Table 2 and the assumption that there is very little wireless traffic the expected power consumption of the CC1000 on the stimulator board can be estimated by Iavg CC1000rec 0 04 x 7 4mA 0 96 x 200nA zz 0 3mA The MSP430 microcontroller spends about 90 of the time in low power mode LPMO where the CPU and its clock is disabled The MSP430 is capable to shut down its DCO to conserve even more power but this feature could not be used as some peripherals always required the DCO as clock source Using 17 the current consumption of the microcontroller is Iavg MSP430stim 0 2 x 2 4 0 8 0 56 0 93mA The
63. tchdog timer SaCPUcbX MHZ niaise VO ports Tum n LED Piakin compera Star WOT WaRtor WDT to expire Tum off LED State iDLE o to Low Power model Figure 23 Flowchart for Main function of Interfacing board 37 Wireless communication The program has two states in IDLE state there is no data to transmit the microcontroller waits in low power mode until a packet arrives from the PC or the button is pressed If either of these events occur the program enters TX state wakes up the CC1000 and starts sending the individual bits see algorithm in Figure 24 on the external interrupts triggered by the falling edge of DCLK Byte finished No Packet finished State IDLE Y Y Load next byte into shift register Disable CC1000 interrupt CC1000 to Power Down mode END Figure 24 Flowchart of external interrupt handling in the main loop Polling of Button and TIMER A0 Timer AO polls the button regularly in every 40 ms This is a suitable interval for debouncing and it also allows the microcontroller to stay in standby mode If the button is pressed the program creates and sends a Start packet As soon as the button is released a Stop packet is transmitted to the stimulator module The MCU keeps the LED on while the button is pressed indicating tha
64. th 200 us START Update parameters Figure 29 Matlab program s graphical user interface 5 Make sure that the red JUMPER RST JP is placed on both the stimulator board and the interface board 6 Turn on the stimulator module and the interface board Look for a short blink of the LED indicating that the board is ready for stimulation 7 Set the required stimulation parameters on the left side of the MATLAB GUI The graph on the right side of the screen will provide a visual rep resentation of the resulting pulse waveform Note that pulse frequency is interpreted as the frequency of pulses with same polarity even if biphasic stimulation is selected The program is protected against entering mean ingless or invalid input values 8 Press the Update button to transfer the parameters into the stimulation board 9 Press the START button to activate stimulation It can be stopped any time with the STOP button The stimulator parameters can be set run time as well the stimulation will continue uninterrupted with the updated parameters The Stim LED on the stimulator board always flashes as long as stimulation is in progress If the stimulation is started before the parameters were programmed the fol lowing default values will be assumed e Pulse amplitude 10 mA e Pulse frequency 50 Hz 47 e Pulse shape biphasic e Positive pulse width 10045 e Negative pulse width 100us If aPC with a
65. tor will have less and less time to charge This can also be shown from equation 19 limy o5 A V3 limy l 0 26 limy tr 0 limy ool 7 0 27 The above described behaviour and the resulting equations were also verified by Spice simulations Figure 8a and 8b Now let s consider the behaviour of the stimulator while T2 or T3 is closed which means that a pulse is currently being delivered The boost regulator now sees the skin and tissue resistance as load and provided the boost converter is stable the output voltage will move towards its steady state level in discontinuous mode Rskin is too high for the boost regulator to operate in continuous mode As discussed earlier in this chapter this steady state output voltage is much smaller so it is a fair approximation that this process can be described by the exponential discharge of the capacitor through Rskin small ripple approximation can evidently not be used here The decline of Vo during the pulse can be estimated by 13 t SS a O T T 0 0ms 0 5 1 0ms 1 5ms 2 0ms 2 5 3 0ms 3 5ms 4 0m 4 5ms 5 0ms a Spice simulation Boost regulator s capacitor voltage Ve 3V L 500 H C 0 1 uF fs 10 kHz D 20 It can be observed that voltage only rises while transistor T1 is off and diode D is on which results in a step like waveform b Spice simulation Boost regulator s capacitor voltage Vg 3V L 500 H C 0 1 LF fs 10 kHz
66. uit see section 3 2 For the parameter overview of the designed stimulator device and a comparison with RehaStim please refer to Table 8 43 Tek M Pos 80 00 us MEASURE MATH Pk Pk 168V MATH Min 8 00 MATH wumainre Max 160v MATH Freq i Trig d MATH None M 50 0 us CH2 182V a High current monophasic pulses Rioad 1kOhm I 100 mA f 50Hz PW 1004s Tek Pm M Pos 0 0005 MEASURE MATH Pk Pk 45 5V MATH Min 8 rnv MATH Max 448v MATH Freq 19 84Hz MATH None CH1 Z 3 47 13 9451Hz Stop M 50 0ms MATH 20 0V c Low frequency monophasic pulses Rioad 1kOhm I 20 mA f 20Hz PW 200us Tek Ak M Pos 30 00us MEASURE MATH Pk Pk 153v MATH Min 102v MATH Max 57 6 MATH Freq 49 94H2 MATH Period 20 02ms CHI Z 20 3V Trig d M 5 00ms e Biphasic pulses Rjoad 5kOhm 1 20 mA of 10 mA f 50Hz PWopos PWneg mz 100us Tek alls Stop M Pos 1 660ms MEASURE MATH Pk Pk 16 84 MATH Min 400m MATH Max 16 4 MATH Freq MATH None CH1 Z 3 20V 43 6252Hz M 500 05 MATH 5 00 b Low current monophasic pulses Rjoad 1kOhm I 5 mA f 50Hz PW 1004s Tek mg M Pos 0 000s MEASURE MATH Pk Pk 46 44 MATH Min 160V MATH Max 448v MATH Freq 238 0Hz MATH None CHI Z 302V 238 104Hz Trig d M 1 00ms MATH 20 0V d High frequency monophasic pulses Rioad 1kOhm I 20 mA f 300
67. ulation is in progress Microcontroller selection The MSP430F2122 is a relatively cheap yet powerful mixed signal microcon troller MCU from Texas Instruments with extremely low power consumption which makes it suitable in portable battery powered applications 18 17 19 It features a 16 bit RISC architecture which together with its adjustable max imum 16 MHz internal crystal oscillator facilitates fast instruction execution 26 Stimulator MSP430 CC1000 P ne Omp Microcontroller Wireless Transceiver Stage LED Antenna Figure 16 Block diagram of wireless stimulator times Several peripherals are integrated on chip Figure 17 including two 16 bit Timers suitable for generating two independent PWM channels for the stimulator s output stage an Universal Serial Communication Interface USCI which can be configured to receive serial data in UART format from the RS232 port of the PC and a fast 10 bit successive approximation analog to digital con verter ADC which can directly digitalise the feedback of the digital controller DVvcc DYAVSS Port P1 sro Interrupt capability an pull up down Ip resistors RSTINMI 4p Too pores Figure 17 Functional block diagram of the MSP430F2122 microcontroller 17 with permission of TI The IC s power consumption is2 4 mA at 8 MHz but it can be reduced to 560 A by turning the MCU to low p
68. ulator output stage behaves unreliably below the frequency of 25 Hz see Section 6 Again the output of the PWM is directly connected to the Timer for precise timing which produces the periodic output without software intervention as soon as a compare event happens TAR TACCRI or TAR TACCR2 Closed loop control and the Analog Digital Converter I implemented a digital Integral controller to regulate the stimulation current The feedback Figure 10 and 11 is sampled in the interrupt service routine of Timer AO which is called on the compare event TAR TACCRO see Figure 19b The rest of the routine is executed in the main loop The current is measured across a 20 Ohm resistor The feedback voltage can be calculated by The analog digital converter ADC is a 10 bit analog successive approximation ADC It has the transfer function Vin Vr Vr Vr where Vn is the upper 2 5V and Vg is the lower limit Vss for conversion 18 Substituting Equation 36 into Equation 37 yields N29 37 N 910 20 1stim 0 1024 x 20 2 5 0 2 5 Using this Formula a desired current amplitude can be translated to a desired ADC result the unit of Istimmust be Amps Besides the digital controller implementation for constant current stimula tion current measurement also helps eliminating important safety hazards It can spot a short or open circuit between the electrodes by comparing N with threshold values too low or to

Download Pdf Manuals

image

Related Search

Related Contents

Brodit 512739 holder  Operating instructions  CW-90/90X - PKM Industrial, SA  Olympus CS-22  Timex W206 User's Manual  Betrie Mittelf das W ebsanleit frequenz Widerstan tung z  Pentair P1-801 User's Manual    CATALOGUE FORMATIONS  

Copyright © All rights reserved.
Failed to retrieve file