My static website generator using poole https://www.xythobuz.de
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

xycontrol.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>xyControl (#) xythobuz.de</title>
  6. <meta name="description" content="AVR base Quadrocopter Flight Controller" />
  7. <meta name="keywords" content="xythobuz" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <link rel="author" href="/xythobuz@xythobuz.de">
  10. <link rel="shortcut icon" href="/img/favicon.ico">
  11. <link rel="alternate" type="application/rss+xml" title="Blog" href="/rss.xml">
  12. <link type="text/css" rel="stylesheet" href="/css/sh_bright.min.css" />
  13. <link rel="stylesheet" href="/css/bootstrap.css" type="text/css" media="screen" />
  14. <link rel="stylesheet" href="/css/gh-fork-ribbon.css" />
  15. <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
  16. <script type="text/javascript" src="/js/sh_main.js"></script>
  17. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
  18. <script type="text/javascript" src="/js/bootstrap.js"></script>
  19. <script type='text/javascript'>
  20. /* <![CDATA[ */
  21. (function() {
  22. var s = document.createElement('script');
  23. var t = document.getElementsByTagName('script')[0];
  24. s.type = 'text/javascript';
  25. s.async = true;
  26. s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';
  27. t.parentNode.insertBefore(s, t);
  28. })();
  29. /* ]]> */
  30. </script>
  31. </head>
  32. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  33. <div class="github-fork-ribbon-wrapper right">
  34. <div class="github-fork-ribbon"><a href="
  35. https://github.com/xythobuz/xyControl
  36. ">Fork me on GitHub</a></div></div>
  37. <div class="navbar">
  38. <div class="navbar-inner">
  39. <a class="brand" href="http://xythobuz.de/lastmusic">♫</a>
  40. <ul class="nav">
  41. <li><a href="/index.html">Home</a></li>
  42. <li><a href="/blog.html">Blog</a></li>
  43. <li><a href="/contact.html">Contact</a></li>
  44. <li class="dropdown"><a href="/software.html" class="dropdown-toggle" data-toggle="dropdown">Software<b class="caret"></b></a><ul class="dropdown-menu">
  45. <li><a href="/avrnetstack.html">avrNetStack</a></li>
  46. <li><a href="/avrserial.html">AVR Serial Library</a></li>
  47. <li><a href="/c250.html">Mio C250 Unlock</a></li>
  48. <li><a href="/nas.html">IB-NAS6210 Linux</a></li>
  49. <li><a href="/serialhelper.html">Serial Helper</a></li>
  50. <li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
  51. <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
  52. </ul>
  53. <li class="dropdown"><a href="/hardware.html" class="dropdown-toggle" data-toggle="dropdown">Hardware<b class="caret"></b></a><ul class="dropdown-menu">
  54. <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
  55. <li><a href="/xycontrol.html">xyControl</a></li>
  56. <li class="dropdown-submenu"><a href="/xyrobot.html" class="dropdown-toggle" data-toggle="dropdown">xyRobot</a><ul class="dropdown-menu">
  57. <li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
  58. <li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
  59. <li><a href="/rremote.html">rRemote</a></li>
  60. <li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
  61. </ul>
  62. <li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
  63. <li><a href="/serialdebug.html">Serial Debug</a></li>
  64. <li><a href="/ledmatrix.html">LED Matrix</a></li>
  65. </ul>
  66. </ul>
  67. </div>
  68. </div>
  69. <div id="header">
  70. <h1>xythobuz.de</h1>
  71. <p><a href="http://xythobuz.de/lastmusic">♫</a></p>
  72. <h2>xyControl</h2>
  73. </div>
  74. <div id="content">
  75. <p><img alt="Logo" src="http://www.xythobuz.de/xycontrol/logo.png" /></p>
  76. <h3>Current Progress</h3>
  77. <iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/b5MhLgDhQ2c" frameborder="0" allowfullscreen></iframe>
  78. <p><a href="http://www.youtube.com/watch?v=b5MhLgDhQ2c"><code>Youtube Link</code></a></p>
  79. <p><a href="http://www.xythobuz.de/xycontrol/">xyControl</a> is a Quadrocopter Flight Controller based on Atmels Atmega2560 microcontroller.
  80. It features 512KB SRAM on-board, using the external memory interface of this processor.
  81. Also included is a switched power supply as well as a USB connection to communicate with and program the target.
  82. All I/O pins, including 3 additional UARTs, SPI, I2C (TWI) and 16 ADC Channels, are accessible via standard 2.54mm connectors.
  83. The Board can be powered from an external stable 5V supply, USB or 7V or more, via the on-board switched power supply. All voltage sources can be selected via jumpers.</p>
  84. <p><a href="/img/xycontrol1.jpg"><img alt="Photo 1" src="/img/xycontrol1_small.jpg" /></a>
  85. <a href="/img/xycontrol2.jpg"><img alt="Photo 2" src="/img/xycontrol2_small.jpg" /></a>
  86. <a href="/img/xyCopterOsci.png"><img alt="Screenshot" src="/img/xyCopterOsci_small.png" /></a></p>
  87. <h2>Flight Control Software Flow</h2>
  88. <p>Three tasks are controlling the Quadrocopter Orientation in Space.</p>
  89. <ul>
  90. <li>The <a href="https://github.com/xythobuz/xyControl/blob/master/include/orientation.h">Orientation Task</a> reads the Gyroscope and Accelerometer and calculates the current Roll and Pitch angles. They are stored in the global struct "orientation".</li>
  91. <li>The <a href="https://github.com/xythobuz/xyControl/blob/master/include/pid.h">PID Task</a> is then feeding these angles into two PID controllers. Their output is then used by...</li>
  92. <li>The <a href="https://github.com/xythobuz/xyControl/blob/master/include/set.h">Set Task</a>, which calculates the motor speeds and gives them to...</li>
  93. <li>The <a href="https://github.com/xythobuz/xyControl/blob/master/include/motor.h">motor task</a>, which sends the new values via TWI to the motor controllers.</li>
  94. </ul>
  95. <h1>Supported Hardware</h1>
  96. <ul>
  97. <li>Gyroscope L3GD20, code based on the <a href="https://github.com/adafruit/Adafruit_L3GD20">Adafruit Example</a>.</li>
  98. <li>Accelerometer and Magnetometer LSM303DLHC, code based on the <a href="https://github.com/pololu/LSM303">Pololu Example</a>.</li>
  99. <li>I got both of these Sensors on the <a href="http://www.pololu.com/catalog/product/1268">MinIMU-9 v2</a>.</li>
  100. <li>Brushless Motor Driver <a href="http://www.mikrokopter.de/ucwiki/en/BL-Ctrl_V1.2">BL-Ctrl V1.2</a> with eg. the <a href="http://www.conrad.de/ce/de/product/231867">Robbe Roxxy Outrunner 2824-34</a> Brushless Motor.</li>
  101. <li>BTM-222 Bluetooth UART Bridge (<a href="http://xythobuz.de/bluetooth.html">PCB</a>)</li>
  102. </ul>
  103. <h2>External Memory (<a href="https://github.com/xythobuz/xyControl/blob/master/include/xmem.h">xmem.h</a>)</h2>
  104. <p>The external memory consists of a 512Kx8 SRAM, bank-switched onto the 16bit avr address space.
  105. This gives us 8 memory banks, consisting of 56KB. All memory from 0x0000 to 0x21FF is the AVRs internal memory. The memory banks are switched into 0x2200 to 0xFFFF.
  106. This gives us 8 banks with 56KB each, resulting in 448KB external RAM.</p>
  107. <p>The data and bss memory sections, as well as the Stack are located in the internal RAM. The external RAM is used only for dynamically allocated memory.</p>
  108. <h2>Orientation Calculation (<a href="https://github.com/xythobuz/xyControl/blob/master/include/orientation.h">orientation.h</a>)</h2>
  109. <p>Calculates the current angles of the platform, using Gyroscope and Accelerometer Data with a Kalman Filter. It is using this slightly modified <a href="http://www.linushelgesson.se/2012/04/pitch-and-roll-estimating-kalman-filter-for-stabilizing-quadrocopters/">Kalman Filter Implementation</a> by Linus Helgesson.</p>
  110. <h1>PC and Android Tools</h1>
  111. <p>You can find some PC Software in the <a href="https://github.com/xythobuz/xyControl/tree/master/tools">tools</a> directory. Each one should be accompanied by it's own Readme file.</p>
  112. <h2>UART-Flight Status Packet Format</h2>
  113. <pre><code>printf("t%.2f %.2f %.2f\n", kp, ki, kd);
  114. printf("u%.2f %.2f\n", pid_output[1], pid_output[0]); // Pitch, Roll
  115. printf("v%i %i %i %i\n", motorSpeed[0], ..., motorSpeed[3]);
  116. printf("w%.2f\n", orientation.pitch);
  117. printf("x%.2f\n", orientation.roll);
  118. printf("y%.2f\n", orientation.yaw);
  119. printf("z%.2f\n", getVoltage());
  120. </code></pre>
  121. <h1>Software used</h1>
  122. <ul>
  123. <li><a href="http://homepage.hispeed.ch/peterfleury/avr-software.html">Peter Fleurys TWI Library</a></li>
  124. </ul>
  125. <h1>License</h1>
  126. <p>Peter Fleurys TWI Library (twi.c &amp; twi.h) is released under the <a href="http://www.gnu.org/licenses/gpl.html">GNU GPL license</a>.</p>
  127. <p>Everything else is released under a BSD-Style license. See the <a href="https://github.com/xythobuz/xyControl/blob/master/COPYING">accompanying COPYING file</a>.</p>
  128. <span id="flattr">
  129. <a class="FlattrButton" href="http://www.xythobuz.de/xycontrol.html" title="xyControl">AVR base Quadrocopter Flight Controller</a>
  130. </span>
  131. <span id="twitter">
  132. <a href="https://twitter.com/share" class="twitter-share-buttdata-via="xythobuz" data-dnt="true" data-related="xythobuz" data-count="vertical">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twi.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitwjs");</script>
  133. </span>
  134. <span id="reddit">
  135. <script type="text/javascript">reddit_url = "http://www.xythobuz.de/xycontrol.html";</script>
  136. <script type="text/javascript" src="http://www.redcom/static/button/button2.js"></script>
  137. </span>
  138. <span id="github">
  139. <a href="https://github.com/xythobuz/xyControl" class="gitforked-button gitforked-forks gitforked-watchers"></a>
  140. </span>
  141. <div id="print"><script>var pfHeaderImgUrl = '';var pfHeaderTagline = '';var pfdisableClickToDel = 0;var pfHideImages = 0;var pfImageDisplayStyle = 'right';var pfDisablePDF = 0;var pfDisableEmail = 0;var pfDisablePrint = 0;var pfCustomCSS = '';var pfBtVersion='1';(function(){var js, pf;pf = document.createElement('script');pf.type = 'text/javascript';if('https:' == document.location.protocol){js='https://pf-cdn.printfriendly.com/ssl/main.js'}else{js='http://cdn.printfriendly.com/printfriendly.js'}pf.src=js;document.getElementsByTagName('head')[0].appendChild(pf)})();</script><a href="http://www.printfriendly.com" style="color:#6D9F00;text-decoration:none;" class="printfriendly" onclick="window.print();return false;" title="Printer Friendly and PDF"><img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-print-icon.gif" width="16" height="15" alt="Print Friendly Version of this page" />Print <img style="border:none;margin:0 6px" src="https://pf-cdn.printfriendly.com/images/icons/pf-pdf-icon.gif" width="12" height="12" alt="Get a PDF version of this webpage" />PDF</a></div>
  142. <div id="disqus_thread"></div>
  143. <script type="text/javascript">
  144. var disqus_shortname = "xythobuz";
  145. (function() {
  146. var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
  147. dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
  148. (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] ).appendChild(dsq);
  149. })();
  150. </script>
  151. <noscript>Please enable JavaScript to view the <a href="http://disqus. com/?ref_noscript">comments powered by Disqus.</a></noscript>
  152. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  153. </div>
  154. <div style="color: gray; text-align: center;">
  155. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  156. &middot;
  157. Made with <a href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a>
  158. &middot;
  159. Using <a href="http://shjs.sourceforge.net">SHJS</a>
  160. &middot;
  161. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  162. </div>
  163. <img src="/stats/count.php?img" alt="Analytics">
  164. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  165. <script type="text/javascript">
  166. var _gaq = _gaq || [];
  167. _gaq.push(['_setAccount', 'UA-39163591-1']);
  168. _gaq.push(['_setDomainName', 'xythobuz.org']);
  169. _gaq.push(['_setAllowLinker', true]);
  170. _gaq.push(['_trackPageview']);
  171. (function() {
  172. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  173. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  174. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  175. })();
  176. </script>
  177. </body>
  178. </html>