cvf06035 created page: home authored by Ida Larsen-Ledet's avatar Ida Larsen-Ledet
......@@ -232,10 +232,10 @@ To test the drift, we began by starting ***GyroTest.java*** and letting it run f
Afterwards, we modified ***GyroTest*** to let both motors run while the program was running, in order to see the effect of the resulting voltage drop. We also added a data logger to the program to gather information for later observations. We used this to calculate the average reading and the average drift, presented in table 2 below. Two cases were investigated: In the first case, the robot was un-modified. In the second case, the robot's wheels were taken off. We took off the wheels in the hopes that this would lessen the vibrations of the robot resulting in a more stable position.
| | Average reading | Highest offset | Lowest offset |
| ----------- | --------------- | ------------- | ------------- |
| Wheels on | 596.698744 | 612 | 577 |
| No wheels | 596.5979995 | 612 | 577 |
| | Average reading | Highest offset | Lowest offset | Upper deviation | Lower deviation |
| ----------- | --------------- | ------------- | ------------- | --------------- | -------------- |
| Wheels on | 596.698744 | 612 | 577 | 15.3 | 19.7 |
| No wheels | 596.5979995 | 612 | 577 | 15.4 | 19.6 |
*Table 2: Data on readings from the gyro sensor*
......@@ -249,8 +249,6 @@ In both cases the readings fluctuate around the average offset and there does no
*Figure 7: Plot of readings from the gyro sensor, with wheels (purple) and without wheels (turquoise) - "dev." is short for deviation*
TODO: Ida, skriv om lowest og highest + indsæt plot
Based on code presented in [the lesson plan](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson5.dir/Lesson.html), we tried implementing integration to calculate the angle of the gyro based on the sample interval and the motion readings of the gyro. The result was, however, extremely inaccurate, and would for some reason slowly slide in one direction, even when the gyro was motionless. We assumed this to be a result of the constant small speed readings made by the gyro even when still, but these should work in both directions as the offset remains the same despite fluctuations to either side, so the drifting angle is a mystery to us.
We would have attempted to amend the inaccurate angle calculation and then use this as a means of creating a balancing robot using the gyro sensor, but at this point we had simply spent too much time on the exercises and were forced to cut our gyro implementation short and leave it at this. Had we had the time to continue, our ideas regarding the implementation of a balancing robot included combining the different sensors to have a form of "second opinion" to take into account when responding to the gyro sensor's readings.
......
......