18.11.2014 Views

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Sensors to Detect and Measure<br />

Figure 9-7. <strong>The</strong> LM385 series of voltage references includes 1.2V, 2.5V,<br />

and an adjustable version.<br />

Listing 9-3 assumes that an LM34 connects to CH2 on the ADC0848, and that VREF is 2.5V.<br />

On request, it displays the current temperature.<br />

For a smaller range, create a 1.2V reference with an LM385-1.2 and change line 70 in the<br />

program to match. Another option is the LM385 adjustable reference, which contains a<br />

reference diode and feedback amplifier. With the addition of a voltage source and resistors<br />

in a voltage divider, you can set the LM385’s output to the reference voltage you need. Use<br />

the formula shown to vary the resistors for different outputs.<br />

Solar Energy<br />

Figure 9-8 shows another sensor application, a solar cell that generates a current proportional<br />

to the intensity of the light hitting the cell. <strong>The</strong> output of the solar cell in the example varies<br />

<strong>The</strong> <strong>Microcontroller</strong> <strong>Idea</strong> <strong>Book</strong> 165

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

Saved successfully!

Ooh no, something went wrong!