{"id":4337,"date":"2020-10-14T21:45:33","date_gmt":"2020-10-14T20:45:33","guid":{"rendered":"http:\/\/dronesonen.usn.no\/?p=4337"},"modified":"2020-10-14T21:45:33","modified_gmt":"2020-10-14T20:45:33","slug":"sixth-sprint-puck-buddies","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=4337","title":{"rendered":"Sixth sprint &#8211; Puck Buddies"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Gaute<\/h2>\n\n\n\n<p>We finally got the technical drawings, with&nbsp;physical dimensions,&nbsp;for the stepper-motor&nbsp;this week.&nbsp;So,&nbsp;I made a model of the&nbsp;stepper and put it in the assembly.&nbsp;Did also make the gear&nbsp;to connect the stepper to the glider ring.&nbsp;&nbsp; <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"205\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-27.png\" alt=\"\" class=\"wp-image-4338\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-27.png 622w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-27-300x99.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/figure><\/div>\n\n\n\n<p>I also&nbsp;worked&nbsp;some&nbsp;more on&nbsp;assembly-blocks&nbsp;for the frame. The plan is to 3D-print the blocks so the&nbsp;physical assembly will become easier&nbsp;because we won\u2019t need to weld anything. And it also gives us the opportunity to&nbsp;have the frame in aluminum and not steel. That could possibly save us a lot of weight,&nbsp;without the expense of the&nbsp;strength.&nbsp;&nbsp; <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"237\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-28.png\" alt=\"\" class=\"wp-image-4339\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-28.png 611w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-28-300x116.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Halvard<\/h2>\n\n\n\n<p>This week&nbsp;I have continued to do material tests and gathering the information gained from those tests. I have not been able to finish all the tests due to working on other subjects this week.&nbsp;&nbsp;<\/p>\n\n\n\n<p>But I will put up some of the data gathered this week, but in the next weeks I will make a bigger document presenting the information gained from this study.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"81\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-29-1024x81.png\" alt=\"\" class=\"wp-image-4340\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-29.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-29-300x24.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-29-768x61.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> <em>Our values from the untreated materials&nbsp;<\/em> <\/figcaption><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"79\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-30-1024x79.png\" alt=\"\" class=\"wp-image-4341\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-30.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-30-300x23.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-30-768x59.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> <em>The same materials just treated in the oven, both to make sure that the layers are fusing together and for some materials like PLA the material will actually go from amorph to crystalline&nbsp;<\/em> <\/figcaption><\/figure>\n\n\n\n<p>This is one of the treatments we are considering&nbsp;using&nbsp;in our system. The heat treatment the material will go trough will&nbsp;be to make sure that we&nbsp;are fusing the layers together, but for some materials it will be an annealing process. In the case of PLA which is a&nbsp;semi-crystalline polyester thermoplastic&nbsp;it will shift from a mostly amorph to a crystalline product, this will give us more strength and durability. However, there are some disadvantages in this method. The PLA will slightly change form during this process, this is why I have printed&nbsp;10mmX10mmX10mm&nbsp;cubes so we can map out the deformation in X, Y and Z- direction, but that will come next week.&nbsp;&nbsp; <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nicholas<\/h2>\n\n\n\n<p>I have spent this week working on setting up the Raspberry Pi. Starting off, I needed to install OpenCV and TensorFlow Lite. Our goal is to create our own model in TensorFlow then convert it to TensorFlow Lite so a good starting point would be to get the default example running on the Raspberry. <\/p>\n\n\n\n<p>BOM:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Raspberry\nPi 3 B (1GB RAM)<\/li><li>16GB\nmicroSD card<\/li><\/ul>\n\n\n\n<p>First off, this is an older Raspberry and performance is therefore not great to put it lightly. However, the setup process is the same regardless of Raspberry Pi version. There are many guides available on this topic, but ended up using these videos (<a href=\"https:\/\/www.youtube.com\/watch?v=aimSGOAUI8Y&amp;t=302s\">https:\/\/www.youtube.com\/watch?v=aimSGOAUI8Y&amp;t=302s<\/a> and <a href=\"https:\/\/www.youtube.com\/watch?v=ylnjXbcNLJU\">https:\/\/www.youtube.com\/watch?v=ylnjXbcNLJU<\/a>). First off I downloaded the latest image of Raspberry Pi OS. Using Etcher I then flashed the image to the SD card. After installing the SD card into the Pi and going through the standard start up procedure I turned on SSH so I could remote into it. So far so good. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"522\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-31.png\" alt=\"\" class=\"wp-image-4343\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-31.png 604w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-31-300x259.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><figcaption> Compiling on the Raspberry Pi <\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"297\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-32.png\" alt=\"\" class=\"wp-image-4344\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-32.png 604w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-32-300x148.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><figcaption> Opening several connections at once to see live usage of CPU and RAM while compiling <\/figcaption><\/figure><\/div>\n\n\n\n<p>Now comes the fun part\nand that is troubleshooting. Even though troubleshooting can be really\nfrustrating sometimes it\u2019s one of the most valuable lessons one can have and it\noften helps giving a better understanding of the system. As I think\ntroubleshooting is so important I want to spend some time explaining what my\nproblems were and how I went about solving them. <\/p>\n\n\n\n<p>First of was the issue of a \u201cLow Voltage\u201d alarm constantly flashing. As the PSU I used is more than capable of supplying the needed current I couldn\u2019t quite figure out what the issue was. It should be noted that the Raspberry Pi have been laying around for several years now and ESD damages are not out of the question. Unplugging all peripherals, including the screen, seemed to do the trick. <\/p>\n\n\n\n<p>The next issue I faced was when trying to compile the code. When starting I used all four cores to compile the code. This worked fine until I reached files around the 78% mark. I guess these files were substantially larger than the ones previously compiled. After looking more into the issue I found out that the problem was that the Pi didn\u2019t have enough RAM and as such need to page files on the SD card. Since the SD card is super slow this took a while and it simply couldn\u2019t keep all four cores fed during the compiling. Running the make command again, but this time with \u201cmake -j1\u201d, and only using one core worked as all the data could be loaded into the RAM fast enough for the CPU. In total the compiling took over 3 hours to complete. <\/p>\n\n\n\n<p>With all this downloaded I got the script to run on the Raspberry and could get some testing done. The first thing I noticed was the abysmal performance which likely could be attributed to the model only running on one core instead of all four. The RAM usage wasn\u2019t very high so it should be able to use more than one core. This is as far as I got this week so I will need to spend some time next week and see how to improve the performance on the Raspberry.<\/p>\n\n\n\n<p>To end this blogpost is a short video showing the current Raspberry Pi&#8217;s cooling solution to help out the struggling power regulator during load.<\/p>\n\n\n\n<figure class=\"wp-block-video aligncenter\"><video autoplay controls loop muted src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/HLGS4651.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Anders<\/h2>\n\n\n\n<p>This week\u00a0I have tried to implement MVVM\u00a0pattern\u00a0in the Windows Forms\u00a0application controlling the puck passing machine. This has proven harder than anticipated because of general\u00a0problems getting the serial communication between the Arduino code and the Windows Forms application to run smoothly, as well as some issues wrapping my head around the MVVM pattern in general.\u00a0 <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"438\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-33.png\" alt=\"\" class=\"wp-image-4352\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-33.png 328w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/10\/image-33-225x300.png 225w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/figure><\/div>\n\n\n\n<p>The MVVM pattern is a model where we split the code into several layers which in turn makes it easier to expand and test our application\u00a0later\u00a0in the lifetime of our project.\u00a0The architectural pattern facilitates the separation of the GUI and the\u00a0back-end\u00a0logic.<\/p>\n\n\n\n<p>MVVM stands for Model \u2013 View&nbsp;\u2013&nbsp;ViewModel&nbsp;and represents the different layers of our application.&nbsp;<\/p>\n\n\n\n<p>Model&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Refers to the&nbsp;domain model&nbsp;or&nbsp;to the&nbsp;data&nbsp;access layer&nbsp;<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Domain model is the representation of real state content. (Object-oriented approach)&nbsp;<\/li><li>Data access layer is the representation of content. (Data-centric approach)&nbsp;<\/li><\/ul>\n\n\n\n<p>View&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The GUI, what the user sees and interacts with&nbsp;<\/li><\/ul>\n\n\n\n<p>ViewModel&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The&nbsp;viewmodel&nbsp;is an abstraction of the view that exposes public properties and commands, meaning this is where all the functions and logic behind the application is done. This in turn&nbsp;has a binder to the view which automates communication between the view and the&nbsp;viewmodel.&nbsp;<\/li><\/ul>\n\n\n\n<p>Implementing this pattern will make future expansion and modification of our codes much easier and hopefully we have a good groundwork in place for future improvement when it comes to a control application now.&nbsp;<\/p>\n\n\n\n<p>\u00a0 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gaute We finally got the technical drawings, with&nbsp;physical dimensions,&nbsp;for the stepper-motor&nbsp;this week.&nbsp;So,&nbsp;I made a model of the&nbsp;stepper and put it in the assembly.&nbsp;Did also make the gear&nbsp;to connect the stepper to the glider ring.&nbsp;&nbsp; I also&nbsp;worked&nbsp;some&nbsp;more on&nbsp;assembly-blocks&nbsp;for the frame. The plan is to 3D-print the blocks so the&nbsp;physical assembly will become easier&nbsp;because we won\u2019t need [&hellip;]<\/p>\n","protected":false},"author":77,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,1],"tags":[63],"class_list":["post-4337","post","type-post","status-publish","format-standard","hentry","category-smartsystems2020","category-uncategorized","tag-puck-buddies"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/4337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4337"}],"version-history":[{"count":8,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/4337\/revisions"}],"predecessor-version":[{"id":4353,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/4337\/revisions\/4353"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}