Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:exercises:adc [2009/07/18 18:28] rellermaaen: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; it is sufficient to use the 20–150 cm range. Use a function which takes into account two different SHARP IR sensors: 2Y0A02 või 2Y0A21 ( 20-150 cm või 10-80 cm). 
-  - ... detect which side of the peak you are on. This could be rather tricky to do, and the algorithm may not work perfectly. 
-  - ... measures the distance to an object when button S1 is pressed. During the measuring LED2 (yellow) blinks for a moment. If the object is further than 50 cm, green LED1 lights up. If it's closer than 50 cm, red LED3 lights up. 
-  - ... measures the object's distance from the IR sensor in binary form using 3 light emitting diodes. When the distance grows, the displayed value must do so as well. Scale should be approximately 1 bit = 1 dm. Bit steps should be chosen so that the variation of binary codes would be easily detectable. 
-  - ... measures the distance in centimeters and displays the value on an LCD. If the value is outside the measuring range (see the sensor's voltage-distance diagram), appropriate text must be displayed. 
-  - ... on pressing button S2 conducts 10 measuring cycles in the period of one second. After the measuring it will display the average of those 10 values in decimeters on a 7-segment numeric indicator. Pressing S1 will display the minimal value and pressing S3 will display the maximum value. Pressing S2 will repeat the measuring process. 
-  - ... according to the size of the distance change, will light either a green, yellow or red LED. The larger the change, the more the LED will light up and the more red it will be. 
- 
-===== 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. 
-  - ... Write a thermometer with an automatic range. The program must find the minimum and maximum temperature by itself and according to that scale the reading from 0 to 9. The reading should be displayed on a 7-segment indicator. 
- 
-===== 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Ω. 
  
en/exercises/adc.1247941702.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0