Week 3

Overview of Activities

Group Meeting

We had a group meeting on Wednesday, right before the Thursday lab, in which we discussed the remaining lab work for the project, individual responsibilities, as well as the many project-management documents that we needed to have ready on the bench inspection day; i.e., in just 2 weeks! Additionally, it was decided that on this week's lab day, two group members would start working on the poster and the blog, respectively; these two items would also be needed for the bench inspection day.

Thursday Lab

On the lab day, we continued were we left off, by testing the servos again, but with new updated code. Blissfully, the servo responsible for vertical rotation worked fine, with about a 90 degree range of motion, between pointing straight ahead, and pointing straight up. Interestingly, it pointed higher at lower angles. Moreover, when we asked it to move to the same position it was at, it would make a tiny negligible movement, and then settle back at its starting position, as if it wanted to move and then recalculated. It is safe to say that we still didn't entirely understand how these servos worked, but we were nonetheless happy with this level of control for the vertical servo.

The horizontal servo, however, was a different story. We were able to control it better than last time, even getting it to move by small increments like 10 or 30 degrees. However it was very unpredictable; for example, making a greater rotation the second time we gave it the same angle input. Moreover, again, it would sometimes try to rotate all the way to the back of the setup, getting stopped by the cardboard container. After many hours of debugging and searching online, we consulted one of the demonstrators, who recommended us to take the pan-tilt brackets (rotating platform) apart, then physically change the orientation of the servo so that its zero angle would be facing the direction we wanted. And so we did that but were unable to test it during this day.


Friday Lab

By the end of Thursday's lab, we were quite concerned about our progress as we only had one more week left. Therefore, we decided to attend another lab session on Friday, for group members who could. To start the day off, we decided to ignore the servos for sometime, and tried to get the RGB colour sensor working. After some hours, we were took some code from the manufacturer's online manual and added to it to suit our project.

Furthermore, we also finally got the horizontal servo to work, after physically changing its orientation inside the pan-tilt brackets and improving the code for it, as well as the vertical one. By the end of the lab, we were even able to achieve a decent level of tracking an object, using the pi camera and the servos, but without needing the sensor.



Challenges

  • Getting the horizontal servo to work properly was quite an ordeal. However, by taking the demonstrator's advice and just dedicating many hours for it, as it was a crucial part of our project, we were able to overcome this challenge. At an earlier stage, we even realised that we had been using the wrong GPIO pin numbers in the code.
  • Getting the RGB sensor to work properly was also challenging. We spent a few ours in the cycle of producing some code, testing the sensor, changing the code and installing some python modules (like libraries), before testing again. After all of that, firstly, we found out that the sensor's clock and data lines (SCL and SDA) were switched around when connecting them to the pi; this was because we misunderstood the colour coding of these jumper wires. Secondly, we were able to find the company's online manual for this sensor which contained some test code which actually worked.

Reflections

  1. Many of us had never done a project like this before and many of the things we did were completely new to us. Especially with the level of programming required. We gained invaluable experience as we struggled to get the different components working.
  2. When searching the internet, we found too much information which made us get carried away as we went from one website to another. we should have thought of the best sources before randomly searching the internet, as seen with the sensor issue.


Tasks for next Meeting/Lab

  1. Improve the tracking speed and accuracy.
  2. Implement colour detection, using the sensor, so that the object to be tracked is automatically identified.
  3. Improve the exterior of the device and make it look more presentable.

Comments

Popular posts from this blog

Week 4

Introduction and Initial Planning

Week 2