{"id":5491,"date":"2022-09-16T16:52:06","date_gmt":"2022-09-16T15:52:06","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=5491"},"modified":"2022-11-29T08:17:42","modified_gmt":"2022-11-29T07:17:42","slug":"group-2-week-4","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=5491","title":{"rendered":"Group 2 &#8211; Week 4"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Computer Science<\/h4>\n\n\n\n<p>This week we found a chess algorithm we could use which fitted our purpose since it already prints the coordinates for the moves that the machine will be executing. We are currently figuring out how to read and write out these coordinates to a file, which will be transferred to our Arduino board, maybe via Bluetooth, for the robot arm to receive. After testing the program, the algorithm seems to have a high level of skill rating and we didn\u2019t discover any bugs yet. We are also figuring out how we can be able to change the skill rating of the algorithm. To do that we either must change the code and integrate another algorithm from another source, or just use a completely different code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/KH.png\" alt=\"\" class=\"wp-image-5492\" width=\"650\" height=\"585\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/KH.png 510w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/KH-300x270.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption><em>Picture 1<\/em><\/figcaption><\/figure>\n\n\n\n<p>We also got to test the programming for servo motors and it\u2019s pretty much straight forward. We don\u2019t get to test much more of the servo programming before the robot arm is finished.<\/p>\n\n\n\n<p>We used some time trying to find simulators, but we gave up on that, so for the time being we have put the programming for the arm on hold, instead we used majority of our time this week(7 hours wednesday and 4 hours friday) with the chess algorithm, and researching how to receive and give coordinates through bluetooth or file write\/read.<\/p>\n\n\n\n<p>Kevin Johansen, Hossein Sadeghi \u2013 Computer Science<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Computer Vision<\/h4>\n\n\n\n<p><strong>Components and OS<\/strong><\/p>\n\n\n\n<p>This week I started with a meeting with Zoran to get some components I need to get started. He got me a Raspberry Pi 4 B, a Raspberry Pi touchscreen and a camera module that fits the minicomputer. I did some research on all the components and their requirements regarding the different operating systems size and decided to order a 32 GB micro SD card for the Raspberry Pi.<\/p>\n\n\n\n<p>I haven\u2019t decided on an operating system yet, because I need to choose the method I will use for the computer vision first, as some of them only works on certain OS`s with the Raspberry Pi. I have done a lot of research on using Roboflow for the computer vision part, and it seems to be doable, but it requires UBUNTU as an OS. This will probably be my chosen method but to be sure I\u2019m going to watch a 3-hour beginner course on OpenCV over the weekend and see what I think of it.<\/p>\n\n\n\n<p><strong>Assembling the PI<\/strong><\/p>\n\n\n\n<p>To start collecting data for my dataset I need to assemble the Raspberry Pi and get the camera up and running. I found the OS image that I wanted for now, which was the UBUNTU Desktop for Raspberry Pi 4, and then flashed it onto the micro SD card I had ordered the previous day. This took about 30 minutes and then I got a confirmation saying that the OS had been written to the SD card and I could remove it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M1-1024x341.png\" alt=\"\" class=\"wp-image-5496\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M1-1024x341.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M1-300x100.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M1-768x256.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M1.png 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>Picture 2: Installation of Operating system on micro SD card<\/em><\/figcaption><\/figure>\n\n\n\n<p>I removed it from my computer and inserted into the SD card slot on the PI. Then I plugged it into my monitor at home, a USB mouse and keyboard and the 5V power supply. I turned it on, but nothing happened.<\/p>\n\n\n\n<p>I started googling for a solution and discovered that the Pi outputs a relatively&nbsp;poor HDMI signal, which means that some devices might not even notice it. So, I decided to try and connect it to the Raspberry Pi touchscreen instead, since it is made for the Pi.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M2.jpg\" alt=\"\" class=\"wp-image-5498\" width=\"648\" height=\"522\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M2.jpg 603w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/M2-300x242.jpg 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><figcaption><em>Picture 3, 4 and 5: <\/em>Assembling the Pi with the touchscreen<\/figcaption><\/figure>\n\n\n\n<p><strong>Connecting to the Touchscreen<\/strong><\/p>\n\n\n\n<p>I started connecting the ribbon cable to the DSI pin on the screen, and then connection all the GPIO cables as well. I mounted the Raspberry Pi 4 B on top and connected all the cables from the screen to the matching ports on the Pi.<\/p>\n\n\n\n<p>Connections:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Touchscreen<\/strong><\/td><td><strong>Cable<\/strong><\/td><td><strong>Raspberry Pi 4 B<\/strong><\/td><\/tr><tr><td>DSI (Display serial interface)<\/td><td>Ribbon cable<\/td><td>DSI Port<\/td><\/tr><tr><td>5V<\/td><td>Red cable<\/td><td>5V (GPIO 04)<\/td><\/tr><tr><td>Ground<\/td><td>Black cable<\/td><td>Ground (GPIO 06)<\/td><\/tr><tr><td>SDA (Serial digital interface)<\/td><td>Green cable<\/td><td>GPIO 03<\/td><\/tr><tr><td>SCL (Clock)<\/td><td>Yellow cable<\/td><td>GPIO 05<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>After assembling all this I put in the power supply again and turned it on, without any luck this time either. Then I started thinking that maybe the SD card didn\u2019t boot correctly or maybe there was something wrong with the OS. I took the card out and installed Raspberry Pi OS (Raspbian) instead, but I was still stuck with a black screen. Next week, I&#8217;ll keep working on getting this to function.<\/p>\n\n\n\n<p>Marte Marheim \u2013 Computer Science<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h4 class=\"wp-block-heading\">Mechanical engineering<\/h4>\n\n\n\n<p><strong>The Robotic Arm<\/strong><\/p>\n\n\n\n<p>For week 4 I continued to work on the design, and I have almost completed the whole design and assembly. The motions the arm will go through is somewhat like the motions off a human arm. The parts are designed (with inspiration from google) like \u201cbody parts\u201d:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Base joint<\/li><li>Shoulder joint<\/li><li>Elbow joint<\/li><li>Wrist \/ hand joint.<\/li><\/ul>\n\n\n\n<p>The base joint will be run by a stepper motor and will be able to turn 360 degrees. The rest of the joints, except the wrist, will be run by servo motors and will be able to move 180 degrees. The wrist joint will be run by a servomotor with the ability to turn 360 degrees and will be connected to an electromagnet motor. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM1-1024x569.png\" alt=\"\" class=\"wp-image-5502\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM1-1024x569.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM1-300x167.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM1-768x427.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM1.png 1387w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>Picture 6: Main assembly 50% completed.<\/em><\/figcaption><\/figure>\n\n\n\n<p>I am close to start printing, but I am currently missing information on the different measurements and dimensions for the servomotor arms. I have designed the arm so that the measurements for the servomotor arms easily can be updated. Once that is finished, and I have made sure that the arm is long enough for it to reach across the whole chess board, I aim to begin with the 3D printing and putting the different parts together.<\/p>\n\n\n\n<p><strong>Chess Pieces<\/strong><\/p>\n\n\n\n<p>Alongside the design of the arm, I have also started to make the bottom plates for the chess pieces. Earlier this week I went to the store Jula and bought magnets. The magnets will be placed inside the bottom plates, which then will be glued to the chess pieces.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM2-1024x768.jpg\" alt=\"\" class=\"wp-image-5503\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM2-1024x768.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM2-300x225.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM2-768x576.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM2.jpg 1239w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>Picture 7: Magnets bought<\/em><\/figcaption><\/figure>\n\n\n\n<p>The design of the bottom plates is simple and based on the measurements of the chess pieces. According to the timeline I established for myself, I will be done with the chess pieces after next Wednesday. <em>Given I don`t run into any problems during printing.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"392\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM3.png\" alt=\"\" class=\"wp-image-5504\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM3.png 756w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM3-300x156.png 300w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><figcaption><em>Picture 8: Hexagon Chess Piece<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"443\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM4.png\" alt=\"\" class=\"wp-image-5505\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM4.png 895w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM4-300x148.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM4-768x380.png 768w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><figcaption><em>Picture 9: Round Chess Piece<\/em><\/figcaption><\/figure>\n\n\n\n<p><strong>Chess Board<\/strong><\/p>\n\n\n\n<p>After discussing with the other group members, I have started to prepare the chessboard that I also will be making. Since we will be using a camera to detect the chess pieces and board, we had a discussion on whether we should have a board where the black tiles are engraved on the board or just outlined using simple lines. In conclusion we decided on a board where the tiles will be outlined with simple lines. And if we have time to test and material available, I can make another board where the black tiles are engraved on the board.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM56.jpg\" alt=\"\" class=\"wp-image-5506\" width=\"650\" height=\"260\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM56.jpg 559w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/09\/LM56-300x120.jpg 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption><em>Picture 10 and 11: Laser cut chess boards as an illustration.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Hours spent working on the project, week 4: 19 Hours<\/p>\n\n\n\n<p>Liv Marte Olsen \u2013 Mechanical engineering<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Computer Science This week we found a chess algorithm we could use which fitted our purpose since it already prints the coordinates for the moves that the machine will be executing. We are currently figuring out how to read and write out these coordinates to a file, which will be transferred to our Arduino board, [&hellip;]<\/p>\n","protected":false},"author":88,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95,93,1],"tags":[87,89],"class_list":["post-5491","post","type-post","status-publish","format-standard","hentry","category-chess-mates","category-smart-systems-2022","category-uncategorized","tag-chess-mates","tag-smarte-systemer-2022"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5491","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\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5491"}],"version-history":[{"count":25,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5491\/revisions"}],"predecessor-version":[{"id":6786,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5491\/revisions\/6786"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}