Presentation on theme: "Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Analog & Digital Signals Analog to Digital Conversion (ADC)"— Presentation transcript:
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Analog & Digital Signals Analog to Digital Conversion (ADC)
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 0 o C to 100 o C and its display shows only one tenth of a 1 o C. – Using this thermometer only a 0.1 o C 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.0 o C, 25.1 o C etc. Though this temperature rise is continuous, the digital nature of the thermometer fails to record the temperatures between 25.0 o C and 25.1 o C.
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-100 o C could be represented as an 8-bit binary value. – 0 o C temperature -> 0 10 or 00000000 2 in digital scale – 100 o C temperature -> 255 or 11111111 2 in digital scale. – 40 o C temperature -> 40*255/100 = 101 10 or 1100101 2 in digital scale. Each bit in the digital scale will represent 0.394 o C. Therefore, using an 8-bit representation the temperature rise could be measured to an accuracy of 0.394 o C.
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)012345678910 Signal voltage/(v)3.55.87.02.18.104.22.168.22.214.171.124
Representation of the Signal as a 3-bit Digital Signal
Time /(s)012345678910 Signal voltage/(v)011101111010 011100011010001000 Signal Error/(v) 0.50.800.50.2 0.80.10.8
The Resolution of ADC 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 2 n 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:
Accuracy of ADC (1) 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.