Friday, 26 February 2016

Week 6: Testing and Evaluating The Prototype

Given that the code prototype was finished last week and the hardware prototype was finished the week before that (until the rangefinder broke and got replaced) the last week was dedicated to testing and evaluating of the prototype and deciding what we would do differently if we were to do this project again.

First of all we did a scan of Fabio in the library. Apologies for the bad audio quality, the laptop we recorded this on was throwing a fit.


From this we were able to conclude a few things about the current prototype. It does not produce a high fidelity scan and is prone to artifacting depending on the properties of the surface being scanned. However the prototype did manage to produce a scan that showed a rough outline of what was scanned. This leads us to believe that with a sensor that has a greater range the project could actually be usable to produce accurate scans.

In order to validate our results we carried out multiple scans at varying distances from the target being scanned and got some interesting results. The scans taken from further away produced more accurate shape silhouettes with less distortion but far less depth resolution which also made them very vulnerable to any artifacting that occurred. This further validated our theory that a sensor with a greater range would produce better results as it would be able to maintain depth resolution while not being susceptible to fish-eye distortion.

We also tested scans very close up to the target object. This produced highly distorted scan images to the point where objects were unrecognisable due to how extreme the fisheye distortion effect was.



Wednesday, 17 February 2016

Week 5 - Making Prototype Code, Sharp Rangefinder Not So Sharp Any More

Sharp GP2Y0A21YK0F
Sharp GP2Y0A21YK0F installed into the case lid
During development of the prototype code we hit several roadblocks. The first of which being that the Sharp 2Y0A02 rangefinder module died during testing of one of the revisions of the software prototype. This was particularly difficult to diagnose because it did not go suddenly, but rather it gradually deteriorated over the course of a few hours to the point that the readings were no longer readable. Fortunately Fabio was able to source a new rangefinder from Amazon, the Sharp GP2Y0A21YK0F, and order it with expedited delivery so that it was delivered within the week. We had originally ordered a second Sharp 2Y0A02 rangefinder but the supplier informed us that they were out of stock and on short notice the Sharp GP2Y0A21YK0F was the only one we could get a hold of. The Sharp GP2Y0A21YK0F had a more limited range, making it less ideal for the project than the Sharp 2Y0A02, but still worked to give some reading at least and allowed Liam to continue developing the code. The new rangefinder also needed to be modified as the old one had been to mount more easily to the front of the case. Fabio performed the modification differently this time however as it was suspected that the modification may have been the cause of failure for the dead rangefinder. This time he simply swapped the cable plug from the front side of the sensor to the backside, rather than removing it altogether and replacing it with wires as had been done with the previous one, which had actually caused some of the PCB to peel from the strain.

The second roadblock we encountered was when the accelerometer and gyroscope module suddenly stopped working during development. After a couple of hours of debugging and testing however this issue was tracked down by Fabio to be caused by a poor solder join on the VCC pin. After Fabio re-soldered the join Liam was able to continue development.

Liam also encountered some code-related issues whilst developing the code. The accelerometer and gyro module would read as being rotated to a roughly 90 degree angle when the device was held as intended. This was due to the fact that the way the module was mounted inside of the case was not being compensated for. This was solved by using the first reading from the module as an offset for all subsequent readings.


By the end of the week the code prototype was finished:
https://drive.google.com/file/d/0B5ZXvoDnC39FR1VnenNDbF95b2s/view?usp=sharing

Tuesday, 9 February 2016

Week 4 - Sick 3D Printing or Sick, 3D Printing... Also soldering

This week Fabio got sick, so Liam had to finish the 3D model to get it printed on time. In the end it took around 6 hours to print, but the result was a durable, lightweight case that fit almost all dimensions of the components perfectly. However there was one error in that the hole for the USB port on the 3D model was positioned incorrectly due to an error made when reading measurements off a diagram of the Arduino Uno. This was corrected by cutting a chunk out of the case on one side of the hole and hot glueing it to the other to move the hole along.

Finished case 3D model

The 3D print in progress
While the case was printing Liam also soldered the cables for the rangefinder and laser modules, as well as the shield board and gyro and accelerometer module.



Afterwards the parts were assembled together to produce the complete prototype.

Shield board underside
Shield board topside
Soldered rangefinder and laser with cables
Case lid back
Rangefinder stoppers
Case lid front
Case body inside
Case body ports
Case lid finished front
Case lid finished back
Case complete finished inside