Student on page: 1 of 16 si Light Sensing er lv Tr ia Light Sensing How can the level of light be measured and how can it be used to control a device? Contents Initial Problem Statement 2 Narrative 3-11 MEI ©2011 Notes 12-15 Appendix 16 Supported by Student on page: 2 of 16 Light Sensing er Initial Problem Statement si Light Sensing There are many occasions when the amount of light available is important. These range from activities such as taking a photograph, where the light is metered in order to produce the right lv exposure, to sporting activities such as cricket, where “bad light” can stop play, through to control applications such as turning on a night or security light. Tr ia How can the level of light be measured and how can it be used to control a device? MEI ©2011 Supported by Student Narrative Introduction The unit for measuring the amount of light falling on a unit area of surface is the lux. The following table shows typical lux values for various forms of illumination. It shows that our eyes are very sensitive to a broad range of lux levels. Illumination Source Typical lux value Starlight 0.00005 Moonlight 0.1 60 W bulb at 1 m 50 Bright sunlight 500 on Fluorescent Lighting, e.g. classroom 30,000 Tr ia lv Light Sensing er page: 3 of 16 si The value of the light level can be measured using a device called a light dependent resistor or LDR. An example of this kind of sensor is shown below. Figure 1. An LDR has a resistance that is high when it is dark and low when it is placed in bright light. Multimedia The video Light Sensing Video is available to demonstrate the behaviour of an LDR. Activity 1 The following data have been collected from an LDR at various light levels for which it might be used. Plot the data on the given axes. Discussion What do you notice about the numbers being plotted? Is the plot useful? MEI ©2011 Supported by An LDR has a resistance value of 1.5 kΩ. Use your graph to estimate the light level in lux. Student Activity 2 Discussion How could you make the data clearer? Measured resistance (kΩ) 0.1 248.87 0.5 92.15 1 60.07 on Light level (lux) 10 14.50 100 3.50 1,000 0.84 10,000 0.20 30,000 0.10 280 260 240 200 180 160 lv 140 Light Sensing er 220 page: 4 of 16 si Measured resistance (k Ω) 120 100 80 60 40 Tr ia 20 0 0 5000 10000 15000 20000 25000 30000 35000 Light level (lux) Figure 2. MEI ©2011 Supported by You might be tempted to zoom in on part of the graph, particularly if you have plotted the data with a spreadsheet. Look at the following zoom-in of the plot to answer the question, Student Discussion “An LDR has a resistance value of 1.5 kΩ. Use your graph to determine the light level in lux.” Do you trust the plot to be accurate? Measured resistance (k Ω) 15 14 13 12 on 11 10 9 8 7 6 3 2 0 0 100 200 er 1 300 400 500 600 700 800 900 Light Sensing 4 page: 5 of 16 si 5 1000 Light level (lux) Tr ia lv Figure 3. MEI ©2011 Supported by There are many problems in engineering that use a large range of values. To make the range more manageable a mathematical technique called changing the variables is often used. To see how this might work consider the following table x log10 x 0.1 -1 1 0 10 1 100 2 1000 3 on Discussion Student 2. Changing the variables Activity 3 si The range of both measured resistance and the light level in the LDR data is very large. One way to reduce the range is to take the log of both sets of data. Mathematically, call the light level l and the resistance r. Take the log base 10 (log10 ) of these values and fill in the table. (Report values to 2 d.p.) 0.1 0.5 1 10 log10 r 248.87 92.15 60.07 14.50 3.50 lv 100 log10 l Light Sensing r er l 0.84 10,000 0.20 30,000 0.10 Tr ia 1,000 MEI ©2011 page: 6 of 16 What do you notice about how log10 x changes when x changes? Discuss the range of x and compare it with the range of log10 x. Supported by Plot log10 r vs log10 l. What do you notice about the range of the variables? What do you notice about the shape of the curve? Student Activity 4 log10 r 3.00 2.50 2.00 1.50 0.00 -1.00 -0.50 0.00 0.50 1.00 1.50 2.00 2.50 -1.00 -1.50 Activity 5 4.00 4.50 5.00 log10 l er Figure 4. 3.50 si -0.50 3.00 page: 7 of 16 -1.50 lv An LDR has a resistance value of 1.5 kΩ. Use your graph to determine the light level in lux to the nearest integer value. Compare your answer with 520 lux found by zooming in on the graph. Discussion Tr ia Under what circumstances should you use a logarithmic graph MEI ©2011 Supported by Light Sensing 0.50 on 1.00 The last activity showed that by transforming the variables by taking their logarithms, the relationship between light level and measured resistance for an LDR became linear. This section will perform some mathematical analysis of the data. Student 3. Mathematical analysis Look again at the plot using the logarithm of the variable values: 3.00 2.50 2.00 0.50 0.175 0.00 -0.50 0.00 0.50 1.00 1.50 -0.50 2.50 3.00 3.50 4.00 4.50 5.00 er -1.00 -1.50 2.00 page: 8 of 16 -1.00 si -1.50 Figure 5. The first thing to do is assign variable name for the transformed variables to make them easier to deal with. lv Discussion Introduce two new variables x and y and write: x = log10 l y = log10 r Tr ia What are the axes labels on the above graph using these new variables? Activity 6 Call the gradient of the line m and the y-intercept c. Write an equation relating x and y. Determine the values of m and c and write out the full equation relating x and y. Discussion Do you expect the gradient to be positive or negative? MEI ©2011 Supported by Light Sensing 1.00 on 1.50 Tr ia lv Light Sensing er page: 9 of 16 si on Use the transformed variable and your equation to find the light level corresponding to a resistance of 1.5 kΩ. Compare this with the previously found value of 398 lux. Student Activity 7 MEI ©2011 Supported by You have previously determined that for the LDR being considered, the light level, l, and resistance, r, are related through the expression: Student 4. Use in a device y = mx + c where and x = log10 l y = log10 r m = −0.62 c = 1.78 Light Sensing er find transformed unknown variable from y = mx + c lv transform value by using the inverse log function Tr ia To make the calculation take fewer steps (and be easier to implement in your device) you will investigate the possibility of finding a direct relationship between r and l. Activity 8 Substitute x = log10 l and y = log10 r into your equation and use the laws of logs to find a direct relationship between r and l. Discussion Did taking the logarithms of the values help? MEI ©2011 page: 10 of 16 si transform known variable by taking logs on This solution leads to the following sequence of calculations Supported by Compare the smooth curve provided by the spreadsheet with the actual curve produced from your mathematical expression. What does this tell you about automatically generated curves in spreadsheets? Student Discussion Measured resistance (k Ω) 15 14 13 12 11 10 9 6 5 4 3 Spreadsheet "smooth" line 2 1 0 0 100 200 300 400 si Actual line 500 600 700 800 900 1000 Light level (lux) Figure 6. lv Activity 9 er The expression that you have just derived gives the resistance as a function of the light, which is what would typically be published by a manufacturer as they are showing their calibration data for standard light levels. However, this expression is not usable in a device as you wish to give light level as a function of resistance. m c Tr ia Rearrange r = l ×10 to make l the subject of the equation. In a previous activity you have determined that l = 386 when r = 1.5. Verify your expression agrees with this. MEI ©2011 Supported by Light Sensing on 7 page: 11 of 16 8 Student Notes Logarithmic graphs Many engineering problems have number ranges that scale many orders of magnitude, such as the resistance of a LDR, see table below. Measured resistance (kΩ) 0.1 248.87 0.5 92.15 1 60.07 10 14.50 100 3.50 on Light level (lux) 1,000 0.84 10,000 0.20 0.10 si One method of plotting these is to transform the variables using the log function. While this gives a clearer graph, it means that you have to convert from the original variables to the log variables in order to be able to use the graph. To avoid this the data can be plotted on a graph with logarithmic scales. 3.00 2.50 lv 2.00 Light Sensing er In the following graph, the variables have been transformed by taking their log and plotted on a graph with linear scales, i.e. a scale where each division represents a fixed unit. 1.50 1.00 0.50 0.00 0.00 Tr ia -1.50 -1.00 -0.50 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 -0.50 -1.00 -1.50 Figure 7. MEI ©2011 page: 12 of 16 30,000 Supported by Student Notes Logarithmic graphs If, instead of taking the log of the values, you plot the original data on a graph with logarithmic axes you obtain the following. Measured resistance (k Ω) 1000 0.1 10 10 0 1 00 0 10 0 00 1 0 00 0 0 er 1 Figure 8. lv Notice the similarity in the shape of the two graphs. On this graph each major division represents a value that is ten times greater than the previous one. This leads to the odd spacing of the subdivision lines. These log graphs can take practice to plot and to read. For example, in the above a light level of 10,000 lux corresponds to a resistance of 0.2 kΩ. To see this either: • Count down from the horizontal line r = 1 in units of 0.1 (the size of the subdivision in this region of the graph). Tr ia or • Count up from the horizontal line r = 0.1 in units of 0.1 (the size of the subdivision in this region of the graph). MEI ©2011 Supported by page: 13 of 16 Light level (lux) 1 0. 1 si 10 Light Sensing on 100 Student Notes Logarithmic graphs Activity 2 uses a log-log graph. There are also many occasions where a semi-log plot is used. Common examples include The Richter Magnitude scale for earth quakes. This measures the deflection of a seismic trace away from the centre line. Each 10-fold increase in deflection gives an increment in the magnitude of the earth quake. For example, if the seismometer trace gave a 0.1 cm deflection for a magnitude 5.0 quake it would give a 1 cm deflection for a magnitude 6.0 quake and a 10 cm deflection for a magnitude 7.0 quake. Radioactivity. The activity of a radioactive source follows and exponential decay with time. If er the activity relative to the initial activity is plotted using a logarithmic scale a straight line graph is obtained that is easier to read for large values of time. For example, the following graph shows the decay of radioactive material with a half-life of 10 days (i.e. the amount of material present halves every 10 days). While it is reasonably easy to see how much material is present for the first 50 or so days it becomes increasingly more difficult to read the graph for larger values of time; how much material is present after 90 days? lv Radio active material present 1.0 0.9 0.8 Tr ia 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 0 10 20 30 40 50 60 70 80 90 100 time (days) Figure 9. MEI ©2011 Supported by page: 14 of 16 si Solutions that have a lower pH are more acidic, meaning a higher concentration of hydrogen ions. A solution with a pH of 4 is 10 times more acidic than a solution with a pH of 5, i.e. it has a concentration of hydrogen ions that is 10 times larger. Similarly, a solution with a pH of 11 is 10 times less acidic, commonly stated as 10 times more alkaline, than a solution with a pH of 10, i.e. it has a concentration of hydrogen ions that is 10 times smaller. Light Sensing on The pH scale. This measures the acidity and alkalinity of a solution and represents the ratio of hydrogen ions relative to pure water. Pure water has a pH of 7. Student Notes Logarithmic graphs Plotting the values with a logarithmic y-axis allows this to be seen more easily. The graph below shows that the amount remaining after 90 days about 0.002 (units not specified). Radio active material present 0 10 20 30 40 50 60 70 80 90 100 0.1 0.0001 er 0.001 Light Sensing si 0.01 time (days) Tr ia lv Figure 10. MEI ©2011 page: 15 of 16 on 1 Supported by Student Appendix mathematical coverage PL objectives Tr ia lv MEI ©2011 page: 16 of 16 Light Sensing er si on Use algebra to solve engineering problems • Be able to work with numbers in index form • Simplify and evaluate expressions involving the use of indices • Change the subject of a formula • Be able to solve linear equations • Be able to solve simultaneous equations • Know how to check answers by substitution • Be able to plot data • Be able to draw graphs by constructing a table of values • Be able to construct and use conversion graphs • Be able to extract information from a graph • Plot a straight line graph from given data and use it to deduce the gradient, intercept and equation of a line • Solve problems using the laws of logarithms Supported by