Estimulador Con Microprocesador

download Estimulador Con Microprocesador

of 5

Transcript of Estimulador Con Microprocesador

  • 7/28/2019 Estimulador Con Microprocesador

    1/5

    Microprocessor Controlled Muscle Stimulation

    K. Balasubramanian and A. Cellatoglu

    Department of Computer Engineering, Faculty of Architecture and EngineeringEuropean University of Lefke, Turkish Republic of Northern Cyprus

    Mersin 10, TurkeyEmail: [email protected] , [email protected]

    Abstract - Identifying the striated muscle during thesurgical treatment of high and low anorectal malformationis an important requirement in Posterior sagittalanorectoplasty technique in surgery. It needs an electronicdevice that drives pulsated current intensities to allowtranscutaneous stimulation at high current intensities and direct muscle stimulation at low current intensities. This

    paper reports the development of a programmable musclestimulator capable of driving the required current intensityof pulsating nature into the muscle of the patient as

    programmed by the surgeon. The set current intensity doesnot vary with the changed muscle impedances seen by the

    probes while injecting the currents. Visual indication about the readiness of the pulsar for stimulation activity and thedisplay of the set current intensity are made as to make theequipment more informative and useful. A microprocessor is used for selecting the current to be driven and for maintaining the display system.

    Keywords : Anorectoplasty, transcutaneous stimulation, programmable current intensity, striated muscle,microprocessor control.

    1 IntroductionMuscle stimulation by electronic means is an

    important requirement in anorectoplasty and sphincter muscle stimulation activities [1-8]. In posterior sagittalanorectoplasty, striated muscle is to be identified during thesurgical treatment of high and low anorectal malformation.This procedure needs variable current intensity to be driveninto the muscle to allow transcutaneous stimulation at higher current intensities as well as direct muscle stimulation atlower current intensities. Transcutaneous stimulation usuallyrequires higher current intensities in the range of 100-200mA depending on patients physical conditions such asweight. Once the skin is open, direct muscle stimulation can

    be achieved with much lower current intensities within therange of 20-80mA. The use of muscle relaxants usually doesnot interfere with the muscle response to direct electricalstimuli. High current intensity may elicit massive musclecontraction thus the surgeon may decrease the intensity

    accordingly. In the reconstruction of an anorectum a reliableand objective way to identify the striated muscles is essentialto locating the best possible placement of the new rectumand anus and this needs to take advantage of all of theavailable muscle structures to gain as much fecal continenceas possible. Therefore, for such requirements, a musclestimulator with adjustable current intensities as set by thesurgeon from time to time needs during surgical operationsupported by visual indicating units is required for makingthe successful surgical operation. In the past, a simpleelectronic device that can generate the current pulse train atmanually selected intensity levels was reported[9]. Althoughit is simple to use the unit can be sophisticated byincorporating additional features and facilities. This paper reports a microprocessor controlled muscle stimulator thathas several additional features such as in display facilitiesand in protection measures added to it. The unit is handy,

    battery powered and easy to use. Furthermore, it could beoperated as independent unit or embedded into PC. If embedded into PC the information could easily be recordedinto memory which could facilitate further analysis andlinking with the data bases of the clinic where the treatmentrecords of the patients are available.

    2 Muscle Stimulator System DesignFigure 1 shows the circuit schematic of the proposed

    programmable muscle stimulator. Popular microprocessor of Intels 8086 family with required minimal interface areemployed for producing the periodic time source for musclestimulant and for maintaining the display activity. The

    programmable peripheral interface chip 8155 is the maininterface included in the system whose functional units viztimer, RAM and three I/O ports are fully exploited here. Inaddition, the microprocessor is supported with RAM,EPROM, keyboard with required interrupt interface for accommodating two interrupts. The keyboard serves toenter the preset time data needed to run the digital clock

    besides enabling us to load a simple program in RAM for performing some specialized tasks .

  • 7/28/2019 Estimulador Con Microprocesador

    2/5

    Pulse Train Generation

    InterruptInterface

    INTR INTA

    8086

    Port PA

    8155

    PC

    PB

    LED LED LED LED

    Decod Decod Decod Decod

    Latch Latch Latch Latch

    KeyboardInterface

    RAMEPROM

    Keyboard

    FrequencyDivider MOD50

    1K T2

    200 R3

    Rectifier &Amplifier

    ADC

    9VMSMV

    Level Translator Pulsating Current Injector

    5.4K

    T4

    5V

    Sw2

    Vcc

    Driver

    Red

    Ye

    Fuse

    230V

    T1

    470K Red LED

    170K

    Probes

    Sw1

    200

    24 9V

    T3

    GreenLED

    Fuse

    Figure 1. Circuit Schematic of Muscle Stimulating System

    Driver

  • 7/28/2019 Estimulador Con Microprocesador

    3/5

    The display unit comprising four 7-segment LEDs withassociated latches and decoders display the time and thecurrent driven sequentially and repeated cyclically. Whilethe BCD information for display is sent through port PAsequentially the selector input to latch and display aredriven through port PC lines. Also, two lines of the port PCare used to drive Red Led and Yellow LED. Furthermore,from the Timer of 8155 a Green LED also is driven.

    2.1 Pulse Train GenerationThe pulsating current to be injected into the muscle is

    of 50Hz frequency with 0.01 duty cycle. Table1 shows therequirement of current amplitudes for maximum loadimpedances seen by the probes. The source for generatingthe pulsating currents in the muscle is issued from the timer unit of 8155. The nature of current pulses to be injectedinto the muscle is shown in timing diagram (Figure 2.a)where the amplitude A is programmable. In order to achievethis timing, the timer in 8155 is programmed to generate thewaveform shown in Figure 2.b. As the voltage output is 5V,it is converted into 9V by accompanying level translator .

    Table 1. Current Requirements as a Functionof Muscle Impedance

    Current AmplitudemA

    Load ImpedanceK

    20406080100

    120140160180200250

    115.53.72.82.2

    1.81.61.41.21.10.88

    2.2 Level TranslatorThe level translator comprising two transistors

    (T1 and T2) with a supply voltage of 9V DC translates the5V voltage pulse train from the Monostable Multivibrator (MSMV) into respective pulses of 9V amplitude. The leveltranslator also provides increased magnitude of currentneeded for driving the circuit of voltage to current converter.

    2.3 Programmable Voltage to CurrentConverter

    A common base transistor circuit built around BC127

    (T3) is working as programmable voltage to currentconverter. The base of the transistor is wired with 9V DCsource and the level translator output is connected to theemitter through a 200 potentiometer. The level translator output being pulsating at 9V amplitude, it allows the emitter current Ie to flow at the instants when the transistor T2 isconducting to give its Vcesat at nearly ground potential. Themagnitude of the emitter current is dependant on theresistances contributed in the emitter loop by the

    potentiometer resistance (R3), 24 resistance, collector saturation resistance of T2 and the emitter to base resistanceof T3. As only the potentiometer resistance is adjustable theemitter current Ie is controlled by the adjusted value of the

    potentiometer. As the collector current Ic is nearly same asthe emitter current Ie ( Ic = Ie, where is nearly unity) wecan control Ic by controlling the potentiometer R3. At theinstants when T2 is cut-off (Vce = 9V) there would no Ieand Ic be flowing in T3. Also, there would be no Ic flowingwhen the switch Sw1 is open. As long as the switch Sw1 isopen the Red LED does not make a glow and when it isclosed it makes a glow indicating that the pulsating Ic isflowing in the circuit. When the probes are touching themuscle, the body resistance also comes parallel to the 470K resistance and the current flows through the muscle also. Asthe amplitude of Ic depends only on Ie the changedimpedance does not change the amplitude of Ic flowing in

    the circuit. A 20mA fuse is also connected in series with the470K resistance in the collector circuit as a protection fromunwanted hazards causing the failure of transistor T3. Thecurrent amplitude is programmable with the adjustment of the resistor R3 as to control Ie resulting in similar changeswith Ic flowing into the muscle.

    200s 20ms

    A

    t

    a

    b

    Figure 2. Timing Diagrama. Pulsating Current Driven

    b. Pulsating Voltage Arising from 8155

  • 7/28/2019 Estimulador Con Microprocesador

    4/5

    2.4 Pulse-On IndicatorThe periodic pulses arising at 50Hz frequency is

    divided in frequency by a factor of 50 with a MOD50counter for producing a pulse train of 1Hz frequency. TheMOD50 counter is developed using two decade counter ICs,7490 hardwired for MOD10 and MOD5 operations. This1Hz pulse train serves two purposes. It is used to give avisual indication about the readiness of the 50Hz pulse trainand it serves also as a source for maintaining a digital clock operated by software. By driving this signal to a Green LEDthrough a transistor drive (T4) a visible pulsating light at1Hz frequency is produced. This indicates that current

    pulses are available and ready to be driven into the muscle.

    2.5 Sensing and Displaying Current FlowThe amplitude of the current being driven into the muscle

    is chosen by the surgeon by adjusting the potentiometer R3in the emitter circuit. The doctor has to see what current heis setting before touching the probes into the muscle. This

    current information is sensed and provided digitally in 7-segment LEDs. The voltage picked up in the 24 resistancein the emitter circuit is rectified, filtered and amplified to getan analogue voltage proportional to the amplitude of the Ie.This is digitized using an 8-bit ADC (Analogue to DigitalConverter) and read to the processor through port PB of 8155 configured as input port. By a lookup tablearrangement the BCD form of the data representing thecurrent is determined and driven to four latches through portPA on multiplexed form with the selection to particular latchextended through port PC. The ADC being used here is aflash ADC developed on the basis of modular architecturefor flash ADC reported recently[10]. One 4-bit flash module

    enters into two sequential conversions as to produce 8-bitdigital output. As the display indicates the actual current

    being driven to the muscle the surgeon limits it to the valueneeded for the patient by adjusting the potentiometer.

    2.6 Digital ClockThe system facilitates indicating the current time by

    running software operated digital clock. This gives instantinformation to the surgeon about his commitment of time for the surgery. Three counters called as seconds-counter,minutes-counter and hours-counter are maintained by thesoftware. Selected memory locations are reserved for

    maintaining these counters. The 1Hz pulse train obtainedfrom a MOD50 counter serves as the time source for thedigital clock. This 1Hz pulse train interrupts themicroprocessor and in the interrupt service procedure theseconds counter is first incremented and its count is carriedon to update the minutes-counter and hours-counter accordingly. The digital clock follows 24-hours format andarranges to display the hours and minutes with two digitseach.

    The presetting of the present time is performed oninterrupt basis. The operation of switch Sw2 gives aninterrupt to microprocessor for this adjustment. The data for seconds-counter, minutes-counter and hours-counter arereloaded in sequential steps by operating the keyboard.

    2.7 Software OutlineThe microprocessors monitor program is loaded in

    EPROM. When the system is reset it performs the followingoperations.

    i. initialize all the ports. ii. initialize the current time by loading zero to seconds-

    counter, minutes-counter and hours-counter.

    iii the timer is programmed by writing the data into thetimer count register and the command register as to producethe 50Hz pulse train from the timer-out line of 8155.

    iv. run the main routine by scanning the ADC, preparingthe muscle current from the lookup table in accordance with

    the data output of the ADC and drive the same to the latchesof the display unit.

    The information about current flow is displayed for two seconds period and then the hours-counter data andminutes-counter data are accessed and driven to the displayunit to indicate the present time for two seconds duration.This display operation of two seconds each is repeatedcyclically. The data being displayed whether muscle currentor the present time on the display is indicated symbolicallyin yellow LED (Ye) and red LED respectively. The monitor

    program is developed on structured basis involving severaldedicated procedures.

    The monitor program developed for this purpose takescare of all needs of muscle stimulation and supportingfacilities. Furthermore, any desirable feature necessitated inthe hospital environment and associated recording facilitiesmight easily be incorporated in the system by adding therequired hardware and software.

    2.8 Power SuppliesThe programmable muscle stimulator employs the DC

    power supplies of 5V for the microprocessor and digitalintegrated circuits, +9V and -9V in level translator andamplifier and +230V in voltage to current converter. Fromthe +9V supply +5V supply is obtained by using heregulator chip 7405. Using standard DC to DC up-converter[11,12] the 230V supply is obtained from 9V. For the sake of simplicity these circuits are not shown in Figure1. While developing the DC to DC converter of 9V/230V afuse is kept in series with the 9V source such that whenexcessive current (200%) is drawn from 9V source due tosome short circuit in the 230V circuit this fuse would blowup and would protect from hazards.

  • 7/28/2019 Estimulador Con Microprocesador

    5/5

    2.9 Embedding the Muscle Stimulatorinto PC

    A standard interface has been developed to extend themuscle stimulator unit into the PC having data bases of the

    patient. The LPT port is used for this purpose. The currentdriven into the muscle of the patient during the surgical

    operation is sensed and received through port PB to themicroprocessor. The data received is sampled every secondon interrupt basis and is saved into the RAM memory of theunit. Through the interface this stream of data can bedownloaded to the pc for further analysis and recording.

    3 ExperimentationThe equipment thus built has been tested with the

    patients and has shown good performance in clinic for surgical treatment of anorectal malformation. After seeingthe pulse-on indicator in active status the user closes switch

    Sw1 to set the current amplitude needed. Looking on thedigital display of the current, the required current amplitudeis set manually by adjusting the potentiometer R3 and thenthe probes are touched on the muscle spot for stimulation.

    4 ConclusionThe programmable muscle stimulator reported is being

    used in the clinic on experimental basis and it helps verymuch the surgeon in setting the required current amplitudefor stimulating the muscle in surgical treatment of anorectalmalformation. As common base transistor is used as voltageto current converter the set current amplitude does notchange with muscle impedance seen by the probes. Duringthe pulsating period of 200s in every cycle, the voltagedeveloped across the probe can go as high as 220V in thisshorter time and stimulates the muscle effectively withoutcausing any damage to the muscle spot. The transistor usedin current converter is rugged and would work for a longtime. Nevertheless, if transistor fails accidentally the 20mAfuse coming in series with 230V would blow up protectingthe muscle from damage. Also any short circuit in the probeor by any other means of reaching the 230V to the patient isfurther avoided by blowing the fuse in the 9V DC to 230VDC converter connected in series with the 9V source. Sincemicroprocessor is used in the system it can provide

    processing additional information if needed. For instance, if breathing rate and electrocardiogram are desired to bemonitored while surgical operation is being carried on; it is

    possible to do so by incorporating appropriate sensors andmaking the required changes in the hardware and thesoftware.

    5 References

    [1] DeVries P. and A.Pena, Posterior SagittalAnorectoplasty, Journal of Pediatric Surgery, Vol XVII,

    pp 638-643, 1982.

    [2] Durham Smith E, The Bath Water Needs Changing, But

    Don't Throw Out the Baby: An Overview of AnorectalAnomalies, Journal of Pediatric Surgery, Vol XXII, pp335-348, 1987.

    [3] Hedlund H. and Pena A, Does the distal rectal Musclein anorectal Malformations Have the Functional Propertiesof a Sphincter?, Journal of Pediatric Surgery, Vol XXV,

    pp 985-989.3.2, 1990.

    [4] Pena A. and DeVries P.A, Posterior SagittalAnorectoplasty: Important Technical Considerations and

    New Applications, Journal of Pediatric Surgery , Vol XVII, pp 796-811, 1982.

    [5] Pena A, Surgical Management of AnorectalMalformations: A Unified Concept, Pediatric Surgery

    International, Vol 3, pp 82-93, 1988.

    [6] Pena A., Bonilla E., Mendez M., Sanchez L, The posterior sagittal approach: further pediatric applications,Pediatric Surgery International, Vol 7, pp 274 278.1992.

    [7] Wiseman N. E. and A. Decter, The Kraske Approach tothe Repair of Recurrent Rectourethral Fistula, Journal of Pediatric Surgery, Vol XVII, pp 342-346, 1982.

    [8] C J Vaizey , M A Kamm , I C Turner , R J Nicholls andJ Woloszko, Effects of short term sacral nerve stimulationon anal and rectal function in patients with analincontinence, Gut , Vol 44, pp 407-412, 1999.

    1. [9] K.Balasubramanian and M.Mak, A versatile musclestimulator, Proceedings of the IV International Symposiumon Biomedical Engineering, Peniscola , Spain, pp 216-218,Sep 1991.

    [10] K.Balasubramanian, Modular design for realizinghigh capacity flash ADCs, Proceedings of the InternationalConference on Computer Communication and ControlTechnologies, Vol 3, pp 374-379, July 2003.

    [11] http://en.wikipedia.org/wiki/2008 DC_to_DC_ Converter .

    [12] http://dc-power-supply.globalspec.com/ 2008.