220 likes | 388 Views
Seismic Octave Programming for Analog/Digital Converters. Michael W. Siekman Electrical and Computer Engineering Senior Capstone Design Project 2007 Advisor: James Hedrick. The Project. Investigate analog/digital data acquisition (A/D DAQ) in the open source software environment
E N D
Seismic Octave Programming for Analog/Digital Converters Michael W. Siekman Electrical and Computer Engineering Senior Capstone Design Project 2007 Advisor: James Hedrick
The Project • Investigate analog/digital data acquisition (A/D DAQ) in the open source software environment • Acquire and display analog input • Implement as a simple seismograph
Block Diagram Seismic Activity (Input) Seismometer Signal Conditioning A/D Converter (PCI) Computer and Software Display (Output) A/D Drivers Octave Function
The Setup • Analog to Digital Conversion (A/D) • Manipulation • Display • Necessary in everyday engineering life! • Used extensively in PCs • Variety of on-board card options
The Problem • MATLAB • Numerical Computing and Programming • Powerful Engineering and A/D processing tool • $$$
The Solution GNU Octave • Open Source (GNU Project) • Uses Linux OS (FC5) • Same method, different package • Shell, DIY • GNU Supporters around the world
The Plan • A/D Converter • Measurement Computing PCI-DAS6035 • PCI card with Input Board • 16-bit resolution • Sampling rate of 200kS/s (200kHz) • Selectable input voltage range of +/- 10V, 5V, 500mV, or 50mV
The Plan • Seismometer • PMD Scientific PMD103m • Receives seismic activity • Output voltage represents force • Output connected to A/D converter • Signal Conditioning • Between voltage output to A/D input board • Terminal board
The Plan • Output Specifications • 3D output (X,Y,Z) • Output voltage swing • +/- 10V Single Ended • +/- 20V differential • +/- 5V is typical • Bandwidth range is 0.033 – 50 Hz • Sampling rate of A/D allows this w/o aliasing • Require 9-13V Power
The Plan • Seismometer to A/D Board • Output of seismometer will not reach +/- 10V swing • Fs = 2Fmax • Fs > 2 (50Hz) • Fs > 100 Hz • 16-bit resolution is more than enough • 12V power source for Seismometer
The Plan • Comedi (COntrol and MEasurement Interface) • DAQ drivers for Linux • Needed to modify in order to compile correctly • Previous work in FC3 • Fedora Core 5 • Redhat Project variant • Custom kernel files • Workarounds
The Plan • Within Octave: • Programming similar to MATLAB • Develop functions or programs • Interface with A/D drivers • Done outside of Octave • Receive A/D signal • Receive 100 samples from signal • Process A/D signal • Read voltages • Display • Seismometer data plots as seismograph
The Implementation • System Components • Hardware • Seismometer • Terminal Board • Input Board • A/D Converter • Software • A/D Converter Drivers • DAQ Program • Octave Program
The Implementation • Hardware • Layout of seismometer output • Connect to terminal board including power • +/- X value into input board • A/D Converter • 200 kHz sampling rate covers seismometer bandwidth (50 Hz max), using 1 kHz • +/- 10V selected in differential mode
The Implementation • Software • Linux preparation • Problems with kernel source and headers being correct • Comedi Installation • Compiled and installed Comedi drivers/library • Modification of Comedi configuration and drivers • Insertion/configuration of driver (cb_pcidas64) into kernel • DAQ program • printdata • Written in C with C and Comedi libraries • Accesses driver, retrieves a signal and samples it (100 samples), and prints voltages to screen
The Implementation • Software (cont) • Octave program getwave.m • Accesses printdata output • Data is then formatted • Displayed • Replicates a static sample of seismograph
The Results • Results • Kernel was configured properly for Comedi • Comedi application and libraries successfully installed to be compatible with FC5 • A/D converter driver successfully inserted as module into kernel • Testing drivers and printdata DAQ program • C battery input reads properly as DC at around 1.5v • Function generator input reads as proper wave (tested at both arbitrary sine and square wave) • printdata receives a signal from the seismometer and prints it properly
The Results • Testing Octave program getwave.m • Properly receives data from printdata and displays its output data correctly • 1.5V C battery shows as DC signal at @ 1.5v • Function generator can show proper sine wave and square wave • Seismometer input is displayed
The Results • Still to be done • Extend period over which 100 samples are taken, lower the sampling rate • Need to verify that seismic action is being properly read by DAQ software and Octave • Try dynamically linking printdata program to Octave • Requires translating to C++ and inclusion of Octave library code • System can support DL • User’s Manual • So others don’t have to go through the things that I did
The Future • Future work that can be done: • Read all planes of seismometer output • Dynamically linking DAQ program to Octave • Creating a continuous stream of seismic data from the A/D board and displaying it as a real time seismograph • Use Comedi functions to provide streaming analog input
The Payoff • Multiple applications • Modular functions and programs • Access to powerful A/D tools without the heavy price
Questions? Acknowledgments: James Hedrick Lance Spallholz Emad Andarawis Everyone on the Comedi Mailing List Thanks!