|
|
dsadsadas![LightPercentageMeasurements](http://gitlab.au.dk/uploads/rene2014/lego/52f8df3f53/LightPercentageMeasurements.jpg) |
|
|
# Group 7
|
|
|
|
|
|
## Lab Notebook - Lesson 1
|
|
|
|
|
|
**Date:** 12/02 2015
|
|
|
|
|
|
**Group members participating:** Ivan Grujic, Lasse Brøsted Pedersen, Steffan Lildholdt, René Nilsson
|
|
|
|
|
|
**Activity duration:** 3 hours
|
|
|
|
|
|
## Goal
|
|
|
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)
|
|
|
|
|
|
## Results
|
|
|
|
|
|
### Exercise 1
|
|
|
|
|
|
In order to generate the color percentages we used the color scale from the assembly manual of the 9797 Lego car (page 69). The robot was placed on one color at a time and the percentage was read from the display. In this setup the red LED on the light sensor was turned on. The output of this process is summarized in the following table.
|
|
|
|
|
|
Color | Percentage
|
|
|
----------- | -----
|
|
|
Yellow | 57
|
|
|
Orange | 56
|
|
|
Red | 55
|
|
|
Light green | 52
|
|
|
Medium Green | 46
|
|
|
Dark green | 42
|
|
|
Light blue | 49
|
|
|
Medium blue | 46
|
|
|
Dark blue | 41
|
|
|
Black | 39
|
|
|
White | 58
|
|
|
|
|
|
From this table it is clear that the lighter the color is the higher is the output percentage. To determine a proper threshold between black and white the middle between black and white is used which is **49**.
|
|
|
|
|
|
|
|
|
### 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 sumarized in the following table.
|
|
|
|
|
|
Color | Percentage
|
|
|
----------- | -----
|
|
|
Yellow | 27
|
|
|
Orange | 26
|
|
|
Red | 25
|
|
|
Light green | 24
|
|
|
Medium green | 23
|
|
|
Dark green | 22
|
|
|
Light blue | 26
|
|
|
Medium blue | 25
|
|
|
Dark blue | 18
|
|
|
Black | 15
|
|
|
White | 21
|
|
|
|
|
|
It is seen that the different color percentages are closer to each other with the red LED is turned off. It is desirable to have the color percentages seperated as much as possible to enhance the operation of the LEGO car which is why in further usage of this light sensor the LED should be turned on.
|
|
|
|
|
|
### Exercise 3
|
|
|
|
|
|
As the sample interval increases the reaction time of the controller in the LEGO car decreases. This is further explained in exercise 4.
|
|
|
|
|
|
|
|
|
### Exercise 4
|
|
|
|
|
|
In the following image the light percentage from the light sensor is plotted at sample rates of 10ms, 100ms and 500ms.
|
|
|
|
|
|
![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.
|
|
|
|
|
|
### 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
|
|
|
|
|
|
### Exercise 6
|
|
|
|
|
|
![alt text](https://gitlab.au.dk/uploads/rene2014/lego/f828f01da7/FreeMemoryMeasurements.png "Exercise 6 - Measurements")
|
|
|
|
|
|
## Conclusion
|
|
|
|
|
|
## Referencesg |
|
|
\ No newline at end of file |