| ... | ... | @@ -91,7 +91,7 @@ As a source of inspiration and initial code setup, we use the example [PCcarCont |
|
|
|
|
|
|
|
## Self-balancing robot with color sensor
|
|
|
|
|
|
|
|
In this section we will try to use a color sensor instead of the light sensor, as proposed by the NXT Segway with Rider design [6]. We hope to achieve similar results as show in this video: [NXT Segway with Leaning Pilot](https://www.youtube.com/watch?v=q9ZONn3p1LI).
|
|
|
|
In this section we will try to use a color sensor instead of the light sensor, as proposed by the NXT Segway with Rider design [6]. We will use the color sensor to try to infer the relative tilt of the our robot, and use it as input to a PID control system. We hope to achieve similar results as show in this video: [NXT Segway with Leaning Pilot](https://www.youtube.com/watch?v=q9ZONn3p1LI).
|
|
|
|
|
|
|
|
### Setup & Approach
|
|
|
|
|
| ... | ... | @@ -105,25 +105,31 @@ Below we see three images of our construction. |
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
In the building instructions [7] in section "Important Usage Information", it is specified, that a clear, white surface will be optimal. That's why we chose to use the same white piece of cardboard as shown in image 1 above.
|
|
|
|
In the building instructions [7] in section "Important Usage Information", it is specified, that a clear, white surface will be optimal. That's why we chose to use the same white piece of cardboard as shown in the very first picture of the report. For our initial testing we did not include a balance bar.
|
|
|
|
|
|
|
|
Instead of calibrating the robot on start, we tried to specify the offset manually beforehand. The offset was obtained manually as well, by disabling the motors and trying to balance the robot physically. The offset was very dependant of light polution, shadows, and surface, as also specified in the building instructions [7].
|
|
|
|
|
|
|
|
### Findings
|
|
|
|
|
|
|
|
#### Phillippe Hurbain's Robot with Color Sensor
|
|
|
|
Through the same kind of trial-and-error as in the first section, we tried to optimize the configuration of the robot's PID control system constants. It's worth noting, that the GUI we created in the previous section made it a lot faster to try out different configurations. It was a bit easier to find the balance point because the robot's NXT brick was horizontal instead of vertical. This also meant that the balance point was lower and thus less subject to change, however it was still a great challenge to make it balance. Once the robot starts tilting towards one side it accelerates out of control. We've spent a lot of time trying to optimize our PID constants. However, this was an issue we could not solve entirely. Conclusively, the robot can only keep its balance for a few seconds, which was also the case with the light sensor.
|
|
|
|
|
|
|
|
**The best performance we obtained with the color sensor can be seen in this video: [NXT Segway with Color Sensor]()**
|
|
|
|
|
|
|
|
The PID constants were as follows:
|
|
|
|
|
|
|
|
FINDINGS/ISSUES?
|
|
|
|
PID CONSTANTS?
|
|
|
|
VIDEO
|
|
|
|
CONCLUSION and PROPOSALS
|
|
|
|
**Power = 100**
|
|
|
|
|
|
|
|
#### Our NXT Segway Without Rider
|
|
|
|
**Integral = 40**
|
|
|
|
|
|
|
|
**Differential = 80**
|
|
|
|
|
|
|
|
**Scale = 18**
|
|
|
|
|
|
|
|
FINDINGS/ISSUES?
|
|
|
|
PID CONSTANTS?
|
|
|
|
VIDEO
|
|
|
|
CONCLUSION and PROPOSALS
|
|
|
|
The offset is very circumstantial and is pointless to provide.
|
|
|
|
|
|
|
|
This setup allowed a best-case balancing time of XXASASFAS seconds.
|
|
|
|
|
|
|
|
To sum up, we can conclude that the color sensor was no significant improvement compared to the light sensor, when the color sensor is used as a lightsensor. However, our lighting conditions were nowhere near perfect, which will have introduced a lot of light pollution. We did not try out this setup with a balance bar because of time limitations, but we believe that it would improve the stability, as was the case in section 1.
|
|
|
|
|
|
|
|
## Self-balancing robots with gyro sensor
|
|
|
|
### Setup & Approach
|
| ... | ... | |