Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Computers and Computations in the Neurosciences
Computers and Computations in the Neurosciences
Computers and Computations in the Neurosciences
Ebook1,084 pages

Computers and Computations in the Neurosciences

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Methods in Neurosciences, Volume 10: Computers and Computations in the Neurosciences discusses the use of computers in the neurosciences. The book deals with data collection, analysis, and modeling, with emphasis on the use of computers. Section I involves data collection using a personal microcomputer system. One paper presents a tutorial on using a PC-based motor control composed of an electronic circuit to adjust the motion of a light microscope stage through a software program. Other papers discuss computer methods in nuclei cartography and a computer-assisted quantitative receptor autoradiography in studying receptor density distribution. Section II deals with data analysis and some computer programs for kinetic modeling of gene expression in neurons. The book also discusses a computerized analysis of opioid receptor heterogeneity by ligand binding in test animals using computerized programs instead of employing manual or graphical methods. Computerized curve-fitting allows the researcher to utilize a more precise mathematical model to describe the binding of one ligand to one class of sites. Section III evaluates data modeling and simulations and describes the practicality of using computers to design model ion channels. Another paper discusses a graphical interaction program called MEMPOT to simulate an electrophysiological investigation of the properties of the membrane potential in stimulated cells. The book also presents a quantitative data gathered from computer simulation of the factors that affect neuronal density per measured sections. The book is suitable for microbiologists, biochemists, neuroscientists, and researchers in the field of medical research, as well as for advanced computer programmers in medical research work.
LanguageEnglish
Release dateOct 22, 2013
ISBN9781483259512
Computers and Computations in the Neurosciences

Related to Computers and Computations in the Neurosciences

Mechanical Engineering For You

View More

Reviews for Computers and Computations in the Neurosciences

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Computers and Computations in the Neurosciences - P. Michael Conn

    preparation)

    Data Collection

    Outline

    Neurophysiological Data Acquisition Based on Personal Microcomputer System

    Personal Computer-Based Motion Control: A Tutorial and Application Using Simple Motor Controller to Drive Light Microscope Stage

    Single-Unit Isolation from Multiunit Nerves by Dedicated Recording and Computation Methods

    Computers in Study of Simultaneously Recorded Spike Trains: Organization of Neuronal Assemblies

    Computer Methods in Nuclei Cartography

    Quantitative Computerized Immunocytochemistry: Tissue Preparation and Image Analysis Techniques

    Confocal Fluorescence Microscopy in Three-Dimensional Analysis of Axon Terminal Distribution, Neuronal Connectivity, and Colocalization of Messenger Molecules in Nervous Tissue: Computerized Analysis

    Computer-Assisted Quantitative Receptor Autoradiography

    Measuring Spatial Water Maze Learning

    Measuring Discrimination Learning

    1

    Neurophysiological Data Acquisition Based on Personal Microcomputer System

    Brian R. Stromquist

    Publisher Summary

    This chapter describes a microcomputer-based system for the acquisition, reduction, display, and storage of electrophysiological data. The system consists primarily of commercially available hardware and software along with custom-built interface hardware and acquisition and review programs. The system offers a considerable advantage over other systems as almost all of the required hardware and software packages are sold commercially and may already exist in most laboratories. The Acquire and Review modules and the computer interface can be obtained from the Rockefeller University Electronics Laboratory, New York, NY. This combination of software and hardware presents a very cost-effective data acquisition system for neurophysiologists. The main advantages of the system lie in its ease of use and flexibility of data manipulation, analysis, and display. It can handle a wide variety of electrophysiological data without any software modification because of its modular design and broad flexibility of its individual components. By fully exploiting the features of the MS Windows environment, these custom modules will run on any personal computer that is Windows-capable and will be able to share data with any application that supports the Windows clipboard and Dynamic Data Exchange, thus giving them added life and value.

    Introduction

    The personal computer (PC) has quickly become a commonplace sight in the laboratory. PCs are used in every facet of the research process, from controlling instruments and gathering data to preparing manuscripts and graphics for publication. Part of the appeal of these machines, which hastened their prevalence, is that they brought to the desktop of the researcher much of the abilities that traditionally were provided by outside centralized service organizations. PCs have brought increased autonomy to those who have put them to use. But as these resources become transformed and distributed as PC hardware and software, integrating them so information flows smoothly from one to another becomes a significant challenge.

    The system described here attempts to address this challenge as well as two more: given that a custom application must be written to accomplish a certain task, one should make it run on all future hardware as it becomes available and make it flexible so as to accommodate as many different user requirements as possible. Meeting these challenges is desirable in any line of research. This system attempts to do so for two widely used techniques in electrophysiological research: recording of evoked synaptic potentials and analysis of poststimulus histograms.

    Over the years, collection and analysis of such data have advanced from visual comparison and manual calculations of oscilloscope traces to acquisition and analysis by computers. One particular limitation of most of these systems, however, has been the software. Although in many cases the software may be very powerful in its ability to analyze a particular set of waveforms, its flexibility in the final analysis and presentation of data is usually very limited.

    The system software operates within a Microsoft (MS) Windows (Microsoft, Inc., Redmond, WA) environment and employs custom software for the acquisition and review of data in conjunction with commercially available software that can be directly linked to the Acquire and Review modules. This combination provides a powerful package not only for automated on-line data acquisition and review but also for further analysis and presentation of electrophysiological data.

    The main advantages of the system are threefold. First, it allows for automated, on-line collection and analysis of evoked potentials and poststimulus histograms with a minimum of effort by the experimenter. Second, the extracted data are automatically linked to a commercially available spreadsheet/graphics program (Microsoft Excel). This program allows the data to be further analyzed and graphed. Finally, all results can be output to either a laser printer or plotter. It should be emphasized that data collection, analysis, and all graphical presentations are accomplished on-line. A hard copy of all intermediate and final results can be obtained immediately following the data collection.

    System Overview

    The system has two types of input channels: analog and histogram. There are four analog and two histogram channels. Each can be triggered independently, or all can share a common trigger. Both pretrigger as well as posttrigger data can be collected. The analog input channels are used for recording field potentials that have been amplified to ± 1 and ± 10 V. The sampling rate is individually selectable and can be one of the following values: 20, 50, 100, 500 μsec or 1, 2, 5 msec. A maximum of 2000 sample points per channel can be collected. The histogram channels are digital inputs and are intended for collecting transistor-transistor logic (TTL) pulses from the output of window discriminators (although pulses of up to 80 V are allowed). The bin width for each histogram channel can be set from 2 to 50 msec with a resolution of 2 msec. Histograms have a maximum duration of 2 sec. All channels can be used simultaneously at a sample rate of 100 μsec or greater. At 50 μsec two analog and two histogram channels can be used. At 20 μsec, one analog and one histogram channel can be used simultaneously.

    Hardware

    The system hardware, as described, typically centers around a 80386 IBM-AT compatible computer with 4 megabytes of memory, a 40-megabyte hard disk, EGA video adapter, and a color monitor. The only hard requirements for the computer are that it be capable of running Windows and be fast enough to keep up with the data acquisition. A standard IBM-AT has proved to meet these requirements.

    Experimental data are acquired through a Burr–Brown PCI-20000 modular subsystem. The PCI-20000 consists of a carrier board which fits into one slot within the computer and up to three module boards that plug into the carrier. The entire subsystem occupies two PC slots. The carrier board provides 32 bits of digital input or output. In the system described, two modules are used. The analog-to-digital converter (ADC) module has 12-bit resolution, 8 multiplexed input channels, and a conversion time of 11.25 μsec. The timer module provides a time bases for the analog channels and digital counters for the histogram channels.

    A locally designed interface module provides a front panel for the PC-20000. The interface module is rack mountable and provides BNC connectors for easy connection of analog, histogram, and trigger inputs. For the analog inputs a switch-selectable gain amplifier provides ×1, ×2, ×5, and × 10 settings which can be used to match the input signal range to the ADC inputs on the PCI-20000. The setting of the switch is ready by Acquire and the gain is taken into account for the acquisition and analysis of the data. The interface box also buffers histogram and trigger inputs.

    Software

    The goal of the system is that it be intuitive to use, relieving the researcher of much of the repetitive aspects of the experiment and presenting results in a variety of meaningful forms. Ideally, the experiment should be configured and run with a minimum of operation on the part of the experimenter.

    To achieve this, Microsoft Windows was chosen as the most suitable operating environment. MS Windows is a graphical user interface that handles much of the details of the computer hardware (i.e., display, mouse, printer, etc.). This is an advantage because it allows the system some independence of specific hardware and it is better able to take advantage of newer devices as they become available. Windows also features the ability to have several programs running and sharing the display at the same time. By using Windows Dynamic Data Exchange (DDE) protocol or its clipboard, concurrently running applications can share data on-line. This makes possible a flexible system comprised of several applications that can be used separately or in combination. Since Windows provides standard mechanisms for interprogram communication, commercially available as well as custom applications can easily be integrated into the system. Of the three applications that constitute the current system, two, Acquire and Review, were developed locally, using the Windows System Development Kit Version 3.0. Microsoft Excel was purchased commercially.

    Acquire

    The Acquire application is responsible for collecting and averaging data according to settings selected by the user. On issuing the run command, data are collected and displayed as graphs. Other commands are then available to display the data numerically, print them as graphs or tables, save them on the disk, and send them to the other applications (i.e., Review, discussed below).

    Configuration of experimental parameters is easily accomplished through the parameter panel, a set of buttons and text boxes that resemble a digital oscilloscope front panel (Fig. 1). Each parameter in the panel can be easily modified by selecting it (either with the mouse or by typing a command sequence) and inputting or selecting the desired parameter. All user input is checked for consistency, and error messages warn of missing or incorrectly specified parameters. After all the parameters are set as desired, the configuration is saved to a disk file. Saved configurations can be retrieved later through the Get-Parameters option.

    Fig. 1 Parameter Window. This window functions as the front panel of the system. With the settings shown, a single analog channel will be recorded. A run will consist of the average of three trials. Each trial will consist of 1000 samples taken every 20 μsec. Forty samples will be recorded before the trigger occurs.

    Following configuration, the Acquire and Review window can be seen. At this point, the user can collect data. Choosing the run command from the menu initiates acquisition (see Fig. 2). In this mode the program waits for the trigger(s), and once detected posttrigger samples are collected, averaged with previous trials, and displayed. This trial cycle (i.e., collect–average data) is repeated for the number of times specified in the configuration setting. By choosing the save-data command the averaged results can now be saved on the disk. The collect–save cycle is fully interlocked; the program will not proceed to the next run until the current data have been saved or discarded. Also, it will not allow the saving of the same data more than once. If, in the experiment, data collection occurs at regular time intervals, the collect–save cycle can be automated. By choosing the auto command and specifying the interval and number of runs desired, the experiment can proceed automatically. This has eliminated much drudgery from experiments involving upward of 300 runs. Another feature, the trial monitor, does somewhat the opposite; it allows for the sorting and discarding of trials within a run. The trial monitor, when enabled on the parameter panel, displays each trial as it is collected along with the current average of previous trials. Each trial can be either included in the average or discarded. A further enhancement of this feature, the data partition, allows for each trial to be placed into one of two running averages to be discarded.

    Fig. 2 Acquire Window displaying a hippocampal field potential on analog channel 1. Acquire collects digitized signals from the four analog and two histogram channels and displays the running average with each new trial. The response shown is the average of three trials. All six channels can be displayed simultaneously. Acquire can be run independently or can be hot-linked to Review for analysis of the response.

    A plot may be printed by choosing the print–plot command from the output menu. Additional commands are available for printing and displaying the raw data (ample values) for each plot.

    The last feature of the Acquire program is the hot-link. This is the method by which data in Acquire can be shared on-line with the Review program. By selecting a channel name in the hot-link menu any data collected on that channel will automatically be sent to Review in addition to being displayed in Acquire.

    Review

    The Review program is used to display and analyze data collected with the Acquire program. This can be done either on-line through a hot-link, or for files saved on disk. Review can operate in either a single-channel or a dual-channel mode. In single-channel mode the chosen data are displayed using the entire window area (see Fig. 3). Cursors can be added and adjusted to provide time, voltage, and optionally slope measurements. In dual mode, runs are selected for display, and the window is subdivided into four graphs: two for the selected data (channel A and channel B) and one each for the sum and difference of the first two. The four graphs displayed in this mode are adjusted so their scales are the same. This facilitates visual comparisons as shown in Fig. 4.

    Fig. 3 Review Window displaying hippocampal field potential along with cursors and cursor data window. The two rectangles are positioned and sized by the user. The cursor data window automatically displays an analysis of the regions outlined by the rectangles. C1 and C2 are the coordinate points of the peak and trough within rectangle B. Line d is the absolute difference in volts and milliseconds between peak and trough. The slope of the data covered by rectangle A (determined by linear regression) and its goodness of fit are displayed in line m.

    Fig. 4 Review Window displaying two field potential channels, A and B, along with the sum and difference plots B + A and B – A. All plots are automatically given uniform scales. Data cursors (shown in Fig. 3) can be added to any of the four plots. Channel A displays a user-selected saved response to which the on-line responses in channel B are referenced. Off-line comparisons could also be made between any two saved responses.

    Analysis pertaining to the EPSPs is accomplished by selecting the desired portions of the waveform to be analyzed (using two rectangles designated A and B, shown in Fig. 3). Within these rectangles various calculations pertaining to the waveform are performed. Within rectangle A the slope of the waveform is calculated via linear regression. The results are given in V/msec. A goodness of fit statistic (chi-square, χ²) is also calculated and displayed in the cursor data window. This is taken into account in accepting or rejecting a particular response. Within rectangle B the maximum (peak) and minimum (trough) values are obtained along with their difference. [This is performed in order to calculate the population spike (see below).] The cursor data window also displays the absolute position and difference of the cursors. The bounding rectangles can be adjusted using the mouse to outline the region of interest. Whenever this happens, the cursors will automatically be repositioned if necessary.

    The min and max cursors are convenient because they gravitate toward the most significant features of the region. However, they can also function more generally. Simply by clicking on one and dragging it horizontally, the cursor will ride along the waveform continuously updating its position in the cursor data window. This can be used to determine the timing of a particular deflection within a waveform. The portion of the waveform within either bounding rectangle may be examined in closer detail by double clicking the mouse inside the rectangle. Doing this expands the boxed region to the full plot size. If greater magnification is needed, the process can be repeated. Another double click restores the original view.

    Review uses the clipboard to share data with other applications. From within Review, cursor data, file name, run number, the time the run was collected, or an entire waveform can be copied to the clipboard. All or any of these parameters can subsequently be picked by a spreadsheet, drawing or graphing program, or word processor.

    Excel

    The electronic spreadsheet has become an invaluable laboratory tool. Because of its general purpose numerical analysis and graphic features, the spreadsheet has replaced many previously custom-written scientific applications. These programs have also won favor among researchers owing to the flexibility they allow in entering, editing, and organizing data. It is, therefore, extremely advantageous to develop software which takes advantage of a full-featured spreadsheet.

    Powerful as they have become, however, spreadsheets cannot efficiently manipulate data graphically. For example, the interactive cursor features of the Review program are not possible in any current spreadsheet application. Also, data acquisition is rarely performed directly by a spreadsheet. In the development of this system, however, it became apparent that flexibility of data collection and analysis had to be a key feature. The data acquisition, analysis, and output formats preferred by one researcher were completely unsatisfactory to another. It was therefore decided that these capabilities could best be met by incorporating MS Excel into the system.

    Excel is a full-featured spreadsheet for Windows with graphic, database, macrolanguage, and interprogram communication capabilities. A set of macrocommands has been developed to facilitate the sharing of data between Review and Excel and to allow Acquire and Review to be controlled through Excel.

    Using the System

    The system can be used for the acquisition and analysis of a wide variety of evoked potential and poststimulus histogram data. A typical session begins by first activating Acquire and setting the desired data parameters for the experiment. Acquire is hot-linked to Review and run in order to obtain and save a sample response. Review is then activated to recall the response. This is performed in order to set the cursors at the desired locations in the field response. Finally Excel is loaded with a template and initialized for data collection (see (Fig. 5).

    Fig. 5 Run time arrangement of the Acquire, Review, and Excel windows. Acquire (depicted by the icon in the upper left corner) is minimized to avoid cluttering of the screen, but it is still active. Review displays the averaged waveform and feature analysis. Excel shows the tabulated data from Review and a graph of the spike and slope values so far obtained as well as the percent change, calculated in the spreadsheet. All operations concerning Acquire and Review are executed from within the Excel menu.

    The template contains specified, prelabeled cells or groups of cells for the input of various experimental observations (i.e., current level required to induce minimum response, maximum response, intensities to be used for input–output curves, baseline observations, etc.) In addition, certain cells contain user-defined formulas (many of these are built into Excel) for various calculations. These can range from simple descriptive statistics, such as averages and standard deviations, to more complex user-defined computations. The templates are easy to create and can be altered as necessary.

    The windows of the three programs are then modified in size and arranged in a configuration that allows for maximum viewing of the field potentials, cursor data, spreadsheet, and graphs (Fig. 5). With the Acquire, Review, and Excel programs ready, data collection is initiated by a trigger switch connected to the trigger input of analog channel 1. This last action begins data collection. The averaged response is displayed by the Review module. Having reviewed the response along with the cursor data, the response can be saved to disk (for later review if required) or ignored. The cursor data are also transferred to Excel, which automatically updates the spreadsheet and the graph. This process is repeated until all data are collected for a particular experiment. At the end of a session, the spreadsheet and graphs are saved to disk. If data reduction is required for specific experimental trials, the data can be accessed through Review. The off-line analysis is identical to the online analysis. Automated off-line analysis of the entire experiment or segments of it is also possible.

    Conclusions

    A microcomputer-based system has been described for the acquisition, reduction, display, and storage of electrophysiological data. The system consists primarily of commercially available hardware and software along with custom-built interface hardware and acquisition and review programs. The present system offers a considerable advantage over other systems since almost all of the required hardware and software packages are sold commercially and may already exist in most laboratories. The Acquire and Review modules as well as the computer interface can be obtained from The Rockefeller University Electronics Laboratory, New York, NY. This combination of software and hardware presents a very cost-effective data acquisition system for neurophysiologists. The main advantages of the system lie in its ease of use (including automation) and flexibility of data manipulation, analysis, and display. It can handle a wide variety of electrophysiological data without any software modification because of its modular design and broad flexibility of its individual components. By fully exploiting the features of the MS Windows environment, these custom modules will run on any PC that is Windows capable and are able to share data with any application that supports the Windows clipboard and DDE, thus giving them added life and value.

    2

    Personal Computer-Based Motion Control: A Tutorial and Application Using Simple Motor Controller to Drive Light Microscope Stage

    Warren G. Tourtellotte

    Publisher Summary

    This chapter discusses some basic principles for PC-based motor control. A detailed description of an electronic circuit designed in the laboratory and used to control the motion of a light microscope stage demonstrates the interaction between its electronic circuitry and controlling software. The circuit is not intended to replace the myriad of motor control circuits available commercially but rather is a workable alternative that has a well-documented circuit diagram and programming characteristics. The latter two features are all too often obscured by manufacturers for proprietary reasons. The chapter describes the implementation of a motor-controlled light microscope stage, although the circuit can be readily implemented for other purposes once its operation and programming characteristics are adequately understood. The motor control circuit discussed in the chapter provides a versatile and uncomplicated approach to remote stepping motor control. Unlike some motor controllers that must receive the motor timing signals directly from the host computer, the circuit described in the chapter relieves the host computer of time-consuming control tasks. The host processor can issue and monitor the progress of motor control operations while the bulk of its processing capabilities are used for more complex graphical and numerical operations. As the motor control microprocessors accept rather high-level instructions, the simplified programming should prove to be a desirable feature for programmers.

    Introduction

    Personal microcomputers (PCs) are an essential component of most modern research laboratories. They have become especially valuable because they are affordable and excellent high-speed data processors, and there are a variety of ready-to-use interface devices available from many commercial sources for high-speed data acquisition and analysis. Consequently, one can affordably implement a versatile computer system capable of performing routine laboratory administrative needs as well as data acquisition and analysis with only minimal knowledge of the technical aspects of computer hardware (electronics) or software (computer program) operation.

    The PC can also interact with the laboratory environment in an active manner, for example, by controlling motorized devices for the accurate positioning of electrodes, stereotaxic devices, or other laboratory instrumentation. Motor control interfaces designed for PCs are available from a variety of commercial sources, but their application within the laboratory requires skillful connection of a motor together with the proper electromechanical coupling to an appropriate instrument. Moreover, the software required to control precisely the electronic circuitry is often not available in a ready-to-use format that can suitably control the motors for the defined purpose. These difficulties add an undesirable order of complexity to implementing motor-controlled devices, especially for investigators who have a primary interest in making their applications work and not developing it. Nevertheless, situations often arise when commercial systems are not available to meet the needs of a specific application and must be designed either de novo or modified from existing technologies.

    This chapter is intended to demonstrate some basic principles for PC-based motor control. A detailed description of an electronic circuit designed in our laboratory and used to control the motion of a light microscope stage demonstrates the interaction between its electronic circuitry and controlling software (1). The circuit is not intended to replace the myriad of motor control circuits available commercially, but rather is a workable alternative that has a well-documented circuit diagram and programming characteristics. The latter two features are all too often obscured by manufacturers for proprietary reasons. Finally, the implementation of a motor-controlled light microscope stage is specifically described, although the circuit can be readily implemented for other purposes once its operation and programming characteristics are adequately understood.

    Light Microscope Charting System

    Analyzing experimental data generated by neural tracing studies, immunocytochemistry, or in situ hybridization often requires an initial form of reduction that localizes the marker in neuropil or other tissues. One traditional method for plotting the distribution of such cellular markers in tissue has been to connect modular transducing devices to a microscope stage in order to detect and measure its movement in terms of a voltage that can be interpreted by a standard X–Y recorder (2–4). The motion of the microscope stage is recorded by the X–Y plotter to obtain a macroscopic view of tissue contours and the spatial distribution of labeled cells representing more than a single microscopic field. In the last decade, efforts have been made to digitize the macroscopic plots so that the data are available for quantitative analysis and manipulation by a computer. Several research groups have developed various schemes for encoding the movement of the microscope stage thereby allowing the computer to access the digitized data (5–11). However, this technology has proved difficult to disseminate since many of the implementations are based on outdated and nonstandard computer hardware or difficult to duplicate hand-wired circuitry.

    A modern computerized charting system (CCS) based on a standard IBM-compatible microcomputer and a motorized stage will demonstrate a sophisticated application of the motor controller circuit (12,13). The electronics have been designed to fit onto a standard IBM PC-compatible circuit board that plugs directly into the microcomputer card socket (Fig. 1A). The stepping motors are configured with a threaded screw and mounted to the microscope stage to generate a linear movement as the motor is advanced by discrete rotary steps (Fig. 1B).

    Fig. 1 (A) The motor controller circuit has been placed onto a custom IBM PC-compatible circuit board. Two connections, P1 and P2, provide access to the joystick and motor control signals, respectively. (B) The circuit has been used to control the movement of a light microscope stage. The stage position is digitized by sampling the discrete motor movements and recorded by the computer to trace tissue section contours and mark the location of appropriate tissue landmarks and chemical markers. [Reproduced with permission from W. G. Tourtellotte, J. Neurosci. Methods 35, 157 (1990).]

    Methods

    Hardware Design

    Overview

    The stepping motor circuit is based on the CY512 intelligent positioning stepper motor controller (Cybernetic Micro Systems, San Gregorio, CA). The microprocessors simplify the design and provide stand-alone motor control. Once programmed, each CY512 generates the required timing signals for the prescribed stepping sequence. A list of additional components required to build the circuit can be derived from the wiring diagram (Fig. 2). The components are extremely common low-power Schottky-clamped transitor–transistor logic devices (LS TTL) with the exception of two linear components: the NE558 quad timer and the ULN2068B Darlington power transistor (Spraque Electric Co, Hudson, NH).

    Fig. 2 Wiring diagram for the motor controller circuit. The input signals on the left (PC) are derived directly from the personal computer. The output signals on the right provide connections with the joystick (connector P1) and the motors (connector P2). [Reproduced with permission from W. G. Tourtellotte, J. Neurosci. Methods 35, 157 (1990).]

    The circuit is designed to drive four-phase stepping motors (5-V DC motors, 1 A/phase maximum) since they are very common and affordable. They can be configured for linear tracking (Fig. 1B) or, more conventionally, for rotary motion. In one form or another, four-phase motors can be obtained from a variety of motor manufacturers (e.g., Superior Electric Co., Bristol, CT; HSI Inc., Waterbury, CT; Sigma Instruments Inc., Braintree, MA).

    To control the stepping motors interactively, a joystick interface has been provided within the circuit. The wiring conforms to standard joystick connector wiring (e.g., Mach III joystick; CH Products, San Marcos, CA), and the joystick can be plugged directly into the circuit without modification (Fig. 2; connector P1, type DB15, JSTICK).

    Theory of Operation

    The motor control circuit has two functionally distinct sections accessed by the PC via 4 input/output (I/O) ports. One section is responsible for the joystick analog-to-digital (A/D) conversion logic, and the other is responsible for controlling the stepping motors. A single I/O port is assigned to the joystick interface, and the remaining three are used to submit commands to each microprocessor and to monitor the appropriate status signals.

    Joystick Control Circuitry

    The joystick can be accessed by read and write operations to I/O port 303 hexidecimal (Fig. 3; 303h, where h means hexidecimal, base 16 representation). The circuit is an adaptation of the IBM standard game control interface (International Business Machines, Boca Raton, FL), although the sensitivity has been substantially increased. The circuit converts the analog joystick position to a discrete numerical format representable by the PC. The deflection of the joystick is linearly represented by variable resistors coupled to the movement along each axis. When the resistors are placed in the circuit (i.e., the joystick is plugged into the socket), and changed accordingly, the time constants of the resistor–capacitor networks connected to the NE558 are altered (Fig. 2; NE558 input C and D). Once each timer is started, the time duration is characteized by the time constant, and hence the absolute joystick position. Converting the analog joystick position to a number is then a matter of starting the NE558 timer for both X and Y axes and counting the time it takes for each timer to time-out. Two numbers representing the current X–Y position of the joystick are subsequently obtained. With the appropriate software, successive operations are performed at a rate sufficient to query the joystick position almost continuously.

    Fig. 3 Four 8-bit input/output (I/O) ports are used by the host computer software to program the motor controller circuitry. Each small box represents a single bit location and the assigned function. Write operation to I/O ports 300h and 302h send instructions to the X and Y motor microprocessors, respectively. Read and write operations to I/O port 301h either reset the entire controller circuitry (RES) or read the current motor direction (XDIR, YDIR) and the status of the microprocessors (XBSY, YBSY). Read instructions from I/O port 303h provide information regarding joystick position (J1X, J1Y) and button depression (BUT1, BUT2). [Reproduced with permission from W. G. Tourtellotte, J. Neurosci. Methods 35, 157 (1990).]

    Motor Control Circuitry

    The motor controllers are programmed via I/O ports 300h and 302h, while status signals are read from I/O port 301h (Fig. 3). When the data are written to the appropriate motor controller by the host computer software, they are latched by the octal D-type flip-flops (Fig. 2; 74LS374) and read into the controllers by switching the SR latches (Fig. 2; 74LS279). Initially, while the command is being processed, the controller will reset the BUSY line to logic 0 (Fig. 2; CY512, pin 27). The BUSY line can be monitored by the host software via I/O port 301h, bits 0 and 1 (Fig. 3), and must return to logic 1 prior to submission of the next instruction (Fig. 4, see WRITEPORT procedure).

    Fig. 4 A Turbo Pascal program to demonstrate motor and joystick control by the host personal computer. The program interacts with the circuitry through the four designated I/O ports. The motors will move in the direction that the joystick is deflected. The demonstration program can be terminated by pressing any key on the keyboard. A detailed description of specific subroutines is addressed in the text. [Reproduced with permission from W. G. Tourtellotte, J. Neurosci. Methods 35, 157 (1990).]

    A combined software and hardware reset circuit has been incorporated into the circuit. If either the PC sends a reset signal (typically occurring during power-on conditions) or the host software writes a logic 1 to I/O port 301h bit 4 (Fig. 3), the controllers and their data latches will be reset. This ensures that the controllers are always initialized to the proper state prior to receiving any programming commands.

    Finally, although the CY512 generates the appropriate four-phase timing signals (Fig. 2; CY512, pins 21, 22, 23, 24), they are not capable of supplying the electrical current required to energize and drive the motors. Thus, the circuit includes an extremely simple and inexpensive unipolar power-transistor Darlington driver. Such a design requires a four-phase motor with six leads (a motor with two windings tapped at each end and at the center). The positive voltage is attached to the center of each winding (Fig. 2; P2, pin 2, 12), and the end of each winding is pulled to ground through power transistors controlled by one of the phase output lines from the CY512 (Fig. 2; ULN2068B, pins 3,6, 11, 15). A current-limiting resistor has been placed on the positive voltage line (Fig. 2; ULN2068B, pin 9) in order to decrease the field decay time constant of the motors and provide a faster step response. When the motors are mounted to a microscope stage (see Results), stepping rates in excess of 3000 steps/second can be achieved with this driving circuit.

    Software Design

    Overview

    The CY512 simplifies the software design because it supports many high-level motion control commands (13). For example, the ATHOME command instructs the microprocessor to mark the current motor position as a coordinate system origin. As the motors are stepped in any direction, a 16-bit position register is automatically updated to reflect the number of steps moved from the coordinate origin. Thus, the POSITION command can be used to step the motors automatically to a prescribed absolute coordinate (relative to the ATHOME position), without any additional record keeping by the host computer (e.g., POSITION 0 would automatically position the motor to the origin from any arbitrary location). Of course, a coordinate system would have an important physical meaning if, for example, the motors were configured to track linearly and they were calibrated such that the distance of each step were precisely known.

    In addition, relative positioning is also painlessly achieved with built-in instructions provided by the CY512. The NUMBER command can be used to set the number of relative steps the motor will make from the current location in a single operation. There are also commands for adjusting the motor direction (CLOCKWISE, COUNTERCLOCKWISE) and the stepping speed (FACTOR, RATE), an acceleration/deceleration command (SLOPE), and a variety of other instructions related to program sequencing.

    The CY512 can operate in program mode or command mode. When in program mode, the submitted commands are stored in a program buffer. From the command mode, a stored program can either be executed (DOITNOW) or parameter commands (e.g., NUMBER, CLOCKWISE, COUNTERCLOCKWISE) executed immediately and the stepping sequences initiated according to the set parameters (GO).

    The stepping motor circuit is easy to program from the host computer. A simple program has been written to control two stepping motors with a joystick in order to demonstrate software control of the motor controller circuitry (Fig. 4). It does not use the program mode of the CY512, but rather adjusts certain parameter commands in the command mode and initiates the stepping sequences directly (GO). The demonstration program (Fig. 4; written in Turbo Pascal, Borland International, Scotts Valley, CA) provides the basic motor/joystick control logic used for controlling the stepping motors in a functional computerized light microscope charting system (12,13).

    Joystick Programming

    Two functions have been written to demonstrate reading the joystick position (Fig. 4; Function JOYSTICK) and the status of its buttons (Fig. 4; Function BUTTON). The JOYSTICK function has been written in machine language to increase execution speed. It requires one parameter (Axis) which specifies the axis of the joystick position to calculate. An output instruction to I/O port 303h starts the quad timer (Fig. 2; NE558). The bit corresponding to the requested axis (Fig. 3; I/O port 303h bit 0 for X axis and bit 1 for Y axis) is read continuously while incrementing a counter until a reset of the timer is detected. The value of the counter when the time-out is detected represents a numerical index of the absolute joystick position for the requested axis.

    The joystick button status can be read easily by using the BUTTON function. A simple read instruction from I/O port 303h bit 6 (button 1) and bit 7 (button 2) indicates whether either button is currently depressed.

    Motor Programming

    The CY512 has a relatively large command set (14). The commands are submitted to the motor controller data ports by the COMMAND and WRITEPORT procedures (Fig. 4). The INITIALIZE_MOTOR procedure demonstrates a typical programming sequence for setting the motor coordinate origin to the current position (‘A’), a maximum step rate (‘F1′, ‘R 250′), an acceleration/deceleration parameter (‘S 50′), a half-step mode to double the stepping resolution (‘H’), and the number of quantal stepping units to take (‘N 1000′) when instructed to do so (GO; e.g., if the motor is mechanically configured for 1-μm linear stepping, each GO command would then step the motors 1 mm). Prior to receiving the GO command (‘G’) the motors must at least receive parameters prescribing the stepping rate and the number of steps to execute.

    Interactive Motor Control

    The procedure JOYDRIVE demonstrates the simple manner by which the controller circuit can be programmed to control two stepping motors interactively with the joystick (Fig. 4). First, the current X (JoyX) and Y (JoyY) position is read by calling the procedure JOYSTICK. For each axis in succession, the value is then tested to determine whether the joystick has been moved (i.e., if the current position value of an axis is outside an arbitrary range, 140–180) and whether the CY512 is ready to accept commands (i.e., assuring that the BUSY line is reset for each controller on I/O port 301h, bits 0 and 1). If the joystick value is less than 140, the motor direction is set to COUNTERCLOCKWISE (‘−’), but if the value is greater than 180, the direction is set to CLOCKWISE (‘+’). Finally, if the joystick has been moved and after the new direction for each motor is set, the command to move each motor is submitted (GO, ‘G’). Since no new NUMBER commands are sent to the motor controllers after the INITIALIZE—MOTOR procedure, the motors will step in 1000-step increments according to the joystick position.

    The sample program demonstrates rather primitive joystick/motor control logic. For example, the motor movements are set by the program at a fixed 1000-step increment. In a more functional version of the joystick control program, it would be desirable for the user to alter the step resolution manually as more precise motor movements are required. Similarly when the joystick is deflected beyond a certain threshold (e.g., 140–180), the motors begin to move in repetitive 1000-step increments at a constant rate regardless of a change in the magnitude of joystick deflection. A more sophisticated approach would vary the rate of the motor movements according to the magnitude of the joystick deflection. Such a scheme has been implemented and previously described in detail (12,13).

    Results

    The open-loop motor control circuit described in this chapter is both accurate and reliable. It was originally designed to control stepping motors mounted to the stage of a microscope. For this application, the motors have been configured to track linearly by moving a threated motor shaft through a tapped bushing mounted to a microscope stage (Fig. 1B).

    Motor Accuracy

    The motors used (Warner Electric, South Beloit, IL; Model SM-400–006-BU) were purchased for $100 each and were engineered to provide a 1.0-μm linear step displacement for each single half-step rotary movement. However, calibration with a microscope stage micrometer revealed that they actually produced a 1.1-μm displacement with approximately 10-μm accumulative error over a 1-cm linear travel (0.1% linear accumulation). For applications requiring well-defined stepping criteria, it is essential to calibrate the motors and adjust the software accordingly. For example, to obtain accurate 1-mm movements from these particular motors, they should be instructed to make 909 quantal steps (1.1 μm each; ‘N 909’) rather than 1000 (‘N 1000’).

    Reliability Testing

    While open-loop motor control is simple and can be performed rapidly, overall reliability is an important consideration since it is vulnerable to stepping errors (see Discussion). To test the potential for error by the control circuit and motors in the absence of feedback circuitry, discrepancies between the number of step commands and the physical movement of the microscope stage are directly measured with a microscope stage micrometer. For each axis independently, the origin is established (COMMAND ‘A’) and the starting position manually recorded on the stage micrometer. The motor controllers are programmed to make four 1000-step movements either forward (COMMAND ‘+’) or backward (COMMAND ‘–’) in random sequence and then to move back to the origin (COMMAND ‘P 0′). The entire process is repeated twice for each trial. After each trial (a total of 16,000 steps) the final stage position is again read on the micrometer in order to detect potential stepping errors between the number of steps executed by the motor controller circuitry and the number that actually occurred. The test results for 100 such trials, applied to each motor, revealed very reliable stepping movements (e.g., a single step error per trial represents a 0.0063% error) with a single step error occurring in a maximum of 5% of the

    Enjoying the preview?
    Page 1 of 1