You are on page 1of 13

Course 1 Acquisition and treatment of experimental data

1. Introduction, definitions, concepts


Course structure: See course syllabus.
Definitions:
 Analog:1. (About signals) whose value can be represented by a continuous function over
time, can take an infinite number of values within its domain of variation. 2. (About devices,
instruments and systems) that generate, measure, process and store analog signals.

 Digital: 1. (About signals) whose value can be represented by a discontinuous function over
time, can take a finite number of values within its domain of variation. 2. (About devices,
instruments and systems) that generate, measure, process and store digital signals.

 Interface: 1. (Chemistry) Surface which separates the components of a mixture, existing as


distinct phases; 2. (Informatics) Subsystem (substructure) which completely separates two
subsystems (substructures); 3. (electronic) device that converts electronic signals so that two
devices or systems can communicate between them.

 Hardware: The physical structure of a computing system or peripherals; the unit itself.

 Software: System of programs (applications) that came with the computer or are developed
by user.

2. Modern sensors used in the experiments and chemical processes monitoring


2.1. Sensors. Generalities
A sensor is a device, module or subsystem whose purpose is to detect events or changes in
its environment and send the information to other electronic devices. The output is, generally, a
signal that is converted to human-readable display at the sensor location or transmitted
electronically over a network for reading or further processing, frequently using a computer based
processor.
The specific input could be light, heat, motion, moisture, pressure or any one of a great
number of other environmental phenomena. Between them, the chemical sensors are self-contained
analytical devices that can provide information about the chemical composition of the environment.
The information is provided in the form of a measurable physical signal that is correlated with the
concentration of a certain chemical species (termed as analyte). Two main steps are involved in the
functioning of a chemical sensor, namely, recognition and transduction. In the recognition step,
analyte molecules interact selectively with receptor molecules or sites included in the structure of
the recognition element of the sensor. Consequently, a characteristic physical parameter varies and
this variation is reported by means of an integrated transducer that generates the output signal. A

1
Course 1 Acquisition and treatment of experimental data

chemical sensor based on recognition material of biological nature is generally defined as a


biosensor.

2.2. Analog and digital sensors


The sensors that produce continuous analog output signal are considered as analog sensors.
This continuous output signal produced by the analog sensors is proportional to the measurand. The
main drawback of the analog sensors is the fact that the output signal can be dramatically affected
by noises, especially when the signals must be transmitted on long distances and/or in a extremely
noisy environment due to the electromagnetic or electrical interferences.
Electronic sensors or electrochemical sensors in which data conversion and data
transmission takes place digitally are called as digital sensors. The digital sensors tend to replace the
analog sensors as they are capable of overcoming the drawbacks of analog sensors. The digital
sensor consists of majorly four components: sensor, converter, transmitter and cable. In the digital
sensors, the signal measured is directly converted into digital output signal inside the digital sensor
itself and this digital signal is also transmitted digitally through cable.

2.3. Smart sensors and TEDS


In the last decades, the researchers and manufacturers tends to impose the new concept of
"smart sensors" in the monitoring and control systems. According to this concept, indifferently if
the sensor is analog or digital, it must also includes a small "intelligent" area able to offer to the data
acquisition system additionally information about the sensor, like sensor manufacturer, model and
serial number, measurement range, calibration and user information and many other additional data.
In order to facilitate the "plug and play" operation for the analogic smart sensors and to
assure the compatibility from the smart sensors and data acquisition systems from different
manufacturers, the Institute of Electrical and Electronics Engineers (IEEE) decide to elaborate and
impose an standardized protocol (IEEE1451.4) for communication with the analogic smart sensors.
According to this standard, the smart sensors manufacturers must to implement the same
Transducer Electronic Data Sheet (TEDS) formats in their products. For example, National
Instruments, one of the leader of data acquisition systems manufacturers, started to produce a series
of smart sensors in agreement with the IEEE.1451.4 standard.

2.4. Unified signals


Before the elaboration and implementation of smart sensors and TEDS concepts, in order to
assure the compatibility from the sensors and data acquisition systems from different manufacturers,
they agreed to use standardized protocols for transmission of the analogic signals, based on an
unified signals system. In this context, the most used and popular standards are:

2
Course 1 Acquisition and treatment of experimental data

 for voltage: 0 ÷ 50 mV, 0 ÷ 1 V, 0 ÷ 5 V, 0 ÷ 10 V, ± 50 mV, ± 1 V, ± 5 V and ± 10 V;


 for current: 0 ÷ 10 mA, 0 ÷ 20 mA; 2 ÷ 10 mA and 4 ÷ 20 mA.
It is worth to note that, in the industrial environment and/or for long distance signal
transmission, the data transfer based on unified current standards are preferred because the voltage
based transfer of signals presents certain disadvantages:
 A sensor or connection fault (no signal) cannot be detected: A value of 0 V can indicate either
zero value or no signal;
 It is prone to electromagnetically and/or electrical noise and interference;
 Over longer cable distances, voltage drop can cause an inaccurate signals.
 A separate power supply to the instrument is usually required, meaning the sensor requires at
least three wires.
Contrarily, the signal transfer based on the unified current standards solve certain problems:
 It is much less prone to electromagnetically and/or electrical noises;
 The instrument (sensor) can be "loop-powered" (often 24VDC) by the same cable that is used
for data transmision, meaning that only two wires are required;
 It allow the elimination of the error due to the transmission wires resistance.
Moreover, using the unified current standards including an initial offset (2 ÷ 10 mA and 4 ÷
20 mA), the "no signal" faults (due to the sensor damage or wires broken) can be easily detected,
because 0 mA indicates signal missing, while 4 mA indicates a zero value.

3. Elements of binary arithmetic (recapitulation)


Numerical systems:
Decimal system
The most usual numerical system is represented by the decimal one, based on the use of ten
symbols (numbers) 0, 1, …9. In this system, 10 units of inferior level represent one unit of superior
level. For example:
Thousands (103) Hundreds(102 Tens (101) Units (100)
)
5 3 0 4

= 5 x 103 + 3 x 102 + 0 x101 + 4 x 100 = 5 x 1000 + 3 x 100 + 0 x 10 + 4 x 1 = (5304)10

Binary system
The binary system is mostly used in the digital computing systems and is based exclusively
in the use of numbers 0 and 1 associated with increasing powers of 2. For example:

8 (23) 4 (22) 2 (21) 1 (20)

3
Course 1 Acquisition and treatment of experimental data

1 0 1 1
= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = (1011)2 = 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1 = (11)10

Since the large numbers in binary representation involve the use of a large number of digits,
new numerical systems are developed, the most common being the octal system (based on the use
of numbers 0, 1, ..... 7) and the hexadecimal system (that uses the numbers from 0 to 9 and, for
numbers greater than 9, uses the symbols A, B, C , D, E and F.)
A suggestive comparison between different numerical systems is shown in Table 1.
Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

In this context, we can define the term bit (short for “binary digit”, having the plural “bits”) ,
which is the fundamental unit of information (0 or 1, ON or OFF, TRUE or FALSE). Using a single
bit we can create only two distinct combinations (numbers, status ). The use of 2 bits allows the
composition of four distinct numbers :
(00)2 = (0)10; (01)2 = (1)10; (10)2 = (2)10; (11)2 = (3)10.
Generally, using a number of “n” bits we can write 2n distinct numbers. Relative to the
position of each bit in the binary number, we can define the notions of:
 LSB ("Least Significant Bit"). Indicates the bit found on the right extremity and
corresponds (for integers) to the binary number 20;
 MSB ("Most Significant Bit"). Indicates the bit from the left extremity and
corresponds (for integers) to the binary number 2n-1
To facilitate both writing numbers in binary and mutual transformation from/in binary, octal
and hexadecimal systems, the bits can be grouped as described below:
 Nibble - Group of 4 bits;

4
Course 1 Acquisition and treatment of experimental data

 Byte - Group of din 8 bits;


 Simple word - Group of 16 bits;
 Long word - Group of 32 bits.
Besides these terms, in order to facilitate the expression of the digital information amount,
byte multiples are frequently used:
 1 kilobyte (1kB) = 210 bytes = 1024 bytes;
 1 Megabyte (1MB) = 220 bytes = 1024 kbytes;
 1 Gigabyte (1GB) = 230 bytes = 1024 Mbytes;
 1 Terabyte (1TB) = 240 bytes = 1024 Gbytes.

Modalities of numbers conversion between different numerical systems


The most used method for transposing a number from different numerical systems involves
the temporary conversion in the decimal number followed by the calculation of its value in the new
numerical system. In this context, a major importance should be given to decimal-binary and
binary-decimal conversions.

Integers conversion
Conversion from any base in the decimal system
Considering the general case of a number of “k” digits write in the “b” base, the
corresponding value in the decimal system will be:
k
(Value )10   k i b i 1
i 1

where ki represents the digit value of i level.

Decimal to binary conversion


 Successive approximation method. The method is relatively simple, can be applied
especially for small numbers but requires knowledge about the powers of 2. An example for
the conversion process of the number 9810 to the binary equivalent is described in Table 2

98  64 ? Yes 98 – 64 = 34 1 (MSB)
34  32 ? Yes 34 – 32 = 2 1
2  16 ? No - 0
28? No - 0
24? No - 0
22 Yes 2–2=0 1
01 No 0 0 (LSB)

5
Course 1 Acquisition and treatment of experimental data

Considering the level of each bit, we can write: (98)10 = (1100010)2.

 The method based on remainder evaluation after successive division by 2. The method can
be applied even for very large integer numbers and involve successive division by 2 of the
number and the corresponding resulting integers and evaluation of the remainders for each
step, as described in Figure 1.

Figure 1

The conversion of rational numbers


A rigorous decimal to binary conversion of rational numbers is possible only in very few
situations, in all the other cases the next approximation being accepted:
R 10  R 2  

where  represents the accepted error for the corresponding conversion.

Binary to decimal conversion


During this process, each digit after the integer separator (coma or dot) represent, as
described below, an increasing negative power of 2:
0.110012 = ?10
0.110012 = 1 * 2-1 + 1 * 2-2 + 0 * 2-3 + 0 * 2-4 + 1 * 2-5 = 1 * 0.5 + 1 * 0.25 + 0 * 0.125 + 0 *
0.0625 + 1 * 0.03125 = 0.5 + 0.25 + 0.03125 = 0.7812510

Decimal to binary conversion


Contrarily to the process of decimal to binary integers’ conversion, the conversion of the
rational numbers require repeated multiplication with 2 in order to obtain the remainder of “0”

6
Course 1 Acquisition and treatment of experimental data

value or up to the required precision for the conversion process. For example, the conversion of
the number 0.1910 with 9 bits resolution includes the next steps:
Step (i) N Operation Remainder z(i-1)
1 0.19 0.19 * 2 = 0.38 0.38 0
2 0.38 0.38 * 2 = 0.76 0.76 0
3 0.76 0.76 * 2 = 1.52 0.52 1
4 0.52 0.52 * 2 = 1.04 0.04 1
5 0.04 0.04 * 2 = 0.08 0.08 0
6 0.08 0.08 * 2 = 0.16 0.16 0
7 0.16 0.16 * 2 = 0.32 0.32 0
8 0.32 0.32 * 2 = 0.64 0.64 0
9 0.64 0.64 * 2 = 1.28 0.28 1

Finally, we have: 0.1910 = 0.0011000012 + e

► Exercise: Calculate the absolute and relative error for the presented case.

Representation of numbers in the computing systems

Byte integer number (8 bits), with or without sign:


7 0 U8: 0 ÷ 255 I8: -128 ÷ 127

Word integer numbers (16 bits), with or without sign:


15 0 U16: 0 ÷ 65535 I16: -32768 ÷ 32767

Long integer number (32 bits), with or without sign:


31 0 U32: 0 ÷ 4294967295; I32: -2147483648 ÷ 2147483647

Quad signed integer (64 bits), with or without sign:


63 0 U64: 0 ÷ 2e19; I64: –1e19 to 1e19

Single-precision floating-point number (32 bits):


31 30 8 bits 23 22 23 bits 0
S 7 Exponent 0 22 Mantissa 0

Double-precision floating-point number (64 bits):


63 62 11 bits 52 51 52 bits 0
S 10 Exponent 0 51 Mantissa 0

Extended precision floating-point numbers (128 bits):


127 126 15 bits 112 111 112 bits 0
S 14 Exponent 0 111 Mantissa 0

7
Course 1 Acquisition and treatment of experimental data

Logic gates
Inverter (NOT)
A Ā
0 1
1 0
AND gate
A B A·B
0 0 0
0 1 0
1 0 0
1 1 1
OR gate
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NAND gate
A B AB
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate
A B AB
0 0 1
0 1 0
1 0 0
1 1 0
XOR gate
A B AB
0 0 0
0 1 1
1 0 1
1 1 0
XNOR gate
A B AB
0 0 1
0 1 0
1 0 0
1 1 1
1 bit half adder
A B SUM CARRY
0 0 0 0
1 0 1 0
0 1 1 0

8
Course 1 Acquisition and treatment of experimental data

1 1 0 1

1 bit complete adder

A B CIN S COUT
0 0 0 0 0
1 0 0 1 0
0 1 0 1 0
1 1 0 0 1
0 0 1 1 0
1 0 1 0 1
0 1 1 0 1
1 1 1 1 1

Complex logical circuits


This type of circuit results combining a corresponding number of fundamental logic gates
in order to obtain complex logic functions. Depending on the approximate number of gates
included in a single chip (IC, Integrated circuit), we can talk about circuits made by:
 SSI, Small scale integration, including 10 – 100 logic gates;
 MSI, Medium scale integration, including 100 – 1000 logic gates;
 LSI, Large scale integration, including 1000 – 10000 logic gates;
 VLSI, Very large scale integration, including over 10000 logic gates;
This is a relative classification but it allows us to have a general image over the
complexity of the designed circuit.
Considering the relation between the inputs and outputs, the complex logical circuits can
be divided in two main categories:
 Combinational logical circuits (coders, decoders, (de)multiplexers etc.)
 Sequential logical circuits (flip-flops, registers, counters etc.)

9
Course 1 Acquisition and treatment of experimental data

Combinational logical circuits


The combinational logical circuits represent complex logical systems characterised by the
fact that the output state is controlled instantly and univocally by the inputs combinations. Their
functioning can be easily and unambiguously described using the truth tables.

Decoders

The decoders represent combinational logical circuits having, basically, “n” logical
inputs and 2n outputs. Depending on the logical input combination (and, in most cases, on the
enable input state), only one from the 2 n outputs is activated. As described in the example from
the Figure 3, using 2 inputs, 4 outputs can be activated independently when the “Enable” input is
active. Contrarily, when the “Enable” input is inactive, all the outputs are inhibited.

Figure 3. The symbol and the truth tables for a 2 bits decoder with Enable input.

The logical schematic for the described decoder is presented in Figure 4.

Figure 4. Logical schematic for


a 2 bits decoder with Enable
input designed with AND gates.

Multiplexers and demultiplexers.

10
Course 1 Acquisition and treatment of experimental data

The multiplexers present “n” logical control inputs, 2n data inputs and one output.
Depending on the logical combination applied to the control inputs, the data presented to the
corresponding input is transferred to the output as in the example presented in Figure 5.

Figure 5. The symbol


and the truth tables for a
2 bits multiplexers

The digital multiplexers can be easily designed using a “n” bits decoder coupled to 2n
AND gates having the outputs connected to an 2n inputs OR gate.

Similarly, the demultiplexers present “n” logical control inputs, one data input and 2n data
outputs. Depending on the logical combination applied to the control inputs, the data presented
to the D input is transferred to the corresponding output (F0 – F2n-1) as in the example presented
in Figure 6.

Figure 6. The symbol


and the truth tables for a
2 bits demultiplexers

For more detailed information, see (from the "Biblio_ATED_2017-2018"folder) the file “C02 A
Practical Introduction to Computer Architecture.pdf”, pages: 23-40, 48-50, 63-65 and 67-71.

11
Course 1 Acquisition and treatment of experimental data

12
Course 1 Acquisition and treatment of experimental data

► Practical activity (See also Seminar 1). Using LabView:

1. Identify the main controls, indicators and operators used for numerical and boolean
data.

2. Create an application that allows displaying a number in decimal, binary and


hexadecimal format.

3. Using boolean controls, indicators and operators, create applications corresponding to


the next combinational circuits:

o 2 bits decoder without Enable input;

o 2 bits multiplexer;

o 2 bits demultiplexer;

13

You might also like