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.

Chapter 9<br />

Figure 9-8. VOUT varies with the light intensity, and output current, of the solar<br />

cell.<br />

from 0 in darkness to 300 milliamperes in full sun. <strong>The</strong> voltage across the cell is about 0.5<br />

volt.<br />

An LF353 dual op amp converts the solar cell’s current into a voltage that the ADC0848 can<br />

measure. Most of the solar cell’s current flows through the 1-ohm resistor to ground. Since<br />

the solar cell’s voltage is only about 0.5 volt, the power dissipated by the 1-ohm resistor is<br />

only about 0.15 watt in full sun.<br />

About one percent of the solar cell’s output flows through the 100-ohm resistor. This same<br />

current flows through the 1.6K resistor, with the result that the voltage at pin 1 of the LF353<br />

varies from 0 to about -4.75V. This voltage is proportional to the intensity of the light hitting<br />

the solar cell. <strong>The</strong> second op amp is an inverter that converts the voltage to positive levels<br />

that the ADC0848 can measure.<br />

Listing 9-4 assumes that pin 7 of the LF353 connects to Channel 8 of the ADC0848. On<br />

request, the program converts the analog input and displays the result.<br />

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

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

Saved successfully!

Ooh no, something went wrong!