{"id":4843,"date":"2020-12-10T17:38:17","date_gmt":"2020-12-10T16:38:17","guid":{"rendered":"http:\/\/dronesonen.usn.no\/?p=4843"},"modified":"2020-12-10T17:41:05","modified_gmt":"2020-12-10T16:41:05","slug":"thirteenth-and-final-sprint-puck-buddies","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=4843","title":{"rendered":"Thirteenth and final sprint &#8211; Puck Buddies"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Gaute<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"468\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-46.png\" alt=\"\" class=\"wp-image-4916\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-46.png 486w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-46-300x289.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><figcaption> Final design of our hockey puck-machine (for some reason one of the feet won\u2019t render) <\/figcaption><\/figure><\/div>\n\n\n\n<p>This is the final design that we landed on. <\/p>\n\n\n\n<p>There has been a lot of work put down in the process to get\nwhere we are now.<\/p>\n\n\n\n<p>A tremendous amount of hours in solidworks and many\niterations on each part pays of when it comes to the end product. <\/p>\n\n\n\n<p>I have based the design of the part so that they either\ncan\u2019t be 3D-printed or cut out of plywood on the laser cutter. All the hole\ndimensions that is decided by me is either 3mm or 5mm, making the assembly\neasier with lesser dimensions to keep track on. The filament for the 3D-printed\npart are generic PLA bought on Clas Ohlson, and the plywood is standard 3.5mm\nthickness. &nbsp;<\/p>\n\n\n\n<p>I have not built up all the parts in the easies and most-forward way, that is simply because I didn\u2019t know how the part was going to turn out before I started designing. There are some pros and cons by doing it that way, the cons are the feature tree is ugly as hell and doesn\u2019t make much sense as you go down, the pros is that you are able to see how I built the part all the way from the first extrude till the last cut. There is no problem for me to make a new clean part and use the dimensions from the \u201cugly\u201d part so that the feature tree is nice and tidy, but that doesn\u2019t tell the whole truth about how much work is put into making a nice and functional part. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"426\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-47.png\" alt=\"\" class=\"wp-image-4917\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-47.png 567w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-47-300x225.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><figcaption>  A sneek-peek inside the &#8220;engine-room&#8221; <\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Halvard<\/h2>\n\n\n\n<p>This week we have been finalizing the project, for my part that has been to design and print parts, assemble the machine and fixing problems that we encountered. The first part of the week Gaute and I spent sourcing and assembling parts for the machine.&nbsp;The parts that are 3d-printed are mostly printed inn PLA. The reason for this is that PLA can be printed fast and easy, which makes it great for fast prototyping. Regular PLA is usually a little brittle and not considered to be&nbsp;great&nbsp;for outdoor use, but we found a&nbsp;special type of PLA, the&nbsp;PRIMASELECT PLA PRO&nbsp;filament.&nbsp;<a href=\"https:\/\/primacreator.com\/collections\/pla-pro\/products\/primaselect%E2%84%A2-pla-pro?variant=61748371979\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/primacreator.com\/collections\/pla-pro\/products\/primaselect%E2%84%A2-pla-pro?variant=61748371979<\/a>&nbsp;&nbsp;<\/p>\n\n\n\n<p>The filament we choose&nbsp;for parts that need strength&nbsp;is engineered&nbsp;for demanding industrial applications.&nbsp;We shortened&nbsp;down the print time significantly&nbsp;since we were able to print as fast as&nbsp;120mm\/s, however we only printed at 75-80mm\/s. The material also has a very high heat resistance&nbsp;up to&nbsp;95\u00b0C+ after&nbsp;an&nbsp;annealing&nbsp;process.&nbsp;&nbsp;It also has excellent mechanical&nbsp;properties&nbsp;(check figure 1 for info)&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"761\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-32-1024x761.png\" alt=\"\" class=\"wp-image-4885\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-32.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-32-300x223.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-32-768x571.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> <em>&nbsp;The material properties of the&nbsp;PRIMASELECT PLA PRO&nbsp;filament. MD is machine direction and TD is transverse direction.&nbsp;<\/em> <\/figcaption><\/figure><\/div>\n\n\n\n<p>We also choose to only use black filament since the&nbsp;coloring they use helps with UV protection.&nbsp;It also has&nbsp;a matte surface finish that helps concealing the printed layers for&nbsp;a better surface look.&nbsp;<\/p>\n\n\n\n<p>The heat treatment the material will go&nbsp;through&nbsp;after it has been printed&nbsp;will be to make sure that we are fusing the layers together, but for some materials&nbsp;this&nbsp;will be an annealing process. In the case of PLA which is a semi-crystalline polyester thermoplastic it will shift from a mostly amorph to a crystalline product, this will give us more strength and durability. However, there are some&nbsp;disadvantages&nbsp;to&nbsp;this method. The PLA will slightly change form during this&nbsp;process,&nbsp;therefore&nbsp;I have printed 10mmX10mmX10mm cubes so we can map out the deformation in X, Y and Z- direction.&nbsp;In the generic PLA the shrink was approximately 5%, this means that a part that is 10mm will have a&nbsp;deviation of 0.5mm.&nbsp;This would not be a problem If the shrinkage were uniform&nbsp;in the X, Y and Z axis, but it is not therefore you cannot just upscale the part.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The&nbsp;PRIMASELECT PLA PRO filament&nbsp;we used for some of the parts have been specially designed to be annealed which means that the shrinkage problem has been almost solved,&nbsp;it has&nbsp;a&nbsp;stated&nbsp;shrinkage of about 0.27% for an annealing process in the oven at 110\u00b0C&nbsp;for 30 minutes and letting the part cool&nbsp;with&nbsp;the oven. In our test it had a shrinkage of 0.34% this means that for a part that is 10mm the shrink will be less than 0.04mm this means that it has less margin for error than the 3d-printer.&nbsp;<\/p>\n\n\n\n<p>The&nbsp;PRIMASELECT PLA PRO&nbsp;was printed at 225\u00b0C&nbsp;with a heated glass bed at 50\u00b0C.&nbsp;<\/p>\n\n\n\n<p>The generic PLA that we used was printed&nbsp;for parts that&nbsp;were not&nbsp;going to be subjected to large forces&nbsp;and it&nbsp;was printed at 200\u00b0C&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"522\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-33-1024x522.png\" alt=\"\" class=\"wp-image-4886\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-33.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-33-300x153.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-33-768x392.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-34-1024x445.png\" alt=\"\" class=\"wp-image-4887\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-34.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-34-300x130.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-34-768x334.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> <em>We saved more than 3 hours in printing time just because we could print at 80mm\/s instead of 55mm\/s<\/em> <\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Anders<\/h2>\n\n\n\n<p>Finally&nbsp;done with all other subjects this semester and ready to put in a final effort in our Smart System project. The past couple of weeks have been quiet regarding this project mainly because there where nothing needed to be done with the software for the project, other than tuning the software once the hardware was ready.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Monday, we went to the ice rink in Kongsberg to do some tracking testing with the test box we made earlier this semester. The tracking seemed to work as intended but we encountered some issues as we had implemented a different stepper motor on the actual machine and there no longer was any support for the test setup stepper in our code. Seeing how the tracking worked close to perfectly even in the weird lighting conditions inside of&nbsp;Kongsberghallen, we decided that we were satisfied for the day.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-1024x461.jpeg\" alt=\"\" class=\"wp-image-4879\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image.jpeg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-300x135.jpeg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-768x346.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Thursday,&nbsp;I had to work so I&nbsp;couldn\u2019t&nbsp;find the time to attend the group meeting, but from what I hear there is just the printing of the final parts left before we can start to assemble the machine and finalizing the product.&nbsp;<\/p>\n\n\n\n<p>Wednesday&nbsp;this week all the hardware components where done and I started soldering on the electrical components to the physical machine.&nbsp;&nbsp;During this procedure we found there was made some changes to the physical model not&nbsp;reflected in the wiring schematics, Nicholas&nbsp;quickly updated the schematics and color coded some of the wiring in the diagram for ease of use. Once we had the wiring figured out and every part connected, we got into getting the stepper moving the plate in accordance with the data sent from the image recognition software. As it turns out the stepper&nbsp;did not work correctly when sent values in whole steps but works properly when values in half steps where sent. Having the turning mechanism figured out properly late into the night we called it a day.&nbsp;<\/p>\n\n\n\n<p>Thursday, we wired on the Electronic Speed Controller&nbsp;(ESC)&nbsp;for the servo motor and encounter another problem when running our calibrating sequence. This new ESC had some issues using the same delay intervals as the previously used&nbsp;ESC but&nbsp;seeing how much bigger the original ESC&nbsp;was as it is intended to run four motors on a quad copter we decided to try and figure things out. After some&nbsp;testing and failure, we found a set of intervals which did the trick and ended up using the new smaller ESC.&nbsp;<\/p>\n\n\n\n<p>Status:&nbsp;<\/p>\n\n\n\n<p>The machine is all done and all&nbsp;that is&nbsp;left is securing all screws as the machine is actively trying to tear itself apart when active. Other than that, we will do some final testing at the ice rink tomorrow where we also plan to do more filming and getting everything ready for the presentation of our project next week.&nbsp;<\/p>\n\n\n\n<p>All in all, the project came out better than initially expected and we had good communication and progress across the different engineering disciplines. I think we all can call this a positive learning experience and look forward to presenting you all our project next week. Signing out.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nicholas<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Electrical<\/h4>\n\n\n\n<p>As we enter the final week of the project we have lot\u2019s of work left to do. The major work left is mounting all the components, connecting them and then test and verify everything. Starting off I finished the wiring schematic before starting. Electrical schematics can be found here: <a href=\"https:\/\/1drv.ms\/u\/s!AkdxjMLchtDupYs-xqFKX6RtvgZp9Q?e=GpYWCP\">https:\/\/1drv.ms\/u\/s!AkdxjMLchtDupYs-xqFKX6RtvgZp9Q?e=GpYWCP<\/a> <\/p>\n\n\n\n<p>Please note that there are some components that are in the wiring diagrams that are not present on the actual model. If we have the time and components we will connect the, if not the system will work fine without it.<\/p>\n\n\n\n<p>Anders helped me by soldering\nwires onto plugs that fit in the Arduino card so we wouldn\u2019t have any loose\nwires. One thing I really dislike is to troubleshoot due to faulty connections.\nWith the wires soldered I connected everything and made sure it was working as intended.\nCurrently we are using a USB cable from the Jetson Nano to the Arduino to send\nboth data and power. One improvement that could be made here would be to use\nthe expansion header on the Jetson to wire directly to the TX and RX on the Arduino.\nHowever, as the Jetson works on 3V3 logic and the Arduino works on 5V I would\nneed to add a level shifter to protect the Jetson. I would also need to add a separate\npower source to the Arduino card.<\/p>\n\n\n\n<p>One thing that is not portable\nat the moment is the Jetson Nano as it needs a power supply of 5V 4A. It might\nbe able to borrow a suitable buck converter from a friend, but if that is not\npossible we will just have to connect it to an wall outlet. <\/p>\n\n\n\n<p>I also spent some time finetuning the stepper driver. As mentioned earlier, there are dip-switches on the driver which are used to configure both max current as well as micro steps. Originally I had it set to full steps and a current limit of 1A. This proved to be insufficient so I looked up the datasheet for the NEMA 17 stepper and found that the coils were rated for 1.5A. Still, after changing this, the result was not desirable and the stepper seemed to miss some steps. I then decided to change the driver to \u00bd steps which improved the results immensely and the stepper now operated relatively smoothly. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Software<\/h4>\n\n\n\n<p>This week I spent most\nof my time finetuning the software and integrating it with the finished\nhardware. As we had tested all the parts separately before mounting them there were\nno huge surprises and everything went pretty smoothly. I downloaded the newest\npython scripts for the image processing part and made sure they ran fine there.\nFortunately they did and I only had one problem and that was with the file formatting,\nand more specially the line endings. I wrote the scripts on Windows which uses\nCR+LF while Linux uses LF. This caused the terminal to throw an error on the first\nline of the script which calls the Python environment with \u201c#!\/usr\/bin python3\u201d.\nDownloading the program dos2unix and converting the files made the problem go\naway. The rest of the script with the new changes, like headless mode etc. to\nwork without a display attached, worked perfectly. I must admit though that I cheated\na bit and manually entered the Arduino com port into the code for the Linux version\nas the solution for Linux isn\u2019t perfect in its current state. The only thing remaining\nnow is to get the Jetson Nano to start the script on power up. Currently I have\nto remote into it with SSH to start the script, which works, but is waste of\ntime as it can be done automatically. <\/p>\n\n\n\n<p>One thing I had not\nbeen able to test before was the loading mechanism of the pucks. We ended up\nusing a continuous servo for this task. After reading the datasheet I found at that\nI turns clockwise when given a pulse greater than 1.5ms (up to 2.0ms) and it\nturns counter clockwise for pulses less than 1.5ms (down to 1.0ms). There was also\na small potmeter that was used to calibrate the zero point of the servo. That is,\nthe point where it would not move in either direction. To calibrate it I\nconnected it to an Arduino board with a simple program that continuously wrote\n1.5ms pulses to the servo. I then adjusted the potmeter until the servo was not\nmoving anymore. The loading mechanism itself is simple. The loading arm is pulled\nall the way back, allowing a puck to fall down, before moving forward again and\nfeeding the puck to the firing wheel. As this is a continuous servo it does not\ngive any feedback so I cannot know where it is. Of course, I could &nbsp;create a function based on the datasheet that calculates\nthe total distance moved based on the RPM of the servo as well as the gear.\nHowever, I ended up just manually testing how long I should run for and fine tuning\nthe values by hand. <\/p>\n\n\n\n<p>Also planned was an\narming signal from the Jetson that would allow the Arduino to shoot. However, I\ndecided to not implement it currently as the code on the computer has no form of\nsafety check that would make the arming signal relevant. Instead I added a\ntimer for the fire rate so it would be some delay between pucks fired. <\/p>\n\n\n\n<p>The last bit was the\nESC calibration. As Halvard had brought a new ESC we had to tweak the\ncalibration a bit. Also, the auto mode on the Arduino supports for configuring\nthe motor speed on the fly. However, I ended up just hardcoding the values to\nassure safe operations for now. <\/p>\n\n\n\n<p>I was relieved to see\nthat the integration process went as well as it did and I\u2019m happy I did a lot\nof testing earlier in the semester on the different component separately. <\/p>\n\n\n\n<p>All the code is located\nher: <a href=\"https:\/\/github.com\/NichoPellic\/hockey_passing_machine\/\">https:\/\/github.com\/NichoPellic\/hockey_passing_machine\/<\/a>\n<\/p>\n\n\n\n<p>Also, the code used can be found in the dev branch. I have mainly been working on the dev branch lately and I simply haven\u2019t bothered merging the dev branch with the master branch yet. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"454\" src=\"http:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-29.png\" alt=\"\" class=\"wp-image-4863\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-29.png 604w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2020\/12\/image-29-300x225.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><figcaption>The machine during some late night integration testing<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Final testing<\/h2>\n\n\n\n<p>Here are two videos from our final testing. The only thing left now is to tidy up the project and do some proper cable management.  The videos can also be found here:   <a href=\"https:\/\/1drv.ms\/u\/s!AkdxjMLchtDupYs-xqFKX6RtvgZp9Q?e=GpYWCP\">https:\/\/1drv.ms\/u\/s!AkdxjMLchtDupYs-xqFKX6RtvgZp9Q?e=GpYWCP<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gaute This is the final design that we landed on. There has been a lot of work put down in the process to get where we are now. A tremendous amount of hours in solidworks and many iterations on each part pays of when it comes to the end product. I have based the design [&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-4843","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\/4843","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=4843"}],"version-history":[{"count":15,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/4843\/revisions"}],"predecessor-version":[{"id":4923,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/4843\/revisions\/4923"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}