{"id":11656,"date":"2025-10-19T23:26:07","date_gmt":"2025-10-19T22:26:07","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=11656"},"modified":"2025-10-21T15:20:08","modified_gmt":"2025-10-21T14:20:08","slug":"pickmebot-week-8","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=11656","title":{"rendered":"PickMeBot-week 8"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Theo:<\/strong><\/h2>\n\n\n\n<p>This week, I managed to get the servo working. I did some troubleshooting with a multimeter and found that the issue was insufficient power to the servo. After connecting the servo to the driver board and powering it with a power bank, it started working. Once the arm is ready, I\u2019ll calibrate the servo and it will be able to move the box.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Sondre:<\/strong><\/h2>\n\n\n\n<p>This week involved quite a bit of troubleshooting and debugging on my part. We finally received the BNO055 IMU module last week, and over the weekend Anette was able to solder the pin headers so it could be mounted on the robot\u2019s expansion board. My main goal this week was to get the IMU communicating reliably with the Micro:bit and integrate it into the robot\u2019s control system.&nbsp;<\/p>\n\n\n\n<p>Me and Anette connected the BNO055 to the Micro:bit Driver Expansion Board using the built-in I2C connector. The table below shows the pin mapping I used for this connection:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>BNO055 (IMU)&nbsp;<\/td><td>Micro:bit expansion board:&nbsp;<\/td><\/tr><tr><td>Vin&nbsp;<\/td><td>3v3&nbsp;<\/td><\/tr><tr><td>GND&nbsp;<\/td><td>GND&nbsp;<\/td><\/tr><tr><td>SDA&nbsp;<\/td><td>SDA&nbsp;<\/td><\/tr><tr><td>SCL&nbsp;<\/td><td>SCL&nbsp;<\/td><\/tr><tr><td>PS0&nbsp;<\/td><td>GND&nbsp;<\/td><\/tr><tr><td>PS1&nbsp;<\/td><td>GND&nbsp;<\/td><\/tr><tr><td>ADR&nbsp;<\/td><td>3v3&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>And the I2C connection on the driver expansion board is shown below.&nbsp;&nbsp;<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"264\" height=\"198\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-119.png\" alt=\"\" class=\"wp-image-11658\" style=\"width:224px;height:auto\" \/><\/figure>\n\n\n\n<p>When we first connected the IMU, it did not appear on the I\u00b2C bus. I expected to find it at address 0x28 or 0x29, depending on whether the ADR pin was set low (GND) or high (3V3). To verify the connection, I used an I2C scanner script that I generated with help from ChatGPT. When I ran the scan, only the motor driver\u2019s addresses appeared, meaning that the IMU was not responding at all.&nbsp;<\/p>\n\n\n\n<p>At this point, I suspected a hardware issue so I checked the power connections with Anette and Robin to confirm that the IMU was receiving voltage. Everything looked fine, which ruled out a power problem. Eventually I decided to swap the SDA and SCL lines, and that turned out to be the issue. After switching the connections, the IMU was successfully detected at address 0x29, confirming proper communication over I2C.&nbsp;<\/p>\n\n\n\n<p>To interface with the sensor, I installed the Adafruit BNO055 library via PlatformIO. This made the integration straightforward, as the library handles sensor initialization.&nbsp;<\/p>\n\n\n\n<p>I then uploaded a simple test program to confirm that the IMU was sending orientation data:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"654\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-120.png\" alt=\"\" class=\"wp-image-11659\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-120.png 746w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-120-300x263.png 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/figure>\n\n\n\n<p>Now I could see in the serial monitor that I got all the readings from the IMU:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"210\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-121.png\" alt=\"\" class=\"wp-image-11660\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-121.png 682w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-121-300x92.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n\n\n\n<p>But the only one I was interested in was the heading. So next was to try to implement this in the code for the robot.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The idea I had with buying the IMU was that with an absolute heading reading I could use that to make it drive straight in the path. I also wanted it for turning since now it would no longer depend on turning for a set time but rather turning based on degrees.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Now that I had gotten readings from the IMU, I could start integrating it with the robot\u2019s navigation system. I reused the turning functions I developed last week, but instead of relying on the ultrasonic sensors to trigger course corrections, the robot now uses the IMU\u2019s heading data to detect and correct angular drift.&nbsp;<\/p>\n\n\n\n<p>To achieve this, I calculate the difference between the robot\u2019s current heading and its target heading using a simple formula that keeps the value within the range of \u2013180 degrees to +180 degrees. This difference, called diff, tells the robot whether it has rotated slightly left or right from its intended direction. By using symmetric thresholds, I can decide which rotation function to call:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If diff is greater than +20 degrees, the robot has turned too far to the right, so it performs a small left rotation to correct its course.&nbsp;<\/li>\n\n\n\n<li>If diff is less than \u201320 degrees, the robot has drifted to the left, and it performs a right rotation.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"323\" height=\"241\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-122.png\" alt=\"\" class=\"wp-image-11661\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-122.png 323w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-122-300x224.png 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/figure>\n\n\n\n<p>Over you can see how I temporarily mounted the IMU with the use of a breadboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"360\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-123.png\" alt=\"\" class=\"wp-image-11662\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-123.png 480w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-123-300x225.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/youtu.be\/1Bl-AbInz40\">https:\/\/youtu.be\/1Bl-AbInz40<\/a><\/p>\n\n\n\n<p>Here you can see how it rotates a bit when it is of course. It does not rotate much since the function only runs for 100 ms. But it shows proof of concept.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Next week, I\u2019ll focus on improving how the IMU works with the robot.&nbsp;&nbsp;<\/p>\n\n\n\n<p>While testing the robot, I noticed that it doesn\u2019t always drive perfectly straight, each new test session tends to drift slightly to the left or right. This shows that relying only on the IMU and calibration values isn\u2019t always reliable, since small mechanical differences or battery levels can affect the motors. Adding encoders to the motors would make it possible to measure the exact wheel rotations, allowing for better control and more consistent movement. During the guest lecture, we learned how reliability is critical in systems that operate in space, where even small errors can have big consequences. I think this idea connects well to our project. Making the robot\u2019s movement more predictable and reliable is just as important here, even if it\u2019s on a smaller scale.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Anette:<\/strong><\/h2>\n\n\n\n<p>This week I was going to test the PCA9685 board with a SG90 servo motor. This is the same one we are going to use for the arm attachment. The board didn&#8217;t include a capacitor, so I had to figure out which one to use and where to acquire it. I asked around to see if I could get it from someone I know, but ended up asking Henning on friday. I was then unavailable during the weekend so I&#8217;m not able to test it until monday. I did test the soldering from last week to see if I had to fix anything, and it worked. I also want to test the motors on the car itself, but I have to find my equipment at home, and there is still some uncertainty about which motors we are going to use. We also have 2 weeks left to order and finish the pcb, so we have to start looking into the process of ordering it.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Matias:<\/strong><\/h2>\n\n\n\n<p>This week I made significant progress in the design phase of our project. Both the motor controller and the voltage regulator for its power supply are now fully completed in <strong>Capture<\/strong>. It has been satisfying to see all the components properly placed and connected in the schematic, and it gives a clear overview of how the system will function once assembled.<\/p>\n\n\n\n<p>Next, I will move on to <strong>PCB Editor<\/strong> to start laying out the physical board. This step will allow me to translate the schematic into a real, manufacturable PCB, taking into account component placement, trace routing, and overall design efficiency. I am looking forward to tackling this part because it is where the design really starts to take shape in a tangible way.<\/p>\n\n\n\n<p>Below are screenshots of the completed schematics in Capture:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"360\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-169.png\" alt=\"\" class=\"wp-image-11870\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-169.png 650w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-169-300x166.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"201\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-170.png\" alt=\"\" class=\"wp-image-11871\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-170.png 600w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/image-170-300x101.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>Completing these schematics has helped me better understand the interactions between components and the practical considerations for power delivery and motor control. I\u2019m excited to start the PCB layout next and see how all the pieces come together.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Robin<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Evolution of the Gripping System Design<\/h4>\n\n\n\n<p>The work for Week 8 focused on redesigning the robot&#8217;s front arm and the package handling system.<\/p>\n\n\n\n<p>The initial concept, which involved a lifting arm module sliding under the object, was abandoned in favor of a more direct approach. We designed a custom box equipped with specific handles that the robot&#8217;s arm grasps to perform the lift.<\/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=\"1024\" height=\"576\" data-id=\"11874\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/cad658f0-5583-4304-8116-ec4819d93c61-1024x576.png\" alt=\"\" class=\"wp-image-11874\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/cad658f0-5583-4304-8116-ec4819d93c61-1024x576.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/cad658f0-5583-4304-8116-ec4819d93c61-300x169.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/cad658f0-5583-4304-8116-ec4819d93c61-768x432.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/cad658f0-5583-4304-8116-ec4819d93c61.png 1205w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" data-id=\"11875\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/d5024b32-1f87-46bc-be4f-4f85dff3b6a1-1024x576.png\" alt=\"\" class=\"wp-image-11875\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/d5024b32-1f87-46bc-be4f-4f85dff3b6a1-1024x576.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/d5024b32-1f87-46bc-be4f-4f85dff3b6a1-300x169.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/d5024b32-1f87-46bc-be4f-4f85dff3b6a1-768x432.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/10\/d5024b32-1f87-46bc-be4f-4f85dff3b6a1.png 1349w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<div class=\"sketchfab-embed-wrapper\">   <p style=\"font-size: 13px;font-weight: normal;margin: 5px;color: #4A4A4A\"> <a href=\"https:\/\/sketchfab.com\/3d-models\/servo-mount-v11-f15bba51152346abae62d077de1bbfad?utm_medium=embed&amp;utm_campaign=share-popup&amp;utm_content=f15bba51152346abae62d077de1bbfad\" target=\"_blank\" rel=\"nofollow\" style=\"font-weight: bold;color: #1CAAD9\"> Servo Mount V11 <\/a> by <a href=\"https:\/\/sketchfab.com\/objex.3d?utm_medium=embed&amp;utm_campaign=share-popup&amp;utm_content=f15bba51152346abae62d077de1bbfad\" target=\"_blank\" rel=\"nofollow\" style=\"font-weight: bold;color: #1CAAD9\"> objex.3d <\/a> on <a href=\"https:\/\/sketchfab.com?utm_medium=embed&amp;utm_campaign=share-popup&amp;utm_content=f15bba51152346abae62d077de1bbfad\" target=\"_blank\" rel=\"nofollow\" style=\"font-weight: bold;color: #1CAAD9\">Sketchfab<\/a><\/p><\/div>\n\n\n\n<p><a href=\"https:\/\/skfb.ly\/pCyBE\">https:\/\/skfb.ly\/pCyBE<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Theo: This week, I managed to get the servo working. I did some troubleshooting with a multimeter and found that the issue was insufficient power to the servo. After connecting the servo to the driver board and powering it with a power bank, it started working. Once the arm is ready, I\u2019ll calibrate the servo [&hellip;]<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[104],"class_list":["post-11656","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-pickmebot"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11656","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\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11656"}],"version-history":[{"count":9,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11656\/revisions"}],"predecessor-version":[{"id":11884,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/11656\/revisions\/11884"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}