My static website generator using poole https://www.xythobuz.de
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

xycontrol.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. <link rel="author" href="/xythobuz@xythobuz.de">
  9. <link rel="shortcut icon" href="/img/favicon.ico">
  10. <script type="text/javascript" src="/js/sh_main.js"></script>
  11. <link type="text/css" rel="stylesheet" href="/css/sh_bright.min.css" />
  12. <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
  13. <link rel="alternate" type="application/rss+xml" title="Blog" href="/rss.xml">
  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'>
  17. /* <![CDATA[ */
  18. (function() {
  19. var s = document.createElement('script');
  20. var t = document.getElementsByTagName('script')[0];
  21. s.type = 'text/javascript';
  22. s.async = true;
  23. s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';
  24. t.parentNode.insertBefore(s, t);
  25. })();
  26. /* ]]> */
  27. </script>
  28. </head>
  29. <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
  30. <div class="github-fork-ribbon-wrapper right">
  31. <div class="github-fork-ribbon"><a href="
  32. https://github.com/xythobuz/xyControl
  33. ">Fork me on GitHub</a></div></div>
  34. <div id="header">
  35. <h1>xythobuz.de</h1>
  36. <p><a href="http://xythobuz.de/lastmusic">♫</a></p>
  37. <h2>xyControl</h2>
  38. </div>
  39. <div class="colmask leftmenu"><div class="colleft">
  40. <div class="content">
  41. <p><img alt="Logo" src="http://www.xythobuz.de/xycontrol/logo.png" /></p>
  42. <h3>Current Progress</h3>
  43. <iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/b5MhLgDhQ2c" frameborder="0" allowfullscreen></iframe>
  44. <p><a href="http://www.youtube.com/watch?v=b5MhLgDhQ2c"><code>Youtube Link</code></a></p>
  45. <p><a href="http://www.xythobuz.de/xycontrol/">xyControl</a> is a Quadrocopter Flight Controller based on Atmels Atmega2560 microcontroller.
  46. It features 512KB SRAM on-board, using the external memory interface of this processor.
  47. Also included is a switched power supply as well as a USB connection to communicate with and program the target.
  48. All I/O pins, including 3 additional UARTs, SPI, I2C (TWI) and 16 ADC Channels, are accessible via standard 2.54mm connectors.
  49. 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>
  50. <p><a href="/img/xycontrol1.jpg"><img alt="Photo 1" src="/img/xycontrol1_small.jpg" /></a>
  51. <a href="/img/xycontrol2.jpg"><img alt="Photo 2" src="/img/xycontrol2_small.jpg" /></a>
  52. <a href="/img/xyCopterOsci.png"><img alt="Screenshot" src="/img/xyCopterOsci_small.png" /></a></p>
  53. <h2>Flight Control Software Flow</h2>
  54. <p>Three tasks are controlling the Quadrocopter Orientation in Space.</p>
  55. <ul>
  56. <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>
  57. <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>
  58. <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>
  59. <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>
  60. </ul>
  61. <h1>Supported Hardware</h1>
  62. <ul>
  63. <li>Gyroscope L3GD20, code based on the <a href="https://github.com/adafruit/Adafruit_L3GD20">Adafruit Example</a>.</li>
  64. <li>Accelerometer and Magnetometer LSM303DLHC, code based on the <a href="https://github.com/pololu/LSM303">Pololu Example</a>.</li>
  65. <li>I got both of these Sensors on the <a href="http://www.pololu.com/catalog/product/1268">MinIMU-9 v2</a>.</li>
  66. <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>
  67. <li>BTM-222 Bluetooth UART Bridge (<a href="http://xythobuz.de/bluetooth.html">PCB</a>)</li>
  68. </ul>
  69. <h2>External Memory (<a href="https://github.com/xythobuz/xyControl/blob/master/include/xmem.h">xmem.h</a>)</h2>
  70. <p>The external memory consists of a 512Kx8 SRAM, bank-switched onto the 16bit avr address space.
  71. 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.
  72. This gives us 8 banks with 56KB each, resulting in 448KB external RAM.</p>
  73. <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>
  74. <h2>Orientation Calculation (<a href="https://github.com/xythobuz/xyControl/blob/master/include/orientation.h">orientation.h</a>)</h2>
  75. <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>
  76. <h1>PC and Android Tools</h1>
  77. <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>
  78. <h2>UART-Flight Status Packet Format</h2>
  79. <pre><code>printf("t%.2f %.2f %.2f\n", kp, ki, kd);
  80. printf("u%.2f %.2f\n", pid_output[1], pid_output[0]); // Pitch, Roll
  81. printf("v%i %i %i %i\n", motorSpeed[0], ..., motorSpeed[3]);
  82. printf("w%.2f\n", orientation.pitch);
  83. printf("x%.2f\n", orientation.roll);
  84. printf("y%.2f\n", orientation.yaw);
  85. printf("z%.2f\n", getVoltage());
  86. </code></pre>
  87. <h1>Software used</h1>
  88. <ul>
  89. <li><a href="http://homepage.hispeed.ch/peterfleury/avr-software.html">Peter Fleurys TWI Library</a></li>
  90. </ul>
  91. <h1>License</h1>
  92. <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>
  93. <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>
  94. <span id="flattr">
  95. <a class="FlattrButton" href="http://www.xythobuz.de/xycontrol.html" title="xyControl">AVR base Quadrocopter Flight Controller</a>
  96. </span>
  97. <span id="twitter">
  98. <a href="https://twitter.com/share" class="twitter-share-button" data-via="xythobuz" data-dnt="true" data-related="xythobuz" data-count="vertical">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  99. </span>
  100. <span id="reddit">
  101. <script type="text/javascript">reddit_url = "http://www.xythobuz.de/xycontrol.html";</script>
  102. <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
  103. </span>
  104. <span id="github">
  105. <a href="https://github.com/xythobuz/xyControl" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>
  106. </span>
  107. <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>
  108. <div id="disqus_thread"></div>
  109. <script type="text/javascript">
  110. var disqus_shortname = "xythobuz";
  111. (function() {
  112. var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
  113. dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
  114. (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
  115. })();
  116. </script>
  117. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  118. <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
  119. </div>
  120. <div class="nav">
  121. <h3>Thomas Buck</h3>
  122. <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
  123. <p id="bio">
  124. I'm a 19 year old Information Engineering student from Germany, mostly building cool stuff with AVR microcontrollers. All of my projects are released as <a href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a> on my <a href="https://github.com/xythobuz">GitHub Profile</a>.
  125. </p>
  126. <ul id="menuList">
  127. <li><a href="/index.html">Home</a></li>
  128. <li><a href="/blog.html">Blog</a></li>
  129. <li><a href="/contact.html">Contact</a></li>
  130. <li>&nbsp;</li>
  131. <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
  132. <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
  133. <li><a href="/avrnetstack.html">avrNetStack</a></li>
  134. <li><a href="/xycontrol.html">xyControl</a></li>
  135. <li><a href="/avrserial.html">AVR Serial Library</a></li>
  136. <li><a href="/serialdebug.html">Serial Debug</a></li>
  137. <li><a href="/ledmatrix.html">LED Matrix</a></li>
  138. <li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
  139. <li><a href="/xyrobot.html">xyRobot</a></li>
  140. <li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
  141. <li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
  142. <li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
  143. <li><a href="/rremote.html">rRemote</a></li>
  144. <li>&nbsp;</li>
  145. <li><a href="/c250.html">Mio C250 Unlock</a></li>
  146. <li><a href="/nas.html">IB-NAS6210 Linux</a></li>
  147. <li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
  148. <li><a href="/serialhelper.html">Serial Helper</a></li>
  149. </ul>
  150. <div id="recent">
  151. Recent blog posts:
  152. <ul id="recentList">
  153. <li class="recentList"><a href="/2013_05_20_just_cause.html">Just Cause 2 Capture</a></li><li class="recentDate">2013-05-20</li>
  154. <li class="recentList"><a href="/2013_05_17_itunes.html">Musik Script History</a></li><li class="recentDate">2013-05-17</li>
  155. <li class="recentList"><a href="/2013_05_09_itunes.html">Musikgeschmack</a></li><li class="recentDate">2013-05-09</li>
  156. <li class="recentList"><a href="/2013_05_05_debian.html">Debian Update</a></li><li class="recentDate">2013-05-05</li>
  157. <li class="recentList"><a href="/2013_04_26_iphone_lens.html">iPhone Linse</a></li><li class="recentDate">2013-04-26</li>
  158. </ul>
  159. </div>
  160. </div>
  161. </div></div>
  162. <img id="dude" alt="The Dude abides..." src="/img/dude.png">
  163. <img id="walter" alt="Mark it zero!" src="/img/walter.png">
  164. <div id="footer">
  165. Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
  166. &middot;
  167. Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
  168. &middot;
  169. <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
  170. &middot;
  171. <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&amp;profile=css3">Validate CSS</a>
  172. &middot;
  173. <a href="http://feed1.w3.org/check.cgi?url=http://www.xythobuz.de/rss.xml">Validate RSS</a>
  174. &middot;
  175. <a href="http://www.validome.org/google/validate?url=http://www.xythobuz.de&amp;googleTyp=SITEMAP">Validate Sitemap</a>
  176. </div>
  177. <img src="/stats/count.php?img" alt="Analytics">
  178. <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
  179. <script type="text/javascript">
  180. var _gaq = _gaq || [];
  181. _gaq.push(['_setAccount', 'UA-39163591-1']);
  182. _gaq.push(['_setDomainName', 'xythobuz.org']);
  183. _gaq.push(['_setAllowLinker', true]);
  184. _gaq.push(['_trackPageview']);
  185. (function() {
  186. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  187. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  188. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  189. })();
  190. </script>
  191. </body>
  192. </html>