MSP430_Microcontroller_Basics_Chapter 9.11

MSP430_Microcontroll - Mixed-Signal Systems Analog Input and Output 475 Example 9.12 Modify Listing 9.12 so that the intensity of the LED responds

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Mixed-Signal Systems: Analog Input and Output 475 Example 9.12 Modify Listing 9.12 so that the intensity of the LED responds to the ambient light in the opposite way: The LED gets brighter as the surroundings become darker. It is a lot easier to test this in action. You might wish to allow the LED to turn off completely in this case but need to modify the PWM to allow for a duty cycle of 0. Do not lose the interrupts that stimulate the SD16_A. 9.11 Signal Conditioning and Operational Amplifiers All the examples that I have described in this chapter use signals connected directly to the input of the ADC. Only an antialiasing filter is needed (which I do not always show). The PGA in the SD16, coupled with the high resolution of sigmadelta converters, is often sufficient to convert small voltages directly. Of course it is not always so simple and an external amplifier or something more complicated may be needed. I look at two examples to examine whether direct connection to a MSP430 is sufficient or whether further conditioning of the signal may be needed. 9.11.1 Thermistor for the Range 530C Suppose that we wish to use a thermistor to measure temperature. I first consider the range 530 C with a resolution of 0.1 C. Thermistors were introduced in the section Operation of Comparator_A + on page 374 and equation (9.1) gives their resistance as a function of temperature. I assume that we have a 10k thermistor, which means the value of its resistance at 25 C, with B = 3600K. The resistance as a function of temperature is plotted in Figure 9.29. It falls from 24k at 5 C to 8k at 30 C and the plot shows that the variation is not linear even over this narrow range. The simplest way of getting a voltage from the thermistor is to put it in a potential divider, as in Figure 9.30(a). I chose the obvious value of 10k for the reference resistor in series with the thermistor (we come back to this) and the resulting voltage V in from the divider is also plotted in Figure 9.29. A pleasant feature of this circuit is that the change in voltage is much more linear than the change in resistance. It falls from 0 . 705 V CC to 0 . 450 V CC over the range. We want to measure a range of 25 C with a resolution of 0.1 C, which requires 250 intervals or 251 points, including both ends. This can be done in several ways. I assume www.newnespress.com 476 Chapter 9 50 100 150 200 250 300 40 20 2 40 2 20 60 80 0.4 0.2 0.6 0.8 1 temperature / 8 C resistance of thermistor/k resistance voltage voltage from potential divider/ V CC Figure 9.29: Plot of the resistance of a 10k thermistor (at 25C) as a function of temperature and the output voltage of a potential divider with a 10k resistor....
View Full Document

This document was uploaded on 02/06/2012.

Page1 / 11

MSP430_Microcontroll - Mixed-Signal Systems Analog Input and Output 475 Example 9.12 Modify Listing 9.12 so that the intensity of the LED responds

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online