1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Data Acquisition Part 6 potx

25 141 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 25
Dung lượng 3,44 MB

Nội dung

Data Acquisition 116 Several TSLinux features as follows: • Glibc version 2.2.5 • Kernel version 2.4.18 and 2.4.23 • Apache web server with PHP • Telnet server and client • FTP server and client • BASH, ASH, minicom, vi, busybox, tinylogin 5. Software development Two software modules developed in the PESS system which are the Analog Input Preprocessing and Data Presentation. The Analog Input Preprocessing module involves data acquiring from sensor, converting analog input to digital output and calculating converted output to human readable value. A C code named sensor to cope all those processes is developed. Data Presentation module in PESS system is handled by a program named Interactive System. An Interactive System provides current sensor’ readings and the information of the system such as disk (CF) usage and memory capacity status. Fig. 7 show the interaction between both software modules which running concurrently. Sensor program processing the analog inputs and store converted data into shared memory, meanwhile those current data available on shared memory can be accessed via Interactive System program. Fig. 7. Software architecture of PESS system 5.1 Analog input preprocessing Signals from analog sensors must be converted to digital signals before electronic device can read them. The conversion from analog input to digital output is done using the ADC. The digital outputs which are in binary format is then calculated into human readable value in decimal value and presented in Volt parameter. The TS-5500 supports an eight-channel, 12- bit ADC capable of 60000 samples per second. Each channel is independently software programmable for a variety of analog input ranges: -10V to +10V, -5V to +5V, 0V to +10V and 0V to +5V. The ADC control register, the Hex 196 setting is outlined by Fig. 8 below. The IO address is read from right to left starting with 0. The settings are based on a bipolar mode with 5V output range for all channels. Portable Embedded Sensing System using 32 Bit Single Board Computer 117 Fig. 8. ADC control register The processes of Analog Input Preprocessing can be divided into four stages: initialization, bit checking, reading and storing. At the initialization stage, the permission to access ADC IO register must be set. Three registers are involved in accessing the ADC I/O address which are, Hex 195, Hex 196 and Hex 197. The digital output of an analog input is available after the ADC has completely converted the input within 11µs. The End of Conversion (EOC) status can be checked at bit 0 of register Hex 195. The conversion is completed if the bit 0 of Hex 195 indicates ‘0’. The digital output of the converted analog input is available at Hex 196 and Hex 197. 8 bits of them is available at Hex 196 which called as the lower 8 bits or LSB. The other 4 bits is available at Hex 197 which called as the upper 4 bits or MSB. Fig. 9. Analog Input Preprocessing algorithm 5.2 Data presentation The Interactive System provides important information about the PESS system. The main goal of the Interactive System is to display current sensors’ readings upon requested by the user. It also provides other information of the system (PESS) such as disk usage and memory status which viewed at the LCD panel. Another feature included in Interactive System is a control process. This process is to enable user to restart or shutdown the PESS for maintenance purposes. The matrix keypad functions as an input device that handles menu selection in the Interactive System. Fig. 10 outlines the main flow chart of the Interactive System. Analog Input Preprocessing algorithm Step 1 : Initialize the IO permission of ADC Step 2 : Create and attach shared memory file descriptor Step 3 : Set up ADC control registers Step 4 : Check End Of Conversion (EOC) signal 4.1 If EOC signal HIGH (1) Go to Step 4 until EOC signal LOW (0) Step 5 : Determine input mode : Check sign bit Step 4 : Read all (12) digital output (LSB and MSB) Step 5 : If input mode negative 5.1 Perform two’s compliment Step 6: Convert binary value (digital output) to decimal value Step 7: Store converted reading into shared memory Step 8: End Data Acquisition 118 Start Load LCD driver Load keypad driver Input == 1 ? Yes No Display “System Starting” Display menu selection Input == 2 ? Yes No Input == 3 ? Yes No System info Control system Sensor reading EndWhile true Yes No Fig. 10. Interactive System flowchart Three options are provided: to check current sensors’ readings, to check systems’ information or to control the system. Three subroutines are created to handle those processes which are system info, control system and sensor reading as outlined by Fig. 10 above. Actually the processes of these three subroutines are carried out by combining the binary C code and shell scripts. Shell scripts retrieve current sensors’ readings which are processed by the sensor program, and manipulate Linux commands to retrieve system information and control the system. The binary C code grabs the data given by the shell script codes and displays them. 6. PESS implementation Standard method to gain the result of environment parameters such as water and air quality is using laboratory experiment. The laboratory experiment is not suitable for long period testing work such as in monitoring process. The alternatives method can resolve that Portable Embedded Sensing System using 32 Bit Single Board Computer 119 limitation. The US Environment Protection Agency (EPA) define alternatives method as any method but has been demonstrated in specific cases to produce results adequate for compliance monitoring (Quevauviller, 2006). The alternatives method leads to real-time data sampling which can produce instant output result for in situ deployment. It also provides easier usage with advance electronic devices in a compact size but can perform multitasks excellently. The handheld instrument usage is one of the alternatives methods such as using Data Acquisition (DAQ) device. The DAQ device such as SBC offers variety of peripherals to make it function as a standalone system. Meanwhile the ion specific electrodes is also been used in many application with handheld instrument. For example, non-invasive chemical sensor arrays provide a suitable technique for in situ monitoring (Bourgeois, 2003). Many researches use specific ion selective electrode or sensor array for detection of target environmental substance or gases (Carotta, 2000; Becker, 2000; Wilson, 2001; Lee, 2001). The measurement of the LM35DZ temperature sensor is done without connecting the signal conditioning circuit. The LM35DZ sensors are only given a power supply and grounding. The sensor’ outputs are connected directly to ADC port of SBC during measurement. Fig. 11 shows the experimental setup to acquire ion selective electrode’s reading. Three parts involve here are: (1) SBC, (2) Sensors (electrodes) and (3) Signal conditioning circuit. While the red arrows marks from point A and B are the input and output from signal conditioning circuit respectively. Sensor reading’ results are presented in next section. Fig. 11. Experimental setup of ion-selective electrodes The programs called sensor and Interactive System are developed to handle all processes involved in Analog Input Preprocessing and Data Presentation modules respectively. Both modules are running separately but have a relationship in terms of data sharing. Fig. 12 outlines the state diagram for PESS system and the running processes listing. The current running process on PESS system including sensor and Interactive System as underlined in figure below. Analog Input Preprocessing module acquires data from sensors and storing converted data in a shared memory at PESS. These processes are repeated again with new inputs after certain time interval. While the Interactive System retrieve those converted data from shared memory and view it at LCD panel. Data Acquisition 120 Fig. 12. PESS state diagram and running process listing Four processes (programs) are set up to automatically start during the boot up program. The processes are: inserting the matrix keypad driver module; running sensor process; running the scripts (info.sh, reading.sh and control.sh) of Interactive System; and running the Interactive System program itself. These processes are underlined in Fig. 13. This procedure can be done by configuring how process will start up at /etc/init.d directory. Fig. 13. Start processes automatically during system boot up Portable Embedded Sensing System using 32 Bit Single Board Computer 121 The integration between the SBC, the matrix keypad and the alphanumeric LCD display is to create an Interactive System for a standalone system. Fig. 14(a) shows the components that are connected to allocated ports. A serial ribbon cable is used to connect the matrix keypad and LCD panel to pin ports on SBC. Fig. 14(b) and Fig. 14(c) show the menu selection of Interactive System and current sensor’ readings respectively. (b) (a) (c) Fig. 14. a) Hardware used in Interactive System b) Interactive System menu selection c) Example of current sensor’ readings 7. Result and discussion Bit error is the value of an encoded bit that has been changed due to a transmission problem such as noise in the line and which is then interpreted incorrectly. Commonly notated as bit error ratio (BER), the ratio of the number of failed bits to the total number of bits calculated. The number of bits in the ADC determines the resolution of the data acquisition system. The resolution of an ADC is defined as follow (Principle of Data Acquisition and Conversion, 1994); FSR n V Resolution One LSB 2 == (1) Where V FSR is a full scale input voltage range and n is the number of bits. The ADC is set up to read all eight analog channels using bipolar mode within 5V range. Therefore the total output range is 10V which are from -5V to +5V. The step resolution of digital output is calculated as below; n = 12 V FSR = 10V ( -5 V to +5 V) 12 10 V Resolution 2.44 2 mV== Analog input reading verification is the important part in PESS development as it will ensure that the sensor’ readings is correct and reliable. Verification testing of analog input reading is carried out by checking the output of each ADC channels. DC power supply is used as input to ADC and tapped manually to every channel. In a single reading, only one channel is given 1.0 V input while the rest is given 0 V using ground signal of SBC. The first Data Acquisition 122 1.0 V input is given to channel 7, then to channel 6 until the last channel, channel 0. Fig. 15 shows the input from DC power supply while Fig. 16 show the result of analog input reading verification testing. From Fig. 15, the input from DC power supply is 1.002V as displayed by digital multimeter. Fig. 15. Input from DC power supply Fig. 16. Analog input reading verification output Every channel is given 0 V input for first reading as shown in first line in Fig. 16. The error recorded in first line reading is 2.44 mV which is given by channel 1 which equals to 1 step resolution. Then 1.0 V input is given to channel 7 as shown by the second reading and for other channels the input given is 0V. The reading is presented in 2 floating point. From Fig. 16, the readings recorded are 1001.47 mV and 999.02 mV for channels that was given 1.0 V input. The reading variants are 0.53 mV and 2.98 mV respectively. From the results above, the analog input reading has small error which are 1 and 2 step resolutions so that the readings is considered reliable. The readings of temperature sensor at room temperature is around 1110 mV and 1120 mV as shown by line 1 until line 5 in Fig. 17 below. Heat was forced to the temperature sensor using a lighter (fire) for a few seconds. The readings are increased at the moment the heating process as shown by line 6 until line 10 in Fig. 17. A measurement of ion-selective electrodes is carried out to observe their output reading reliability. The reading of ion-selective electrodes are considered reliable if their readings are stable and do not fluctuate. The Copper electrode is tested with Copper standard solution which has been produced by mixing sterile water and Copper liquid. In this research, five different standard solution densities are used: 10 ppm, 20 ppm, 30 ppm, 40 ppm and 50 ppm. Firstly, the Copper sensor is tested using 10 ppm standard solution. The Copper ion- selective electrode together with the reference electrode are immersed in 10 ppm Copper Portable Embedded Sensing System using 32 Bit Single Board Computer 123 standard solution. Measurement is started five minutes after those electrodes immersed. The measurement is repeated for 20 ppm of Copper standard solution. These steps are repeated until the standard solution reaches 50 ppm. Fig. 18 shows the reading of Copper ion- selective electrode. From the graphs, the readings are decrease with higher standard solution density for each case. Fig. 17. LM35DZ temperature sensor readings Fig. 18. Copper sensor’s reading versus standard solution density 8. Conclusion Data Acquisition System (DAS) is one of common system currently applied in industrial application such as automation control, alert system and monitoring system. The advancement of electronic technology has led to tremendous applications using embedded systems. Embedded based application has led to portable and small form factor system with medium or high speed processor. In this research, a DAS has been developed using a 32bit Single Board Computer (SBC). The developed DAS is an integration of SBC, matrix keypad and LCD display and named as Portable Embedded Sensing System (PESS). PESS can be used as a data logger for a short term data collection which can provide immediate results for portable works either for indoor or outdoor experiment. Data Acquisition 124 Two software modules developed in PESS systems which are Analog Input Preprocessing and Data Presentation. The processes involved in Analog Input Preprocessing are acquiring analog sensor’s input, converting analog signal to digital signal and calculating digital output to human readable values. These processes are done by a program named sensor. An Interactive System handles input given by user via matrix keypad and output to the LCD display for Data Presentation modules. PESS has limited data storage capacity since it used a Compact Flash (CF) to store temporary data. This system also has limitation in term of visualization where data are viewed via LCD panel. These limitation can be enhanced by extending the PESS system into a network based DAS. PESS system can be used as Sensor Node (SN) that collecting data from fields and sending the collected data to the server that able in providing larger storage capacity. The user interface can be developed to provide interactive data presentation which can be access remotely via internet. The network based DAS is normally applied in monitoring system especially for long period and scheduled activities. 9. References Al-Beik, H., Meryash, N. & Orsan, I. A. (2005). Detect, Verify, Locate, Build (DVLB) Rover. Project Report, Worcester Polytechnic Institute. Alderighi, M., Anzalone, O., Bartolucci, M., Cardella, G., Cavallaro, S., De Filippo, E., et al. (2002). CHIMERA data acquisition and computational system using DSP-based VME modules. IEEE Transactions on Nuclear Science, 49(2), 432-436. Application Notes 270. (2000). Analog-Signal Data Acquisition in Industrial Systems. Retrieved April 14, 2006 from http://pdfserv.maxim-ic.com/en/an/AN270.pdf Baxter, M. (2001). Embedded Linux SBCs. Linux Journal. Retrieved March 23, 2006 from http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/047/ 4726/4726t1.html Becker, T., Mühlberger, S., Braunmühl C. Bosch-v., Müller, G., Ziemann, T & Hechtenberg, K. V. (2000). Air pollution monitoring using tin-oxide-based microreactor system, Sensors and Actuators B: Chemical, 69(1-2), 108-119 Bourgeois, W., Romain, A-C, Nicolas, J. & Stuetz, R. M. (2003). The use of sensor array for environmental monitoring: interests and limitations. Journal of Environmental Monitoring, 5, 852-860. Burckle, R. A., (n.d.). The Evolution of Single Board Computers. Retrieved Jun 30, 2006 from http://www.winsystems.com/whitepapers/SBC_Evolution.pdf Carotta, M. C., Martinelli, G., Crema, L., Gallana, M., Merli, M., Ghiotti, G et al. (2000). Array of thick film sensors for atmospheric pollutant monitoring, Sensors and Actuators B: Chemical, 68(1-3), 1-8. Eyre, J. & Bier, J. (2000). The evolution of DSP processors. IEEE Signal Processing Magazine, 17(2), 43-51. Hansen, S., Jordan, T., Kiper, T., Claes, D., Snow, G., Berns, H., Burnett, T. H., Gran, R. & Wilkes, R. J. (2004). Low-cost data acquisition card for school-network cosmic ray detectors. IEEE Transaction on Nuclear Science, 51(3), 926-930. Hoopes, D., Davis, T., Norman, K. & Helps, R. (2003). An Autonomous Mobile Robot Development for Teaching a Graduate Level Mechatronics Course. Proceedings of Portable Embedded Sensing System using 32 Bit Single Board Computer 125 33 rd ASEE/IEEE Frontiers in Education Conference, F4E-17-F4E22. Retrieved March 23, 2006 http://cyber.felk.cvut.cz/gerstner/reports/GL128.pdf Ismail, Y. (1998). Data Acquisition System with Embedded Digital Signal Processor for Instrumentation/Control Applications (Design and Implementation). Degree Thesis, Universiti Islam Malaysia. James, K. (2000). PC Interfacing and Data Acquisition Techniques for Measurement, Instrumentation and Control. Oxford: Newnes. Laymon, C. M., Miyaoka, R. S., Park, B. K. & Lewellen, T. K. (2003). Simplified FPGA-based data acquisition system for PET. IEEE Transactions on Nuclear Science, 50(5), 1483- 1486. Lee, D-D. & Lee, D-S. (2001). Environmental gas sensors, IEEE Sensors Journal, 1(3), 214-224. LinuxDevices (n.d.). A Linux-oriented Intro to Embeddable Single Board Computers. Retrieved March 23, 2006 from http://www.linuxdevices.com/articles/AT6449817972.html Martin, S. (1990). PC-based Data Acquisition in an Industrial Environment. IEE Colloquium on PC-Based Instrumentation, 2/1 – 2/3. Microlink. (n.d.) Technical Notes: Data Acquisition Techniques. Retrieved May 13, 2006 from http://www.microlink.co.uk/dataaq.html Misal, C. S. & Conrad, J.M. (2007). Designing a pH data acquisition and logging device using an inexpensive microcontroller. IEEE Proceedings SoutheastCon, 217-220. Ng, K. Y. (1994). General Purpose Data Acquisition and Process Control System. Degree Thesis, Universiti Malaya. Omata, K., Fujita, Y., Yoshikawa, N., Sekiguchi, M. & Shida, Y. (1992). A Data Acquisition System based on a Personal Computer. IEEE Transaction on Nuclear Science, 39(2), 143-147. OPA2111 (1993). Dual Low noise precision difet operational amplifier. Retrieved April 14, 2006 from http://www.datasheetcatalog.org/datasheet/BurrBrown/mXsrqyy.pdf Perera, A., Gutierrez-Osuna, R., & Marco, S. (2001). IPNOSE: A Portable Electronic Nose Based on Embedded Technology for Intensive Computation and Time Dependent Signal Processing. Proceeding of the 8 th Intl. Symp. On Olfaction an Electronic Nose, 1-6. Peters, B., Wardrop, A., Lahti, D., Herzog, H., O'Connor, T., & DeCoursey, R. (2007). Flight SEU Performance of the Single Board Computer (SBC) Utilizing Hardware Voted Commercial PowerPC Processors On-board the CALIPSO Satellite. IEEE Radiation Effects Data Workshop 2007, 0, 16-25. Quevauviller, P, Thomas, O. & Beken, A. V-D. (2006). Wastewater Quality Monitoring and Treatment. West Sussex, England: Wiley. Rangnekar, S., Nema, R. K. & Raman, P. (1995). PC based data acquisition and monitoring system for synchronous machines. IEEE/IAS International Conference on Industrial Automation and Control, 195-197. Riley, T. C., Endreny, T. A. & Halfman, J. D. (2006). Monitoring soil moisture and water table height with a low-cost data logger. Computers & Geosciences, 32(1), 135-140. Rongen, H. (n.d.). Introduction to PC-Based Data Acquisition Systems. Retrieved October 23, 2006 from http://www.fz-juelich.de/zel/datapool/page/160/DAQ.pdf Wilson, D. M., Hoyt, S., Janata, J., Booksh, K. & Obando, L. (2001). Chemical sensor for portable, handheld field instruments, IEEE Sensors Journal, 1(4), 256-274. [...]...1 26 Data Acquisition Zabolotny, W M., Roszkowski, P., Kierzkowski, K., Pozniak, K., Romaniuk, R & Simrock, S (2003) Distributed Embedded PC Based Control and Data Acquisition System for TESLA Cavity Controller and Simulator Retrieved March 16, 2007 from http://tesla.desy.de/new_pages/TESLA_Reports/2003/pdf_files/tesla200334.pdf 7 Microcontroller-based Data Acquisition Device for... using pins PTC1 (data clock), PTC2 (serial data in/out) and PTC4 (chip select) One conversion is done after 16 clock signal periods resulting in maximum of 12.5 kHz sampling rate at clock frequency of 200 kHz Analog output circuits are based on digital-to-analog converter DAC 761 1 with 12-bit resolution It is controlled by MCU pins PTC0 (chip select), PTC1 (data clock), PTC2 (serial data in) and PTC3... range 0 – 10 V Supply voltage 6. 5 to 9V DC Communication RS232 interface, 5 760 0 Bd, 8-bit data, 1 start bit, 1 stop bit Table 1 Technical parameters of the DAQ device 133 134 Data Acquisition Fig 9 Photograph of the prototype DAQ unit 3 DAQ device firmware design DAQ device internal software is based on real-time operating system RTMON for HC08, which was developed on our department especially for microcontroller-based... areas without access to mains power This contribution proposes design of multi-channel portable data acquisition device based on low cost general-purpose 8-bit microcontroller Freescale 68 HC908GP32, which was developed in our department mainly for control and monitoring educational laboratory models First part deals with hardware design of the DAQ device with focus on description of operation of individual... 0 – 10 V Exact output range can be adjusted by variable resistor R19 Data acquisition device contains three independent power supplies Digital parts (MCU circuits, input/output driver, serial communications interface and D/A converter) are supplied by circuit depicted in the Fig.5 It uses low-drop 5V/1A regulator LM2940 in 132 Data Acquisition manufacturer’s recommended wiring enabling correct operation... voltage reference LM3 36- Z5.0 which is connected to adjustable current source LM334 Output voltage can be adjusted to the exact 5 V value by variable resistor R18 (Fig .6) Analog output amplifier is supplied by DC-DC converter ICL 766 2 providing positive and negative voltages for analog output operational amplifier from single supply Fig 5 Power supply for digital circuits schematic Fig 6 Power supply for... main part of M68HC908GP32 microcontroller is fully object code compatible with M68HC05 This feature allows easy code migration to new architecture providing high speed, low power and better processing capabilities Central processor unit features can be summarized in the following points: 8 MHz bus speed at 5 V, 4 MHz bus speed at 3 V 16- bit stack pointer with new stack manipulation instructions 16- bit... for the data acquisition device and consequently process its response Application developer then does not need to know exact communication protocol and do not need to program it This simplification results in faster program development and reduction of debugging time For the portable data acquisition device there were created supporting program libraries for Visual C++, Control Web 5 and Matlab 6. 5 (and... instructions 16- bit index register with index register instructions 78 new instructions Memory to memory moves without using the accumulator 16 addressing modes including stack relative 64 Kbytes program /data memory space Fully static low-voltage/low-power design (Freescale, 20 06) Analog-to-digital conversion is performed by the A/D converter Linear Technology LTC1298 It is micro power, 2-channel, 12-bit switched-capacitor... on our department especially for microcontroller-based embedded systems with CPU08 main processor core Next chapters discuss DAQ device software support in form of program libraries for MS Visual C++, Control Web and Matlab/Simulink development environments, which can significantly improve development time of new process control or 128 Data Acquisition monitoring applications And finally last part deals . Technical Notes: Data Acquisition Techniques. Retrieved May 13, 20 06 from http://www.microlink.co.uk/dataaq.html Misal, C. S. & Conrad, J.M. (2007). Designing a pH data acquisition and logging. 1(4), 2 56- 274. Data Acquisition 1 26 Zabolotny, W. M., Roszkowski, P., Kierzkowski, K., Pozniak, K., Romaniuk, R. & Simrock, S. (2003). Distributed Embedded PC Based Control and Data Acquisition. CHIMERA data acquisition and computational system using DSP-based VME modules. IEEE Transactions on Nuclear Science, 49(2), 432-4 36. Application Notes 270. (2000). Analog-Signal Data Acquisition

Ngày đăng: 21/06/2014, 01:20