{"id":1059,"date":"2015-08-07T19:22:15","date_gmt":"2015-08-07T18:22:15","guid":{"rendered":"http:\/\/steppschuh.net\/blog\/?p=1059"},"modified":"2016-01-07T17:15:54","modified_gmt":"2016-01-07T16:15:54","slug":"self-balancing-robot","status":"publish","type":"post","link":"http:\/\/steppschuh.net\/blog\/?p=1059","title":{"rendered":"Self-Balancing Robot"},"content":{"rendered":"<p>The following is a computer vision project for a class in <a href=\"http:\/\/hpi.de\/en\/research\/research-groups\/human-computer-interaction.html\" target=\"_blank\">Human Computer Interaction<\/a>. The task was to create an autonomous moving vehicle that finds the center of a projected light source, built exclusively from laser-cut parts and some given electronics.<\/p>\n<p>I decided to create a self balancing robot because it&#8217;s more agile than a device with more wheels and for the extra challenge that comes with it. It took a lot of iterations before I had a working prototype, especially because of gears and weight optimisations.<\/p>\n<h2>First Prototype<\/h2>\n<p>My initial design was basically a shelf on wheels. Because only laser-cut parts were allowed, the wheels are just multiple acrylic circles. The top level of the shelf held a battery and the light sensors, below that was an Arduino Nano. On the bottom layer was a breadboard with an H-bridge on it (for controlling the DCs).<\/p>\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"50%\" style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_1_1.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_1_1.jpg\" alt=\"Self Balancing Robot Prototype\" title=\"Self Balancing Robot Prototype\" \/><\/a>\n<\/td>\n<td style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_1_2.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_1_2.jpg\" alt=\"Self Balancing Robot Prototype\" title=\"Self Balancing Robot Prototype\" \/><\/a>\n<\/td>\n<\/tr>\n<\/table>\n<p>In all my prototypes the balancing magic is done using an <a href=\"https:\/\/store.arduino.cc\/product\/SEN136B5B\" target=\"_blank\">ultra sonic sensor<\/a>. It detects the distance to the ground and can calculate the tilt angle using that information. Surprisingly, this worked out quite well. Usually people use a gyroscope for balancing things, but I had this sonar lying around and wanted to play with it.<\/p>\n<h2>Last Prototype<\/h2>\n<p>Unfortunately the above robot had a few flaws. It wasn&#8217;t able to balance itself because the DC motors didn&#8217;t output enough power. Friction between the gears and not enough transmission resulted in barely spinning wheels at all (without any load).<\/p>\n<p><a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/sketches_2.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/sketches_2.jpg\" alt=\"Self Balancing Robot Sketches\" title=\"Self Balancing Robot Sketches\" \/><\/a><\/p>\n<p>I needed to come up with a new robot that has significantly less weight, smoother axis and improved transmission. I came up with the sketch above, it has some more gearing and gets rid of the layers (shelf look). I also removed the breadboards and used thinner acrylic to make it more lightweight.<\/p>\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"50%\" style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_2_1.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_2_1.jpg\" alt=\"Self Balancing Robot Prototype\" title=\"Self Balancing Robot Prototype\" \/><\/a>\n<\/td>\n<td style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_2_2.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/prototype_2_2.jpg\" alt=\"Self Balancing Robot Prototype\" title=\"Self Balancing Robot Prototype\" \/><\/a>\n<\/td>\n<\/tr>\n<\/table>\n<p>This robot didn&#8217;t only look fancy, it was also able to balance itself! Although it couldn&#8217;t tolerate a lot of distortion because of the weak motors, it was my final version (just in time for the contest).<\/p>\n<h2>Contest<\/h2>\n<p>We actually had a competition for all the projects that my fellow students created for this class, you can have a look at the different approaches in this short <a href=\"https:\/\/goo.gl\/photos\/FfjZ6PuNTHn8xSXt7\" target=\"_blank\">video<\/a>. Everyone had a ton of fun and as usual, there wasn&#8217;t any robot that didn&#8217;t had some weird issues. Anyway, my version won me an engraved mango for being the most exotic design, jay!<\/p>\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"50%\" style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/battle_1.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/battle_1.jpg\" alt=\"Self Balancing Robot Battle\" title=\"Self Balancing Robot Battle\" \/><\/a>\n<\/td>\n<td style=\"background-color:transparent;\">\n<a rel=\"lightbox\" href=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/battle_2.jpg\" target=\"_blank\"><img decoding=\"async\" width=\"100%\" src=\"http:\/\/steppschuh.net\/media\/images\/stuff\/robot\/battle_2.jpg\" alt=\"Self Balancing Robot Battle\" title=\"Self Balancing Robot Battle\" \/><\/a>\n<\/td>\n<\/tr>\n<\/table>\n<p>If you want to learn more, you can find some images, wiring details and code on the project site on hackster.io:<\/p>\n<p><a title=\"Project on hackster.io\" href=\"https:\/\/www.hackster.io\/Steppschuh\/self-balancing-robot-ca9326\" target=\"_blank\"><input class=\"button\" type=\"submit\" value=\"Project on hackster.io\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following is a computer vision project for a class in Human Computer Interaction. The task was to create an autonomous moving vehicle that finds the center of a projected light source, built exclusively from laser-cut parts and some given electronics. I decided to create a self balancing robot because it&#8217;s more agile than a &hellip; <a href=\"http:\/\/steppschuh.net\/blog\/?p=1059\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Self-Balancing Robot<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[122,123,121],"class_list":["post-1059","post","type-post","status-publish","format-standard","hentry","category-general","tag-hci","tag-laser","tag-robot"],"_links":{"self":[{"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1059"}],"version-history":[{"count":20,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1059\/revisions"}],"predecessor-version":[{"id":1079,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1059\/revisions\/1079"}],"wp:attachment":[{"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1059"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/steppschuh.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}