low-impact muscle stimulator - toulonuxtoulonux.org/documents/electrostim/e004012_low-impact...
TRANSCRIPT
Anyone who has ever visited the clinic ofa physiotherapist or a sports masseur willhave been amazed at the large amount ofcomplex-looking equipment to be foundthere. In this area, as in many others,modern technology (and in particularelectronics technology) has become indis-pensable in a relatively short time.
One type of equipment that is mostoften used by these people is a musclestimulator. There are all sorts of differentmodels available with a variety of names,but they all work in essentially the samemanner. Two electrodes are attached tosome part of the body a small ways apart,and a pulsating current is passedbetween the electrodes. The objective ofthis is to stimulate the muscle locatedbetween the electrodes.
This usually starts with loosening upa cramped muscle and promoting theblood circulation in the muscle tissue. A
GENERALINTEREST
12 Elektor Electronics 4/2000
Low-Impact Muscle StimulatorL.I.M.S.
with treatment programs
Design by K. Walraven
This is a DIY version of a device that can be found in various forms in the clinics ofphysiotherapists and massage institutes. It produces a series of electrical shocksthat stimulate the muscles. The intensity and duration of the shocks are adjustable,and we have given great attention to the safety of this device.
Use this equipment only with bat-tery power.Never use this equipment in thevicinity of the heart! It shouldpreferably be used only on thearms and legs.Always set the amplitude controlto the minimum level when start-ing a treatment.
to leave this electronic stimulator alone and insteadask you spouse or another family member to helpyou. After all, there’s nothing wrong with a normalhand massage! Then at least you do not have toworry about possible harmful effects.
DesignThe complete schematic diagram of the stimulatoris shown in Figure 1. We can distinguish betweentwo things in terms of its operation: the generationof the electrical pulses and the implementation ofa few special functions.
The first of these is remarkably simple. Micro-processor IC1 (an 89C2051) is programmed to gen-erate pulses on its RxD and TxD outputs after theStart/Stop button S1 has been pressed. Thesepulses drive MOSFETs T1 and T2 alternately intosaturation. Transformer Tr1 boosts the voltage ofthese pulses by a factor of around 10, and they arethen applied to the electrodes I and II. That’s allthere is to it. The strength (amplitude) of the pulses
low-intensity pulsating current is ade-quate for this. With some therapeutictreatments, the only objective is to createa general sense of wellbeing, which canbe achieved using even weaker shocks. Ifon the other hand the equipment is usedto strengthen the muscles, the pulsesthat are used are significantly stronger.
However, we don’t want say too muchabout this, since you might otherwise getthe false impression that we are expertson the subject. Just to avoid any misun-derstanding, let us say that this isabsolutely not the case. All that we aredoing is making the necessary equipmentavailable, in response to repeatedrequests. From what we have been ableto find out, the technology used in thissort of equipment is in fact fairly simple.We have translated this technology into aDIY design that is as safe and reliable as
possible. That is our job and our skill.We would rather not say anything
about how to use the equipment. Instead,we strongly recommend that you consulta doctor or other specialist. You definitelyshould not use the muscle stimulator ifyou have not first informed yourself aboutwhat can and cannot be achieved withelectrical muscle stimulation. Further-more, do not regard this as a kind of toy.Even though it is powered by a battery, itcan without question produce veryintense current pulses, and these couldhave undesirable effects if the equipmentis not used properly. Depending on theskin resistance, the peak voltage acrossthe electrodes is 35 to 45 V; with no load itcan easily reach 50 V!If all that you are interested in is looseningup certain muscles or enjoying a relaxingmassage, we would actually advise you
GENERALINTEREST
134/2000 Elektor Electronics
LD1
7 a6
b4
c2
d1
e9
f10
g
3 8
5
dp
CA CA
HD1131 O HD1131 O
LD2
10dp
CA CA 7a6
b4
c2
d1
e9
f
g
3 8
5
INT0/P3.2
INT1/P3.3
P1.0/IN+
P1.1/IN–
RXD/P3.0
TXD/P3.1
89C2051
T0/P3.4
T1/P3.5
IC1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7P3.7
RST
X1 X2
20
10
12
13
14
15
16
17
18
1911
5 4
2
3
1
6
7
8
9
R51k
R61k
R71k
R41k
R81k
R91k
R101k
R12
1k
R11
1k
X1
12MHz
C3
33p
C4
33p
S4S3S2S1
C1
100n
R3
4k
7
R2
4k
7
BUZ11
SG
D
T2T1
BUZ11D7
39V400mW
D8
39V400mW
D1
TIME
D2
PROG
R1
1k
D6
1N4148
D3D4
R14
4k
7
Tr1
R16
1k
R15
1k
C5
47µ25V
T3
BD140
R13
22
k
2xINTENSITY
MAX
MIN
CW
START/STOP UP DOWN PROG/TIME
7805
IC2
C6
100µ16V
C7
100µ16V
D5
1N4001
S5 5V
5V
5V
BE
C
BD140P1
50klin
C2
10µ 63V
R17
10
k
000041 - 11
20W
0 4 16
9V
+U
+U ON/OFF
Figure 1. The use of a pre-programmed microcontroller allows the hardware to be kept to a minimum.
is controlled by simple current source formed by T3,which can be adjusted using P1. The current sourcecharges electrolytic capacitor C5, and the voltageon this capacitor is used for the output pulses. Thisapproach also ensures that only a certain limitedamount of energy reaches the transformer for eachtime interval, which is very important with regard tosafety. LEDs D3 and D4 act as a simple amplitudeindicator for the output pulses.
This takes care of the pulse generation. Now youmay be wondering why we have used a micro-processor for the pulse generator, since this couldbe done just as well with a couple of transistors anda 555 timer IC. The presence of the processor isentirely due to a number of extra functions thathave been included in the stimulator. These extrafunctions also explain the presence of the two-digitdisplay (LD1 and LD2), the two indicator LEDs D1and D2 and the control buttons S1 through S4.
The buttons can be used to select a specifictreatment time and a particular treatment program.You will see shortly how this is done. To avoid anymisunderstanding, we should say right away thatoutput pulses can be produced only after both atime and a program have been selected. Until thishas taken place, pressing the start/stop button S1has no effect. This has been done for safety rea-sons, in order to prevent the stimulator from unex-pectedly delivering a continuous current at anunguarded moment.
Before we go any further into the details of theprogram options of the stimulator, we must firstdivert our attention to a more detailed descriptionof the pulse signals that it produces.
PulsesAfter immersing ourselves deeply into theavailable literature, we came to the clearconclusion that the developers of suchdevices are remarkably unanimous withregard to the width and repetition rate ofthe pulses. Based on this, we havedecided on alternating positive and neg-ative pulses with a width of 256 µs and arepetition rate of 109 Hz. This corre-sponds to an idle time of 4.61 ms.
The pulses do not appear continuouslyat the output, but rather in packets orbursts with a duration of around one sec-ond. A typical burst is illustrated in Fig-ure 2. This naturally does not show allthe pulses in the burst, since we’d needa lot bigger page for that.
The interval between successivebursts can be set between 0.5 and 4.5seconds. The resulting signal on the elec-trodes appears as shown in Figure 2b.The intensity of the shocks dependsalmost as much on the repetition intervalas on the pulse amplitude set by P1. Thevarious treatment programs take advan-tage of this fact.
Program and timeAs already noted, two things mustselected before the circuit can start deliv-ering pulses: the treatment time and thetreatment program.
The time is set by selecting the ‘time’mode using button S4. The ‘time’ indi-cator LED D1 is on when the unit is inthe ‘time’ mode. After this, the time can
be set between 1 and 19 minutes usingthe up and down buttons S2 and S3.The time is shown on the display. Thepulses will stop after the selected timehas expired.
If the unit is switched to the ‘program’mode by pressing button S4, the indica-tor LED D2 lights up. In this mode, one ofa total of fifteen programs can beselected. The programs labelled 1 thor-ough 9 are the simplest ones, since theywork with a constant intensity levelbased on selecting the burst intervaltime. When the display shows a ‘9’, theintensity is at maximum, since the mini-mum burst interval of 0.5 s is used. Pro-gram 8 corresponds to an interval time of1 s, ‘7’ represents an interval time of 1.5 sand so on. This ‘illogical’ reversesequence has been chosen intentionallyso that the strongest program has thehighest number.
The programs indicated by ‘A’ through‘F’ are more sophisticated, since variousintensity levels are used during thecourse of the treatment session. There areactually only three different programs,each in a weak and a strong version.
Figure 3 shows how programs Athrough F are set up. The intensity isdivided into the same levels as for pro-grams 1 through 9. This means that theburst interval is the shortest, and theintensity the greatest, at level 9. The hor-izontal axis shows the treatment time —which as you know can vary.
In programs A and B, the intensity ofthe pulses is increased to its maximum
GENERALINTEREST
14 Elektor Electronics 4/2000
256 µs
1 s 0.5 ... 4.5 s
adjustable
000041 - 12
4.61 ms
ca.1 s
a
b
1
0.06 0.12 0.18 0.24 0.30 0.36 0.42 0.48 0.54 0.60
2
3
4
5
6
7
8
9
inte
nsity
time
= A= B
1
0.06 0.12 0.18 0.24 0.30 0.36 0.42 0.48 0.54 0.60
2
3
4
5
6
7
8
9
inte
nsity
time
= C= D
= E= F
1
0.06 0.12 0.18 0.24 0.30 0.36 0.42 0.48 0.54 0.60
000041 - 13
2
3
4
5
6
7
8
9
inte
nsity
time
Figure 2. The pulse signal produced by the muscle stimulator.
Figure 3. There is a choice of three differentarrangements for the automatic treatmentprograms, each with two intensity levels.
value in three steps, following which it remains atthis level for a reasonable length of time and thendrops back down in steps. Program A is the weakversion, and program B is the strong version.
In programs C and D, the treatment time isdivided into three equal intervals, and the intensityis gradually increased in each of these intervals.Once again, C is the weak version and D is thestrong version.
In programs E and F, the treatment time isdivided into five intervals, and the intensity alter-nates between two levels in each of these intervals.Version F is the stronger of the two.
The durations of the individual phases of pro-grams A through F naturally depends on the
GENERALINTEREST
154/2000 Elektor Electronics
Project softwareDisk # 000041-1 supplied through Readers Services
LIMS 2.734 21-10-00 10:49 limsLIMS LST 86341 21-01-00 10:49 lims.txtLIMS HEX 5.881 21-01-00 10:49 lims.HEXLIMS PRJ 2.112 21-01-00 11:33 lims.prjCONTENTS TXT 0 08-02-00 11.49 contents.txtLIMS M51 4.200 21-01-00 10:49 lims.m51LIMS C 16.984 08-02-00 11:38 Lims.CLIMS OBJ 5.683 21-01-00 10:49 Lims.OBJREADME TXT 220 08-02-00 11:43 Readme.txt
(Sophos data integrity and fingerprint files not listed)
SoftwareThe software contained in the microprocessorconsists of a main routine and an interrupt routine.The interrupt routine handles all real-time pro-cessing, such as keeping track of the time, generat-ing the pulses and scanning the keypad (withdebouncing). Pulses are generated as soon as themain routine has set a flag. In the reverse direction,the interrupt routine sets flags whenever it detectsthat a valid button has been pushed. The time (inthe form of a counter with a resolution of half asecond) is also made available to the main routine.The main routine responds to the pushbuttons,drives the display and determines when outputpulses must occur.The processor works with a 12-MHz crystal. Theinternal Timer 0 works in mode 3, which meansthat it divides by 256 (8-bit counter) and has aninput frequency of (12 MHz ÷ 12) = 1 MHz.Timer 0 thus generates an interrupt every 256 µs.The number of interrupts is counted and used tocontrol the circuit. For example, output P30 is sethigh when the interrupt count is 2 and it is set lowagain when the count is 3. Output P31 is set highwhen the count is 20 and again low when thecount is 21.At a count of 37, the counter resets itself (to 1)and a new cycle begins. The time between twopulses is thus 18 times 256 µs, or 4608 µs. A fullcycle lasts 36 times 256 µs, which is 9216 µs. Eachcycle is always completed once it is started. Time-keeping is based on counting 1964 interrupts forevery half second. Here a full second is not exactlyone second, but instead 1.000448 s.The main program actually consists of a statemachine. In order to prevent the accidental gener-ation of pulses, there are two parts, one with andthe other without pulses. Only after all of the pre-requisites have been satisfied is it possible to trans-fer to the part that has pulses.In the idle state, the software checks to see if a button is pressed. Until this happens, the program runs in an endless loop. As soon as abutton is pressed, the program takes action. It switches over to the part of the program with output pulses only after a program has beenselected, the treatment time has been set and the start button has been pressed.Based on the treatment time and the selected treatment program, the main program then periodically sets a flag that causes the interruptroutine to generate pulses. When the stop button is pressed or the time has expired, the other half of the program is again called.The ‘running 8’ display is an exception, in that it is generated in the interrupt routine rather than in the main program.
interruptcounter: = interruptcounter + 1
Interrupt routine of the Low Impact Muscle stimulator (LIMS)This routine executes on every overflow of the 8 bit timer 0 (timer 0 is used in Mode 3)
The timer counts at CLOCKFREQ/12, so the interrupt routine executes every 256 µs (@12 MHz crystal)
are all input-key values the sameas the previous interrupt cycle ?
output counter = 0 ?
outputcounter = outputcounter + 1
on outputcounter = 2 activate positive out
on outputcounter = 3 deactivate positive out
on outputcounter = 18 activate negative out
on outputcounter = 19 deactivate negative out
on outputcounter = 37 outputcounter: = 0
000041 - 14
outputcounter =outputcounter + 1
keep positive andnegative outputs high
output flag = 1 ?
"running segments" displaymode flag = 1 ?
interruptcounter: = 0
display next segment every 1/16 second
treatment time: =treatment time - 1
HalfSecCounter: = HalfSecCounter + 1
HalfSecondsCounterMOD120=0 ?
interruptcounter > number of interrupts that fit in 1/2 sec.AND treatment is running ?
true
true false
false
true
true
execute code for key debounce and key repeatThis code sets "pressed keys flags" or pressed keys
to 1 if these keys are pressed during a numberof interrupt cycles (about 40 cycles).
This code also sets the "keypressed" flags after alarger number of interrupt-cycles (about 2500).
In this way we create a key-repeat effect.
Save key values, overwriting the values of theprevious interrupt cycle
false
true
true
false
false
selected treatment time. The microprocessoralways calculates the correct distribution.
Starting and stoppingAs soon as the start/stop button S1 is pressed afterthe time and program have been selected, the stim-ulator starts to generate pulses and a ‘running 8’appears on the display. As long as pulses are beinggenerated, it is not possible to change the selec-tions, and only the start/stop button can be used.If any of the other buttons is pressed, the displayshows the number of the selected program or theremaining treatment time. The display automati-cally returns to showing a running ‘8’ after aboutfive seconds.
The program can be interrupted by pressing onthe start/stop button. This amounts to a sort ofpause function, since the program continues if thebutton is pressed again. While the program ispaused, the program number or the remaining time
is displayed, and it is possible to changethe settings.
After the set time has expired, pulseproduction stops automatically and thedefault values are shown on the display:‘–‘ for the program and ‘0’ for the time.New values for both of these must beselected before a new treatment cyclecan be started.
Safety and powerWith a circuit such as this, safety musthave the highest priority. We have thusgiven it the proper amount of attention.
An important point is that pulses cannever be produced ‘by accident’ if thestart/stop button is pressed at the wrongtime. It is always necessary to intention-ally select a program and a time beforethis button has any effect.
The benefit provided by the currentsource T3 has already been mentioned. Itlimits the amount of energy that is sup-plied to the transformer. If a voltage reg-ulator had been used instead of a currentsource, the voltage would try to remainconstant, with the consequence thatoccasionally much more current wouldbe delivered than is actually necessary.This could lead to dangerous situations.
However, using a current source alsohas an unavoidable disadvantage, whichis that when there are no output pulsesthere is no current consumption, and con-sequently capacitor C5 will be charged tothe maximum voltage. The first pulsesafter this could thus have a dangerouslyhigh intensity. This is countered by hav-ing the microprocessor drive both tran-sistors (T1 and T2) at the same time when
GENERALINTEREST
16 Elektor Electronics 4/2000
(C) ELEKTOR
000041-1
C1
C2
C3
C4
C5
C6 C7
D1
D2
D3
D4
D5
D6
D7 D8
H1
H2 H3
H4
IC1
IC2
LD1
LD2
P1
PC1
PC2
PC3
PC4
R1
R2
R3
R4R5R6R7R8R9
R10R11R12
R13
R14 R15R16
R17
S1
S2
S3
S4
S5
T1
T2
T3
TR1
X1
00
00
41
-1
20W
16440
+ 0
(C) E
LEK
TOR
00
00
41
-1
Figure 4. Aside from the processor, the transformer and the displays, there aren’t a lot of components on the circuit board.
circuit board and have carefully inspected it (payparticular attention to the quality of the solder jointsand watch out for possible shorts!), you can look fora suitable enclosure. The type shown in the com-ponents list is attractively compact, but it’s a bit onthe small side. If your transformer turns out to besomewhat larger than the one used in our prototypemodel, the whole assembly may not fit in this enclo-sure, and you will have to look for something bigger.
As indicated on the component layout drawing,a number of components (such as the transistorsand the voltage regulator) should be mounted flaton the board in order to limit the height of theassembled board. The photograph of the board inFigure 5 clearly illustrates this.
The board is mounted using four small screwsthat are glued to the rear side of the front panel ofthe enclosure. However, it’s better to make the firsttests without the front panel in place, since it’s eas-ier to access the board in this case. If there are anyproblems, it’s then easier to check whether the sup-ply voltage is present at certain key points.
We designed a front panel for our prototype thatmatches the enclosure shown in the componentslist, as shown in Figure 6. Of course, you are freeto choose something different if you want to.
ElectrodesIn our experiments, we were able to successfullyuse homemade electrodes consisting of smallpieces of unetched printed-circuit board materialaround 2 by 3 cm in size. These were clamped toan arm or leg using elastics bands. To make a goodcontact, place a small piece of paper that is gener-ously moistened with ordinary tap water between
no pulses are being generated. This dis-charges C5, and the first pulses will actu-ally be weaker than normal. This is apleasant side effect, since it results in asort of ‘soft start’ effect for each cycle.
The choice of the power supply is alsoa critical issue with regard to safety. Thiscircuit must be powered only from a bat-tery, and absolutely not from a mainsadapter. If you use rechargeable batteries,the battery charger must never be con-nected to the stimulator while it is in use.
The power source can be either sixpenlight cells or a 9-volt battery, asdesired. The current consumption is
around 50 mA, which is not all that low.However since a treatment session lastsat most 19 minutes, even a 9-V batterywill last for at least 30 sessions. If youreplace the voltage regulator (IC2) witha low-drop type (LM2940-5 or 4805), thebattery can be used until it is dis-charged to 6 V, and the number of ses-sions that you can get from a single bat-tery is even greater.
ConstructionThe printed circuit board for the musclestimulator is shown in Figure 4. Sincethere are actually only very few compo-nents in this circuit, we hardly need tosay much about building it. If you use thecomponents specified in the componentslist and mount them as shown in the lay-out drawing, there’s not much that cango wrong.
Transformer Tr1 is what is called a‘100-V’ output transformer. Even thoughoutput transformers are not all that pop-ular any more, it is reasonably easy toobtain. Both Conrad Electronics andMonacor (or Monarch in some countries)still have this type of transformer in theircatalogues. We need a type that has0/4/16-Ω outputs and can deliver 20 W.Although it’s true that we do not needanything like 20 watts here, this is theonly transformer that has the correctwinding ratio (1:10).
After you have finished assembling the
GENERALINTEREST
174/2000 Elektor Electronics
COMPONENTS LIST
Resistors:R1,R4-R12,R15,R16 = 1kΩR2,R3,R14 = 4kΩ7R13 = 22kΩR17 = 10kΩP1 = 50kΩ linear potentiometer
Capacitors:C1 = 100nFC2 = 10µF 63 V radialC3,C4 = 33pFC5 = 47µF 25V radialC6,C7 = 100µF 16V radial
Semiconductors:D1-D4 = high-efficiency-LED, red
(3 mm)D5 = 1N4001D6 = 1N4148D7,D8 = zener diode 39V/0.4WT1,T2 = BUZ11 (BUZ10,
BUZ100)T3 = BD140IC1 = 89C2051-12PC
(programmed), order code000041-41
IC2 = 7805 (or LM2940T-5, 4805)
Miscellaneous:S1-S4 = Digitast pushbutton
(ITT/Schadow)S5 = on/off switchTr1 = 100-V line output
transformer 0-4-16 Ω/20 W(Conrad Electronics orMonacor/Monarch)
X1 = 12 MHz quartz crystal LD1,LD2 = HD1131OEnclosure: e.g., TEKO 160x95x61
mmPC1-PC4 = miniature wander
socketsDisk, project software (source
code and hex code): order code000041-11 (see ReadersServices)
Figure 5. The transistors and the voltage regulator are mounted flat on the board, in orderto limit the height of the assembly.
the electrode surface and the skin (don’t use dis-tilled water, since it doesn’t conduct electricity).The separation of the two electrodes must be deter-mined experimentally; it will usually lie somewherebetween 5 and 30 cm.
If you plan to use the stimulator regularly, it isbetter to use a more durable material for the elec-trodes. You might consider purchasing ‘real’ elec-trodes with Velcro fastenings. These can usually beobtained in specialist medical equipment shops.
The connection between the electrodes and thestimulator can best be made using lengths of flex-ible wire (test lead cable) with miniature bananaplugs at each end.
Initial operationTo check out the stimulator once you have built it,proceed as follows:– Connect a 9-V battery, turn P1 completely to theleft and switch on the device with S5. The ‘pro-gram’ LED D2 must now be on, and ‘Lims’(for ‘Low-impact muscle stimulator’) should appearon the display, followed by a static dash. The dashmeans that no program has been selected. If thisdisplay indication appears, you can be practicallycertain that the processor part of the circuit is work-ing properly.– Press on the ‘up’ button. A ‘1’ should appear onthe display. Each time that the ‘up’ button ispressed again, the program number will beincreased by one, while pressing on the ‘down’ but-
ton will reduce it by one.– Press the ‘program/time’ button S4. A‘0’ will appear on the display, and the‘time’ LED will be lit. Choose a timebetween 1 and 19 minutes using the upand down buttons.– Press on the ‘start/stop’ button. A linesegment will start to run around on thedisplay in the form of an ‘8’, as a sign thatthe circuit is active.– Turn the amplitude control P1 slowly tothe right. LEDs D3 and D4 should light upat a certain point, and they shouldbecome brighter as P1 is turned further tothe right.– If everything is OK up to now, turn P1back to its minimum position (left) andswitch off the stimulator with S5.– Connect two electrodes to the stimula-tor, and clamp them to your leg (for exam-ple) about 10 cm apart. Switch on thestimulator, and select program 8 and atime of 2 or 3 minutes.– Check that P1 is turned to the mini-mum level, and then press the start/stopbutton. You will not feel anything at thispoint.– Turn P1 slowly to the right. At a certainpoint, you should feel a slight tingling.Cautiously turn P1 further until the desiredintensity is reached. Don’t overdo it!
The circuit also has a test program forchecking that it is working properly. Thiscan be run by holding the up and downbuttons pressed while you switch the uniton with S5. If you then press thestart/stop button, all segments of the dis-play should light up and LEDs D1 and D2should blink. You can exit the test pro-gram by pressing on the program/timebutton, which causes the software num-ber to appear on the display.
(000041-1)
Text (Dutch original): S. van Rooij
GENERALINTEREST
18 Elektor Electronics 4/2000
Low Impact Muscle Stimulator
L I M S
000041 - F
UPINTENSITY
TIME
PROG
DOWN
POWER
PROG/TIME
START/STOP
MAX
OFF
ON
MIN
Figure 6. This front panel design matches the TEKO enclosure noted in the components list.