{"id":13167,"date":"2025-11-25T03:25:17","date_gmt":"2025-11-25T02:25:17","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=13167"},"modified":"2025-11-25T03:25:17","modified_gmt":"2025-11-25T02:25:17","slug":"pickmebot-week-13","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=13167","title":{"rendered":"PickMeBot-week 13"},"content":{"rendered":"\n<p><strong>Sondre:<\/strong><\/p>\n\n\n\n<p>This week I focused on improving the navigation and stability of our mecanum robot. One of the main problems earlier was that the robot often confused a wall with a box, since the ultrasonic sensors saw both situations almost the same way. To fix this, I added a simple verification step where the robot strafes slightly to the side and checks if the front distance changes. A box gives a large difference, while a wall barely changes at all.&nbsp;<\/p>\n\n\n\n<p>I also spent time debugging the left ultrasonic sensor, which sometimes returned completely unrealistic values. This caused issues for the PID controller, especially in narrow corridors.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Another task this week was reorganizing the servo code for the robot arm. Theo originally wrote the arm logic, and I made it into a small PlatformIO library so we can control the arm cleanly from main using simple functions. This will make it easier to integrate the arm into the final system.&nbsp;<\/p>\n\n\n\n<p>Most of my work went into improving how the robot behaves at intersections and after turns. I added logic so the robot fully stabilizes its heading before the PID controller takes over again, and added a short cooldown period to avoid fighting between the correction code and PID. I also added a small forward \u201cescape\u201d movement after every turn so the robot doesn\u2019t re-detect the same intersection and spin back and forth. These changes made the movement much smoother and more predictable.&nbsp;<\/p>\n\n\n\n<p>After talking with Steven, I also realized that I shouldn\u2019t overcomplicate the system too early. I had added a lot of advanced logic, but some of it wasn\u2019t fully finished and created more problems than it solved. So I took a few steps back and focused on making the basic functionality strong and reliable before adding more complexity.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Overall, it\u2019s been a productive week, and after Monday I\u2019ll be ready to continue progressing faster. Under is a video of how the robot moves now:&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/youtube.com\/shorts\/MFTijbGVwuM?feature=share\">https:\/\/youtube.com\/shorts\/MFTijbGVwuM?feature=share<\/a><\/p>\n\n\n\n<p><strong>Robin:<\/strong><\/p>\n\n\n\n<p>With the BMS (Battery Management System) successfully realized, the next step is to manufacture a component capable of charging the batteries.<\/p>\n\n\n\n<p><strong>1. Circuit Topology<\/strong><\/p>\n\n\n\n<p><strong><em>*equation are wright in LaText because i write it first in Notion<\/em><\/strong><\/p>\n\n\n\n<p>To achieve this, I selected a schematic based on the <strong>CN3722<\/strong> controller.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"674\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-152.png\" alt=\"\" class=\"wp-image-13169\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-152.png 960w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-152-300x211.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-152-768x539.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>The component values must be adapted to obtain the required charging voltage for a 3S LiPo battery. Additionally, an <strong>IP2368<\/strong> module will be integrated. This component allows the system to accept a standard <strong>5V USB input<\/strong> by boosting the voltage above the required threshold for charging the 3S pack.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153-1024x1024.png\" alt=\"\" class=\"wp-image-13170\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153-1024x1024.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153-300x300.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153-150x150.png 150w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153-768x768.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-153.png 1360w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>2. Component Value Calculations<\/strong><\/h6>\n\n\n\n<p><strong>Target Charging Voltage ($V_{bat}$):<\/strong> 12.6V (for 3S LiPo)<\/p>\n\n\n\n<p>The regulation voltage is determined by the feedback resistor network ($R6$ and $R7$) using the following formula:<\/p>\n\n\n\n<p>$$V_{bat} = 1.205 \\times \\left(1 + \\frac{R7}{R6}\\right)$$<\/p>\n\n\n\n<p>Calculation of R7:<\/p>\n\n\n\n<p>We arbitrarily set $R6 = 10 k\\Omega$.<\/p>\n\n\n\n<p>$$12.6 = 1.205 \\times \\left(1 + \\frac{R7}{10000}\\right)$$<\/p>\n\n\n\n<p>Solving for the ratio:<\/p>\n\n\n\n<p>$$\\frac{R7}{10000} = \\frac{12.6}{1.205} &#8211; 1 \\approx 9.456$$<\/p>\n\n\n\n<p>$$R7 \\approx 94.56 k\\Omega$$<\/p>\n\n\n\n<p>Component Selection:<\/p>\n\n\n\n<p>Since $94.56 k\\Omega$ is not a standard resistor value, we will select a $91 k\\Omega$ resistor in series with a $10 k\\Omega$ potentiometer. This allows for precise fine-tuning of the output voltage to exactly 12.6V.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>3. Current Regulation ($R_{CS}$)<\/strong><\/h6>\n\n\n\n<p>The charging current is defined by the current sense resistor ($R_{CS}$) according to the formula:<\/p>\n\n\n\n<p>$$I_{charge} = \\frac{120mV}{R_{CS}}$$<\/p>\n\n\n\n<p><strong>Scenarios:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For a 1A charging current:<br>$R_{CS} = 0.12 \/ 1 = \\mathbf{0.12 \\Omega}$<\/li>\n\n\n\n<li>For a 2A charging current:<br>$R_{CS} = 0.12 \/ 2 = \\mathbf{0.06 \\Omega}$<\/li>\n<\/ul>\n\n\n\n<p><em>Note: This resistor must have a power rating of at least <\/em><strong><em>1W<\/em><\/strong><em> to handle the heat dissipation.<\/em><\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>4. Input Voltage Monitoring (MPPT\/UVLO)<\/strong><\/h6>\n\n\n\n<p>To ensure the charger only operates when the input voltage is sufficient (e.g., using a 15V-19V adapter), we set the undervoltage lockout using $R3$ and $R8$.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>R3:<\/strong> $10 k\\Omega$<\/li>\n\n\n\n<li><strong>R8:<\/strong> $100 k\\Omega$<\/li>\n<\/ul>\n\n\n\n<p>Verification:<\/p>\n\n\n\n<p>$$V_{off} = 1.205 \\times \\left(1 + \\frac{R8}{R3}\\right)$$<\/p>\n\n\n\n<p>$$V_{off} = 1.205 \\times \\left(1 + \\frac{100}{10}\\right) = 1.205 \\times 11 = \\mathbf{13.25V}$$<\/p>\n\n\n\n<p><strong>Conclusion:<\/strong> The charger will function correctly as long as the input source provides a voltage higher than <strong>13.25V<\/strong>.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>5. Capacitor Selection (BOM)<\/strong><\/h6>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>C1 (Input):<\/strong> $40 \\mu F$ (Standard: $47 \\mu F$ recommended)<\/li>\n\n\n\n<li><strong>C6 (Output):<\/strong> $20 \\mu F$ (Standard: $22 \\mu F$ recommended)<\/li>\n\n\n\n<li><strong>C7 (Compensation):<\/strong> $100 pF$<\/li>\n<\/ul>\n\n\n\n<p><strong>Th\u00e9o :<\/strong><\/p>\n\n\n\n<p>This week, I succeeded in upgrading the algorithm. It can now recalculate its path when there is something in its way. After each move, I check which neighbouring cells are available so I can update the matrix accordingly. Then, I update the car\u2019s position and recalculate the path to the destination.<br>While testing, I discovered that the front sensor wasn\u2019t working, but at the same time it proved that my code was working. At first, I wanted to test a basic path where the car only had to go straight forward with no obstacles, but since the front sensor detected an imaginary obstacle, it recalculated the path and that part was working correctly.<br>Here is my updated code and what it print while moving :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-154-705x1024.png\" alt=\"\" class=\"wp-image-13171\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-154-705x1024.png 705w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-154-206x300.png 206w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-154.png 753w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-155-618x1024.png\" alt=\"\" class=\"wp-image-13172\" style=\"width:650px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-155-618x1024.png 618w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-155-181x300.png 181w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-155.png 753w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-156-616x1024.png\" alt=\"\" class=\"wp-image-13173\" style=\"width:650px;height:auto\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-156-616x1024.png 616w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-156-180x300.png 180w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-156.png 751w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"745\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-157.png\" alt=\"\" class=\"wp-image-13174\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-157.png 750w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-157-300x298.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-157-150x150.png 150w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"202\" height=\"978\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-158.png\" alt=\"\" class=\"wp-image-13175\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-158.png 202w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-158-62x300.png 62w\" sizes=\"auto, (max-width: 202px) 100vw, 202px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"901\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-159.png\" alt=\"\" class=\"wp-image-13176\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-159.png 235w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2025\/11\/image-159-78x300.png 78w\" sizes=\"auto, (max-width: 235px) 100vw, 235px\" \/><\/figure>\n\n\n\n<p><strong>Anette:<\/strong><\/p>\n\n\n\n<p>This week I am still working on the PCB. It has been going a bit slow due to an upcoming exam and some major issues with orcad that lead to me switching to kicad. I have since been redoing the schematic in kicad and made a list over what i need to add to the board. I have also been working on how the layout should end up. Hopefully I will have time to finish early enough to order and test before the exam date.<\/p>\n\n\n\n<p><strong>Matias<\/strong>:<\/p>\n\n\n\n<p>This week I didn\u2019t make a lot of progress on the build itself because I was mainly focused on studying for the <strong>Electronic Design exam<\/strong>. Still, I managed to keep the project moving a bit. I met with Steven to make sure we have all the components we\u2019ll need for the upcoming protoboard setup, so we\u2019re ready to continue as soon as possible.<\/p>\n\n\n\n<p>I also learned how to use the <strong>Analog Discovery<\/strong>, a portable oscilloscope. This will be really helpful, because now I can work with Sondre to check the <strong>PWM signals with the active filtering<\/strong> and see which filtering setup gives us the best results. Being able to visualize the waveforms directly will make it much easier to choose the right configuration.<\/p>\n\n\n\n<p>Even though it was a lighter week due to the exam, I still picked up useful tools and prepared the next steps for the project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sondre: This week I focused on improving the navigation and stability of our mecanum robot. One of the main problems earlier was that the robot often confused a wall with a box, since the ultrasonic sensors saw both situations almost the same way. To fix this, I added a simple verification step where the robot [&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-13167","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\/13167","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=13167"}],"version-history":[{"count":2,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/13167\/revisions"}],"predecessor-version":[{"id":13177,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/13167\/revisions\/13177"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}