21.08.2013 Views

Embedded Systems Design with the Atmel AVR Microcontroller Part II

Embedded Systems Design with the Atmel AVR Microcontroller Part II

Embedded Systems Design with the Atmel AVR Microcontroller Part II

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

196 CHAPTER 7. ATMEL <strong>AVR</strong> OPERATING PARAMETERS AND INTERFACING<br />

An example of an analog sensor is <strong>the</strong> flex sensor shown in Figure 7.7(a). The flex sensor<br />

provides a change in resistance for a change in sensor flexure. At 0 degrees flex, <strong>the</strong> sensor provides<br />

10K ohms of resistance. For 90 degrees flex, <strong>the</strong> sensor provides 30-40K ohms of resistance. Since<br />

<strong>the</strong> microcontroller can not measure resistance directly, <strong>the</strong> change in flex sensor resistance must be<br />

converted to a change in a DC voltage.This is accomplished using <strong>the</strong> voltage divider network shown<br />

in Figure 7.7(c). For increased flex, <strong>the</strong> DC voltage will increase. The voltage can be measured using<br />

<strong>the</strong> ATmega164’s analog to digital converter subsystem. The flex sensor may be used in applications<br />

such as virtual reality data gloves, robotic sensors, biometric sensors, and in science and engineering<br />

experiments (Images).<br />

Figure 7.7: Flex sensor.<br />

b) flex action<br />

4.5 in (11.43 cm)<br />

a) flex sensor physical dimensions<br />

V DD = 5 VDC<br />

10K fixed<br />

resistor<br />

0.25 in (0.635 cm)<br />

flex sensor:<br />

-- 0 degree flex, 10K<br />

-- 90 degree flex, 30-40K<br />

c) equivalent circuit<br />

7.3.6 LM34 TEMPERATURE SENSOR EXAMPLE<br />

Temperature may be sensed using an LM34 (Fahrenheit) or LM35 (Centigrade) temperature transducer.<br />

The LM34 provides an output voltage that is linearly related to temperature. For example,<br />

<strong>the</strong> LM34D operates from 32 degrees F to 212 degrees F providing +10mV/degree Fahrenheit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!