123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>xyControl (#) xythobuz.de</title>
- <meta name="description" content="AVR base Quadrocopter Flight Controller" />
- <meta name="keywords" content="xythobuz" />
- <link rel="author" href="/xythobuz@xythobuz.de">
- <link rel="shortcut icon" href="/img/favicon.ico">
- <script type="text/javascript" src="/js/sh_main.js"></script>
- <link type="text/css" rel="stylesheet" href="/css/sh_bright.min.css" />
- <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
- <link rel="alternate" type="application/rss+xml" title="Blog" href="/rss.xml">
- <link rel="stylesheet" href="/css/gh-fork-ribbon.css" />
- <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
- <script type='text/javascript'>
- /* <![CDATA[ */
- (function() {
- var s = document.createElement('script');
- var t = document.getElementsByTagName('script')[0];
- s.type = 'text/javascript';
- s.async = true;
- s.src = '//api.flattr.com/js/0.6/load.js?mode=auto&uid=xythobuz&category=text';
- t.parentNode.insertBefore(s, t);
- })();
- /* ]]> */
- </script>
- </head>
- <body onload="sh_highlightDocument('/js/sh/', '.min.js');">
- <div class="github-fork-ribbon-wrapper right">
- <div class="github-fork-ribbon"><a href="
- https://github.com/xythobuz/xyControl
- ">Fork me on GitHub</a></div></div>
- <div id="header">
- <h1>xythobuz.de</h1>
- <p><a href="http://xythobuz.de/lastmusic">♫</a></p>
- <h2>xyControl</h2>
- </div>
-
- <div class="colmask leftmenu"><div class="colleft">
- <div class="content">
-
- <p><img alt="Logo" src="http://www.xythobuz.de/xycontrol/logo.png" /></p>
- <h3>Current Progress</h3>
- <iframe width="560" height="315" src="http://www.youtube-nocookie.com/embed/b5MhLgDhQ2c" frameborder="0" allowfullscreen></iframe>
-
- <p><a href="http://www.youtube.com/watch?v=b5MhLgDhQ2c"><code>Youtube Link</code></a></p>
- <p><a href="http://www.xythobuz.de/xycontrol/">xyControl</a> is a Quadrocopter Flight Controller based on Atmels Atmega2560 microcontroller.
- It features 512KB SRAM on-board, using the external memory interface of this processor.
- Also included is a switched power supply as well as a USB connection to communicate with and program the target.
- All I/O pins, including 3 additional UARTs, SPI, I2C (TWI) and 16 ADC Channels, are accessible via standard 2.54mm connectors.
- 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>
- <p><a href="/img/xycontrol1.jpg"><img alt="Photo 1" src="/img/xycontrol1_small.jpg" /></a>
- <a href="/img/xycontrol2.jpg"><img alt="Photo 2" src="/img/xycontrol2_small.jpg" /></a>
- <a href="/img/xyCopterOsci.png"><img alt="Screenshot" src="/img/xyCopterOsci_small.png" /></a></p>
- <h2>Flight Control Software Flow</h2>
- <p>Three tasks are controlling the Quadrocopter Orientation in Space.</p>
- <ul>
- <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>
- <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>
- <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>
- <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>
- </ul>
- <h1>Supported Hardware</h1>
- <ul>
- <li>Gyroscope L3GD20, code based on the <a href="https://github.com/adafruit/Adafruit_L3GD20">Adafruit Example</a>.</li>
- <li>Accelerometer and Magnetometer LSM303DLHC, code based on the <a href="https://github.com/pololu/LSM303">Pololu Example</a>.</li>
- <li>I got both of these Sensors on the <a href="http://www.pololu.com/catalog/product/1268">MinIMU-9 v2</a>.</li>
- <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>
- <li>BTM-222 Bluetooth UART Bridge (<a href="http://xythobuz.de/bluetooth.html">PCB</a>)</li>
- </ul>
- <h2>External Memory (<a href="https://github.com/xythobuz/xyControl/blob/master/include/xmem.h">xmem.h</a>)</h2>
- <p>The external memory consists of a 512Kx8 SRAM, bank-switched onto the 16bit avr address space.
- 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.
- This gives us 8 banks with 56KB each, resulting in 448KB external RAM.</p>
- <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>
- <h2>Orientation Calculation (<a href="https://github.com/xythobuz/xyControl/blob/master/include/orientation.h">orientation.h</a>)</h2>
- <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>
- <h1>PC and Android Tools</h1>
- <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>
- <h2>UART-Flight Status Packet Format</h2>
- <pre><code>printf("t%.2f %.2f %.2f\n", kp, ki, kd);
- printf("u%.2f %.2f\n", pid_output[1], pid_output[0]); // Pitch, Roll
- printf("v%i %i %i %i\n", motorSpeed[0], ..., motorSpeed[3]);
- printf("w%.2f\n", orientation.pitch);
- printf("x%.2f\n", orientation.roll);
- printf("y%.2f\n", orientation.yaw);
- printf("z%.2f\n", getVoltage());
- </code></pre>
- <h1>Software used</h1>
- <ul>
- <li><a href="http://homepage.hispeed.ch/peterfleury/avr-software.html">Peter Fleurys TWI Library</a></li>
- </ul>
- <h1>License</h1>
- <p>Peter Fleurys TWI Library (twi.c & twi.h) is released under the <a href="http://www.gnu.org/licenses/gpl.html">GNU GPL license</a>.</p>
- <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>
-
- <span id="flattr">
- <a class="FlattrButton" href="http://www.xythobuz.de/xycontrol.html" title="xyControl">AVR base Quadrocopter Flight Controller</a>
- </span>
- <span id="twitter">
- <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>
- </span>
- <span id="reddit">
- <script type="text/javascript">reddit_url = "http://www.xythobuz.de/xycontrol.html";</script>
- <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
- </span>
- <span id="github">
- <a href="https://github.com/xythobuz/xyControl" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>
- </span>
-
- <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>
- <div id="disqus_thread"></div>
- <script type="text/javascript">
- var disqus_shortname = "xythobuz";
- (function() {
- var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
- dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
- (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
- })();
- </script>
- <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
- <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
-
- </div>
- <div class="nav">
- <h3>Thomas Buck</h3>
-
- <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
-
- <p id="bio">
- 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>. It would be nice if you could use this <a href="http://www.amazon.de/?_encoding=UTF8&camp=1638&creative=19454&linkCode=ur2&site-redirect=de&tag=xythobuzorg-21">Amazon.de Affiliate Link</a>.
- </p>
-
- <ul id="menuList">
- <li><a href="/index.html">Home</a></li>
- <li><a href="/blog.html">Blog</a></li>
- <li><a href="/contact.html">Contact</a></li>
- <li> </li>
- <li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
- <li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
- <li><a href="/avrnetstack.html">avrNetStack</a></li>
- <li><a href="/xycontrol.html">xyControl</a></li>
- <li><a href="/avrserial.html">AVR Serial Library</a></li>
- <li><a href="/serialdebug.html">Serial Debug</a></li>
- <li><a href="/ledmatrix.html">LED Matrix</a></li>
- <li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
- <li><a href="/xyrobot.html">xyRobot</a></li>
- <li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
- <li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
- <li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
- <li><a href="/rremote.html">rRemote</a></li>
- <li> </li>
- <li><a href="/c250.html">Mio C250 Unlock</a></li>
- <li><a href="/nas.html">IB-NAS6210 Linux</a></li>
- <li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
- <li><a href="/serialhelper.html">Serial Helper</a></li>
- </ul>
-
- <div id="recent">
- Recent blog posts:
- <ul id="recentList">
- <li class="recentList"><a href="/2013_05_28_pid.html">Regelschwingungen</a></li><li class="recentDate">2013-05-28</li>
- <li class="recentList"><a href="/2013_05_20_just_cause.html">Just Cause 2 Capture</a></li><li class="recentDate">2013-05-20</li>
- <li class="recentList"><a href="/2013_05_17_itunes.html">Musik Script History</a></li><li class="recentDate">2013-05-17</li>
- <li class="recentList"><a href="/2013_05_09_itunes.html">Musikgeschmack</a></li><li class="recentDate">2013-05-09</li>
- <li class="recentList"><a href="/2013_05_05_debian.html">Debian Update</a></li><li class="recentDate">2013-05-05</li>
- </ul>
- </div>
- </div>
- </div></div>
-
- <img id="dude" alt="The Dude abides..." src="/img/dude.png">
- <img id="walter" alt="Mark it zero!" src="/img/walter.png">
-
- <div id="footer">
- Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
- ·
- Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
- ·
- <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
- ·
- <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&profile=css3">Validate CSS</a>
- ·
- <a href="http://feed1.w3.org/check.cgi?url=http://www.xythobuz.de/rss.xml">Validate RSS</a>
- ·
- <a href="http://www.validome.org/google/validate?url=http://www.xythobuz.de&googleTyp=SITEMAP">Validate Sitemap</a>
- </div>
- <img src="/stats/count.php?img" alt="Analytics">
- <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-39163591-1']);
- _gaq.push(['_setDomainName', 'xythobuz.org']);
- _gaq.push(['_setAllowLinker', true]);
- _gaq.push(['_trackPageview']);
- setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])", 30000);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
- </body>
- </html>
|