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