ECTRONICS 00 0 September, Sozopol, BULGARIA MICROCONTROLR BASED PULSE GENERATOR FOR NEURO-STIMULATION PURPOSES Sever Paşca, Istvan Sztojanov Department of Applied Electronics and Information Engineering, University POLIHNICA of Bucharest, Splaiul Independenţei nr., 000 Bucharest, Romania, Phone: +0, E-mail: Sever.Pasca@elmed.pub.ro The electrical stimulation has the advantage of the easy way to be implemented having in the same time better results than the traditional treatment. The paper proposes an innovative stimulating system, a microcontroller based pulse generator for neuro-stimulation purposes. Two of the implemented applications, with very impressive results are mentioned. The first one is the electro acupuncture anesthesia and the second one is the prolonged coma treatment. There are also the possibilities to extend the use of the system in other medical applications.. INTRODUCTION Keywords: electrical neuro-stimulation, microcontroller, pulse generator Among the physical and chemical factors used in medicine to study the electrical phenomena, the electrical stimuli are the most currently used because they are similar to the natural, biological stimulus. Electrical stimuli have in addition the following advantages: that they are gentle and they do not affect the tissues; they can be repetitively used; they act directly and quickly; they can generate excitation and inhibitions in any type of cells or tissue; they can be very precisely measured; they can be applied very accurately. Neural system is a bioelectrical entity under the influence of the electrical current. In many diseases the electrical stimulation of the neural structures is an alternative to the therapy based on drugs. The paper proposes an innovative stimulating system, a microcontroller based pulse generator for neuro-stimulation purposes.. BLOCK DIAGRAM The primary used pulse is the bipolar pulse shown in Fig.. The block-diagram of the neurostimulator is shown in Fig.. There are two pulse-generating channels, one for low frequencies and the other for high frequencies. Each channel has two outputs, with the possibility of autonomous stimulation amplitude regulation and autonomous measurement of the mean current shot in the patient by the positive rectangular pulse. One of the generators produces the low frequency elementary pulses between 0,...0 Hz by 0, Hz step. The second generator Fig.. Elementary stimulation pulse
ECTRONICS 00 0 September, Sozopol, BULGARIA produces the high-frequency elementary pulses between 0 000 Hz by 0 Hz step. The pulse duration can be set between 00 μs by μs step. The generators have two functioning modes continuous pulses and discontinuous pulses. All settings are digitally user-defined through micro-switches while the user interface uses an LCD display with x alphanumeric symbols. Each of the output currents generated for patient stimulation are converted by the microcontroller and digitally displayed. The remote PC control of the stimulator uses an isolated serial interface. The system power sources are obtained using switching mode power supply generated from two,v batteries or two, V accumulators.. NEUROSTIMULATOR COMPONENTS. The Microcontroller The microcontroller used for the control of the whole stimulator system is ATMEGA (Fig. ). The working frequency is MHz set by an external quartz crystal, with the clock input being taken over and used in the pulse and frequency generator blocks, which are external blocks to the microcontroller. Fig.. Block Diagram The microcontrollers Reset is activated either from the LowBat signal by the digital booster power source, or from the SW button, which has the function of manual stopping of the device in emergency cases. The control of the stimulator and the information flux from/to the user are accomplished through the four bidirectional ports. Port A is used as bidirectional port. During the frequency and pulse duration setting process, port A is used as output port and works similar to a data-bus, loading the control latches which memorize the necessary parameters for the counters which generate the frequencies and the duration of the stimulating pulses. Used as input port, port A converts the analogue inputs through the incorporated 0 bit ADC, available at ATMEGA for this port. The four inputs (PA0 PA) measure the currents picked up from the electrode-side output and with PA the batteries voltage for signalising a batteries low voltage condition.
ECTRONICS 00 0 September, Sozopol, BULGARIA +V D N R0 00k SW LowBat C 0uF Reset PortB[0..] PortD[0..] ClockMHz +V L nh C C. uf 00nF 0 UC PortB0 PortB PortB PortB PortB PortB PortB PortB Port PortD PortD PortD PortD PortD PortD PortD /PWM_JF /PWM_IF /LDAC /SS /MOSI /MISO /SCK /Adr0 /Adr /Adr /Adr Y UC PB0 (XCK/T0) PB (T) PB (INT/AIN0) PB (OC0/AIN) PB (SS) PB (MOSI) PB (MISO) PB (SCK) 0 RESET VCC XTAL XTAL P (RXD) PD (TXD) PD (INT0) PD (INT) PD (OCB) 0 PD (OCA) PD (ICP) PD (OC) ATmega 0 (ADC0) PA0 (ADC) PA (ADC) PA (ADC) PA (ADC) PA (ADC) PA (ADC) PA (ADC) PA AREF AVCC 0 GND (SCL) PC0 (SDA) PC (TCK) PC (TMS) PC (TDO) PC (TDI) PC (TOSC) PC (TOSC) PC GND MasuraCurent/Date0 MasuraCurent/Date MasuraCurent/Date MasuraCurent/Date Detector/Date BatVol/Date /Date /Date +.0V /RS /RW Ok/E /Masa Dreapta/DB Sus/DB Jos/DB Stanga/DB +.V R 0k PortA PortA PortA PortA PortA PortA PortA PortC0 PortC PortC PortC PortC PortC PortC PortC R 0k L nh C 00nF PortA[0..] PortC[0..] +V 0 C MHz pf C pf Port B is used unidirectional, as output port. PB and PB stand for the stimulating periods and activate the frequency rate counters. PB is used as LDAC signal, which means the transfer of the information from the first latch in the second one corresponding to each ADC of digital controlled power source. Pins PB.PB are used for serial data transfer between microcontroller and ADC, using the SPI protocol (Serial Peripheral Interface). PB is also used as activation signal for the decoder which selects the peripheral that will be used by the microcontroller for data-transfer. The other bidirectional used port is port C. As input is used for keypad reading and as output is used for LCD display writing. Port D is used as input address for the decoder.. The High/Low Frequency Generator The high-frequency generator (Fig. ) divides the MHz crystal frequency to obtain on the output side a 0 000 Hz frequency. The necessary value for the division is stored in latches using the LatchHF LatchHF signals. Three -bit countdown counters build a programmable frequency Fig.. Microcontroller PortB[0..] ClockMHz PortA[0..] LatchIF LatchIF LatchIF PortB U PortA PortA D PortA D PortA D PortA D PortA D PortA D D PortA PortA PortA PortA PortA PortA PortA Q Q Q Q Q Q Q CYFCT U D D D D D D D U PortA PortA D PortA D PortA D PortA D PortA D PortA D D Q Q Q Q Q Q Q CYFCT Q Q Q Q Q Q Q CYFCT +V U P P 0 P P P P P TC CDHCT00 +V +V P P 0 P P P P P TC P P 0 P P P P P TC U CDHCT00 U CDHCT00 Fig.. High frequency generator InaltaFrecv enta
ECTRONICS 00 0 September, Sozopol, BULGARIA divider. When the counter reaches 0, it is automatically loaded with the value stored in latches. The countdown will be activated by the PWM_FJ (pin PB) signal, which means that the counters will only generate impulses for the wanted period and the chosen functioning mode. The low frequency generator has a structure and a functioning mode similar to the previous generator, with the only difference is in the counter number for obtaining the frequency between 0, 0 Hz. The validation countdown signal is generated on pin PB.. The Pulses generator The complete determination of the stimulation pulse requires the setting of a pulse duration and amplitude. The pulse generator (Fig. ) determines the duration of the two pulses with the repetitive frequencies generated by the two frequency generators. +V ClockMHz +V 0 0=000000 P P P P P P P TC U CDHCT00 PortA[0..] DurataJF JoasaFrecv enta InaltaFrecventa DurataIF LowBat PortA PortA PortA PortA PortA PortA PortA PortA PortA PortA PortA PortA PortA PortA U0 D D D D D D D Q Q Q Q Q Q Q CYFCT U D D D D D D D Q Q Q Q Q Q Q CYFCT CLOCK 00KHz +V 0 +V 0 P P P P P P P P P P P P P P U TC CDHCT00 U TC CDHCT00 UA 0 +V UB R S Q Q UA D 0 D VDD Q VSS Q R S 0 ImpulsJF ImpulsIF 0 Fig.. Pulses generator By using a reversible, parallel loading counter and a flip-flop it was obtained a digital programmable one shot flip-flop structure, triggered by the frequency generator output. To ensure the microsecond setting step for the duration value, the system clock is divided by 0 using a reversible programmable counter, obtaining so a 00.000 KHz frequency. The connection of the LowBat and the TC signals (which
ECTRONICS 00 0 September, Sozopol, BULGARIA gives the end time of the pulse) in a NAND gate will ensures the flip-flop reset and accomplishes the reset of the pulse generator at start-up and in low battery conditions.. The Digital Controlled Voltage Source The Digital Controlled Voltage Source (Fig. ) allows the individual setting of every amplitude output of the elementary rectangular pulse. The source consists of three elementary components: the DAC, the amplifier and the analog controlled linear source. The 0-bit resolution DAC, which has the reference value connected to the voltage of,0 V, receives the user-defined value from the microcontroller through port SPI. The converter output can be set between 0,0 V. This voltage is connected to the inverter input of an operational MCP Vin Vout ADJ LML amplifier which has the purpose of generating a control voltage from, to, V, in order to obtain an output voltage between 0 0, V.. The Output Stage The output stage (Fig. ) creates the stimulating pulse at the patient s output by applying the digital pulse generated by the pulse generator to an electronic switch device. This switch connects the primary side of the step-up transformer to the output voltage of the digitally controlled voltage source which defines the amplitude of pulses. The D visually shows the presence of the rectangular stimulating pulse, achieving this way the continuous monitoring of functioning modes and the stimulating frequencies.. RESULTS Po rtb[0..] SS +V PortB PortB PortB CDA VREFA VDD VOUTA SDI SCK LDAC CS AVSS There are studies and clinical experiments which have been made regarding the usage of this system, especially in the field of electro-acupuncture anaesthesia (Fig. ) and in prolonged coma treatment. Very impressive results were obtained. The post operational behaviour of the patients is clearly superior to the one of the patient s +.0V C 00nF R0 k R k./ =0. R k R 0k/0,% 0...0V +V C 0nF R.K/0,% +V U UA + - LM -,...V Fig.. Digital Controlled Voltage Source Amplitudine +V Impuls R 0k C 00uF C uf R k R 0 R k Q BCA Q N0 D D R R Q T : BD C 00u T :0 Fig.. Output stage 0..0.V R 0 R k C.uF R0 0k Amplitudine J RCA JACK MasuraCurent
ECTRONICS 00 0 September, Sozopol, BULGARIA using the classical drug-based anaesthesia method, and this occurs without administration of any aesthesis drug only a sleeping one.. CONCLUSIONS The implemented system has proved its usefulness in some clinical applications on stimulation of nervous system. The very good results obtained in the implemented and tested applications determined the investigation of other possibilities to extend the use of the system in other medical applications (pain control at different levels, Parkinson s disease, depression and Fig.. Practical experiment for anaesthesia spasticity control). The neurostimulator allows its PC control, opening development perspectives for the researches with the purpose of obtaining an efficient anaesthesia and neurostimulating procedure through the optimal adjustment of the stimulating parameters (the waveform of the stimulating pulse, the stimulating frequency and amplitude) through the closing of reaction circuit patient EEG analyze PC stimulator.. REFERENCES [] Adams et al.: Principles of Neurology, Fortschr Neural Psychiatry, th Ed, P, (): -,. [] Ciurea J., Constantinovici Al., Simoca I., Perin R., Mircea D., Pasca S.: Brain Electrical Stimulation Therapy in Patients With Prolonged Consciousness Disturbances - Pilot Study, Romanian Neurosurgery, Romanian Academy, New Serie VII, No. -, January-December, pp. -,. [] Ciurea J., Paşca S., Sztojanov I.: New System for Prolonged Coma Treatment by Electrical Stimulation (Sistem pentru tratamentul comei prelungite prin stimulare electrica), Professional Realizations in Electronical Domain volume V, ICSI, Bucharest - October, pp. M-M, (in romanian). [] Strungaru R., Pasca S.: Electrical Stimulation of The Tissues (Stimularea electrica a tesuturilor), Bulletin I.P.B., Electronical Serie, Volume XLVIII, pp. -,. [] Atmel corporation, http://www.atmel.com.