Journal of Neuroscience Methods, 39 ( 1991 ) 45-52

45

~" 1991 Elsevier Science Publishers B.V. All rights reserved 0165-0270/91/$03.50

NSM 01266

A simple computer-controlled analogue ramp generator for producing multiple ramp-and-hold stimuli T. M a t h e s o n a n d F. Ditz Department of Zoology, Unit'ersiO' of Canterbuo', Christchurch (New Zealand) (Received 5 March 1991) (Revised version received 30 April 1991 ) (Accepted 3 May 1991)

Key words: Analogue ramp generator; Mechanical stimulus; Ramp-and-hold stimulus; Mechanoreceptor; Chordotonal organ; Experimental control This report describes an inexpensive ramp generator which produces multiple ramp-and-hold stimuli ("staircase-type" wave forms). The output voltage is analogue and is, therefore, free of stepping artifacts characteristic of digital function generators. W h e n coupled with a standard power amplifier and mechanical vibrator, this system is particularly suitable for stimulation of mechanoreceptive sense organs. Connection to the serial port of an IBM personal computer, or the user port of a BBC computer allows complex ramp-and-hold sequences to be developed and repeated. The number, duration and sign of ramps, and the duration of intervening hold periods can be set using the computer. This system has been used successfully to characterise phasic and tonic neurones in the locust metathoracic femoral chordotonal organ (a leg position and movement detector).

Introduction To characterise the responses of mechanoreceptors fully, it is important to be able to deliver stimuli which are similar to the animal's natural movements. In addition, the stimuli must be amenable to modification so that the limits of the response can be explored. The ability to present uniform stimuli to all the receptors under study is an important prerequisite to making detailed comparisons of responses. Complex but repeatable stimuli are most easily produced using computer-based systems because stimulus protocols can be readily stored and retrieved. Such systems generally create an output

Present address and correspondence: Dr. T. Matheson, Department of Zoology, University of Cambridge, Downing Street, Cambridge CB2 3EJ. U.K. Tel.: (0223) 336637. Fax.: (0223) 336676.

(control) voltage using a digital to analogue ( D / A ) circuit board. A simple ramp is created by incrementing the numerical value stored in a memory location in the D / A . The board then uses this numerical value to determine the voltage applied to the output. Simple programs can be devised to produce the required sequence of changes in the appropriate memory, location and thus control the shape of the output wave form. Both linear and complex curves, and repetitive wave forms can be designed. A problem inherent in D / A boards is that the output voltage changes in steps corresponding to the times when the numerical value in the memory location changes. That is, the output voltage is only an approximation of an analogue signal. with the size of these steps depending on the resolution of the D / A board. In addition, there may be switching spikes associated with the changing of values within each of the bits of the

46

memory location. Steps and spikes in the output voltage may subsequently be amplified by the power amplifier and mechanical vibrator. In many cases, these artifacts in the stimulus are large enough to stimulate sensitive mechanoreceptors, particularly acceleration detectors (since acceleration at the leading and trailing edges of each step or spike will be very high). Such stimulation is clearly undesirable in many experiments. Complex schemes have been designed to reduce stepping in D / A outputs, but these are generally expensive. True analogue voltage ramps can be created by electrical circuits containing operational amplifiers controlled by appropriate feedback (see Brown (1982) for detailed examples and schema). Such circuits are simple to design and easy to operate. It is, however, difficult to produce complex series of stimuli which can be repeated on different occasions. Typically, analogue function generators can produce square, triangle or sine waves, or linear ramps. In the case of ramps, the sign and duration are generally determined by manual controls and are, therefore, difficult to repeat accurately. The ramp generator described in this communication overcomes the problems associated with digital ramp generation because the output voltage is created by an analogue circuit. The addition of a computer interface allows repeatable accurate ramp stimuli to be delivered to the output. The analogue hardware is simple to build, cheap and compact, and can be controlled by any computer with a suitable output port (e.g., RS-232 or BBC user port). An IBM compatible computer with a clock speed of 4.77 Mz has been successfully used in our lab. BASIC software suitable for stimulation of the locust metathoracic femoral chordotonal organ is available from the first author. Customised software for different experimental protocols is relatively simple to develop.

Materials a n d m e t h o d s

Overview Hardware. The duration of ramps and intervening hold periods can be controlled either by

computer or by using the manual toggle switch on the front panel. In manual mode a computer is not required, but the durations of ramps and holds are determined solely by the experimenter's manipulation of the switch. Manual control is useful for quick testing of responses, but automatic control is preferred for precise, repeatable stimulation. Front panel controls (Fig. 1) allow alteration of the sign of the ramp (SW2: momentary-contact bipolar switch), the magnitude of the output voltage range (R30: potentiometer) and the slope of the ramp (SW4, R15: range selector switch and potentiometer). The voltage can also be set temporarily to 0 V (SW3: momentary-contact switch) or reset to 0 V (SW3: momentary-contact switch). A 3-position rotary switch (SW1) sets the operating mode (manual, automatic or calibrate). The calibrate position provides a continuous triangle wave at the input of the integrator. This signal is used in association with a 10-turn trimpot (R11) to equilibrate the positive and negative slopes. Linear ramps are produced manually by setting the appropriate slope rate, and holding SW2 closed towards the side producing the desired sign of slope. When the switch is released, the voltage remains set at the final level until a further stimulus is given or until it is reset to 0 V. Voltage drift is negligible over the time scale

SW1

Rll ~

\ D3 SW2 D4i D2

"e'

• CAL

oMANUAL

• AUTO

o//'~J . e~,)

RAMP "O

"~0L

15 10 I ~ l l tr,: N

@ "C'" :)

@

SW4 , Ii SLOPE SELECT i 0

0so~

¢.201

1e%-~_•

2"~ ,,1.5 - S

I

1o I x2.0I

SLOPE o ~ ~'~o VAx~'.~ ~i )x~.5 R15 xi.u o "~._.J • OUTPUT OFF

®

0 O~o25 -INPUT OUTPUT RESET OUTPUT VOLTAGE l t R30 SW3 Fig. 1. Front panel controls. Each control is described in the text. Control abbreviations (SW1-4, R l l , R15, R30, D 2 - 4 ) correspond to those in the component list (Table I) and the circuit diagram (Fig. 3).

47

commonly used in investigations of mechanoreceptors (1.5% in 1 min) and could be substantially improved if necessary for long-term experiments by using polystyrene capacitors. When switched to auto, ramps and intervening hold periods are generated according to commands sent from the computer (input connector: lower left in Fig. 1). The ramp slope is set using the front panel controls (SW4 and R15) as for manual control, but the start and end of each ramp in the series, and the sign of the ramps are determined by the computer (see software overview below). Software. Computer control of the ramp generator is relatively simple and could be accomplished using virtually any computer with a suitable output port. The unit has been controlled using either the user port of a BBC computer or the serial port of an IBM compatible computer. It should be noted that only 2 pins of the port are actually used (plus earth) and that a full serial communication protocol is not required. The D T R line (pin 20) is used to control the start and end of ramps, while the RTS line (pin 4) controls the sign of the ramp. Software for the IBM was written in Turbo BASIC (Borland) and compiled to an executable file (60 Kb in length), while software for the BBC was written in BBC BASIC. These particular programs were written specifically for the stimulation of the locust metathoracic femoral chordotonal organ (mtFCO), and are therefore designed to monitor the output voltage in terms of "leg angle" and "leg velocity in degrees per second" (Matheson, 1990). These aspects of the programs could be recalibrated for other experiments by anyone reasonably conversant with the BASIC programming language. The rest of this section will describe features of the FCO program (IBM version) to briefly illustrate some of the possibilities of the system. The main menu prompts the user to specify the starting voltage (leg angle), the number, size and duration (or velocity) of ramps in a series, and the duration of the intervening hold periods. The program will not allow entry of values which would result in movements outside the limits of the chordotonal organ's movement (thus preventing mechanical damage to the organ). The pro-

gram prompts the user to set the front panel controls (SW4 and R15 in Fig. 1) to the correct slope setting. A keypress then initiates the programmed series of ramps. A stimulus need not return to the starting value (leg angle). Subsequent stimuli can repeat, reverse or add to the previous one. There is provision to save protocols to disk for later recall. The stimulus regimen used for testing the responses of locust chordotonal organ neurones usually consisted of 5 - 8 complete "staircases", each with ramps at a different velocity. A single "staircase" is illustrated schematically in Fig. 2.

Hardware design The following descriptions refer to the ramp generator circuit illustrated in Fig. 3 and the components listed in Table I. Power supply and calibration circuit. The ramp generator requires +_ 15 V, with 0 V referred to ground (Fig. 3). In our laboratory the generator was built as a plug-in component for an existing modular rack system which contained a suitable power supply. A calibration circuit allows the slopes of positive and negative ramps to be balanced. When selected by SW1, an LM555 timer chip (upper left in Fig. 3) provides a 12 Hz (approx.), 50% duty cycle signal which continuously switches the ramp polarity between positive and negative. In

Negative r a m l ~ R a m p : Hold

~ [ I

I I

r-3 F-I

1

I--

izc



]

["....

1-3 F----L

.... Ulo~ed (~) Open

Manual

.... closed i ) .... Hlgh Pi I 2 ] i 0\~ Auto High P m 4

Fig. 2. S c h e m a t i c r e p r e s e n t a t i o n of a single '~staircase-type'" r a m p - a n d - h o l d stimulus. The n u m b e r and size of r a m p s can easily be varied, as can the d u r a t i o n of the hold periods. The lower t h r e e traces r e p r e s e n t the switch m o v e m e n t s ( m a n u a l control) or pin s t a t e s ( a u t o m a t i c o p e r a t i o n ) r e q u i r e d to produce the i l l u s t r a t e d series of ramps.

48 TABLE I LIST O F C O M P O N E N T S U S E D IN T H E C O N S T R U C T I O N O F T H E R A M P G E N E R A T O R RI R2 R3 R4 R5 R6 R7 R8 R9 RI0 R 11 R12 R13 R14 R15 RI6 R17 R18 R19 R20 R21 R22 R23 R24 R25 R26 R28 R29 R30 R31 R32 R33 R34 R35

22.1 k metalfilm (1%) 51 k metalfilm (1%) 3.3 k 3.3 k 820 3.3 k metalfilm (1%) 3.3 k 10 k 180 metalfilm (1%) 820 200 trim potentiometer 6.8 k 330 330 5 k potentiometer LIN 3.3 k 1 k metalfilm (1%) 7.5 k metalfilm (1%) 24 k metalfilm (1%) 43 k metalfilm (1%) 82 k metalfilm (1%) 240 k metalfilm (1%) 430 k metalfilm (1%) 820 k metalfilm (1%) 2.2 M metalfilm (1%) 4.7 M metalfilm (1%) 100 9.1 k 5 k potentiometer LIN 100 k 100 k 270 k 10 k I00 0.5 W

CI C2 C3 C4 C5

10 nF l #F 0.33 # F 3.3 , t F 33 pF

D1 D2 D3 D4 D5 D6

IN4007 LED any choice LED any choice LED any choice 1N4148 1N4148

T1 T2

BC337 BC327

ICI IC2 1C3 IC4 IC5 IC6 1C7

LM555 LM317 4N25 4N25 LM308 LM307 UA741

SWI SW2 SW3

rotary switch, 3 pos., 2 pole

SW4

rotary switch, 10 pos., 1 pole

RELAY

5 V D I L reed relay (up to 12 V may be used

toggle switch, 2 pole, on-off-on, momentary contact both sides toggle switch, 2 pole, on(momentary)-off-on(continuous)

but recalculate R5)

this mode, therefore, the output of the ramp generator is a continuous low-amplitude triangle wave. If the slopes are unbalanced because of inaccuracies in the power supply for example (e.g., positive slopes are steeper than negative slopes) then the overall output voltage (with superimposed triangle wave) drifts away from its initial value. Adjustment of the 10-turn trimpot ( R l l ) allows any such drift to be compensated. Once calibrated for a particular power supply, no further calibration should be necessary. Slope, sign and duration of ramps. The analogue ramp generating circuit is designed around an LM308 op-amp (IC5: lower left in Fig. 3)

which produces linear ramps at slopes designated by the resistance values set on the range selector switch (SW4) and slope variable potentiometer (R15). The front panel is calibrated in terms of the time taken for a given ramp to traverse the full output range of the op-amp (i.e., smaller values represent steeper ramps). With the present resistors (R17-R26) the range of durations is 0.1-100 sec. These resistance values may be recalculated and replaced if different ranges are required. The absolute slope in terms of V / s e c can be further altered by the final amplification stage of the circuit (IC6: lower right in Fig. 3). This final amplification allows the output of the

49 PART 1 CALIBRATION OSCILLATOR

]

II POLARITY SELECT I I

r#V"

i,.i

,D3

1 2 6 7iRa

~ - ~

i I

-

VOLTAGE REGULATOR

! C2-'b T

"~ I I R3 4

FROMPART 1 PART2

"~1b /

IDl~ ~r~ ] / L rela)l R6J7

£ 4} t:52

7

~i I l

R1 q

i ~TI~ _

;16 ~"oSW2

TO PART2

inputfromeom )uter _.1. reset "o~---SW3 R28 20

R33

R2o .s,¥

2,0

R220 ~

2.

6

t,,

~

output R35 31

i

J--~,,

R24~F__~ R34 tR32 R25~..._.° R27 R3~ ~eoutput off R26~ i SW3 INTEGRATION OUTPUTAMPL1FIER INTEGRATOR SLOPESELECT Fig. 3. Circuitdiagramof ramp generator. Note that the circuit is drawn as Part (upper)and Part 2 (lower)with a discontinuity betweenthe two indicatedby arrowheadsat the rightof Part 1 and left of Part 2. There are 6 mainfunctionalregions(separatedby dashed lines): (1) calibrationoscillator:(2) ramp polarity selector;(3) switchablevoltage regulator:(4) slope selector: (5) ramp integrator;and (6) output amplifier. ramp generator to be matched to the input ranges of a variety of different power amplifiers. The maximum output of approximately 25 V allows a maximum slope of 250 V - s i. The sign of the ramp is determined either by manual switch (SW2) or by the state of pin 4

when the unit is under computer control (high = negative ramp). When the base of transistor T1 is shorted to ground (by manual or automatic control) the ramp will be negative going. A positive ramp results when the base is disconnected from ground. Green and red LEDs (D3, D4) indicate

50

the sign of the present (or most recent) ramp. Op-amp IC7 (upper right in Fig. 3) provides a voltage follower to minimise changes in loading on the power supply as different resistance values are selected by SW4 (lower left of Fig. 3). Switch 2 (upper right in Fig. 3) not only determines the sign of the ramp but also closes the circuit leading to the input of IC5. This causes a ramp to be generated for as long as the switch is held closed (unless the signal reaches the upper or lower voltage limit). When under automatic control, a separate signal is required to initiate and maintain a ramp. This signal is delivered on pin 20 of the serial input. While pin 20 is high, a relay completes the circuit leading to the op-amp. An LED (D2) is illuminated whenever this relay is closed, providing confirmation that the computer is sending the command for a ramp. This is particularly useful for monitoring movements which are too slow or small to be seen. There is no direct electrical connection between the computer and the ramp generator: the control signals are relayed by optocouplers (IC3 and IC4 in Fig. 3). Reset of output. Two options are available for resetting the output of the ramp generator (SW3). Closing SW3 to one side ("output off") shorts the output of the op-amp to ground (centre bottom in Fig. 3). When released from this position, the previous voltage is again applied to the final output stage. Closing SW3 to the other side ("reset") shorts out the voltage difference across the op-amp and causes any standing voltage to be reset to 0 V. When the switch is released from this position the output from the ramp generator will be 0 V.

Discussion The ramp generator described in this communication is a useful tool which produces stimuli suitable for testing the tonic and phasic responses of mechanosensory neurones. Its design eliminates the problems associated with digital ramp generation, while retaining the versatility of programmed experimental protocols. It is cheap, simple to construct and easy to use. Computer

software to run the unit does not require complex programming and can be tailored to suit individual experiments.

Use to date The unit has successfully been used in studies of the locust metathoracic femoral chordotonal organ (mtFCO) (Matheson, 1990; Matheson, in preparation). This internal proprioceptive organ contains approximately 90 neurones (Matheson and Field, 1990) which respond to different parameters of leg movement (e.g., Fig. 4). The mtFCO spans the femur-tibia joint and is stretched by leg flexion. Linear movements of the distal attachment strand of the organ (the apodeme ligament) mimic leg movements in the range 0-120 ° (Field and Burrows, 1982). This covers most of the angles used by the animal during normal behaviour. In our lab the ramp generator described in the present paper was used to drive a Ling 101 vibrator which stretched or relaxed the mtFCO in controlled ramps at different velocities (Fig. 4). Such a protocol was ideal for characterising the tonic and phasic (velocity) components of individual neurone's responses, and was superior to continuous triangle or sine wave stimuli or to manual ramp stimuli in which the duration of ramps and the intervals between ramps were poorly controlled. If required, the ramp generator could easily be programmed to produce triangle-wave stimuli (repeating positive and negative ramps with no intervening hold periods). Limitations and possible developments At present it is not possible to control the acceleration of movements created using the ramp generator. In some cases it may be desirable to separate the phasic components of a neurone's response into acceleration and velocity components. Hofmann and Koch (1985) and Hofmann et al., (1985) have devised a system which allows this discrimination. However, their stimulator did not incorporate computer control and is considerably more complex to build and calibrate than the unit described here. It is likely that the advantages of both these devices could be combined in a more sophisticated ramp generator if necessary.

51

' J ....

[[[ [

]

...............

...... I .....

l

~:~

l .......

[

]

[

[

~

......

~, ............................ ::; .... 120 °

100005"1 0°gl flex

. . . . . .

]

Fig. 4. R e s p o n s e s of a locust m e t a t h o r a c i c f e m o r a l c h o r d o t o n a l o r g a n n e u r o n e to a s e r i e s of staircase stimuli p r o d u c e d by the r a m p g e n e r a t o r . E a c h staircase has r a m p s of a d i f f e r e n t slope (leg velocity in °sec ~). This p a r t i c u l a r n e u r o n e r e s p o n d e d to the velocity of tibial e x t e n s i o n s and fired a single spike at the e n d of some flexion m o v e m e n t s ( M a t h e s o n , 1990). T h e insets show at a faster s w e e p rate the t i m i n g of spikes in r e l a t i o n to tibial e x t e n s i o n (asterisk) and flexion (arrow). The slight delay in the r e s p o n s e (e.g., u p p e r inset) is due to c o n d u c t i o n t i m e from the c h o r d o t o n a l o r g a n to the site of i n t r a c e l l u l a r r e c o r d i n g in mid-femur. Scale: vertical = 35 mV: h o r i z o n t a l = 1 sec (insets = 67 msec).

A second shortcoming of the ramp generator described here is that a computer must be d e d i cated to running the unit during experiments if automatic control is d e s i r e d H o w e v e r because of the simplicity of the computer interface (just 2 input lines each either h i g h or l o w ) and the uncomplicated p r o g r a m m i n g it should be p o s s i ble to use virtually any low cost computer to drive the u n i t Another option may be to drive the r a m p generator using a multichannel p r o grammable pulse g e n e r a t o r Clearly such a s t i m ulator could not keep track of the output voltage in the way that a computer program c a n but the necessary pulse trains for a range of protocols could easily be precalculated p r o g r a m m e d and

called up at will during subsequent e x p e r i m e n t s This would free up a computer for online data acquisition or other t a s k s

Acknowledgements We would like to thank D r Larry F i e l d M r Tas Carryer and M r Chris Hereward for discus sions about the design and use of this ramp g e n e r a t o r D r Phil Newland kindly provided comments on an earlier draft of the m a n u s c r i p t We also thank those researchers whose interest in the circuit and program p r o m p t e d us to write this r e p o r t

52

References Brown, P.B., Franz, G.W. and Moraff, H. (1982) Electronics for the Modern Scientist. Elsevier, New York. Field, L.H. and Burrows, M. (1982) Reflex effects of the femoral chordotonal organ upon leg motor neurones of the locust. J. Exp. Biol., 101: 265-285. Hofmann, T. and Koch, U.T. (1985) Acceleration receptors in the femoral chordotonal organ in the stick insect Cuniculina impigra. J. Exp. Biol., 114: 225-237.

Hofmann, T., Koch, U.T. and B/issler, U. (1985) Physiology ol the femoral chordotonal organ in the stick insect Cumculina impigra. J. Exp. Biol., 114: 207-223. Matheson, T. (1990) Responses and locations of neurones in the locust metathoracic femoral chordotonal organ. J. Comp. Physiol., 166: 915-927. Matheson, T. and Field, L.H. (1990) Inncrvation of the metathoracic femoral chordotonal organ of Locusta migratoria. Cell Tissue Res., 259: 551-560.

A simple computer-controlled analogue ramp generator for producing multiple ramp-and-hold stimuli.

This report describes an inexpensive ramp generator which produces multiple ramp-and-hold stimuli ("staircase-type" wave forms). The output voltage is...
535KB Sizes 0 Downloads 0 Views