|
|
# Group 7
|
|
|
|
|
|
## Lab Notebook - Lesson 1
|
|
|
|
|
|
**Date:** 12/02 2015
|
|
|
|
|
|
**Group members participating:** Ivan Grujic, Lasse Brøsted Pedersen, Steffan Lildholdt, René Nilsson
|
... | ... | @@ -7,7 +9,7 @@ |
|
|
**Activity duration:** 3 hours
|
|
|
|
|
|
## Goal
|
|
|
The goal of this exercise is to experiment with the light and make the robot follow a line using simple control algorithms.
|
|
|
The goal of this exercise is to expirement with the light and make the robot follow a line using simple control algorithms.
|
|
|
|
|
|
## Plan
|
|
|
To follow the instructions given in Lesson 1 (http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson1.dir/Lesson.html)
|
... | ... | @@ -37,7 +39,7 @@ From this table it is clear that the lighter the color is the higher is the outp |
|
|
|
|
|
### Exercise 2
|
|
|
|
|
|
In this exercise the same procedure as in exercise 1 is carried out however the red LED in the light sensor is turned off. The output of this process is summarized in the following table.
|
|
|
In this exercise the same procedure as in exercise 1 is carried out however the red LED in the light sensor is turned off. The output of this process is sumarized in the following table.
|
|
|
|
|
|
Color | Percentage
|
|
|
----------- | -----
|
... | ... | @@ -66,41 +68,47 @@ In the following image the light percentage from the light sensor is plotted at |
|
|
|
|
|
![alt text](https://gitlab.au.dk/uploads/rene2014/lego/52f8df3f53/LightPercentageMeasurements.jpg "Exercise 3 - Measurements")
|
|
|
|
|
|
At a sample rate of 10ms there seem to be an almost constant oscillation between ~55% and ~35%, white and black respectively.
|
|
|
At a sample rate of 10ms there seem to be an almost constant oscillation between ~55% and ~35%, white and black respectively. This indicates that the LEGO car constantly are moving back and forth between the black line and its white surroundings. As the sample rate increases the efficiency of the control algorithm will decrease making the LEGO car spend more time on a white surface before correcting its movement.
|
|
|
|
|
|
### Exercise 5
|
|
|
|
|
|
// Med lys
|
|
|
|
|
|
Color | Value
|
|
|
----------- | -----
|
|
|
Gul | 426
|
|
|
Orange | 436
|
|
|
Rød | 443
|
|
|
Lys grøn | 478
|
|
|
Grøn | 541
|
|
|
Mørk grøn | 569
|
|
|
Lys blå | 509
|
|
|
Blå | 544
|
|
|
Mørk blå | 599
|
|
|
Sort | 622
|
|
|
Hvid | 430
|
|
|
|
|
|
// Uden lys
|
|
|
|
|
|
Color | Value
|
|
|
----------- | -----
|
|
|
Yellow | 730
|
|
|
Orange | 737
|
|
|
Red | 742
|
|
|
Light green | 726
|
|
|
Medium Green | 740
|
|
|
Dark green | 750
|
|
|
Light blue | 725
|
|
|
Medium blue | 770
|
|
|
Dark blue | 793
|
|
|
Black | 842
|
|
|
White | 762
|
|
|
The raw digital value from the A/D converter is read from the LCD and then converted to a percentage using the specified equation in order to do a comparison (delta) between the percentages from exercise 2 and these manually calculated percentages. This in done both with or without the red LED in the light sensor.
|
|
|
|
|
|
The result with the red LED turned on is shown in the following table.
|
|
|
|
|
|
Color | Raw value | Calculated percentage | Delta percentage
|
|
|
------- | ----- | --------- |
|
|
|
Yellow | 426 | 58.36 | 1.36
|
|
|
Orange | 436 | 57.38 | 1.38
|
|
|
Red | 443 | 56.7 | 1.7
|
|
|
Light green | 478 | 53.28 | 1.28
|
|
|
Medium green | 541 | 47.16 | 1.16
|
|
|
Dark grøn | 569 | 44.38 | 2.38
|
|
|
Light blue | 509 | 50.24 | 1.24
|
|
|
Medium blue | 544 | 46.82 | 0.82
|
|
|
Dark blue | 599 | 41.45 | 0.45
|
|
|
Black | 622 | 39.2 | 0.2
|
|
|
White | 430 | 57.97 | -0.03
|
|
|
|
|
|
The result with the red LED turned off is shown in the following table.
|
|
|
|
|
|
Color | Raw value | Calculated percentage | Delta percentage
|
|
|
------- | ----- | --------- |
|
|
|
Yellow | 730 | 28.64 | 1.64
|
|
|
Orange | 737 | 27.96 | 1.96
|
|
|
Red | 742 | 27.47 | 2.47
|
|
|
Light green | 726 | 29.03 | 5.03
|
|
|
Medium green | 740 | 27.66 | 4.66
|
|
|
Dark grøn | 750 | 26.69 | 4.69
|
|
|
Light blue | 725 | 29.13 | 3.13
|
|
|
Medium blue | 770 | 24.73 | -0.27
|
|
|
Dark blue | 793 | 22.48 | 4.48
|
|
|
Black | 842 | 17.69 | 2.69
|
|
|
White | 762 | 25.51 | 4.51
|
|
|
|
|
|
It is seen from these tables that the delta percentages more inconsistent when the red LED in turned off.
|
|
|
|
|
|
In general one will gain a higher precision when using the raw values due to a larger span which can be beneficial in some applications.
|
|
|
|
|
|
### Exercise 6
|
|
|
|
... | ... | |