* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download 22873 - Data Acquisition Systems Design and Implementation
Survey
Document related concepts
Telecommunications engineering wikipedia , lookup
Electronic engineering wikipedia , lookup
Control system wikipedia , lookup
Multidimensional empirical mode decomposition wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Transcript
ECE40275 - Data Acquisition Systems Victor Kolesnichenko UCSD Extension Fall 2014 Course Objectives: • Provide students with the knowledge required to specify, design, and implement a Data Acquisition System (DAS) • Learn common architecture of a Data Acquisition System and its components • Apply basic principles of sampling and digitizing theory • Design a simple DAS based on a Cortex-type microcontroller. This includes hardware and firmware design. • Collect and analyze data from the DAS • Evaluate “build versus buy” option Grading and withdrawal policy – read Buy STM32F4-Discovery board from ST Microelectronic Buy USB to USB To RS232 TTL UART PL2303HX Auto Converter from eBay The main book: Data Conversion Handbook, Analog Devices, 2005, ISBN : 0750678410 http://hotfile.com/dl/19138498/ca230e6/0750678410.rar.html - does not work anymore Roster Sheet – to sign [email protected], 858-500-6088 Prerequisites: • Students must have a basic understanding of C programming, circuit analysis, analog and digital electronics, and microprocessor-based design. Audience: • Instrumentation engineers / electronics engineers in manufacturing and process industries; • Data Acquisition & Control (DA&C) system designers / integrators; • Control and Instrumentation Engineers; • Students taking Embedded Engineering courses; • Electrical, mechanical, software, and chemical engineers and technicians wishing to understand the essentials of data acquisition. Demo Board Selection • Criteria: price less than $50, easy to add sensors and memory, several IDEs • TI TMDX28027USB Piccolo ControlStick $39.00, now $40.5 • Microchip DM330011 - MPLAB Starter Kit for dsPIC DSC $59.98 • Futurlec dsPIC30F2010 Development Board $44.90 Demo Board Selection, 2 • Futurlec STM32F103 Development Board $39.90 Coridium Super-PRO board - $49.00 (LPC1756) STM32F4-Discovery Features of STM32F4-Discovery • STM32F407VGT6 microcontroller featuring 32-bit ARM Cortex-M4F core, 1 MB Flash, 192 KB RAM in an LQFP100 package • On-board ST-LINK/V2 with selection mode switch to use the kit as a standalone ST-LINK/V2 (with SWD connector for programming and debugging) • Board power supply: through USB bus or from an external 5 V supply voltage • External application power supply: 3 V and 5 V • LIS302DL or LIS3DSH ST MEMS 3-axis accelerometer • MP45DT02, ST MEMS audio sensor, omni-directional digital microphone • CS43L22, audio DAC with integrated class D speaker driver Features of STM32F4-Discovery, 2 • • • • • • • • • Eight LEDs: LD1 (red/green) for USB communication LD2 (red) for 3.3 V power on Four user LEDs, LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue) 2 USB OTG LEDs LD7 (green) VBus and LD8 (red) over-current Two push buttons (user and reset) USB OTG FS with micro-AB connector Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing Price - $14.58 (Direct from STM) Terminology • Accuracy - The extend to which a given measurement agrees with the defined value. • Accuracy Class - The maximum allowable error of measurement at reference conditions. • ADC Analog-to-Digital Converter is a device that converts a continuous quantity (usually – voltage) to discrete digital numbers. • ANSI American National Standards Institute is a nonprofit, privately funded membership organization that coordinates the development of U.S. voluntary national standards and represents the U.S. in international standards organizations. The institute promotes and facilitates the development and integrity of voluntary consensus standards and conformity assessment systems. Terminology, 2 • ASCII - American Standard Code for Information Interchange • ASIC - Application-Specific Integrated Circuit • b - Bit • B - Byte • bps - Bits per second • CMRR - Common-Mode Rejection Ratio • DAQ - Data Acquisition • DAS - Data Acquisition System • dB - decibel (?) (Graham Bell invented a phone) • DIO - Digital Input/Output • DSP - Digital Signal Process(or/ing) Terminology, 3 • EEPROM - Electrically Erasable Programmable ROM • ENOB - Effective Number Of Bits • Firmware - Software that is embedded in the electronic device. • FRAM - Ferroelectric Random Access Memory • Giga - A prefix meaning 1,000,000,000. Example: 2.4GHz. • GPIB - General Purpose Interface Bus • GUI - Graphical User Interface • Hertz or Hz - Cycles per Second. The practical unit of frequency measurement. • I/O - Input/Output Terminology, 4 • I2C - Inter IC (Integrated Circuits) Communication • IEC - International Electrotechnical Commission, a worldwide organization preparing and publishing international standards for electrical, electronic, and related technologies. The members of IEC have national committees in each country. • kilo or k - the prefix meaning 1000. Use small letter k, for example, kV. • LAN Local Area Network. A network consisting of nodes that are confined within a localized area. For example, a floor of a building, or the building itself. Terminology, 5 • LSB least significant bit • Mega A prefix (capital M) meaning 1,000,000. 10MW, for example. • Micro (u) A prefix (small u) meaning 1/1,000,000. 100uA, for example. • Milli (m) A prefix (small m) meaning 1/1000. 5 mA, for example. • N.E.C. National Electric Code. A regulation covering the electric wiring systems on the customer’s premises with regards to safety. • PGA - Programmable Gain Amplifier • RMS - Root-Mean-Square • SCADA - Supervisory Control And Data Acquisition Terminology, 6 • • • • S/H - Sample-and-Hold SNR - Signal-to-Noise Ratio SPI - Serial Peripheral Interface. USB - Universal Serial Bus – industry standard defining physical connections, power supply, and protocol of communication between master and slave • ZigBee - ZigBee™ is the standards-based wireless networking technology for reliable, secure, cost-effective, low-power monitoring and control solutions. ZigBee™ provides the network, security and application profile software layers for the IEEE 802.15.4 global wireless standard. Google Search Results on Data Acquisition System Google Search Results on Data Acquisition System, 2 Data Acquisition System – Definition from Wikipedia • Data Acquisition is the process of sampling of real world physical conditions and conversion of the resulting samples into digital numeric values that can be manipulated by a computer. The components of data acquisition systems include: Sensors that convert physical parameters to electrical signals. Signal conditioning circuitry to convert sensor signals into a form that can be converted to digital values. Analog-to-digital converters, which convert conditioned sensor signals to digital values. Communication channel for transmission data to a computer. Data Logger (From Wikipedia) • A data logger (also datalogger or data recorder) is an electronic device that records data over time or in relation to location either with a built in instrument or sensor or via external instruments and sensors. Increasingly, but not entirely, they are based on a digital processor (or computer). They generally are small, battery powered, portable, and equipped with a microprocessor, internal memory for data storage, and sensors. Some data loggers interface with a personal computer and utilize software to activate the data logger and view and analyze the collected data, while others have a local interface device (keypad, LCD) and can be used as a stand-alone device. Applications of DAS: – – – – – – – – – Automotive: Crash-, Drive-Tests (DAS or Logger?) Aerospace: “black boxes” - Data ? Industrial: AMI, SCADA, Monitoring… Medical: Patient diagnostic, observation, (including remote), etc… Scientific Research Semiconductors Testing Transportation: traffic statistics, schedule control, traffic violations… Weather forecasting Your examples: Architecture of a Typical DAS/Data Logger Sensors/ Transdu cers cers Signal Conditio ners Analog to Digital Conver ters Microcon troller Memory Other components – Firmware and Software Commu nication Channel Sensors or Transducers • There is no agreement among scientists and engineers on this definition, for example one well known states: Transducer: 1. A device that is intended to transform an electrical signal into acoustic, biological, chemical, electrical, magnetic, mechanical, optical, radiational, or thermal stimuli for the purpose of transmitting information. (Information in biological form??) 2. A device that is intended to transform energy in one form into energy in another form for the purpose of transmitting power. (Hydro-electro station??) Sensor: A device that is intended to transform acoustic, biological, chemical, electrical, magnetic, mechanical, optical, radiational, or thermal stimuli into an electrical signal for the purpose of transmitting information. Rich Gorczyca: • “In a control system, sensors are on the input side and they sense specific phenomena in the environment. Actuators are on the output side and they manipulate or adjust phenomena in the environment. Both sensors and actuators are transducers in that they convert one form of energy into another form. Sensors typically convert physical energy (??) into electrical energy (??). Actuators convert electrical energy into physical energy. A microphone is a sensor that converts sound waves into electrical signals. A speaker is an actuator that converts the electrical signals into sound waves. Both are transducers.” Overview of Sensors/Transducers • Sensors (give me your examples) • Transducers (piezoelectric mike or speaker, electromechanical…- 2-way, photovoltiac, electrochemical…- 1-way) • Gauges (pressure, vacuum, RPM…) • Detectors (photo, ion, alpha, beta, gamma, XRay…) • Indicators: Test the pH of a substance by means of the dye litmus (see also indicator ) Sensors from http://www.sensorsportal.com/HTML/Sensor.htm • Optical sensors • Biosensors • Torque sensors • Chemical sensors • Position sensors • Level sensors • Rotation speed sensors • Proximity sensors • Ultrasonic sensors • Displacement sensors • Load Cells • Resonant sensors • Vacuum sensors • Flow sensors • Magnetic sensors • TEDS (Transducer Electronic Data Sheet) (IEEE 1451 plug-andplay) sensors • Viscosity sensors • Mechanical sensors • Wireless sensors • Moisture sensors • Yaw sensors • Temperature sensors • Pressure sensors • Gas sensors • Nano-sensors • Accelerometers • Oxygen sensors • Acoustic sensors • pH sensors • • • Humidity sensors Tilt sensors Inclination sensors Sensor(s) Selection We will operate with the term “sensor” for our DAS. The sensor(s) selection is dictated by the requirements to the DAS (MRD -> Functional Specs -> Hardware Requirements Specification): • What physical phenomenon(s) to be measured? • What is the range of the parameter change? • What is the required accuracy of measurements? • Any requirements to (non)linearity (calibration)? • Speed of measurements (samples per second), • What type of interface does the sensor have to provide? • What is the price limit? Sensors Deviations (from Wikipedia) • The sensitivity may in practice differ from the value specified. This is called a sensitivity error, but the sensor is still linear. • Since the range of the output signal is always limited, the output signal will eventually reach a minimum or maximum when the measured property exceeds the limits. The full scale range defines the maximum and minimum values of the measured property. • If the output signal is not zero when the measured property is zero, the sensor has an offset or bias. This is defined as the output of the sensor at zero input. • If the sensitivity is not constant over the range of the sensor, this is called nonlinearity. Usually this is defined by the amount the output differs from ideal behavior over the full range of the sensor, often noted as a percentage of the full range. • If the deviation is caused by a rapid change of the measured property over time, there is a dynamic error. Often, this behavior is described with a bode plot showing sensitivity error and phase shift as function of the frequency of a periodic input signal. • If the output signal slowly changes independent of the measured property, this is defined as drift (telecommunication). Sensors Deviations (from Wikipedia), 2 • Long term drift usually indicates a slow degradation of sensor properties over a long period of time. • Noise is a random deviation of the signal that varies in time. • Hysteresis is an error caused by when the measured property reverses direction, but there is some finite lag in time for the sensor to respond, creating a different offset error in one direction than in the other. • If the sensor has a digital output, the output is essentially an approximation of the measured property. The approximation error is also called digitization error. • If the signal is monitored digitally, limitation of the sampling frequency also can cause a dynamic error, or, if the variable or added noise changes periodically at a frequency near a multiple of the sampling rate, it may induce aliasing errors. • The sensor may to some extent be sensitive to properties other than the property being measured. For example, most sensors are influenced by the temperature of their environment. • All these deviations can be classified as systematic errors or random errors. Systematic errors can sometimes be compensated for by means of some kind of calibration strategy. Noise is a random error that can be reduced by signal processing, such as filtering, usually at the expense of the dynamic behavior of the sensor. Functional Requirements Specification for the Project Design • Data Acquisition System capable of logging and storing data from two temperature sensors (inside and outside the building, for example) • Samples are 8-bit long (what is the accuracy?) • Temperature range from 0 to 100F (what is the resolution?) • Max number of records - >=10000 (how much memory?) • Each record must have a time stamp • Price of the DAS must not exceed $50.00 • The DAS must be reprogrammable and reconfigurable via RS-232 • Data must be stored in non-volatile memory • The DAS must be able to work as a stand-alone unit Temperature Sensors • Semiconductor Diode (−2 mV/˚C at low constant current through the diode, needed additional circuitry) • Integrated Circuit (analog or digital output) • RTD – Resistive Temperature Detector (carbon, platinum layer on substrate): NTC, PTC (needed additional circuitry) • Thermocouple - Junction of different metals or alloys (needed some methods of cold-junction compensation to adjust for varying temperature at the terminals and amplifiers) Signal Conditioning • In most practical cases a proper interface between a sensor and an ADC is required. • The goals of the interface is to provide the ADC with: – Full-scale signal (voltage) corresponding to the maximum of the measured parameter – Low-pass frequency filtering of the input signal equal or lower than maximum sampling frequency of ADC – If necessary – differential and/or isolated from the sensor signal – Phase correction – in case of simultaneous sampling or S&H from different kinds of sensors (Wattmeter) – Linearization of sensor’s characteristic, if necessary Components of Signal Conditioners • Operational Amplifiers (OpAmps) • Passive components: – – – – – Resistors Capacitors, Inductors (warning), Transformers, Optoisolators. • Example of R-C low-pass filter – Time Constant; error vs. time – Graphical Interpretation with an input step function