{"id":1944,"date":"2012-04-21T02:52:13","date_gmt":"2012-04-21T06:52:13","guid":{"rendered":"http:\/\/www.etotheipiplusone.net\/?p=1944"},"modified":"2012-04-21T02:53:49","modified_gmt":"2012-04-21T06:53:49","slug":"chibi-everything-part-ii-copter","status":"publish","type":"post","link":"https:\/\/www.etotheipiplusone.net\/?p=1944","title":{"rendered":"Chibi-Everything, Part II: Copter"},"content":{"rendered":"<p>Poor Chibicopter.<\/p>\n<p>So I&#8217;m proud to announce that I&#8217;ve found a solution to the XBee over-the-air code uploading problem. The only catch is that&#8230;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc29.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc29-mid.jpg\" alt=\"\" width=\"512\" height=\"384\" \/><\/a><\/P><br \/>\n&#8230;it involves chopping an FTDI cable header onto the board.<\/p>\n<p>Yeah, not groundbreaking or world-changing. But, at least I&#8217;ve gotten over my software-induced project fear stage and now have a workable, if slightly convoluted, procedure for uploading code and debugging! The hookup for the FTDI is essentially that of the <a href=\"http:\/\/dlnmh9ip6v2uc.cloudfront.net\/datasheets\/Dev\/Arduino\/Boards\/Arduino-Pro-Mini-v12.pdf\" target=\"_blank\">Sparkfun Pro Mini<\/a>, but instead of DTR I have RTS from the standard FTDI cable going into my reset isolation capacitor thing.<\/p>\n<p>I really should have just done this like two weeks ago.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc30.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc30-mid.jpg\" alt=\"\" width=\"512\" height=\"384\" \/><\/a><\/p>\n<p>Anyways, here&#8217;s a picture of me <em>triple wielding<\/em> XBees in order to get this thing to work. The current signalling protocol is:<\/p>\n<ul>\n<li>The Xbee connected to my transmitter (in <a href=\"https:\/\/www.etotheipiplusone.net\/?p=1820\" target=\"_blank\">bypass mode<\/a>) is address 2, the XBee on Chibicopter is address 1, and my debugging\/base station is address 0<\/li>\n<li>XBee 2 only transmits to Xbee 1 (ATDL = 1 ATMY = 2)<\/li>\n<li>Xbee 1 only transmits to Xbee 0 (ATDL = 0 ATMY = 1)<\/li>\n<li>Xbee 0 transmits to the nonexistent XBee #3 (ATDL = 3 ATMY = 0) in order for its serial transmissions to not appear on the others<\/li>\n<li>Therefore, my radio transmits commands to Chibicopter, which in turn transmits debugging data to the base station where it appears on my screen.<\/li>\n<\/ul>\n<p>To reprogram Chibicopter, I remove the Xbee from Chibicopter, disengage the base station XBee adapter and jam the FTDI cable onto Chibicopter. I have to take the XBee onboard out first because there is no selection\/domination circuitry which allows both XBee and FTDI cable to use the serial lines at the same time.<\/p>\n<p>It&#8217;s quite an overloaded process, but it has at least gotten me to the point of&#8230;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc28.jpg\"><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/etotheipiplusone.net\/pics\/edf\/pc28.jpg\" alt=\"\" width=\"512\" \/><\/a><\/p>\n<p>&#8230;being able to finally read the pulsewidths from my radio. All four of the ones I care about. The Serial buffer reading code needed a bit of tweaking &#8211; I had to flush the serial receive buffer after every read or else it would desynchronize because more packets appear as the procedure was executing.<\/p>\n<p>Sadly enough, there is no more Serial.flush() in Arduino 1.0, the functionality having been removed. I wondered why briefly before just writing a dumb serial buffer clearing loop.<\/p>\n<p>Anyways, the good news is that I transferred enough core functionality over from <a href=\"https:\/\/www.etotheipiplusone.net\/?cat=87\" target=\"_blank\">tinycopter<\/a> such that Chibicopter&#8217;s props respond properly to suddenly orientation changes! That means it&#8217;s just some tuning of gains away from actually flying.<\/p>\n<p>The bad news is that through some irony of fate, two of the tiny 1S-lithium motor controllers have ceased to function. Just in time, right? I&#8217;m uncertain as to why they failed. One possible reason is that since the board has absolutely no logic power supply at all (everything running off the 3.something volt battery) that 5 volts from the FTDI cable was enough to destroy the weaker ones.<\/p>\n<p>Now, I&#8217;m also wondering why it is that there is an option for 3.3v-compatible logic but with <em>5 volt <\/em>VCC (power supply). If the point is to use it with a 3.3v system safely, isn&#8217;t this undesirable?<\/p>\n<p>No matter &#8211; I have more spares on the way, but they&#8217;ll still take a few days to arrive. In the mean time, I might make a little pass-through board or something which down-regulates the 5v USB power to 3.3v.<\/p>\n<p>&#8230;<em>and then it will fly I swear guys<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Poor Chibicopter. So I&#8217;m proud to announce that I&#8217;ve found a solution to the XBee over-the-air code uploading problem. The only catch is that&#8230; &#8230;it involves chopping an FTDI cable header onto the board. Yeah, not groundbreaking or world-changing. But, at least I&#8217;ve gotten over my software-induced project fear stage and now have a workable, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,5],"tags":[],"class_list":["post-1944","post","type-post","status-publish","format-standard","hentry","category-chibicopter","category-project-build-reports"],"_links":{"self":[{"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/posts\/1944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1944"}],"version-history":[{"count":2,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/posts\/1944\/revisions"}],"predecessor-version":[{"id":1946,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=\/wp\/v2\/posts\/1944\/revisions\/1946"}],"wp:attachment":[{"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.etotheipiplusone.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}