Analogue to Digital Conversion in Distance Measurement How is an analogue to digital conversion of a distance measurement made and how accurate is it? Analogue to Digital Conversion in Distance Measurement page: 1 of 6 Contents Initial Problem Statement 2 Narrative 3-4 Notes 5 Appendix 6
Analogue to Digital Conversion in Distance Measurement Initial Problem Statement There are many engineering applications where measuring the distance to an object is useful. One example is helping in a manual operation, such as parking a car, where bumper sensors let the driver know the distance to nearby objects. Another is in automated manufacturing where robots are used to handle and position items. The ability to measure distances allows the robot to perform such tasks without collisions. How is the conversion made and how accurate is it? The distance between a sensor and an object is an analogue value, meaning it is a real number that can take any value. For representation in the computer that will act on the measurement it must be converted to a digital value, meaning it can only take certain discrete values. Analogue to Digital Conversion in Distance Measurement page: 2 of 6
Narrative Introduction There are three common sensor types used for measuring distance, laser, ultrasonic and infrared (IR). The first two typically use a time of flight method which measures the time it takes for a signal sent out from the device to be returned when reflected off an object. An infrared sensor usually works by illuminating an object using an infrared LED, then measuring how bright the reflected light is. A typical IR distance sensor is shown below. Multimedia Figure 1 The video Distance Sensor Video is available to demonstrate the behaviour of a distance sensor. Discussion Shine a torch on a table and look at the size and brightness of the light that is reflected back. What happens to these when you change the distance between the torch and the table? Analogue to Digital Conversion in Distance Measurement page: 3 of 6
The device is shown schematically below. +5 V (VCC) 0 V (GND) Output For historical reasons the positive supply is commonly called VCC on many electronic devices; this stands for voltage common collector. Figure 2 GND is short for ground or earth. There are three connections. Two are for power (VCC and GND). The third gives the output of the device in the form of a potential of between 0 and 5 volts above ground depending on how far away an object is from the sensor. The output is usually connected to a digital computer using an analogue to digital convertor (ADC). See Note Analogue to digital conversion on page 5. An ADC turns an analogue value into a binary representation of that value. Binary numbers are numbers that are written in base 2 rather than the base 10 that you are more familiar with. Each of the binary digits, or bits, of this value is either a zero or a one. The larger the number of bits used to represent a range of values, the more accurate the digital representation will be. Activity You will use a 10 bit analogue to digital convertor (ADC) to record an integer value that is proportional to the output voltage of the sensor. What is the smallest and largest binary number that the ADC can represent? If the largest number corresponds to 5 Volts what is the minimum difference in voltage levels that can be measured? Analogue to Digital Conversion in Distance Measurement page: 4 of 6
Notes Analogue to digital conversion At typical human engineering scales, variables in the physical world can be regarded as continuous, that is, they can take any value. Such variables are called analogue variables, Computers, however, store information digitally as a series of binary digits, or bits, that can take the value of 0 or 1. When an analogue value, say the voltage of an output, is read by a digital device it must convert the value to the nearest digital equivalent. This process is called analogue to digital conversion and is carried out by an analogue to digital convertor (ADC). The accuracy with which the conversion takes place depends on how many bits the ADC uses. For example, suppose an analogue variable has a continuous range of 0 to 1. If the ADC uses 1 bit then the reading will be either 0 or 1. Any analogue value in between is rounded to the nearest integer. Digital value Analogue equivalent 0 0.00 1 1.00 Any analogue value in between is rounded to the nearest integer. Suppose now that the ADC uses 2 bits. The possible combinations and representation of analogue values are Digital value Analogue equivalent 0 0.00 01 0.33... 10 0.66... 1 1.00 In this representation an analogue value in between is rounded to the nearest 1/3. Most common ADCs use at least 8 bits and many use more. For example, an ADC used to digitise music for an MP3 player will typically use 16 or 24 bits. Analogue to Digital Conversion in Distance Measurement page: 5 of 6
Appendix mathematical coverage Use algebra to solve engineering problems Be able to evaluate expressions Be able to work with numbers in index form Analogue to Digital Conversion in Distance Measurement page: 6 of 6