This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Several hospitals and health clinics use functional electrical stimulation to enhance the recovering process of the patients. Electronic medical devices provide a vast array of medical information while allowing the patient to have a user-friendly interface. A functional electrical system is a pulse stimulator which sends current into our body surface through electrode pads. As the current pulse is sending into our body, the electrode pads will stimulate muscle according to the magnitude of current and frequency we wanted.
This Final Year Project aims:
- To apply knowledge and experience gained in university into a functional device;
- To develop a low cost pulse simulator for physical therapy usage; and
- To utilize At89s52 micro-controller.
Scope of Project
This project is divided into two major parts which is hardware and software. For the hardware part, it includes circuit design and troubleshooting while software includes programming of micro-controller using C language.
Schedule and Timeline of the Project Development
The entire project was divided into 2 semesters which is:
- 2nd semester (short semester)
- 3rd semester (long semester)
An average duration of 5 months was spent on developing this project. Shown below is the timeline of significant achievements.
THEORY AND LITERATURE REVIEW
It has been a long time since Luigi Galvani first discovered that frog muscles twitch by the application of electrical current. At present electrotherapy became a customary practice in medicine. The usage of electrotherapy are: to heal neurological diseases, smooth the progress of wound sickness, recover muscle functions after spinal cord injury. Concepts of electrical stimulation will be discussed in this section the basic with a short introduction to the biology of nerve and muscle cells, which is necessary to understand the further discussion in this section. After that, functional electrical stimulation, the proposed application field of the subject device will be introduced.
Nerve and muscle cells
Cells hold lower concentration of positive cations, compared to the surrounding extracellular fluid. Because of this, a potential difference between the two sides of the cell membrane is produced. Resting potential is the electronegative voltage of cells, and it is continual by active biochemical and electrostatical processes. The voltage in nerve cells ( neurons ) and muscle cells ( muscle fibres ) can be reversed by depolarizing the cell membrane with adequately intense electric field ( current ) and inadequate duration. The excitation of the cell membrane produces an action potential which propagates along the lengthy nerve fibre (the axon) to the subsequent nerve or muscle cell. Motor units are the links between muscle fibres and neurons. They 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 a lot of motor units in a muscle. They activate with a relative phase shift and the resulting firing pattern determines the smooth muscular movement[3, 4].
Electrical stimulation in practice
As described above is the natural physiological process, but same outcome can be triggered artificially by applying an electrical pulse train all the way through the tissue. The induced current causes electric field along its path, which depolarizes the membrane of motor units. This results a contract of the muscle. The stimulation of innervated tissue is called neuromuscular stimulation,. It is also possible to stimulate muscles which has loss of nerves directly, even though the threshold charge for activating muscle fibres is significantly larger than that of neurons. This stimulation technique is called electrical muscular stimulation.
Variety of ways on how stimulation electrodes can be applied. As this is a low cost project, the simplest and cheapest method is to place surface electrodes on the skin noninvasively. This technique, called transcutaneous stimulation, has the disadvantage, that the skin-electrode interface significantly heightens the impedance of the total system to be stimulated. Additionally, a trained therapist is needed to correctly 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. Transcutaneuos stimulation might also be hurtful for patients as pain receptors are also stimulated. Alternative to surface electrodes are the invasive percutaneous and implanted electrodes.
Neuromuscular stimulators can be characterized in many aspects. They can be portable or power supplied, high voltage or low voltage, their output can be unvarying voltage or constant current regulated, but maybe most essential characteristic is the output waveform they produce. Till now, active research is still finding 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 stimulation, rather uses a low frequency (<100 Hz) faradic pulse train, which can be characterised with the amplitude of pulses, the repetition frequency of pulses and the pulse duration. The are capacitive properties in electrode-tissue interface and every pulse that being delivered builds up charge in the tissue which can be potentially harmful, especially in case of implanted electrodes. To avoid this from happening, another pulse with opposite polarity ( called reverse pulse ) is induced to balance the net charge which is called biphasic, while a unipolar pulse train is referred to as monophasic. Biphasic stimulation is normally safer, but the threshold current for activating muscle movement will be higher, as the induced electric field will be more localized. The solution is the application of pseudomorphic biphasic pulses, which are extended and have lower amplitudes, at the same time still deliver the same amount of charge. A biphasic pulse with the definition of the pulse parameter terminology that will be used in the rest of this paper is shown in Figure2.2. The strength of muscle contraction can be controlled by the parameters of stimulation.
The current amplitude and pulse duration controls the total amount of injected charge. Increasing either of these parameters will result in larger electric field, more and more motoneurons ( motor units ) will be affected, increasing number of muscle fibres twitch which contributes to the total force of the contraction ( this effect is known as spatial summation ).
If the period 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 ). Because of this, the stimulation frequency must be higher than the so called fusion frequency for a smooth contraction, if not, the response will be a series of twitches. It is important to know that increasing of 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.
Muscles come in different size and shape, which also determines the maximal force, susceptibility to fatigue, and the time for a twitch. Thus the parameters 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.
Functional electrical stimulation (FES)
Functional electrical stimulation is the stimulation of the peripheral nerves with the function of facilitating some kind of functional movement. It must be distinguished 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]. As mentioned before, 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.
In every movement human made, it involves the twitch 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 natural muscle movement. Neuroprostheses have been successfully tested for the upper and lower extremities, the bowels, and the respiratory system, but even bladder control of patients could be recovered with FES. Several systems underwent clinical trials and are now available as commercial products.
At the moment, 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 links, and connecting neuroprostheses in a network.
Impedance model of skin
Basic knowledge about the electrical characteristics of the electrodes, the human skin and tissue are required in order to have an accurate control over the injected charge and the resulting muscle response. Thus, current regulated stimulation must be applied. The total impedance that can be measured between the electrodes depends on a variety of factors, such as current density, repetitive pulse frequency, electrode size, electrode separation, electrode material, temperature, humidity, and duration of stimulation. There has been massive research to find the best fitting equivalent circuit model, but there is still no accordance how to model its nonlinear behavior accurately. One of the most common models is presented in Figure 2.3. It reflects that during neuromuscular stimulation three subsystems are connected serially.
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 Rf accounting for DC characteristics of the model .
The skin surface of our body can be modeled by a serial resistance and a parallel RC. Cp and Rp can be practically eliminated by removing the outermost layer of the skin, the stratum corneum (outermost layer of epidermis ) . The deep tissue can be modeled by the resistive Rt, bulk tissue resistance.
Due to the complexity of the model and lots of contributing nonlinear physical factors, it is very difficult to estimate the total impedance between the two electrodes. Yet, based on research conducted,  suggests that for practical FES applications, the impedance 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.
Figure 3.1 shows the basic block diagram of Pulse Stimulator. It consist of three major parts which are input devices, main board ( microcontroller ) and output devices which includes LCD, boost converter and output switch.
Selection of circuit components
Amicrocontrolleris a small computer on a singleintegrated circuit consisting internal CPU,clock, timers, I/O ports, and memory, as well as a typically small amount of RAM (Random Access Memory). Microcontrollers are designed for small or dedicated applications. Thus, in contrast to themicroprocessorsused inpersonal computersand other high-performance or general purpose applications, simplicity is emphasized.
Microcontrollers may use four-bit words and operate atclock ratefrequencies as low as 4kHz, as this is adequate for many typical applications, enabling low power consumption (millwatts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications. Other microcontrollers may serve as performance-critical roles, where they may need to act more like aDSP (digital signal process), or with higher clock speeds and power consumption.
Microcontroller can be considered as a self-contained system with a processor, memory and peripherals and can be used with anembedded system. (Only the software needs to be added.) The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. These are called embedded systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Typical input and output devices include switches, relays, solenoids, LEDs, small or customLCDdisplays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc.
Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.
Interrupts in Microcontrollers plays a very important role in providingreal time response to events in the embedded system they are controlling. When certain events occur, aninterrupt system can signal the processor to suspend processing the current instruction sequence and to begin aninterrupt service routine(ISR, or "interrupt handler"). The ISR will perform any processing required based on the source of the interrupt before returning to the original instruction sequence. Possible interrupt sources are device dependent, and often include events such as an internal timer overflow, completing an analog to digital conversion, a logic level change on an input such as from a button being pressed, and data received on a communication link. Where power consumption is important as in battery operated devices, interrupts may also wake a microcontroller from a low power sleep state where the processor is halted until required to do something by a peripheral event.
Microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable memory. Compilers and assembler are used to turn high-level language and assembler language codes into a compactmachine codefor storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory.
Microcontrollers usually contain from several to dozens of general purpose input/output pins (GPIO). GPIO pins are software configurable to either an input or an output state. When GPIO pins are configured to an input state, they are often used to read sensors or external signals. Configured to the output state, GPIO pins can drive external devices such as LED's or motors. Time Processing Unit(TPU) is a sophisticated timer. It can detect input events, generate output events, and perform other useful operations. A dedicatedPulse Width Modulation(PWM) block makes it possible for the CPU to controlpower converters, resistive loads, and motors without using lots of CPU resources in tight timer loops.
Many embedded systems need to read sensors that produce analog signals. This is the purpose of theanalog-to-digital converter(ADC). Since processors are built to interpret and process digital data, for example, 1s and 0s, they would not be able to do anything with the analog signals that may be sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. A less common feature on some microcontrollers is adigital-to-analog converter(DAC) that allows the processor to output analog signals or voltage levels.
In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is theProgrammable Interval Timer(PIT). A PIT just counts down from some value to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, or the heater on.
Universal Asynchronous Receiver/Transmitter(UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU. Dedicated on-chip hardware also often includes capabilities to communicate with other devices (chips) in digital formats such asI2CandSerial Peripheral Interface(SPI).
AT89S52 was chosen to be the microcontroller for this project mainly due to it's low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel's high-density nonvolatile memory technology and it is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.
AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. Besides, the Power-down of At89s52 mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. 
TL494 Pulse - Width - Modulation Control Circuits
The TL494 incorporates all the functions required in the construction of a pulse-width-modulation (PWM) control circuit on a single chip. It is designed primarily for power-supply control as it offers the flexibility to tailor the power-supply control circuitry to a specific application. The TL494 contains two error amplifiers, an on-chip adjustable oscillator, a dead-time control (DTC) comparator, a pulse-steering control flip-flop, a 5-V, 5%-precision regulator, and output-control circuits. The error amplifiers exhibit a common-mode voltage range from -0.3 V to VCC - 2 V whereas the dead-time control comparator has a fixed offset that provides approximately 5% dead time. The on-chip oscillator can be bypassed by terminating RT to the reference output and providing a saw tooth input to CT, or it can drive the common circuits in synchronous multiple-rail power supplies.
The uncommitted output transistors provide either common-emitter or emitter-follower output capability. The TL494 provides for push-pull or single-ended output operation, which can be selected through the output-control function. The architecture of this device prohibits the possibility of either output being pulsed twice during push-pull operation. The TL494C is characterized for operation from 0°C to 70°C. The TL494I is characterized for operation from -40°C to 85°C.
Positive 5 V Voltage Regulator
LM7805 series of three terminal positive regulators are available in the TO-220/D-PAK package and fixed output of positive 5V.This makes them very useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If sufficient heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents.
LCD was used as an interface for users when data is transmitted during certain performed task. It can be configured to drive a dot-matrix LCD under the control of a 4-bit or 8-bit microprocessor. Since all the functions such as display RAM, character generator, and liquid crystal driver, required for driving a dot-matrix LCD are internally provided on one chip, a minimal system can be interfaced with this controller.
A single 2x16 LCD can display up to two 16-character lines. As shown in Table 3.1 is the pin connections and the functions of a 2x16 LCD. The register select (R/S) bit is for the selection of data or and instruction is being transferred between the microcontroller and the LCD. If R/S bit is set, the byte at the current LCD "Cursor" position can be read or written. If the R/S bit is reset, either an instruction is being sent to the LCD or the execution status of the last instruction is read back. To initiate data transfer, enable (E) bit is used. The enable (E) bit is programmed in such a way that it is a clock pulse and the duty for the pulse has to be at least 450ns.
Acrystal oscillatoris anelectronic circuitthat uses the mechanical resonance of a vibratingcrystalofpiezoelectric materialto create an electrical signal with a very precisefrequency. This frequency is commonly used to keep track of time (as inquartz wristwatches), to provide a stableclock signalfordigitalintegrated circuits, and to stabilize frequencies forradio transmittersandreceivers. The most common type of piezoelectric resonator used is thequartz crystal, so oscillator circuits designed around them were called "crystal oscillators".
The value of crystal is not the main concern of the design as it can be calculated according to the desired crystal as long as oscillation frequency is above minimal. 12Mhz was chosen to be the crystal oscillator for the ease of calculation in the programming part.
The2N3904is a small, commonNPNBJTtransistorused for general purpose low-poweramplifyingor switching applications. It is designed for lowcurrentandpower, mediumvoltage, and can operate at moderately high speeds. It is a 200milliamp, 40volt, 625milliwatttransistor capable of amplifying up to 100MHz, with abetaof at least 100. It is used in a variety of analog amplification and switching applications.
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 output of the pulse stimulator, these issues were less relevant, therefore a BJT was used, which exhibits lower forward voltage drop and higher breakdown voltage at lower price as cost is still the main concern for this project.
Potentiometer consists of three terminals. Two end terminals which placed at the same direction will give the entire resistance whereas the third terminal, the "wiper" shows the variable resistance as the shaft is tuned. The resistance between wiper and on end terminal will decrease while the other increases.
In this project, potentiometer was used to control the contrast of LCD and to vary the frequency and duty cycle of the PWN circuit.
AC to DC Adapter
TELETRON AC to DC Adapter is a low cost AC to DC converter which converts 240V AC to desired DC ranged from 3V to 12V. Moreover, changes of polarity can be made in this adapter too. TELETRON AC to DC Adapter was chosen for this project to provide a constant DC for the pulse stimulator
An inductor is a passive electronic component which energy is stored in the form of a magnetic field. In its simplest form, an inductor consists of a wire loop or coil. The inductance is directly proportional to the number of turns in the coil. Besides, inductance also depends on the radius of the coil and on the type of material around which the coil is wound.
In this project, 2.2mH was chosen to be the inductor for the boost converter. It is crucial for the inductor to have a higher peak current rating than iL. With improper design, the inductor might overheat or saturate, if duty cycles are pushed too high. Lower inductances causes output voltage to rise more rapidly because they also increase the total transferred charge in each cycle. 
Acapacitor is apassiveelectronic componentconsisting a pair of conductors separated by a dielectric. When there is apotential difference exists across the conductors, electric fieldis present in the dielectric. This field storesenergyand produces a mechanical force between the conductors. The effect is greatest when there is a narrow separation between large areas of conductor; hence capacitor conductors are often called plates. In electronic circuits, capacitors are used to block the flow of direct current while allowing alternating current to pass, filter out interference and to smooth the output of power supplies.
Diodes are electronic component that allow electricity to flow in only one direction. 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.
CIRCUIT DESIGNING AND DEVELOPMENT
In this chapter, all the circuits and their theories will be covered. The whole circuit will be broken to small part for further explanation. There are total of 7 parts of small circuits which form the pulse stimulator circuit. They are, push button with pull down resistor circuit, oscillation circuit, 5V to 5V voltage regulator circuit followed by LCD and microcontroller interfacing circuit, pulse modulator circuit, boost converter circuit and lastly the switching circuit.
Reset Button With Pull Down Resistor Circuit
Figure 4.1 above shows that a switch is connected to a 5V parallel with a 10uF capacitor and a 0.2k resistor. It then connected in series with the pin 9 (RST) of microcontroller and followed by a pull down resistor of 0.1k. 
When reset button is pressed, the circuit holds the RST pin "high" and while releasing , will hold back to "low". A RST is accomplished by holding the RST pin high for at least two machine cycles.
9V to 5V Voltage Regulator Circuit
Switch is connected between a 9V DC source and the input of the voltage regulator (pin 1). At the output ( pin 3 ), a resistor of 0.1k is connected in series with a LED and then to ground.
Resistor is connected to prevent excessive current to flow into diode while LED is to make sure that there is current flow at the output of the voltage regulator. There are 2 capacitors connector at the input and the output of the voltage regulator. It is just to smoothen the voltage waveform.
XTAL 1 and XTAL 2 are the input and output of an inverting amplifier that can be configured for use as an on-chip oscillator. 12Mhz crystal and two 22pF are used to produce a reliably clock signal.
LCD and Microcontroller Interfacing Circuit
From figure 4.6, we can see that the data pin of LCD from DB0 to DB7 is connected to Port 0 of Microcontroller. 10k external pull ups are required for this connection as Port 0 of microcontroller does not have internal pull ups.
Potentiometer is connected to Vdd, Vo, and ground to control the contrast of the LCD. For pin RS and E, it is connected to P2.7 and P2.6 of microcontroller. No external resistor required for this port as there are strong internal pull ups in the microcontroller.
Pulse Modulator Circuit
To generate a pulse, TL494 is needed. This circuit will generate from 13kHz up to 100kHz of pulse according to desired frequency. The 4.7k potentiometer which connected to pin 4 (DTC) , pin 3 (FEEDBACK) and 9V DC source is for the control of duty cycle. Another potentiometer connected to pin 6 (RT) and ground is for the adjustment of frequency.
Notice that for this circuit, 9V of DC source is required. We just need to make sure that 9V form the source must be connected separately from the voltage regulator. Ct is the timing capacitor and the value can be from 0.44nF to 10000nF. 1nF has been chosen to be Ct. At pin 10 (E2), 0.22k resistor is connected to ground and the output of the generated pulse is carried to the transistor of the boost converter.
Boost converter is a DC to DC converter that gives a higher output voltage than the input voltage. This circuit is needed because 5V or 9V source is insufficient to generate milliamp magnitude current pulses over the high resistance of skin and tissue. Some sort of electrical power supply is needed to multiply the voltage and mostly importantly, it must be low cost. Boost converter satisfy there requirements. 
In this circuit, transistor T1 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.7). The energy of the inductor builds up as increasing current fows through it. At the same time, the capacitor discharges through Rload. If we assume that the switching frequency is high enough and the capacitor has large capacitance, Vo will be almost constant ( small ripple approximation):
When transistor is off, 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:
Discontinuous Conduction Mode
In the discontinuous mode, if is not controlled during each switching time at least are transferred from the input to the output capacitor and to the load. If the load is not able to absorb this energy, the capacitor voltage would increase until and energy balance is established. If the load becomes very light, the increase in may cause a capacitor breakdown or a dangerously high voltage to occur.
The output from boost converter is a DC output. If it is connected to the electrode pads, we can only feel constant amplitude without any pulse. To make the output to become a pulse, we need to generate a pulse according to desired frequency and connect it to a transistor. The transistor will act as a switch and turn on and off, a pulse with output from the boost converter will be generated.
SOFTWARE DESIGNING AND DEVELOPMENT
This chapter mainly describe the process of developing microcontroller based product will be discussed. The design flow, the tools to program microcontroller, the flow chart of the code will be discussed in this chapter.
Introducing to M-IDE Studio for MCS-51
M-IDE Studio for MCS-51 is the primary means for performing compiling for the MCS-51 devices. M-IDE Studio for MCS-51 allows user to edit, compile, and debug file.
The M-IDE Studio for MCS-51 allows user to write prgramming with C programming language. By using this software, user can see the error by viewing report in flie LST.
Voltage Regulator Output
Figure 6.1 and 6.2 above shows different output voltage. 9V is shown at the oscilloscopes when measure the voltage at the 9V DC source. As voltage pass through the voltage regulator, it regulate the voltage to 5V as shown in Figure 6.2.
Output Pulse from PWM
Figures below shows the output pulse captured from oscillator with different duty cycles at frequency of 14 KHz. This will also be the switching frequency of the boost converter which the output of this pulse connected to the base of the transistor.
Boost Converter OutputOutput voltage of the boost converter with different duty cycles were captured with oscillator as shown below. As duty cycle increase, voltage will get to increase. This satisfies equation (9).
From the output of the boost converter, we can see that voltage is increase with increasing of duty cycle. In Figure 6.21, notice that the waveform is different from the rest, it is the output without putting capacitor. Without the capacitor, the output voltage passes out without filtering and it became a pulse.
As shown above is the graph sketch from the values of equation (9).
A graph of output voltage versus duty cycle is plotted. Figure 6.22 shows the graph plotted from equation (9) meanwhile Figure 6.23 shows the graph plotted from the values measured. In ideal case, duty cycle can goes up to maximum which is 1, but in practice, the duty cycle can only vary up to around 0.714.
Output pulse from switching circuit
As shown in figure 6.24 is output pulse from switching circuit. In fact that the pulse in figure 6.21 can be used as the output for electrode pads too, but due to its high frequency, we have to use another way to provide a variable low frequency.
Though the table 6.1 above, we can see that most expensive component is the LCD. We can actually cut cost by developing an alternative way such as using 555 timers to generate desired adjustable frequency instead of using microcontroller, this can cut the cost of microcontroller and LCD which can save up around RM30. Besides, 555 timer is a very cheap component and can be found easily.
A low pulse stimulator has been designed and implemented. The stimulator device can generate high voltage from 19V to 50V with switching frequency of 10kHz from the boost converter. Even though the quality of produced waveform is inferior to professional waveform, the low cost makes it a competitive product in numerous applications.
Through this project, interpersonal and intrapersonal skills had been developed. Technical skills on soldering had also improved drastically and as this project includes hardware and software, this knowledge had been gained too.
In conclusion, the result of the project is not as ideal as drafted, the objective of generating pulse through electrode pads had still been able to achieve.
- Centre for Rehabilitation Engineering, Glasgow University, http://www.
- 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 Engineering, 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 engineering, 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 & 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" , Medical 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
- M. Ned, M.U. Tore, P.R. William, "Power Electronics: Converters, Applications, and Design", 3rd Edition, John Wiley & Sons, 2003.
- V.C. Koo, T. S. Lim, K.H. Koay, Y.S. Yong, E. K. Wong, B. M. Goi and W. H. Tan, "The 8051 Cook Book: A Complete Guide to Architecture, Programming & Interfacing", 2nd Edition, Prentice Hall, 2003.
- A.N. Donald, "Electronic Circuit Analysis and Design", 2nd Edition, McGraw-Hill International Edition, 2001.