{"id":11759,"date":"2025-10-20T22:48:34","date_gmt":"2025-10-20T21:48:34","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=11759"},"modified":"2025-10-20T22:48:34","modified_gmt":"2025-10-20T21:48:34","slug":"hydrawlics-week-9","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=11759","title":{"rendered":"Hydrawlics &#8211; Week 9:"},"content":{"rendered":"\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\n<p><br>Hello and welcome back!\ud83d\udc4b<br><br>We\u2019ve officially started Sprint 4, and the project is really taking shape. This week, much of the focus has been on development and testing across different parts of the system &#8211; both in hardware and software. This is what our team members have been working on.<br><br><\/p>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:85% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Hydrawlics-Logo-3.png\" alt=\"\" class=\"wp-image-11828 size-full\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Hydrawlics-Logo-3.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Hydrawlics-Logo-3-300x300.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Hydrawlics-Logo-3-150x150.png 150w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Hydrawlics-Logo-3-768x768.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Fredrik:<\/h2>\n\n\n\n<p>This week we started sprint four, which means we should be nearing a working product. Now that the arm structure is in place, we need to get the hydraulic system fully working and implement it.<\/p>\n\n\n\n<p>My first priority was getting the valve attachment ready, as this was necessary to be able to test the valves. This was both to make sure that it works, and to enable the software engineers to develop and test their valve control system. I started on this last week, with printing a threaded piece that matched the threads of the valve. Still, I needed to print with a hose barb on top to be able to attach our tube. From the test of the hydraulic cylinder, I knew I wanted the diameter of the hose barb to be larger, since it seemed to be leaking in the test. Since the previous hose barb easily snapped when printed right side up, I printed it laying on its side for optimal print orientation. I was worried that printing the valve attachment on its side would mess up the threads, so I decided to print it right side up. To my surprise, the increase in diameter of the hose barb led to it being much stronger, and I actually had difficulties snapping it.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"900\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_iso.jpg\" alt=\"\" class=\"wp-image-11811\" style=\"width:203px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_iso.jpg 532w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_iso-177x300.jpg 177w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_section-522x1024.jpg\" alt=\"\" class=\"wp-image-11812\" style=\"width:177px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_section-522x1024.jpg 522w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_section-153x300.jpg 153w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit_section.jpg 548w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>With the valve attachment done, we were ready to test the valve. The video of this is shown below. The valve was successful in directing the water, meaning that the system was working. This is really great news! Granted, this test was isolated to the valve, and did not include any cylinder or manifold, but the component test was a success. There was as expected a lot of leakage from the valve attachments during the test. This is important to fix, as the problem would grow exponentially when connecting three more valves, and the remaining cylinders and manifolds.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Valve-test-1.mp4\"><\/video><\/figure>\n\n\n\n<p>From the test, it seemed like water was leaking both through the hose barb and the threads. The hose barb is not that surprising, since we used large zip-ties (because it was what we had easy access to). By using smaller zip ties, we should get a tighter seal, and the leakage should be fixed. For the threads, I was recommended using thread seal tape. I was sceptical at first, since the threads I was working with were so small, but decided to give it a go. Both the small zip-ties and the thread seal tape were easily obtainable at Clas Ohlson.<\/p>\n\n\n\n<p>When we did the test again with these leakage reducing efforts, the system worked perfectly! There was no leakage at all during normal use. There was only leakage when the valve was blocking both paths, and pressure was building inside the valve, but this should not be a problem.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1628\" height=\"2171\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited.jpg\" alt=\"\" class=\"wp-image-11816\" style=\"width:175px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited.jpg 1628w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited-225x300.jpg 225w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited-768x1024.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited-1152x1536.jpg 1152w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Pushfit-with-tape-edited-1536x2048.jpg 1536w\" sizes=\"auto, (max-width: 1628px) 100vw, 1628px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Valve-test-2-1.mov\"><\/video><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>Now that the valve attachments do not leak under operations, it&#8217;s time to look at how the cylinder should be mounted to the arm. This will be the interface between the arm structure and the hydraulic system. The cylinder mounting positions were defined last week, check out our previous blog post for that. I wanted the cylinders to be easily removed from the system, seeing as they are vital components that we might want to swap out or work on free from the arm. With that in mind, I used threads as the fastening method, and designed an attachment rod with three components.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"538\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-sketch.jpg\" alt=\"\" class=\"wp-image-11818\" style=\"width:177px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-sketch.jpg 898w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-sketch-300x180.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-sketch-768x460.jpg 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-iso-1024x529.jpg\" alt=\"\" class=\"wp-image-11819\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-iso-1024x529.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-iso-300x155.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-iso-768x397.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-iso.jpg 1230w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"364\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section-1024x364.jpg\" alt=\"\" class=\"wp-image-11820\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section-1024x364.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section-300x107.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section-768x273.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section-1536x546.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-section.jpg 1570w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>The cylinder attachment rod seemed to work fine, and was easy to implement to the arm. I also tweaked on the design of the hydraulic cylinder to match the attachment rods, meaning I added hoops to both the piston and the end cap of the cylinder. I made sure to have a small clearing in the prints, to make sure it was a good fit. When putting it all together, the fit was tight enough to hold it firmly in place, but not so tight that it limited the movement.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image alignright size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"942\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/End-cap-with-hoop.jpg\" alt=\"\" class=\"wp-image-11823\" style=\"width:172px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/End-cap-with-hoop.jpg 616w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/End-cap-with-hoop-196x300.jpg 196w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"242\" height=\"1012\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Piston-with-hoop.jpg\" alt=\"\" class=\"wp-image-11824\" style=\"width:63px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Piston-with-hoop.jpg 242w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Piston-with-hoop-72x300.jpg 72w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><\/figure>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1920\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-scaled.jpg\" alt=\"\" class=\"wp-image-11826\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-scaled.jpg 2560w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-300x225.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-1024x768.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-768x576.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-1536x1152.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/Attachment-rod-printed-edited-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>For the full hydraulic system, we need at least six of these attachment rods, as well as four cylinders. So printing components and putting them together will be much of my work the coming week. But hopefully we will have a fully working hydraulic system by the end of it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Lisa:<\/h2>\n\n\n\n<p>This week, I had the chance to test the valve control system integrated with the pump, and the results were really promising!<br><br>After several weeks of software development, where I previously implemented the angle calibration for the potentiometer, I was now able to integrate it into the complete control structure. The potentiometer data is continuously converted into an angular value used by the control logic to determine the current state of the valves and the pump.<br>Seeing that data now directly controls real hardware felt like a big step; the software is no longer just code, but an active part of the physical system!<br><br><br><strong>How the system works<br><\/strong>The code I worked on this week was based on a structure that Syver had previously set up. I built upon this useful groundwork by refining the logic for activation, pump control, and timing to make it precise and stable.<br>The software running on the Arduino now acts as a small real-time control system that manages both the <strong>valves<\/strong> and the <strong>pump<\/strong> based on the angle measured by the potentiometer.<\/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\/2025\/10\/IMG_3592-1024x768.jpeg\" alt=\"\" class=\"wp-image-11802\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3592-1024x768.jpeg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3592-300x225.jpeg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3592-768x576.jpeg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3592-1536x1152.jpeg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3592-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Overview of the setup<\/figcaption><\/figure>\n\n\n\n<p>Each valve consists of two relay channels: one for <strong>Extend (E)<\/strong> and one for <strong>Retract (R)<\/strong>. The code continuously reads the angle and determines which valve should be active:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the angle is <strong>below 76.1\u00b0<\/strong>, <strong>Valve 1<\/strong> is active.<\/li>\n\n\n\n<li>When the angle is <strong>above 76.1\u00b0<\/strong>, <strong>Valve 2<\/strong> takes control.<\/li>\n\n\n\n<li>And right in the middle, there\u2019s a <strong>dead zone<\/strong> where both valves stay off to keep the system stable.<\/li>\n<\/ul>\n\n\n\n<p>To prevent the relays from switching too quickly, I implemented time-gating, which enforces a minimum ON and OFF time for each channel. The pump logic was also refined. Instead of reacting directly to the relay outputs, it now responds to the intention of motion, meaning that the pump stays on while the system is in motion and turns off once the arm stops moving.<\/p>\n\n\n\n<p>For example, if the arm moves from <strong>54\u00b0 to 74\u00b0<\/strong>, the pump initially remains off. As soon as the potentiometer begins to rotate and the arm starts moving toward its destination angle, the pump turns on and remains active throughout the movement. Once the arm reaches 74\u00b0 and the motion stops, the pump automatically turns off again.<\/p>\n\n\n\n<p>Of course, this isn\u2019t a completely realistic situation yet, since the movement is currently controlled manually by rotating the potentiometer. While this manual control with the potentiometer was perfect for testing, the final version of the system will receive automatic movement instructions, for instance, from the image processing module. Using the same control logic, it will then know exactly where to move and adjust the valves accordingly.<\/p>\n\n\n\n<p><strong>Testing<\/strong><br>For the test, we connected one complete valve with the pump to verify the behavior. The results were overall good, the valve correctly switched between extend and retract, and the pump followed the movement as intended.<\/p>\n\n\n\n<p>However, during the test, we observed that the system was quite sensitive to changes in the potentiometer signal, especially from the software side. It required a steady and constant rotation to keep the system active, and even small variations in movement caused the control logic to interpret it as \u201cno motion,\u201d which immediately turned off the pump. This sensitivity made the pump logic a bit unstable at times, and it\u2019s something I\u2019ll need to fine-tune to make the system respond more consistently and reliably.<br><br>To sum it up, here\u2019s a short clip from the test, where it is showing how the valve and the pump work together in practice:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/IMG_3605.mov\"><\/video><\/figure>\n\n\n\n<p>Even though the system worked well during testing, there\u2019s still room for improvement. I\u2019ll be taking a closer look at how each valve\u2019s state behaves under different conditions, to make transitions smoother and even more consistent.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Syver:<\/h2>\n\n\n\n<p>Last week, I wrote that I completed the control system for each joint, allowing the simulation to manipulate each angle based on keypresses. What remained was to implement the inverse kinematics, so the arm could operate on coordinates rather than target angles. I\u2019ve also helped implement the base class structure for the Arduino controlling the kinematics.<\/p>\n\n\n\n<p>Starting the week by working on the Arduino kinematics, I began by laying out the classes needed for the different components;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LowFreqPWM: Copied from the Unity simulation, handles toggling outputs in correlation to the duty cycles (limited to 0, 20-80, 100%).<\/li>\n\n\n\n<li>Valve: Holds two LowFreqPWM instances, one for each end of the solenoid\/outflow direction.<\/li>\n\n\n\n<li>Joint: Holds everything related to the joint; Valve class instance, potmeter pin, etc.<\/li>\n<\/ul>\n\n\n\n<p>I then defined the different joint instances with pinouts, put them into a list, and made the Arduino loop() iterate over their update() methods. With the structure in place, I handed off the implementation to Lisa, who continued building out the logic.<\/p>\n\n\n\n<p>Most of my week went into implementing the inverse kinematics in Unity, which will be transferred to the Arduino when done. I first researched what formulas were needed to resolve the angles for a two-segment arm, leaving the wrist segment till the end as it can be calculated using the resolved angles. Seeing as I\u2019ve never worked with inverse kinematics before, I had to find some sources to learn from. Luckily, I found some <a href=\"https:\/\/opentextbooks.clemson.edu\/wangrobotics\/chapter\/inverse-kinematics\/\">very useful learning material<\/a> online, which helped me understand the topic.<\/p>\n\n\n\n<p>The arms given in the examples were similar enough that I could extrapolate much of the maths from there as well. The maths ended up being easier than I first anticipated, much thanks to our limited degrees of freedom. We only have 4, with 2 relevant degrees in the vertical plane. These are some excerpts from the maths:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"672\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/SyverSittBilde.png\" alt=\"\" class=\"wp-image-11837\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/SyverSittBilde.png 681w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/SyverSittBilde-300x296.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/figure>\n\n\n\n<p>Summarized, the maths is divided into solving each plane. By first looking at the horizontal plane, we see that joint 0 is the only one affecting what orientation the vertical plane will be in. Using this fact, a simple Atan2 function is used to find its rotation around Z. The vertical plane was a bit trickier, and required some algebra and the law of cosines to compute.<\/p>\n\n\n\n<p>I was on my own when calculating the end effector (or \u201cwrist\u201d) offset, which I solved by representing the end of the second segment as a unit vector, and multiplying with the length of the end effector segment (0.07m).<\/p>\n\n\n\n<p>Implementing this in C# was straightforward after I had the maths laid out. After implementing this, the arm could handle movement in the form of coordinates;<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/kinematics-showcase.mp4\"><\/video><\/figure>\n\n\n\n<p>I\u2019ve also been helping with testing the solenoid valves together with the pump, as can be seen in Fredrik\u2019s part.<\/p>\n\n\n\n<p>Looking forward, some further tweaking needs to be done. This includes translating 2D coordinates from the drawing G-Code to a 16:9 aspect ratio rectangle enclosed within the circular band of reachability that the robot has around it. When that is done, I will shift my focus onto cooperating with the rest of the team in integrating all the different components into one big beautiful robotic arm.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Emory:<\/h2>\n\n\n\n<p>This week, I started looking into incorporating all the algorithms I have created for image processing into the website so that they can be displayed and utilised further. In the begining trying to import the image directly into main to use for the image shown in the UI did not work. The problem was by doing this the img.copy would clash with another img.copy from another code,<\/p>\n\n\n\n<p>So by just importing functions that use it makes it so it\u2019s possible to use the image created in the other files.So I had to start by fixing<a href=\"http:\/\/polygonoutline.py\"> <\/a>polygonOutline.py and ContourDetection.py to be a function so it can be properly used inside of main to show the sent image and have the contours on top of it.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"651\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_1-1.png\" alt=\"\" class=\"wp-image-11803\" style=\"width:511px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_1-1.png 1011w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_1-1-300x193.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_1-1-768x495.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_2-1-1024x470.png\" alt=\"\" class=\"wp-image-11804\" style=\"width:508px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_2-1-1024x470.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_2-1-300x138.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_2-1-768x353.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_2-1.png 1341w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Started by importing the functions from the files I fixed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"325\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_3-1.png\" alt=\"\" class=\"wp-image-11805\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_3-1.png 703w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_3-1-300x139.png 300w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/figure>\n\n\n\n<p>Then added inside the apply_edge_detection to add the contour for the image so you can see what will be drawn.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"506\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_4.png\" alt=\"\" class=\"wp-image-11806\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_4.png 1017w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_4-300x149.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_4-768x382.png 768w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p>Showing the results from the website with our logo and the image I\u2019ve mostly used so far. So below is how the website looks so far. This given a good view of the image you sent and what will be drawn shown in pink.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"861\" height=\"676\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_5.png\" alt=\"\" class=\"wp-image-11807\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_5.png 861w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_5-300x236.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_5-768x603.png 768w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/figure>\n\n\n\n<p>After fixing this, I looked at continuing the arduino_interface so the line algorithm can be sent over. I added the function find_gcode_file to the code to find the file being created and if name == &#8220;main&#8221; to sent the gcode from that file to the arduino.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"982\" height=\"301\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_6.png\" alt=\"\" class=\"wp-image-11808\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_6.png 982w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_6-300x92.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_6-768x235.png 768w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><\/figure>\n\n\n\n<p>This function looks through the directory it\u2019s inn to find a file that ends with .gcode. Which for use here it would find the output.gcode file which contains the gcode for the image that has been processed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"617\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_7-1024x617.png\" alt=\"\" class=\"wp-image-11809\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_7-1024x617.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_7-300x181.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_7-768x463.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/BildeTilEm_7.png 1192w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The other part of the code is to transfer the gcode to the arduino with a delay to avoid overwhelming the arduino serial buffer.<\/p>\n\n\n\n<p>Didn\u2019t get to test this yet, but is a good setup to use to try to run the code when we test the connection between the raspberry pi and arduino. So for the future it would be to further see the setup with the raspberry pi and the arduino together with the UI to see how it all works together.<\/p>\n\n\n\n<p>This week have taught me global variables will make clashing between different codes more likely to happen, so putting them into functions makes life a lot easier.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Erling:<\/h2>\n\n\n\n<p>This week i have focused mainly on the input and exhaust manifolds for our hydraulic system, and making sure that we have a full understanding of what goes into our hydraulic system. And i have done some simple design alterations and assembly of the radaxial bearings in the arm base unit.<\/p>\n\n\n\n<p>In our hydraulic system, we have the following components:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>valves x4<\/li>\n\n\n\n<li>cylinder x4<\/li>\n\n\n\n<li>printed push-to-connect fittings x20<\/li>\n\n\n\n<li>manifolds (Distribution and collector)<\/li>\n\n\n\n<li>pump<\/li>\n\n\n\n<li>tubes (10mm and 4mm)<\/li>\n\n\n\n<li>reservoir<\/li>\n\n\n\n<li>printed barb fittings (2x 10mm and 12x 4mm)<\/li>\n<\/ul>\n\n\n\n<p>Fredrik has made the design for the cylinders, and we have purchased valves and the pump as previously described. The reservoir can be made as easy as a bucket full of water, and the tubes are purchased from Tools in Kongsberg.<\/p>\n\n\n\n<p>The manifolds have been designed and are ready for production, which will happen in the coming week.<\/p>\n\n\n\n<p>There are two distinct variants of the manifold as shown under:<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"492\" data-id=\"11761\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/collection-manifold.png\" alt=\"\" class=\"wp-image-11761\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/collection-manifold.png 600w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/collection-manifold-300x246.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"767\" height=\"697\" data-id=\"11762\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/input-manifold.png\" alt=\"\" class=\"wp-image-11762\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/input-manifold.png 767w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/input-manifold-300x273.png 300w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Collector manifold on the left. Distribution manifold on the right.<\/p>\n\n\n\n<p>The distribution manifold has 4 outputs (barb fittings), each to the Pressure port of its respective valve. The collector manifold has 8 inputs (barb fittings) to collect from the exhaust ports from the valves, and consolidate the flows to the reservoir.<\/p>\n\n\n\n<p>I will print the caps and the barb ends (pink) on a 3d printer and glue them with 2 part epoxy to the manifold tubes that have holes in them. This should create a watertight seal and function as designed.<\/p>\n\n\n\n<p>I realized that i made small mistake in the previous design for the radaxial bearings for the arm base, so i redesigned the large one to better suit the needs of the project.<\/p>\n\n\n\n<p>I added the rolling elements of the bearings to the main assembly, so now the arm base moves as it is intended to. I discovered that the resistance in the radaxial bearing is adjustable with center bolt pretension as the rolling elements are made of steel, and the bearing races are PLA, it is possible we get some creep due to viscoelastic effects over time. this wont be an issue for our use case as we can progressively tighten the center bolt or easily print new and replace deformed parts.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"568\" height=\"517\" data-id=\"11765\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/center-bolt-image.png\" alt=\"\" class=\"wp-image-11765\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/center-bolt-image.png 568w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/center-bolt-image-300x273.png 300w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"646\" data-id=\"11766\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/new-bearing-design-1.png\" alt=\"\" class=\"wp-image-11766\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/new-bearing-design-1.png 682w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/new-bearing-design-1-300x284.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>In all, we have conducted the tests we wanted to at this stage, and gotten a better hold of the physical form of the hydraulic system as a whole. We have tested each component individually, and can say with a degree of certainty that our approach will work when implemented.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n\n\n\n<p class=\"has-text-align-center\">That\u2019s all for now, see you next week!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello and welcome back!\ud83d\udc4b We\u2019ve officially started Sprint 4, and the project is really taking shape. This week, much of the focus has been on development and testing across different parts of the system &#8211; both in hardware and software. This is what our team members have been working on. Fredrik: This week we started [&hellip;]<\/p>\n","protected":false},"author":116,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11759","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11759","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\/116"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11759"}],"version-history":[{"count":12,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11759\/revisions"}],"predecessor-version":[{"id":11839,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11759\/revisions\/11839"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}