Sunteți pe pagina 1din 28

URL: http//www.lins.usthb.

dz

Cours 1: Data acquisition system

Prof. Youcef Remram


Laboratoire instrumentation, Facult
dElectronique et Informatique, USTHB
Basic principle of sensors

Sensor : Converts a physical parameter to an electrical output


Electrical output is desirable as to enables further signal processing

Actuator: Converts an electrical signal to a physical output

Sensors actuators
Camera Hydrolic
Acclerometer Analog sensors Pneumatic
Strain gauge - Continously varing output Electric
Microphone, loudspeaker Digital sensors Thermal or magnetic
Chemical sensors - On/off mechanic
Light sensors - pulse trains (convert in freq)
Exemple : Photoresistor

Or Light Dependant Resistor (LDR)


Resistance decreases with incresing light intensity
Made of semiconductor
Photons absorbed cause electrons to jump into conduction band.

Exemple of voltage devider By using a voltage devider, we


can transfom the resistance
change into a voltage change
which is more readely measured
Most modern sensors are electromecanical

We can clasify by sensing mechanism

Resistive : potentiometer , strain gauges, thermistors, light, etc,


Electrical output is desirable as ot enables further signal processing

Capacitive : Very common in MEMS (micro-electro-mecanical syst), accelerometer,


microphone, etc,

Inductive and Magnetic: proximity, distance, ,,,

Piezolectric : force, wave


Resistive sensors rely on changes in resistance
Calibration of the potentiometer sensor
Elements of a data acquisition system

Sensors: physical to electrical signal


Amplifier: Amplify and offset circuit: the output voltage should much the required voltage to the
folowing stage, voltage level shifting may also be required,

Filter: Get a rid of unwanted signal components

Multiplexer: Select one of multiple inputs,

Sampler: the conversion rate must be at least twice the highest signal frequency ( Nyquist
sampling criterion)

ADC
Elements of a data acquisition system
Signal conditioning

.
Signal conditioning circuits improve the quality of signals generated by sensors before they are
converted into digital signals by the PC's data-acquisition hardware.

Examples of signal conditioning are


- signal scaling,
- amplification,
- linearization,
- filtering,
- attenuation,
- common-mode rejection, and so on.
Signal conditioning
One of the most common signal conditioning functions is amplification.
For maximum resolution, the voltage range of the input signals should be approximately equal to
the maximum input range of the A/D converter. Amplification expands the range of the
transducer signals so that they match the input range of the A/D converter.

For example, a x10 amplifier maps sensor signals which range from 0 to 1 V into the range 0 to
10 V before they go into the A/D converter.
Sample and hold, and acquisition time

If the switch is closed, the capacitor is charged to the potential Vs (sample). When the switch
opens, the capacitor (holds) its charge, so the follower op amp has an output potential of
what potential was on the capacitor at the moment the switch opened.
11
Sample and hold, and acquisition time

12
Example

When the acquisition process should start for a 10-bit ADC?


The voltage should rise to
Vs quantization error = Vs - Vs / 2n+1 (qerror 1/2LSB)
Vs(2047/2048) = 0.9995 Vs

VC = Vs {1 exp(t/RC)}
0.9995Vs = Vs {1 exp(t/RC)}
exp(t/RC) = 1 0.9995
t = RC ln(0.0005)
t = 7.6RC
13
A/D conversion

Analog to digital (A/D) conversion changes analog voltage


or current levels into digital information. The conversion is
necessary to enable the computer to process or store the
signals
Typical application of data acquisition by PIC C 18F4550

- Signals coming out from the temperature sensor IC LM35 and


humidity sensor IC HIH 4000 are not suitable for feeding it to the DAS
directly.
- Signal conditioning circuits have been designed using OpAmps OP07
- To protect the over voltage due to accidental or over range, a 5.1 volt
zener diode is used in series with a series current limiter resistance.

15
Typical application of data acquisition by PIC C

- A C program was written using MikroC IDE for proper ADC conversion
and sending the digitized data to the PC through the USB. The program
was compiled and generate a hex file. The hex file so generated was
downloaded to the PIC18F4550 microcontroller using PICkit2
programmer.
- For proper acquisition of the data by the PC, graphical display and saving
into a file an application program was developed in Visual Basic.
- Since it has 10 bit resolution it can read a value from 0 to 5 volt in 1023
steps for a channel. Thus, it has an accuracy of 4.88mV.
- For the temperature, the range is set between 0 to 500C. This is converted
into voltage from 0 to 5 volt, by the signal conditioning circuit.
- The range of the relative humidity is from 10 to 90 % RH. Then the signal
conditioning circuit converted this voltage range to 1 - 5 volt.
Data acquisition in the microcontroller
environment
To operate to a good level of accuracy, an ADC
needs a clean power supply and ground and no
electromagnetic interference.
When an ADC is integrated inside a
microcontroller, it will be affected by the noisy
internal power sources.
So, integrated ADCs are not very accurate, typically
8- or 10-bit.

17
Data acquisition card

Data acquisition and control


hardware generally performs one
or more of the following functions:

- analog input,
- analog output,
- digital input,
- digital output and
- counter/timer functions.
A/D converter

Themost
The mostsignificant
significantcriteria
criteriawhen
whenselecting
selectingA/D
A/Dhardware
hardware
are:
are:
1. Number of input channels
1.
2.Number of input
Single-ended orchannels
differential input signals
3.Single-ended
2. Sampling rateor(in samples per
differential inputsecond)
signals
4. Resolution (usually measured in bits of resolution)
3.
5.Sampling rate
Input range (in samples
(specified per second)
in full-scale volts)
6.Resolution
4. Noise and (usually
nonlinearity
measured in bits of resolution)
5. Input range (specified in full-scale volts)
6. Noise and nonlinearity
A/D Converter:
Sampling Rate

Determines how often conversions take place.


The higher the sampling rate, the better.

Analog 16
8
4 Samples/cycle
Samples/cycle
Input
A/D Converter:
Sampling Rate

Aliasing.
Acquired signal gets distorted if sampling rate
is too small.
A/D Converter:
Throughput *

Effective rate of each individual channel is inversely


proportional to the number of channels sampled.
Example:
100 KHz maximum.
16 channels.
100 KHz/16 = 6.25 KHz per channel.

* Throughput : dbit
A/D Converter:
Range

Minimum and maximum voltage levels that the


A/D converter can quantize

Ranges are selectable (either


hardware or software) to accurately
measure the signal
A/D Converter:
Resolution
Analog Outputs (D/A)

The opposite of analog to digital conversion is digital to analog


(D/A) conversion. This operation converts digital information into
analog voltage or current. D/A devices allow the computer to
control real-world events.
Analog output signals may directly control process equipment.
The process can give feedback in the form of analog input signals.
This is referred to as a closed loop control system with PID
control.
Analog outputs can also be used to generate waveforms. In this
case, the device behaves as a function generator.
Data Acquisition Software

It can be the most critical factor in obtaining reliable, high


performance operation.
Transforms the PC and DAQ hardware into a complete
DAQ, analysis, and display system.
Different alternatives:
Programmable software.
Data acquisition software packages.
Programmable Software

Involves the use of a programming language, such as:


C++, visual C++
BASIC, Visual Basic + Add-on tools (such as VisuaLab with VTX)
Fortran
Pascal
Advantage: flexibility
Disadvantages: complexity and steep learning curve
Designing a DAS: Factors to Consider

Is it a fixed or a mobile application?


Type of input/output signal: digital or analog?
Frequency of input signal ?
Resolution, range, and gain?
Continuous operation?
Compatibility between hardware and software. Are the
drivers available?
Overall price.

S-ar putea să vă placă și