{"id":6050,"date":"2013-01-19T12:56:42","date_gmt":"2013-01-19T10:56:42","guid":{"rendered":"http:\/\/lukse.lt\/uzrasai\/?p=6050"},"modified":"2013-02-02T09:38:11","modified_gmt":"2013-02-02T07:38:11","slug":"carambola-powered-robot-v2","status":"publish","type":"post","link":"https:\/\/lukse.lt\/uzrasai\/2013-01-carambola-powered-robot-v2\/","title":{"rendered":"Carambola powered robot v2"},"content":{"rendered":"<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-6254\" title=\"\" alt=\"IMG_3900_t\" src=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_t1.jpg\" width=\"200\" height=\"110\" \/>If you were interested in <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.8devices.com\/wiki_carambola\/doku.php\/carambola_robot1');\"  href=\"http:\/\/www.8devices.com\/wiki_carambola\/doku.php\/carambola_robot1\">first Carambola based rover<\/a>, you will love this one. First one was just how to connect and setup everything. This one is actualy usable and fun to use. Purpose of this rover is to replace crappy toy cars and to have more fun. Not fogetting ability to learn and build something new! It even has an Android application.<\/p>\n<p style=\"text-align: center;\"><!--more--><\/p>\n<h2><\/h2>\n<h2><\/h2>\n<h2>Goals set for this rover<\/h2>\n<ul>\n<li>Rugged<\/li>\n<li>Easy to control<\/li>\n<li>Controllable from Android phone or tablet<\/li>\n<li>Video streaming<\/li>\n<\/ul>\n<h2>Lets start from fun part<\/h2>\n<p>Video and couple of pictures.<\/p>\n<p><iframe loading=\"lazy\" src=\"http:\/\/www.youtube.com\/embed\/ZzeQVhiWK-o\" height=\"360\" width=\"640\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p><a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_r2.jpg');\"  href=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_r2.jpg\" rel=\"lightbox[6050]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6226  alignnone\" alt=\"IMG_3900_r\" src=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_r2.jpg\" width=\"640\" height=\"353\" srcset=\"https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_r2.jpg 800w, https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3900_r2-400x220.jpg 400w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p><a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3892_r.jpg');\" title=\"\"  href=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3892_r.jpg\" target=\"\" rel=\"\" rel=\"lightbox[6050]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6225 alignnone\" title=\"\" alt=\"IMG_3892_r\" src=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3892_r.jpg\" width=\"640\" height=\"447\" srcset=\"https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3892_r.jpg 800w, https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/IMG_3892_r-400x279.jpg 400w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h2>Used parts<\/h2>\n<ul>\n<li>Motors: from ebay (Torque: 130 N*cm, 12V DC, 60RPM, Diameter: 25mm, Length: 72mm, Shaft diameter: 4mm, Weight: 96g)<\/li>\n<li>Camera: <span class=\"description\">720p Webcam Microsoft LifeCam Cinema<\/span><\/li>\n<li>Motor controller: <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.pololu.com\/catalog\/product\/1112');\"  href=\"http:\/\/www.pololu.com\/catalog\/product\/1112\">Pololu Qik 2s12v10 Dual Serial Motor Controller<\/a><\/li>\n<li>Battery: 3SP1 3Ah LiPo<\/li>\n<li>Wheels: <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.pololu.com\/catalog\/product\/1557');\"  href=\"http:\/\/www.pololu.com\/catalog\/product\/1557\">Dagu Wild Thumper Wheel 120x60mm Pair with 4mm Shaft Adapters<\/a><\/li>\n<li>Chasis: I have chosen to use custom chasis, because it is easier to accomodate all parts the way I like.<\/li>\n<\/ul>\n<h2>Mechanics<\/h2>\n<p>3D (STEP) file of this rover can be found <a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/failai\/2013-01-19-cara-rover-2\/rover_2.zip');\"  href=\"http:\/\/lukse.lt\/failai\/2013-01-19-cara-rover-2\/rover_2.zip\">here<\/a>.<\/p>\n<p><a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/uzrasai\/wp-content\/uploads\/2013\/01\/rover_2_.png');\" title=\"\"  href=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/rover_2_.png\" target=\"\" rel=\"\" rel=\"lightbox[6050]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6250 alignnone\" title=\"\" alt=\"rover_2_\" src=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/rover_2_.png\" width=\"640\" height=\"530\" \/><\/a><\/p>\n<h2>Electronics<\/h2>\n<p>Here is quick sketch how everything is connected.<\/p>\n<p><a onclick=\"javascript:pageTracker._trackPageview('\/downloads\/uzrasai\/wp-content\/uploads\/2013\/01\/cara-rover-connections2.png');\" title=\"\"  href=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/cara-rover-connections2.png\" target=\"\" rel=\"\" rel=\"lightbox[6050]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6259 alignnone\" title=\"\" alt=\"cara-rover-connections\" src=\"http:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/cara-rover-connections2.png\" width=\"389\" height=\"600\" srcset=\"https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/cara-rover-connections2.png 648w, https:\/\/lukse.lt\/uzrasai\/wp-content\/uploads\/2013\/01\/cara-rover-connections2-259x400.png 259w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/a><\/p>\n<h2>Carambola setup<\/h2>\n<h3 class=\"sectionedit1\" id=\"prepare_firware\">Prepare firware<\/h3>\n<blockquote><p>Kernel modules<br \/>\nVideo Support<br \/>\nSelect all if unsure<\/p><\/blockquote>\n<h3 class=\"sectionedit2\" id=\"flash_firmware\">flash firmware<\/h3>\n<blockquote><p>scp test@192.168.0.109:\/home\/test\/carambola\/bin\/ramips\/openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin \/tmp<br \/>\nsysupgrade -v -n \/tmp\/openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin<\/p><\/blockquote>\n<h3 class=\"sectionedit3\" id=\"prepare_wireless_in_sta_mode\">Setup wireless in AP mode<\/h3>\n<blockquote><p>rm \/etc\/config\/wireless<br \/>\nwifi detect &gt; \/etc\/config\/wireless<br \/>\nvi \/etc\/config\/wireless<\/p><\/blockquote>\n<h4><strong>vi \/etc\/config\/wireless<\/strong><\/h4>\n<blockquote><p>config wifi-device\u00a0 radio0<br \/>\n&lt;..&gt;<br \/>\n# option disabled 1<br \/>\noption txpower 20<\/p>\n<p>config wifi-iface<br \/>\noption device\u00a0\u00a0 radio0<br \/>\noption network\u00a0 wwan<br \/>\noption mode\u00a0\u00a0\u00a0\u00a0 ap<br \/>\noption ssid\u00a0\u00a0\u00a0\u00a0 &#8216;rover&#8217;<br \/>\noption encryption psk2<br \/>\noption key\u00a0\u00a0\u00a0\u00a0\u00a0 &#8216;rover&#8217;<\/p><\/blockquote>\n<h4><strong>vi \/etc\/config\/network<\/strong><\/h4>\n<blockquote><p>&lt;&#8230;&gt;<br \/>\nconfig interface &#8216;lan&#8217;<br \/>\noption ifname &#8216;eth0.1&#8217;<br \/>\noption type &#8216;bridge&#8217;<br \/>\noption proto &#8216;static&#8217;<br \/>\noption ipaddr &#8216;192.168.0.110&#8217;<br \/>\noption netmask &#8216;255.255.255.0&#8217;<br \/>\nconfig interface &#8216;wwan&#8217;<br \/>\noption proto\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dhcp<\/p><\/blockquote>\n<h3>Connect to carambola<\/h3>\n<h4>Enable connection from ssh<\/h4>\n<blockquote><p>passwd root<\/p><\/blockquote>\n<h4>Install necessary packages<\/h4>\n<blockquote><p>opkg update<br \/>\nopkg install mjpg-streamer<br \/>\nopkg install io<br \/>\nopkg install ser2net<br \/>\nopkg install http:\/\/pkg.8devices.com\/v2.2\/carambola\/packages\/gpioctl_1.0-1_ramips.ipk<\/p><\/blockquote>\n<h3 class=\"sectionedit6\" id=\"setup\">Setup<\/h3>\n<h4><strong>vi \/etc\/ser2net.conf<\/strong><\/h4>\n<blockquote><p>&lt;..&gt;<br \/>\n2002:raw:600:\/dev\/ttyS0:115200<\/p><\/blockquote>\n<h4><strong>vi \/etc\/rc.local<\/strong><\/h4>\n<blockquote><p>io 0x10000060 0x15<br \/>\nser2net<br \/>\nexit 0<\/p><\/blockquote>\n<h4><strong>vi \/etc\/inittab<\/strong><\/h4>\n<blockquote><p>root@OpenWrt:\/# cat \/etc\/inittab<br \/>\n::sysinit:\/etc\/init.d\/rcS S boot<br \/>\n::shutdown:\/etc\/init.d\/rcS K shutdown<br \/>\n#ttyS0::askfirst:\/bin\/ash &#8211;login\u00a0 #&lt;&#8212;&#8212;&#8212;&#8212;- comment this line to disable console on ttyS0<br \/>\nttyS1::askfirst:\/bin\/ash &#8211;login<\/p><\/blockquote>\n<h3 class=\"sectionedit8\" id=\"setup_mjpg-streamer\">Setup mjpg-streamer<\/h3>\n<h4><strong>vi \/etc\/config\/mjpg-streamer<\/strong><\/h4>\n<blockquote><p>config mjpg-streamer core<br \/>\noption device\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;\/dev\/video0&#8221;<br \/>\noption resolution\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;400&#215;200&#8221;<br \/>\noption fps\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;25&#8221;<br \/>\noption port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;8080&#8221;<br \/>\noption enabled\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;true&#8221;<\/p><\/blockquote>\n<h3 class=\"sectionedit9\" id=\"streaming_test\">Video streaming test<\/h3>\n<p>Run from computer (browser or vlc) &#8211; you should see video or picture, depending on URL you picked.<\/p>\n<blockquote><p>http:\/\/192.168.0.110:8080\/?action=stream<br \/>\nhttp:\/\/192.168.0.110:8080\/?action=snapshot<\/p><\/blockquote>\n<h3>Control mjpg<\/h3>\n<h4>Start on boot<\/h4>\n<blockquote><p>\/etc\/init.d\/mjpg-streamer enable<\/p><\/blockquote>\n<h4>Start mjpg-streamer right now<\/h4>\n<blockquote><p>\/etc\/init.d\/mjpg-streamer start<\/p><\/blockquote>\n<h2>Motor controller setup<\/h2>\n<p>I am not really sure what settings I am using (setup was trial and error method). In general you should:<\/p>\n<ul>\n<li>Enable security timeout for serial comunications (if there are no data more than 0.2s motors will stop)<\/li>\n<li>Set baud 115200 baud rate with jumpers<\/li>\n<li>Set acceleration \/ deceleration and other parameters as you like (chose best settings for your platform)<\/li>\n<li>More details can be fond <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/www.pololu.com\/docs\/pdf\/0J29\/qik_2s12v10.pdf');\"  href=\"http:\/\/www.pololu.com\/docs\/pdf\/0J29\/qik_2s12v10.pdf\">here<\/a><\/li>\n<\/ul>\n<h2>Android<\/h2>\n<p>There are lots of things I stil don&#8217;t know about Android. I have been toying with it for a week. This is also my first encounter with coding java. There are key notes about this software.<\/p>\n<ol>\n<li>Application has no UI customization properties. It just hopes that rover will respond on 192.168.0.110 ip address.<\/li>\n<li>Program is configured for fixed LCD resolution (1024&#215;768)<\/li>\n<li>It displays video stream of 200px wide (for better video perfomance)<\/li>\n<li>To drive forward touch upper LCD part (the higher, the faster). To drive backwards do the opposite.<\/li>\n<li>To turn, lean tablet or phone left or right.<\/li>\n<li>Manoeuvrability becomes less responsive the faster you go.<\/li>\n<li>Exit must be performed hard way &#8211; by killing it from task manager.<\/li>\n<\/ol>\n<p>Android application (and sources) can be found on <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/github.com\/Lukse\/cara-rover-2');\"  href=\"https:\/\/github.com\/Lukse\/cara-rover-2\">githuib<\/a>. (it is derived from some mjpeg streaming software, so beware &#8211; name is still the same). Also I should credit authors, but unfortunately I don&#8217;t remember where I got this example.<\/p>\n<h2>Some ideas for future<\/h2>\n<ul>\n<li>Bigger\/faster motors (which ones)<\/li>\n<li>Wider front camera lens (to be able to see wheels)<\/li>\n<li>Custom panoramic lens for second camera<\/li>\n<li>Custom controller\n<ul>\n<li>Integrated charger<\/li>\n<li>New protocol with discovery<\/li>\n<li>Accerometer<\/li>\n<li>Compass<\/li>\n<li>Current\/voltage monitoring<\/li>\n<li>Head lamps with control<\/li>\n<li>Arduino for custom functions?<\/li>\n<\/ul>\n<\/li>\n<li>Switch (debug port) selectable wifi AP\/STA mode<\/li>\n<li>Camera up\/down control<\/li>\n<li>Gripper?<\/li>\n<li>Autonomic navigation?<\/li>\n<li>Kinect terain mapping<\/li>\n<li>Video keeps refocusing. In low light it is confusing. There is utility called <strong>uvcdynctrl<\/strong> to control camera parameters. At this moment it is unclear how shoult I port it to Carambola, but it should do the trick.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you were interested in first Carambola based rover, you will love this one. First one was just how to connect and setup everything. This one is actualy usable and fun to use. Purpose of this rover is to replace crappy toy cars and to have more fun. Not fogetting ability to learn and build [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[12,38,21,14],"tags":[24,30,23,31,33,29,27,34,35,26,25,32,37,28,36],"class_list":["post-6050","post","type-post","status-publish","format-standard","hentry","category-3d","category-in-english","category-projektai","category-rc","tag-8devices","tag-android","tag-carambola","tag-git","tag-java","tag-live-stream","tag-motors","tag-pololu","tag-ralink","tag-robot","tag-rover","tag-sources","tag-tablet","tag-video-2","tag-wifi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2rU5c-1zA","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/posts\/6050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/comments?post=6050"}],"version-history":[{"count":78,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/posts\/6050\/revisions"}],"predecessor-version":[{"id":7314,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/posts\/6050\/revisions\/7314"}],"wp:attachment":[{"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/media?parent=6050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/categories?post=6050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lukse.lt\/uzrasai\/wp-json\/wp\/v2\/tags?post=6050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}