You are on page 1of 5

Microprocessor Controlled Muscle Stimulation

K. Balasubramanian and A. Cellatoglu Department of Computer Engineering, Faculty of Architecture and Engineering European University of Lefke, Turkish Republic of Northern Cyprus Mersin 10, Turkey Email: bala@lefke.edu.tr , a.cellatoglu@lefke.edu.tr

Abstract - Identifying the striated muscle during the surgical treatment of high and low anorectal malformation is an important requirement in Posterior sagittal anorectoplasty technique in surgery. It needs an electronic device that drives pulsated current intensities to allow transcutaneous stimulation at high current intensities and direct muscle stimulation at low current intensities. This paper reports the development of a programmable muscle stimulator capable of driving the required current intensity of pulsating nature into the muscle of the patient as programmed by the surgeon. The set current intensity does not 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 the display of the set current intensity are made as to make the equipment 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.

accordingly. In the reconstruction of an anorectum a reliable and objective way to identify the striated muscles is essential to locating the best possible placement of the new rectum and anus and this needs to take advantage of all of the available muscle structures to gain as much fecal continence as possible. Therefore, for such requirements, a muscle stimulator with adjustable current intensities as set by the surgeon from time to time needs during surgical operation supported by visual indicating units is required for making the successful surgical operation. In the past, a simple electronic device that can generate the current pulse train at manually selected intensity levels was reported[9]. Although it is simple to use the unit can be sophisticated by incorporating additional features and facilities. This paper reports a microprocessor controlled muscle stimulator that has several additional features such as in display facilities and in protection measures added to it. The unit is handy, battery powered and easy to use. Furthermore, it could be operated as independent unit or embedded into PC. If embedded into PC the information could easily be recorded into memory which could facilitate further analysis and linking with the data bases of the clinic where the treatment records of the patients are available.

Introduction 2 Muscle Stimulator System Design


Figure 1 shows the circuit schematic of the proposed programmable muscle stimulator. Popular microprocessor of Intels 8086 family with required minimal interface are employed for producing the periodic time source for muscle stimulant and for maintaining the display activity. The programmable peripheral interface chip 8155 is the main interface included in the system whose functional units viz timer, RAM and three I/O ports are fully exploited here. In addition, the microprocessor is supported with RAM, EPROM, keyboard with required interrupt interface for accommodating two interrupts. The keyboard serves to enter 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.

Muscle stimulation by electronic means is an important requirement in anorectoplasty and sphincter muscle stimulation activities [1-8]. In posterior sagittal anorectoplasty, striated muscle is to be identified during the surgical treatment of high and low anorectal malformation. This procedure needs variable current intensity to be driven into the muscle to allow transcutaneous stimulation at higher current intensities as well as direct muscle stimulation at lower current intensities. Transcutaneous stimulation usually requires higher current intensities in the range of 100200mA depending on patients physical conditions such as weight. Once the skin is open, direct muscle stimulation can be achieved with much lower current intensities within the range of 20-80mA. The use of muscle relaxants usually does not interfere with the muscle response to direct electrical stimuli. High current intensity may elicit massive muscle contraction thus the surgeon may decrease the intensity

Vcc
Red

Interrupt Interface

Sw2

LED

LED

LED

LED

Ye

Decod

Decod

Decod

Decod Driver

INTR INTA

Port PA 8155

Latch

Latch

Latch

Latch

8086

Driver

PC PB

RAM EPROM

Keyboard Interface

Frequency Divider MOD50

ADC 5V

Keyboard

5.4K

Green LED

T4 9V MSMV
Fuse

Rectifier & Amplifier


200 200

Probes

Sw1
T3

R3

T2
T1 Level Translator

1K

24 9V

470K Red LED 170K

Fuse 230V

Pulsating Current Injector

Pulse Train Generation Figure 1. Circuit Schematic of Muscle Stimulating System

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

A t

200s

20ms

2.1

Pulse Train Generation


Figure 2. Timing Diagram a. Pulsating Current Driven b. Pulsating Voltage Arising from 8155

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

2.3

Programmable Converter

Voltage

to

Current

Table 1. Current Requirements as a Function of Muscle Impedance Current Amplitude mA 20 40 60 80 100 120 140 160 180 200 250 Load Impedance K 11 5.5 3.7 2.8 2.2 1.8 1.6 1.4 1.2 1.1 0.88

2.2

Level Translator

The level translator comprising two transistors (T1 and T2) with a supply voltage of 9V DC translates the 5V voltage pulse train from the Monostable Multivibrator (MSMV) into respective pulses of 9V amplitude. The level translator also provides increased magnitude of current needed for driving the circuit of voltage to current converter.

A common base transistor circuit built around BC127 (T3) is working as programmable voltage to current converter. The base of the transistor is wired with 9V DC source and the level translator output is connected to the emitter 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 is conducting to give its Vcesat at nearly ground potential. The magnitude of the emitter current is dependant on the resistances contributed in the emitter loop by the potentiometer resistance (R3), 24 resistance, collector saturation resistance of T2 and the emitter to base resistance of T3. As only the potentiometer resistance is adjustable the emitter current Ie is controlled by the adjusted value of the potentiometer. As the collector current Ic is nearly same as the emitter current Ie ( Ic = Ie, where is nearly unity) we can control Ic by controlling the potentiometer R3. At the instants when T2 is cut-off (Vce = 9V) there would no Ie and Ic be flowing in T3. Also, there would be no Ic flowing when the switch Sw1 is open. As long as the switch Sw1 is open the Red LED does not make a glow and when it is closed it makes a glow indicating that the pulsating Ic is flowing in the circuit. When the probes are touching the muscle, the body resistance also comes parallel to the 470K resistance and the current flows through the muscle also. As the amplitude of Ic depends only on Ie the changed impedance does not change the amplitude of Ic flowing in the circuit. A 20mA fuse is also connected in series with the 470K resistance in the collector circuit as a protection from unwanted hazards causing the failure of transistor T3. The current amplitude is programmable with the adjustment of the resistor R3 as to control Ie resulting in similar changes with Ic flowing into the muscle.

2.4

Pulse-On Indicator

The periodic pulses arising at 50Hz frequency is divided in frequency by a factor of 50 with a MOD50 counter for producing a pulse train of 1Hz frequency. The MOD50 counter is developed using two decade counter ICs, 7490 hardwired for MOD10 and MOD5 operations. This 1Hz pulse train serves two purposes. It is used to give a visual indication about the readiness of the 50Hz pulse train and it serves also as a source for maintaining a digital clock operated by software. By driving this signal to a Green LED through a transistor drive (T4) a visible pulsating light at 1Hz frequency is produced. This indicates that current pulses are available and ready to be driven into the muscle.

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

2.7

Software Outline

The microprocessors monitor program is loaded in EPROM. When the system is reset it performs the following operations. i. initialize all the ports. ii. initialize the current time by loading zero to secondscounter, minutes-counter and hours-counter. iii the timer is programmed by writing the data into the timer count register and the command register as to produce the 50Hz pulse train from the timer-out line of 8155. iv. run the main routine by scanning the ADC, preparing the muscle current from the lookup table in accordance with the data output of the ADC and drive the same to the latches of the display unit. The information about current flow is displayed for two seconds period and then the hours-counter data and minutes-counter data are accessed and driven to the display unit to indicate the present time for two seconds duration. This display operation of two seconds each is repeated cyclically. The data being displayed whether muscle current or the present time on the display is indicated symbolically in yellow LED (Ye) and red LED respectively. The monitor program is developed on structured basis involving several dedicated procedures. The monitor program developed for this purpose takes care of all needs of muscle stimulation and supporting facilities. Furthermore, any desirable feature necessitated in the hospital environment and associated recording facilities might easily be incorporated in the system by adding the required hardware and software.

2.5

Sensing and Displaying Current Flow

The amplitude of the current being driven into the muscle is chosen by the surgeon by adjusting the potentiometer R3 in the emitter circuit. The doctor has to see what current he is setting before touching the probes into the muscle. This current information is sensed and provided digitally in 7segment LEDs. The voltage picked up in the 24 resistance in the emitter circuit is rectified, filtered and amplified to get an analogue voltage proportional to the amplitude of the Ie. This is digitized using an 8-bit ADC (Analogue to Digital Converter) and read to the processor through port PB of 8155 configured as input port. By a lookup table arrangement the BCD form of the data representing the current is determined and driven to four latches through port PA on multiplexed form with the selection to particular latch extended through port PC. The ADC being used here is a flash ADC developed on the basis of modular architecture for flash ADC reported recently[10]. One 4-bit flash module enters into two sequential conversions as to produce 8-bit digital output. As the display indicates the actual current being driven to the muscle the surgeon limits it to the value needed for the patient by adjusting the potentiometer.

2.6

Digital Clock

The system facilitates indicating the current time by running software operated digital clock. This gives instant information 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 the software. Selected memory locations are reserved for maintaining these counters. The 1Hz pulse train obtained from a MOD50 counter serves as the time source for the digital clock. This 1Hz pulse train interrupts the microprocessor and in the interrupt service procedure the seconds counter is first incremented and its count is carried on to update the minutes-counter and hours-counter accordingly. The digital clock follows 24-hours format and arranges to display the hours and minutes with two digits each.

2.8

Power Supplies

The programmable muscle stimulator employs the DC power supplies of 5V for the microprocessor and digital integrated circuits, +9V and -9V in level translator and amplifier and +230V in voltage to current converter. From the +9V supply +5V supply is obtained by using he regulator chip 7405. Using standard DC to DC upconverter[11,12] the 230V supply is obtained from 9V. For the sake of simplicity these circuits are not shown in Figure 1. While developing the DC to DC converter of 9V/230V a fuse is kept in series with the 9V source such that when excessive current (200%) is drawn from 9V source due to some short circuit in the 230V circuit this fuse would blow up and would protect from hazards.

2.9

Embedding into PC

the

Muscle

Stimulator

References

A standard interface has been developed to extend the muscle stimulator unit into the PC having data bases of the patient. The LPT port is used for this purpose. The current driven into the muscle of the patient during the surgical operation is sensed and received through port PB to the microprocessor. The data received is sampled every second on interrupt basis and is saved into the RAM memory of the unit. Through the interface this stream of data can be downloaded to the pc for further analysis and recording.

[1] DeVries P. and A.Pena, Posterior Sagittal Anorectoplasty, 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 Anorectal Anomalies, Journal of Pediatric Surgery, Vol XXII, pp 335-348, 1987. [3] Hedlund H. and Pena A, Does the distal rectal Muscle in anorectal Malformations Have the Functional Properties of a Sphincter?, Journal of Pediatric Surgery, Vol XXV, pp 985-989.3.2, 1990. [4] Pena A. and DeVries P.A, Posterior Sagittal Anorectoplasty: Important Technical Considerations and New Applications, Journal of Pediatric Surgery, Vol XVII, pp 796-811, 1982. [5] Pena A, Surgical Management of Anorectal Malformations: 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 to the 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 and J Woloszko, Effects of short term sacral nerve stimulation on anal and rectal function in patients with anal incontinence, Gut, Vol 44, pp 407-412, 1999. [9] K.Balasubramanian and M.Mak, A versatile muscle stimulator, Proceedings of the IV International Symposium on Biomedical Engineering, Peniscola, Spain, pp 216-218, Sep 1991. [10] K.Balasubramanian, Modular design for realizing high capacity flash ADCs, Proceedings of the International Conference on Computer Communication and Control Technologies, 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.

Experimentation

The equipment thus built has been tested with the patients and has shown good performance in clinic for surgical treatment of anorectal malformation. After seeing the pulse-on indicator in active status the user closes switch Sw1 to set the current amplitude needed. Looking on the digital display of the current, the required current amplitude is set manually by adjusting the potentiometer R3 and then the probes are touched on the muscle spot for stimulation.

Conclusion

The programmable muscle stimulator reported is being used in the clinic on experimental basis and it helps very much the surgeon in setting the required current amplitude for stimulating the muscle in surgical treatment of anorectal malformation. As common base transistor is used as voltage to current converter the set current amplitude does not change with muscle impedance seen by the probes. During the pulsating period of 200s in every cycle, the voltage developed across the probe can go as high as 220V in this shorter time and stimulates the muscle effectively without causing any damage to the muscle spot. The transistor used in current converter is rugged and would work for a long 1. time. Nevertheless, if transistor fails accidentally the 20mA fuse coming in series with 230V would blow up protecting the muscle from damage. Also any short circuit in the probe or by any other means of reaching the 230V to the patient is further avoided by blowing the fuse in the 9V DC to 230V DC converter connected in series with the 9V source. Since microprocessor is used in the system it can provide processing additional information if needed. For instance, if breathing rate and electrocardiogram are desired to be monitored while surgical operation is being carried on; it is possible to do so by incorporating appropriate sensors and making the required changes in the hardware and the software.

You might also like