## Вход

Забыли?

#### вход по аккаунту

код для вставкиСкачать
```Engineering 1040: Mechanisms & Electric Circuits
Winter 2015
Analog & Digital Signals
Analog Signals
• An analog signal is any continuous signal that changes over time to
represent a time varying physical quantity.
Eg:– A mercury bar of a thermometer changes its height in response
to a temperature change.
– Even an infinitesimal temperature change results in an
infinitesimal change in the height of the mercury bar.
• In most cases an analog signal is thought of as an electrical context.
Eg:– The voltage from a potentiometer could be changed
infinitesimally from a minimum value to a maximum value.
Digital Signals (1)
• This is a discrete signal a time series signal which consists of a sequence of
quantities.
• It is a physical signal that is a representation of a sequence of discrete
values.
Eg:– A digital thermometer reads 0oC to 100oC and its display shows only one
tenth of a 1 oC.
– Using this thermometer only a 0.1oC could be obtained.
– If this thermometer is used to record the temperature rise of boiling
water from room temperature, the observer will acquire a time series of
discrete temperature readings; e.g., 25.0oC, 25.1oC etc.
• Though this temperature rise is continuous, the digital nature of the
thermometer fails to record the temperatures between 25.0 oC and 25.1 oC.
Digital Signals (2)
• Often the digital signals are represented as a binary number
because it could be easily converted into an electrical signal.
Eg:• If a thermometer temperature from 0-100oC could be represented
as an 8-bit binary value.
– 0 oC temperature -> 010 or 000000002 in digital scale
– 100 oC temperature -> 255 or 111111112 in digital scale.
– 40 oC temperature -> 40*255/100 = 10110 or 11001012 in digital
scale.
• Each bit in the digital scale will represent 0.394 oC.
• Therefore, using an 8-bit representation the temperature rise could
be measured to an accuracy of 0.394 oC.
Analog vs Digital Signals
• Analog signals can produce an infinite amount of signal resolution.
However, in case of digital signals this is not possible.
• Processing of analog signals is simpler & more straight forward. Eg:
Reading an analog signal is easy as measuring a voltage.
• Processing of digital signals it is more complicated. Eg: Read a digital
signal more complicated serial interfaces are needed (SPI, I2C).
• Disadvantages of analog signals are,
– Has random unwanted variation of voltage (noise).
– If the signal is transmitted over long distances the effects of noise
create signal loss and distortion.
• However, by representing this signal as a series of pulses the problems
with respect to noise could be suppressed.
• Although there will be losses and distortions in the voltage levels of the
pulses, the value of the bit stream is determined based on low (0) and
high (1) voltages.
Analog to Digital Conversion (1)
• Most sensors used today are analog sensors.
• These are much simpler to use.
• The sensor reading could be obtained simply by measuring a
voltage level.
• The value of an analog sensor is measured in terms of a voltage.
• It should be converted into a digital signal in order for this signal to
be processed by a microprocessor or a microcontroller.
• This is done by using an analog to digital converter (ADC).
An Analog Signal
Time /(s)
Signal voltage/(v)
0
3.5
1
5.8
2
7.0
3
2.5
4
2.2
5
3.2
6
4.2
7
3.8
8
2.1
9
1.8
10
0.8
Representation of the Signal as a
3-bit Digital Signal
Representation of the Signal as a
3-bit Digital Signal
Time /(s)
Signal voltage/(v)
Signal Error/(v)
0
011
0.5
1
101
0.8
2
111
0
3
010
0.5
4
010
0.2
5
011
0.2
6
100
0.2
7
011
0.8
8
010
0.1
9
001
0.8
10
000
0.8
• The resolution of an ADC indicates the number of discrete values it
can produce over the range of analog values.
• Higher accuracy could be produced with higher resolution of a
digital signal.
• If the digital signal is considered as an n-bit signal it can produce a
number of 2n-1 different quantization intervals.
• The resolution of an analog to digital convertor is the minimum
voltage required to make a change in the output digital level.
• ADC resolution is calculated as follows:
• In the above given analog to digital conversion example,
– 3-bit ADC -> resolution is 1.
– 6-bit ADC -> resolution is 0.1111.
– 12-bit ADC -> resolution is 0.0017.
• By increasing the bit resolution the signal error could be
reduced.
• By increasing sampling rate the signal accuracy could also be
increased.
Eg: In the above case sampling rate was 1 data sample per
second or 1 Hz.
if it this is increased the signal accuracy will increase.