Escolar Documentos
Profissional Documentos
Cultura Documentos
DATA ACQUISITION
SYSTEM
DAQ HARDWARE
DAQ hardware is what usually interfaces between the signal and a PC. It could be in
the form of modules that can be connected to the computer's ports (parallel, serial,
USB) or cards connected to slots (PCI, ISA, PCI-E) in the mother board.
Usually the space on the back of a PCI card is too small for all the connections
needed, so an external breakout box is required. The cable between this Box and the
PC is expensive due to the many wires, the required shielding, and because it is
exotic.
DAQ-cards often contain multiple components (multiplexer, ADC, DAC, TTL-IO, high
speed timers, RAM). These are accessible via a bus by a micro controller, which can
run small programs. The controller is more flexible than a hard wired logic, yet
cheaper than a CPU so that it is alright to block it with simple polling loops.
For example: Waiting for a trigger, starting the ADC, looking up the time, waiting for
the ADC to finish, move value to RAM, switch multiplexer, get TTL input, let DAC
proceed with voltage ramp. As 16 bit ADCs, DACs, OpAmps and sample and holds
with equal precision as of 2007 only run at 1 MHz, even low cost digital controllers
like the AVR32 have about 100 clock cycles for bookkeeping in between.
DAQ SOFTWARE
DAQ software is needed in order for the DAQ Hardware to work with a PC.
This can come in at least three flavors: applications that register directly
from the hardware, low-level software driver (usually packaged with the
DAQ hardware) to allow developing higher level applications to register data
coming from the hardware and off-the-shelf applications
Driver software that usually comes with the DAQ hardware or from other
vendors, allows the operating system to recognize the DAQ hardware and
programs to access the signals being read by the DAQ hardware. A good
driver offers high and low level access. So one would start out with the high
level solutions offered and improves down to assembly instructions in time
critical or exotic applications.
Off-the-shelf applications include interface for programming means to log,
analyze and display the acquired data. Examples of this kind of software are
MATLAB and LabVIEW, both providing a high level graphical programming
language.
ANALOG DIGITAL
CCONVERTER
An analog-to-digital converter (abbreviated ADC, A/D or A to D)
is a device which converts continuous signals to discrete digital
numbers. The reverse operation is performed by a digital-to-analog
converter (DAC).
Typically, an ADC is an electronic device that converts an input
analog voltage (or current) to a digital number proportional to the
magnitude of the voltage or current. However, some non-electronic
or only partially electronic devices, such as rotary encoders, can
also be considered ADCs. The digital output may use different
coding schemes, such as binary, Gray code or two's complement
binary
Resolution
The resolution of the converter indicates the number of discrete values it can
produce over the range of analog values. The values are usually stored
electronically in binary form, so the resolution is usually expressed in bits. In
consequence, the number of discrete values available, or "levels", is usually a
power of two. For example, an ADC with a resolution of 8 bits can encode an
analog input to one in 256 different levels, since 28 = 256. The values can
represent the ranges from 0 to 255 (i.e. unsigned integer) or from -128 to 127
(i.e. signed integer), depending on the application.
Resolution can also be defined electrically, and expressed in volts. The voltage
resolution of an ADC is equal to its overall voltage measurement range divided
by the number of discrete intervals as in the formula:
Where:
Example 1
Full scale measurement range = 0 to 10 volts
ADC resolution is 12 bits: 212 = 4096 quantization levels (codes)
ADC voltage resolution is: (10V - 0V) / 4096 codes = 10V / 4096 codes 0.00244
V/code 2.44 mV/code
Example 2
Full scale measurement range = -10 to +10 volts
ADC resolution is 14 bits: 214 = 16384 quantization levels (codes)
ADC voltage resolution is: (10V - (-10V)) / 16384 codes = 20V / 16384 codes
0.00122 V/code 1.22 mV/code
Example 3
Full scale measurement range = 0 to 8 volts
ADC resolution is 3 bits: 23 = 8 quantization levels (codes)
ADC voltage resolution is: (8 V 0 V)/8 codes = 8 V/8 codes = 1 V/code = 1000
mV/code
Sampling rate
Sampling rate
The analog signal is continuous in time and it is necessary to convert this to a
flow of digital values. It is therefore required to define the rate at which new
digital values are sampled from the analog signal. The rate of new values is
called the sampling rate or sampling frequency of the converter.
A continuously varying bandlimited signal can be sampled (that is, the signal
values at intervals of time T, the sampling time, are measured and stored) and
then the original signal can be exactly reproduced from the discrete-time values
by an interpolation formula. The accuracy is limited by quantization error.
However, this faithful reproduction is only possible if the sampling rate is higher
than twice the highest frequency of the signal. This is essentially what is
embodied in the Shannon-Nyquist sampling theorem.
Since a practical ADC cannot make an instantaneous conversion, the input
value must necessarily be held constant during the time that the converter
performs a conversion (called the conversion time). An input circuit called a
sample and hold performs this taskin most cases by using a capacitor to
store the analog voltage at the input, and using an electronic switch or gate to
disconnect the capacitor from the input. Many ADC integrated circuits include
the sample and hold subsystem internally.
The SPI bus can operate with a single master device and with
one or more slave devices.
If a single slave device is used, the SS pin may be fixed to logic
low if the slave permits it. Some slaves require the falling edge
(high->low transition) of the slave select to initiate an action
such as the MAX1242 by Maxim, an ADC, that starts
conversion on said transition. With multiple slave devices, an
independent SS signal is required from the master for each
slave device.
Most slave devices have tri-state outputs so their MISO signal
becomes high impedance ("disconnected") when the device is
not selected. Devices without tristate outputs can't share SPI
bus segments with other devices; only one such slave could
talk to the master, and only its chipselect could be activated.
Data Transmission
A typical hardware setup using two shift registers to form an inter-chip circular buffer
To begin a communication, the master first configures the clock, using a frequency less
than or equal to the maximum frequency the slave device supports. Such frequencies are
commonly in the range of 1-70 MHz.
The master then pulls the slave select low for the desired chip. If a waiting period is
required (such as for analog-to-digital conversion) then the master must wait for at least
that period of time before starting to issue clock cycles.
During each SPI clock cycle, a full duplex data transmission occurs:
the master sends a bit on the MOSI line; the slave reads it from that same line
the slave sends a bit on the MISO line; the master reads it from that same line
Not all transmissions require all four of these operations to be meaningful but they do
happen.
Transmissions normally involve two shift registers of some given word size, such as eight
bits, one in the master and one in the slave; they are connected in a ring. Data is usually
shifted out with the most significant bit first, while shifting a new least significant bit into the
same register. After that register has been shifted out, the master and slave have
exchanged register values. Then each device takes that value and does something with it,
such as writing it to memory. If there is more data to exchange, the shift registers are
loaded with new data and the process repeats.
Transmissions may involve any number of clock cycles. When there is no more data to be
transmitted, the master stops toggling its clock. Normally, it then deselects the slave.
Transmissions often consist of 8-bit words, and a master can initiate multiple such
transmissions if it wishes/needs. However, other word sizes are also common, such as 16bit words for touchscreen controllers or audio codecs, like the TSC2101 from Texas
Instruments; or 12-bit words for many digital-to-analog or analog-to-digital converters.
Every slave on the bus that hasn't been activated using its slave select line must disregard
the input clock and MOSI signals, and must not drive MISO. The master must select only
one slave at a time.
parallel port
Before the advent of USB, the parallel interface was adapted to access a
number of peripheral devices other than printers. Probably one of the
earliest devices to use parallel were dongles used as a hardware key form
of software copy protection. Zip drives and scanners were early
implementations followed by external modems, sound cards, webcams,
gamepads, joysticks and external hard disk drives and CD-ROM drives.
Adapters were available to run SCSI devices via parallel. Other devices
such as EPROM programmers and hardware controllers could be
connected parallel.
Serial port
Serial communication is a popular means of transmitting
data between a computer and a peripheral device such
as a printer, a plotter, or a programmable instrument.
Serial communication uses a transmitter to send data,
one bit at a time, over a single communication line to a
receiver.
This method of communication is common when
transferring data at low rates or over long distances.
For instance, serial data can be transferred via modems,
over standard telephone lines.
USB
RS232
Pinouts
RS-232 signals and pin assignments
Signals
Commonly-used signals are:
Transmitted Data (TxD)
Data sent from DTE to DCE.
Received Data (RxD)
Data sent from DCE to DTE.
Request To Send (RTS)
Asserted (set to logic 0, positive voltage) by DTE to prepare DCE to receive data. This may require
action on the part of the DCE, e.g. transmitting a carrier or reversing the direction of a half-duplex
channel. For the modern usage of "RTS/CTS handshaking," see the section of that name.
Ready To Receive (RTR)
Asserted by DTE to indicate to DCE that DTE is ready to receive data. If in use, this signal appears
on the pin that would otherwise be used for Request To Send, and the DCE assumes that RTS is
always asserted; see RTS/CTS handshaking for details.
Clear To Send (CTS)
Asserted by DCE to acknowledge RTS and allow DTE to transmit. This signaling was originally used
with half-duplex modems and by slave terminals on multidrop lines: The DTE would raise RTS to
indicate that it had data to send, and the modem would raise CTS to indicate that transmission was
possible. For the modern usage of "RTS/CTS handshaking," see the section of that name.
Data Terminal Ready (DTR)
Asserted by DTE to indicate that it is ready to be connected. If the DCE is a modem, this may "wake
up" the modem, bringing it out of a power saving mode. This behaviour is seen quite often in modern
PSTN and GSM modems. When this signal is de-asserted, the modem may return to its standby
mode, immediately hanging up any calls in progress.
Data Set Ready (DSR)
Asserted by DCE to indicate the DCE is powered on and is ready to receive commands or data for
transmission from the DTE. For example, if the DCE is a modem, DSR is asserted as soon as the
modem is ready to receive dialing or other commands; DSR is not dependent on the connection to
the remote DCE (see Data Carrier Detect for that function). If the DCE is not a modem (e.g. a null
modem cable or other equipment), this signal should be permanently asserted (set to 0), possibly by
a jumper to another signal.
Data Carrier Detect (DCD)
Asserted by DCE when a connection has been established with remote equipment.
Ring Indicator (RI)
Asserted by DCE when it detects a ring signal from the telephone line
RS485
EIA-485 only specifies electrical characteristics of the driver and the receiver. It does not specify or recommend
any data protocol. EIA-485 enables the configuration of inexpensive local networks and multidrop communications
links. It offers high data transmission speeds (35 Mbit/s up to 10 m and 100 kbit/s at 1200 m). Since it uses a
differential balanced line over twisted pair (like EIA-422), it can span relatively large distances (up to 4000 feet or
just over 1200 meters).
In contrast to EIA-422, which has a single driver circuit which cannot be switched off, EIA-485 drivers need to be
put in transmit mode explicitly by asserting a signal to the driver. This allows EIA-485 to implement linear
topologies using only two wires. The equipment located along a set of EIA-485 wires are interchangeably called
nodes, stations and devices. [1]
The recommended arrangement of the wires is as a connected series of point-to-point (multidropped) nodes, a line
or bus, not a star, ring, or multiply-connected network. Ideally, the two ends of the cable will have a termination
resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause
multiple data edges that can cause data corruption. Termination resistors also reduce electrical noise sensitivity
due to the lower impedance, and bias resistors (see below) are required. The value of each termination resistor
should be equal to the cable impedance (typically, 120 ohms for twisted pairs).
Star and ring topologies are not recommended because of signal reflections or excessively low or high termination
impedance. But if a star configuration is unavoidable, such as when controlling multiple pan-tilt-zoom video
cameras from a central video surveillance hub, special EIA-485 star/hub repeaters are available which
bidirectionally listen for data on each span and then retransmit the data onto all other spans.
Somewhere along the set of wires, pull up or pull down resistors are established to Fail-safe bias each data
line/wire when the lines are not being driven by any device. This way, the lines will be biased to known voltages
and nodes will not interpret the noise from undriven lines as actual data; without biasing resistors, the data lines
float in such a way that electrical noise sensitivity is greatest when all device stations are silent or unpowered
DATA LOGGER
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.
Data loggers vary between general purpose types for a range of measurement applications to
very specific devices for measuring in one environment or application type only. It is common for
general purpose types to be programmable however many remain as static machines with only a
limited number or no changeable parameters. Electronic dataloggers have replaced chart
recorders in many applications.
One of the primary benefits of using data loggers is the ability to automatically collect data on a
24-hour basis. Upon activation, data loggers are typically deployed and left unattended to
measure and record information for the duration of the monitoring period. This allows for a
comprehensive, accurate picture of the environmental conditions being monitored, such as air
temperature and relative humidity.
Due to the technology involved in manufacturing some of the higher-end dataloggers, they can be
quite expensive.