This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:exercises:adc [2009/03/26 16:37] – raivo.sell | en:exercises:adc [2010/02/04 12:37] (current) – removed mikk.leini | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Analogous ====== | ||
| - | |||
| - | ====== Analoog digitaal converter ====== | ||
| - | |||
| - | |||
| - | ===== Infrared sensor ===== | ||
| - | |||
| - | Write a program that ... | ||
| - | |||
| - | - ... converts the output of the sensor to centimetres; | ||
| - | - ... detect which side of the peak you are on. This could be rather tricky to do, and the algorithm may not work perfectly. | ||
| - | |||
| - | (translation needed) | ||
| - | - ... mõõdab objekti kaugust, kui vajutatakse nupule S1. Mõõtmise ajal vilgutab korraks LED2 (kollane). Kui objekt on kaugemal kui 50 cm süttib roheline LED1 ja kui objekt on lähemal kui 50 cm süttib punane LED3. | ||
| - | - …mõõdab objekti kaugust IR andurist kolme valgusdioodi abil kahendkujul. Kauguse | ||
| - | - ... mõõdab kaugust sentimeetrites ja kuvab tulemuse LCD-l. Kui tulemus on mõõtepiirkonnast väljas (vt. anduri pinge-kauguse diagrammi), kuvada vastav tekst. | ||
| - | - ... vajutades nupule S2 teostab 10 mõõtmist ühe sekundi jooksul. Peale mõõtmist | ||
| - | - ... vastavalt kauguse muutuse suurusele süütab kas rohelise, kollase või punase LED-i. Mida järsem muutus seda rohkem ja seda punasem LED põlema läheb. | ||
| - | |||
| - | ===== Temperature sensor (NTC) ===== | ||
| - | |||
| - | Write a program that | ||
| - | |||
| - | - ... reads the output of the converter to which the NTC signal is connected. Let the program show the value on the display. | ||
| - | - Convert the output to temperature. In the datasheet you will find two different equations; try using equation 2 to estimate the temperature. If you want to calibrate the values, use ice water to get 0°C and boiling water for 100°C. | ||
| - | |||
| - | (translation needed) | ||
| - | - Kirjutage automaatse mõõtepiirkonnaga termomeeter. Programm peab ise leidma minimaalse ja maksimaalse mõõdetava temperatuuri ning näitu vastavalt sellele piirkonnale skaleerima numbrist 0 numbrini 9. Näit kuvada 7-segmendilisel indikaatoril. | ||
| - | |||
| - | ===== Light sensor ===== | ||
| - | |||
| - | Write a program that ... | ||
| - | - ... shows the value of the sensor on the LCD. | ||
| - | - ... shows the strength of the light in lux on the LCD. Look for the sensor datasheet to get the right resistance values. You can assume that the resistance of the fixed resistor is exactly 10kΩ. | ||