Lab 8:
Recording from neurons sensing insect leg joint angle and bristle deflection

Background:  An electrode near nerve cell processes can record what physiologists call action potentials (APs): transient changes in voltage due to the opening and closing of membrane channels that allow passage of ions such as sodium, potassium, calcium or chloride. Even removed from the body of a roach, the sensory fibers in a leg can can function for more than 3 hours. In this lab you will use needle electrodes to record extracellular AP "spikes" that are spontaneous and/or correlated with joint flexion or leg "hair" stimulation. You will use your window discriminator of Lab 0.5 to detect AP events, counting them over a 10 second interval, and trying to find the peak rate of firing.

In Lab 8 the sensors of joint angle or hair stimulation are live nerve cell endings that change internal voltage due to mechanical stress. They convert voltage changes into pulse frequency, acting as voltage controlled oscillators.

Lab 8 will take place in room B-20 in Arnold Lab; a team will be accompanied by JDD, bringing the subject, Blaberus. "Adult size, 5 to 6 cm. Common to tropical America. Also known as the palmetto bug or the death's head bug, the Blaberus is the largest cockroach in the US." from Carolina Biological.
B-20 has six Gateway computers with the full edition of LabVIEW installed, a version not backward compatible with the Student Edition. The Gateway has a 6024E DAQ card, and a BNC version of the green connector block. (acct: Stein_Lab; password: arnoldb20)

Requirements:
As you will have seen in the B-20 class demo, you (or we) will need to remove one of the legs from a roach and place it on white paper on a dissection tray. Pin the leg down at the proximal joint with a dissecting pin. Clean two needle electrodes with emory paper and insert them into the exoskeleton at the segment of the leg above the bristles (smooth exoskeleton), 2-5 mm distance between electrodes. Make sure not to pierce the needles into the joints themselves.

(1) Before the "surgery", set up the electronics in B-20: Attach clip leads that take the signal from the needle electrodes to the A-M Systems preamp recording head, and thence to the A-M Systems amp in the rack. Set HP filter to 100Hz and LP to 5000Hz, and gain to 1000. The A-M output goes to the Tektronix 5110 scope, where you should set the vertical gain to about 20mV. Turn on audio monitor. Out of the back of the scope is an output that will feed to Harvard Apparatus audio amplifier/speaker, and go to an Analog Channel of the BNC connector box for LabVIEW. Thus change gain on the scope will change the size of the signal to the monitor and LabVIEW.

(2) Test the impedance of the electrode pair by sticking the electrodes the roach leg or into saline-soaked blotter paper and turning the A-M preamp from REC to IMP. You should see about 1mV p-p 1KHz sinewave if your electrodes are making good connections.

Establish a low noise recording you can listen to. Is the 60Hz noise low? Make sure the metal of the dissecting tray is grounded, and the shielding of the electrode pair is grounded.

(3) Either we or you can do the surgery to remove one of the roach's back legs. The roach should be anesthesized in a CO2 atmosphere from dry ice. Place the leg on blotter paper on a dissection tray. Use a dissecting needle to hold the leg in place on the proximal side. Pierce the "thigh" exoskeleton with the needle electrodes, at about 3-6mm spacing. Turn up the audio sound and listen for multiunit nerve activity.

Evaluate spontaneous and evoked activity. Stimulate the leg by extending and flexing the "knee" joint. Touch the bristles (hairs) with a silk thread, or blow air on the feeler at the end of the leg.

We will be particularly interested if you can detect directionally selective responses for flexion and extension of the joint: meaning: Response is better to one direction of rotation than to the other. Try to estimate the maximum "firing rate" in Hz of the units you listen to and watch on the scope.

(4) Use MAX to look at the analog channel input to LabVIEW sent from the back of the 'scope. Try to select a good threshold while watching evoked activity on the channel strip chart.

(5) Before you go to the B-20 Lab, Create a VI similar to the one you did in Lab 0.5: Your VI will count the number of analog "events" that go above then below a threshold. Have the counting go on, in a loop, for 10 seconds at at time. Displays the total count on your front panel at the end of the 10 seconds. Also display the number of times the the Analog In icon was accessed during the 10 seconds. (What is your effective sampling rate?) On one Gateway in B-20 we counted 1700 cycles in 10 seconds.

Timing: From the Time & Dialog menu of the diagram window select Tick Count to be an initial condition from outside a timing while loop; inside the loop have the init. cond time subtracted from a second tick count, and the result compared to 10000 msec as a condition of Stop-If-True for the loop.

<THE GATEWAYS IN B-2O DO NOT HAVE ZIP DRIVES: YOU WILL HAVE TO BRING OVER YOUR VI ON A FLOPPY, OR A JUMP DRIVE, OR EMAIL IT TO YOURSELF.>

Measure spontaneous and evoked counts. Try to assess variability to repeated stimulations. See if you can hear more than one distinct unit contributing to the response. Listen for transient and sustained responses to stimuli.

(6) Create a VI that can detect the peak rate (1/t-min) of response during a 1 second interval.

Matlab Help: Below is the diagram of a VI that acquires 1 second of a waveform at 10000 Hz sampling rate, then passes the waveform on to a Matlab script that, in a loop, threshold discriminates, counts pulses, and finds a peak rate. Note that the VI also reports the total count!

Read about how to use the Matlab Function icon in LabVIEW: (Math menu choice). Study the script above. Your main problem may be debugging your script without the Matlab support of breakpoints. You can help yourself by sending variables to the front panel. See the "debug" output on the diagram above. Use JD as a debugging tool if you like, or copy all the text to a Matlab script file, add at the top of the file thet, dt and D_A inputs, and single-step in Matlab.

As you build up your script, try running it. Make sure you attach the error message in the bottom right hand corner. In the script above ordinary words are deliberately misspelled: flag is a function in Matlab... The size function can have 2 or more outputs, making it a vector. On the Inputs and Outputs designated on the edges of the icon you need to declare them as real vectors. You may want some hysteresis around thet to avoid spurious small blips.

In the MAX utility you can with Analog In the approximate size of your signal, to know where to set thet, the threshold.

Create and test your Matlab script VI in 095 before going over to Arnold Lab: Use a 100 Hz 20% duty cycle 0-2v amplitude pulse waveform as your test input.

What to show us:
Run the signal from the roach leg, to the needle electrodes, through the amplifier and filters, to the scope, the audio monitor and into LabVIEW. Collect 10 seconds worth of data, with evoked and spontaneous trials. Adjust for best threshold. Have a VI process the signal to count events that exceed the threshold, and report peak rate. See if you can demonstrate direction selectivity in knee joint rotation, or direction of stroking leg bristles.

About peak rate: If you were recording from one nerve cell only, you'd expect the peak rate to be less than 1000Hz. But your electrodes are recording from several units simultaneously. Depending on the threshold you set, you may see something like a half-dozen units. So if two different units fire v. near each other in time, your recorded peak rate may be greater than 1000Hz. If you set a high enough threshold so that you are recording from only the unit with the greatest amplitude, your peak rate should be less than 1000Hz.

Calibration: Back in the 095 lab you should show us that your counting and max_rate report the correct numbers for a calibrating pulse train from the waveform generator.

See what happens to unit activity if you extend the joint to near its limit, or flex to "jack-knife" closure. Can you hear one unit firing for extension, and a different one for flex?

FTQ: May involve looking at your matlab script for detecting peak rate, and asking what happens if a line of code is altered. Or you maydiscuss sample rate and spectrum of information in signal.

[Clean up your work area before leaving room B-20. Disconnect the cables from the electrodes and the scope. Be sure to turn off battery-powered audio monitor!]