This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| pt:exercises:sensor [2015/12/17 18:21] – Criação deste novo documento. artica | pt:exercises:sensor [2020/07/20 12:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Exercícios ====== | ||
| + | |||
| + | O objectivo é escrever um programa que executa a seguinte tarefa: | ||
| + | ===== Exercício de aquecimento ===== | ||
| + | |||
| + | * O valor da resistência do potenciómetro é exibido no LCD em ohms quando a resistência do potenciómetro está abaixo de 1000 Ω e kilo-ohms quando acima de 1000 ohms. O valor nominal da resistência é de 10 kΩ. Os resultados são mostrados nas unidades corretas, ohm como (Ohm). | ||
| + | |||
| + | ===== Para principiantes === | ||
| + | |||
| + | - Medir a distância a um objecto. A distância a um objecto é medida com um sensor de infravermelhos, | ||
| + | - The distance to an object is measured using an UH sensor. The result is displayed | ||
| + | - The value of the NTC temperature sensor is displayed on the LCD in degrees. By pressing the S2 button the units may be selected: Kelvin (K), Fahrenheit (F) and Celsius (C). The temperature is displayed in correct units and symbols. | ||
| + | - By using a LDR sensor, rapid changes of light intensity are registered (switching lamps on-off). If the change is rapid, red LED is blinked for 5 seconds. If the light changes smoothly the direction of the change is shown. Green LED means that the light intensity grows and yellow shows that it diminishes.(Suggestion: | ||
| + | - By using a PIR sensor and combined temperature-humidity sensor, create a simple program that shows a room ambient parameters: humidity, temperature and light intensity on the LCD screen when a person entering the room. If a person is leaving, the LCD display is cleaned and the program will enter standby mode. | ||
| + | |||
| + | ===== For advanced ===== | ||
| + | |||
| + | - Data recorder. The values of all analogue sensors (potentiometer, | ||
| + | - UH Distance sensor. If the button number S2 is pressed, 10 sequential measurements are taken place in one second. After measuring the average distance to the object in decimetres it is displayed on 7-segment indicator. By pressing button S1, minimum measured value is displayed and by pressing button S3 maximum value is displayed. | ||
| + | - Velocity. According to the changing rate of the distance to the object (as measured by infrared or ultrasonic sensor), it is shown with LEDs as follows: slow change – green LED, moderate change – yellow LED and rapid change red LED. The speed may be displayed on the LCD. | ||
| + | - By combining IR and ultrasonic distance sensors the distance to the object, velocity of the object and direction of the object are determined. Results are displayed on LCD. | ||
| + | - Using the acceleration sensor detect the movement of an object and the direction of movement, which is displayed on a stripe with direction of the center of the LCD. The stripe length corresponds to the absolute value of the acceleration. | ||
| + | |||
| + | < | ||
| + | |||
| + | ===== Questions ===== | ||
| + | |||
| + | - How accurate is the digital-analogue converter (ADC) of ATxmega128A1U microcontroller? | ||
| + | - How long takes one ADC process? How is the operating frequency changed? | ||
| + | - Which is the the range of input voltage of the ADC? Is it possible to be changed? How? | ||
| + | - What is the difference between positive temperature coefficient (PTC) thermistor and negative temperature coefficient(NTC)? | ||
| + | - What is the purpose of a voltage divider in a measuring circuit? | ||
| + | - Combine a voltage divider, which allows to use an analogue sensor with ATxmega128A1U microcontroller. The maximum output voltage of the sensor is 10 V. | ||
| + | - Extra resistors were added to the potentiometer pins and voltage of 5 V were applied on them. How big must be the resistances of extra resistors and the potentiometer so the regulated voltage on the slider of the potentiometer can be regulated between 1 V and 2 V (from one end to the other end)? The current should not exceed 10 mA. | ||
| + | - Which parameters of the surroundings have an effect on the functioning of ultrasonic distance sensor and why? | ||
| + | - Which light sensitive sensors could be used in a robotics project. Count at least three principal components and explain their differences. | ||
| + | - Besides trigonometrical method, how is distance determined by using light? Name at least 3 methods. | ||