Historic, archived document Do not assume content reflects current scientific knowledge, policies, or practices. ‘4. a 5 c2/ £ 4-tQ 0 United States Department of Agriculture Agricultural Research Service ARS-48 April 1986 / Electronic Techniques for Measuring Insect Behavior in the Laboratory o c- oo ~< ABSTRACT CONTENTS Spangler, Hayward G., and Alex Takessian. 1986. Electronic Techniques for Measuring Insect Behavior in the Laboratory. U.S. Department of Agriculture, Agricultural Research Service, ARS-48, 12 p. A number of relatively simple electronic devices, useful in the entomology laboratory, are described. These include power supplies, signal amplifiers using operational amplifiers, timing circuits, and filter circuits. This introduction to simple electronic techniques is designed to help entomologists and other biologists collect data efficiently, accurately, and correctly.' Keywords: bioelectronics, entomological techniques, insect behavior techniques Copies of this publication may be purchased from the National Technical Information Service, 5285 Port Royal Road, Springfield, VA 22161. ARS has no additional copies for free distribution. ACKNOWLEDGMENTS We thank Robert E. Wilson of the USDA-ARS Southwest Rangeland Watershed Research Center for drawing the figures. Introduction 3 Power Supplies 3 Voltage Regulators 4 Variable Power Supply 4 Operational Amplifiers 5 XCM7555 CMOS Timer /Oscillator 6 Simple Signal Processing 8 Rectif ier/Averager (Detector) 9 Accumulating Calculator 9 Portable Strobelight 10 Suggested Readings 10 Mention of companies or commercial products does not imply recommendation or endorsement by the U.S. Department of Agriculture over others not mentioned. ABBREVIATIONS BW - bandwidth C - capacitance CMOS - complementary metal-oxide semiconductor G - gain f - frequency I - current R - resistance rms - root mean square T - time Vcc - supply voltage ELECTRONIC TECHNIQUES FOR MEASURING INSECT BEHAVIOR IN THE LABORATORY By Hayward G. ^Spangler and Alex Takes sian^ INTRODUCTION This publication introduces entomologists and other biologists to simple electronic techniques to help them collect data quickly, efficiently, and accurately. The reader does not need to have an extensive background in complex electronics to apply these techniques to biological studies. Many devices can be built using simple analog circuits. Described are several types of power supplies, precisely controlled amplifiers, timing circuits for controlling experiments, and filter circuits that reduce power line interference. Also included are two methods for detecting amplitude changes from high-frequency signal lines, useful for developing signal detectors for insect sounds and movements. Plans are given for constructing two specific devices. One device, a ^calculator converted to accumulate data, can count most electrical pulses -- transduced from insect activity. In combination with operational amplifiers for signal amplification and a rectifier- averager for signal processing, this device has been used to count insects engaged in a number of behaviors, for example, honey bees feeding or leaving and entering a colony. The second device described is the pocket strobe, which has two distinct advantages over xenon flashtube stroboscopes. Because it is small and fully portable, it can be aimed at an insect at close range, both in the field and in the laboratory. Its lower flash intensity, though bright enough to freeze action under dim light, is much less likely to disturb the insect. ^-Research entomologist and laboratory assistant, respectively, Carl Hayden Bee Research Center, U.S. Department of Agriculture, Tucson, AZ 85719. By simplifying the application of electronics to biological research, we hope that this publication will encourage widespread use of techniques which can make the collection of data easy and reliable. A list of suggested readings is included to provide more information for those requiring it. POWER SUPPLIES All active electronic circuits require some form of power supply. Frequently, power can be supplied by batteries. However, if a device is often used in one laboratory location and if it uses heavy current at one or several regulated voltages, some form of power supply using line voltage (assumed to be approximately 117 V, 60 Hz) is needed. Frequently, low power applications can be satisfied with "battery eliminators" available in several voltage ratings. More power at 12 V can easily be obtained with larger power supplies designed to run automobile accessories inside the home. Because these options may not be suitable, we present the basic information for constructing low-voltage power supplies that will power virtually any solid-state device. Three common configurations are given in figure 1.1 to 1.3 for connecting a transformer, rectifiers, and capacitors to obtain useful low-voltage DC. Both figure 1.1 and 1.3 will provide a DC voltage of 1.414 times the rms output voltage of the transformer secondary winding. However, figure 1.3 will produce twice the current as figure 1.1. Figure 1.2 will produce a peak DC output of 0.707 times the rms output voltage of the transformer. Both figure 1.2 and 1.3 will give twice the pulse output frequency of figure 1.1, allowing for one-half as much filtering capacitance. 3 Figure 1.1 Figure 1.2 TRANSFORMER REGULATORS LM 7805 = 5 V LM 7812 = 12V LM 7815 = 15V DC IN J_ LM 2_ 78XX -O 0.01 fiF REGULATED DC OUT Figure 1.3 Figure 1.4 POSITIVE REGULATOR 35V DC IN rio.^F o- -o + 1.2- 33V DC OUT Figure 1.5 Figure 1.6 Voltage Regulators Integrated circuit voltage regulators (fig. 1.4) can easily be obtained in many voltages (5, 12, and 15 V, and so on). To operate a regulator, the basic DC power supply must yield a voltage level at least 2 V higher than the regulated output. Because the regulator consumes some current, it may not be practical for battery operated circuits. The 0.01-uF capacitor is used to suppress voltage spikes that are too fast to be filtered by the large electrolytic capacitors shown in figures 1.1 to 1.3. Regulators are available in both positive and negative configurations. If both a positive and negative supply with a center ground (split) are required, the configuration shown in figure 1.5 can be used. The researcher should select regulators that supply needed voltage while keeping both positive and negative supplies at least 2 V higher than the output voltage under expected load conditions . Variable Power Supply The most economical way to construct a variable power supply is to use an adjustable regulator integrated circuit. These are readily available in many voltage ranges. For example, the LM350, which is the type we used (fig. 1.6), has a range of from 1.2 to 33 V. This circuit requires a 50-kohm (50k) potentiometer for a control. A voltmeter could be used to read the output voltage; otherwise, the control should be calibrated. 4 ■O + 9V "A I Figure 2.1 Figure 2.2 Figure 2.3 +9V 33K Figure 2.4 Figure 2.5 Figure 2.6 OPERATIONAL AMPLIFIERS Operational amplifiers (hereafter referred to as op amps) are versatile active devices which can be used to make many kinds of amplifiers. Two basic amplifying configurations are used for op amps. One, the noninverting amplifier, produces an output that is in phase with the input (fig. 2.1). The other, the inverting amplifier, produces an output that is 180 degrees out of phase with the input (fig. 2.2). Op amp circuits can be powered in two ways. The most common is with the split supply, which has a positive voltage and a negative voltage of the same magnitude and a ground at zero volts (fig. 2.3). The other way to power op amps is with the single supply, which has a zero volt ground and a positive voltage line (fig. 2.4). A single supply is often more convenient for small portable equipment. The gain of the noninverting amplifier of figure 2.1 can be computed by G=l+R^/Rg. The gain of the inverting amplifier of figure 2.2 can be found by G=-R^/Rg. A typical single-supply noninverting amplifier using a CA3140 op amp is shown in figure 2.5. The gain of this amplifier can be computed from the first formula by letting R^=47k and Rg-2 . 2k to give a gain of 22.4. Any gain can be achieved by selecting appropriate resistance values for R^ and Rg. Since this is a single-supply design, a voltage divider must be used to provide an offset to the op amp so that it can amplify both positive and negative voltage variations. The capacitor, which is part of this offset network, provides a signal path to ground so that the offset voltage will not vary with the incoming signal. The input resistance of this amplifier equals the resistance which supplies bias voltage to the input from the divider (100k). Figure 2.6 shows an inverting amplifier with a split power supply. The split supply requires no offset circuitry; hence, it is often simpler to design. The gain of this inverting amplifier can be computed by the formula given; and where R^=33k and Rg=4.7k, the gain is -7.02. The input resistance of this amplifier is equal to Rg and is 4.7k for this case. 5 + 9V + 9V If only AC signals are to be amplified, then the circuit in figure 2.7 can be used. This circuitry is essentially the same as that for the noninverting amplifier of figure 2.5, but with the feedback divider grounded through a capacitor. This alteration allows the amplifier to amplify AC signals while ignoring the DC bias at the input. The low-frequency response of this amplifier depends on this ground capacitor. When the capacitance is larger, the amplifier passes lower frequencies. The high-frequency response of the amplifier is inversely related to the gain of the op amp. For the CA3140, the bandwidth can be computed from BW=4.5 mHz /gain. For a gain of 22.4, for instance, the bandwidth would be 200.9 kHz. In some cases high gain and large bandwidth are needed. In such cases, the circuit of figure 2.7 can be modified to increase the bandwidth by bypassing with a small capacitor, as shown in figure 2.8. This method of bandwidth extension increases the upper limit by up to about 50 percent. The circuits given here can be used as given or customized to amplify a variety of electrical signals. Examples include electrical signals from transducers detecting insect sounds, vibration from insect movement, and electrophysiological signals. If the gain of one amplifier is insufficient, additional stages of amplification can be added. The additional gain of successive stages is most often needed when high frequencies such as insect ultrasonic signals are to be amplified, because the gain of op amps decreases with increases in frequency. ICM7555 CMOS TIMER/OSCILLATOR With the addition of two resistors and capacitors, the ICM7555 can be tailored to complete almost any requirement involving oscillation, pulse generation, and time-delay functions. The 7555 is almost identical in performance to the 555; but being CMOS, the 7555 draws only 80 uA, whereas the 555 draws 5 mA. Thus, the 7555 is ideally suited for battery operation. Figure 3.1 shows the pin locations of the 7555, and figure 3.2 shows an operational schematic. Vce( + 2 TO 18 VOLTS) DISCHARGE 2/3 TRIGGER CONTROL Figure 3.1 2/3 TRIGGER COMPARATOR DISCHARGE 3 OUTPUT DISCHARGE STAGE OUTPUT STAGE SET RESET FLIP - FLOP CONTROL COMPARATOR 1/3 TRIGGER RESET Figure 3.2 6 VCC Figure 3.3 a large value of R should be used. For example, if R=91k, then the total current consumption during the pulse is approximately 80 uA+Vcc/R; and if Vcc=9 V, then 1=80 uA+9/91k=0.18 mA. An input which will ensure that pin 2 is not held down longer than the pulse time is shown in figure 3.5. Note that the input time constant, RR*CC, must be less than the pulse duration of the circuit. An input circuit which will allow the use of positive trigger pulses is shown in figure 3.6. TIME (SECONDS) Figure 3.4 Figure 3.3 shows the 7555 configured as a basic time-delay circuit. The circuitry produces a positive pulse, as shown in figure 3.4, lasting T=1.1RC s every time pin 2 is brought down to ground potential. If pin 2 is held at ground potential for longer than the programmed duration, then the output will remain high until pin 2 is allowed to return to Vcc. For example, if the desired output pulse is to be 1 ms and if C=0.01 uF, then R=1 ms/(l.l*0.01 uF)=91k. For a 1-min pulse and C=100 uF, R=60*103/(l. 1*100 uF)= 545k. If adjustability in pulse duration is desired, then a variable resistor can be used for R. The range of pulse duration can be limited by the addition of a resistor in series with the potentiometer. To ensure stable operation in any of the configurations, values of R should not be less than 100 ohms or greater than 10 Mohms while values of C should not be less than 50 pF or greater than 500 uF. The current drain of the circuit is dependent on the value of R. Since low current consumption is usually desirable, The 7555 can be used as an oscillator with programmable pulse-high and pulse-low times, as shown in figure 3.7. Figure 3.8 shows the output of this oscillator. The length of time the output is high is TjpO. 693(Ra+R|D)C; the time the output is low is Tl=0. 693R]3*C. The VCC I Figure 3.5 Figure 3.6 Figure 3.7 7 vcc TIME (SECONDS) Figure 3.8 frequency of the output is f=1.44/(C(Ra+2Rb)) . For a symmetrical output waveform, let 10Ra10R). Figure 4.3 The best way to remove 60-Hz interference is with proper shielding to prevent such signals from being picked up. However, some entomological experiments require long exposed wires attached to insects or plants. Light detecting equipment frequently picks up 120-Hz interference, due to the variation in intensity of lights powered by 60-Hz AC current. Under such conditions, these filters, placed ahead of or between amplifier stages, will 8 remove most of the interference without significantly affecting other signal frequencies . RECTIFIER/AVERAGER (DETECTOR) To convert the amplitude of an AC signal to a DC level representing the average voltage level of the AC signal, or to remove the carrier frequency from a modulating signal, the detector circuit shown in figure 5.1 can be used. In normal use C^=C2, but if C2R DC OUT Figure 5.1 C2 IN9I4 1 1 lO/iF AC IN IN9I4 2 o S IO>xf; K o- 11 >318*1 DC OUT o Figure 5.2 ACCUMULATING CALCULATOR Calculators with constant and equal functions can be modified to repeat any of the four basic arithmetic functions when triggered by an electrical pulse from a remote source. The calculator functions as an accumulator when the addition function is repeated, adding one for each pulse. The Texas Instrument TI30 is an inexpensive calculator well suited to such adaptation. It has sufficient room for the installation of the subminiature phone jack, NPN transistor, and the 1,000-ohm resistor needed for the conversion. With its optional AC power supply, the TI30 can function continuously as an accumulator. Other calculators can be used, but thin, liquid-crystal display models are difficult to use because they either do not provide enough room for the needed parts or shut off automatically after about 10 min of idle time. Converting the calculator is relatively simple, as shown by the following steps. First, disassemble it so that the control lines from the keyboard are exposed. Then, determine the best location for the jack, bore a hole through the plastic case, and mount the jack. Next, locate the control lines activating the equals function. For the TI30, these are lines 9 and 1 in figure 6.1. Solder an NPN Figure 6.1 9 transistor (2N2222 or equivalent) across the control lines. With the TI30, the collector of the transistor goes to line 9 while the emitter goes to line 1 and the outer connector of the jack. Solder a 1,000-ohm resistor to the transistor base and to the center connector of the jack, and reassemble the calculator. The equals function will now be triggered with at least a volt-positive pulse to the center connector of the jack. Press in sequence 0, +, 1, and K. Either pressing the equals key or a positive pulse will now add one to the display. PORTABLE STROBELIGHT Stroboscopes are useful for determining the rates of repetitious movements such as insect wing beats. These devices produce very short bright flashes of light at adjustable but regular intervals. Commercial stroboscopes must be plugged into a wall outlet, since the xenon-filled tube, which produces extremely bright flashes of light, requires more power than would be practical for portable use. The portable strobelight (pocket strobe) reported here is recommended for convenient field use. This pocket strobe has two adjustable ranges, which allow from about 1 to 30 and 14 to 300 flashes. It is completely solid state and lightweight. Intended for close proximity measurements of movement rates, it does not produce nearly as much light as a xenon strobe. It employs a high-intensity (super-bright) light-emitting diode (LED) to produce yellow light. If the ambient light intensity is low, the light produced by this kind of LED is sufficient for viewing at distances of up to 25 cm. The LED circuit consists of three main sections — the power supply, timing circuit, and LED driver (fig. 7.1). The power supply is a 9-V alkaline battery. The timing circuit is a 7555 timer chip, which we have discussed earlier. The LED driver is simply a silicon PNP transistor and a current-limiting resistor. This strobelight produces short flashes of yellow light lasting only about 120 us. The time between each flash is adjustable, but the duration of each flash is fixed by the circuitry. By using the equations Figure 7.1 previously shown in the section describing the 7555, one can verify the flash duration and the flash rates, which are determined by the resistances and capacitances connected to the 7555. The 3.3k resistor connected to the LED provides a current-limited output to drive a frequency counter. Using this strobelight is quite simple: first set the strobe rate to the maximum on the high range; then, reduce it slowly until the object appears as a stable single image. The flash rate and hence the rate of movement can then be read with a frequency counter. Although this method is the most accurate way to measure the repetition rate, an easier and more portable alternative method handy for field use is to use the frequency counter only once to calibrate the dial on the strobelight. An approximate rate can then be read directly off the strobelight without need for a frequency counter. SUGGESTED READINGS Brown, P., Franz, G. N., and Moraff, H. 1982. Electronics for the modern scientists. 512 p. Elsevier, New York. Graf, R. F. 1978. Dictionary of electronics. 832 p. Radio Shack, Ft. Worth, TX. Hoenig, S. A., and Payne, F. L. 1973. How to build and use electronic devices without frustration, panic, mountains of money, or an engineering degree. 360 p. Little, Brown and Co., Boston. 10 Leventhal, L. A. 1978. Introduction to microprocessors: software, hardware, programming. 624 p. Prentice-Hall, Englewood Cliffs, NJ. Mars ton, R. M. 1976. 110 CMOS digital IC projects. 114 p. Hayden, Rochelle Park, NJ. Masten, L. B., and Masten, B. R. 1981. Understanding Optronics. Radio Shack, Ft. Worth, TX. McWhorter, G. 1978. Understanding digital electronics. Radio Shack, Ft. Worth, TX. Mims, F. M. , III. 1982. Engineers notebook II — a handbook of integrated circuit applications. 128 p. Radio Shack, Ft. Worth, TX. Roth, C. A. 1979. Fundamentals of logic design. 627 p. West, St. Paul, MN. Sessions, K. W. (ed.). 1975. Master handbook of 1001 practical electronic circuits. 602 p. Tab Books, Blue Ridge Summit, PA. Weber, L. J. , and McLean, D. L. 1975. Electrical measurement systems for the biological and physical scientists. 399 p. Addison-Wesley , Reading, MA.