|
@@ -0,0 +1,187 @@
|
|
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
|
+ <h2>xyControl</h2>
|
|
37
|
+ </div>
|
|
38
|
+
|
|
39
|
+ <div class="colmask leftmenu"><div class="colleft">
|
|
40
|
+ <div class="content">
|
|
41
|
+
|
|
42
|
+ <p><img alt="Logo" src="http://www.xythobuz.de/xycontrol/logo.png" /></p>
|
|
43
|
+<p><a href="https://www.github.com/xythobuz/xyControl/">xyControl</a> is a Quadrocopter Flight Controller based on Atmels Atmega2560 microcontroller.
|
|
44
|
+It features 512KB SRAM on-board, using the external memory interface of this processor.
|
|
45
|
+Also included is a switched power supply as well as a USB connection to communicate with and program the target.
|
|
46
|
+All I/O pins, including 3 additional UARTs, SPI, I2C (TWI) and 16 ADC Channels, are accessible via standard 2.54mm connectors.
|
|
47
|
+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>
|
|
48
|
+<p><a href="/img/xyCopterOsci.png"><img alt="Screenshot" src="/img/xyCopterOsci_small.png" /></a>
|
|
49
|
+<a href="/img/xycontrol1.jpg"><img alt="Photo 1" src="/img/xycontrol1_small.jpg" /></a>
|
|
50
|
+<a href="/img/xycontrol2.jpg"><img alt="Photo 2" src="/img/xycontrol2_small.jpg" /></a></p>
|
|
51
|
+<h2>Flight Control Software Flow</h2>
|
|
52
|
+<p>Three tasks are controlling the Quadrocopter Orientation in Space.</p>
|
|
53
|
+<ul>
|
|
54
|
+<li>The Orientation Task reads the Gyroscope and Accelerometer and calculates the current Roll and Pitch angles. They are stored in the global struct "orientation".</li>
|
|
55
|
+<li>The PID Task is then feeding these angles into two PID controllers. Their output is then used by...</li>
|
|
56
|
+<li>The Set Task, which calculates the motor speeds and gives them to...</li>
|
|
57
|
+<li>The motor task, which sends the new values via TWI to the motor controllers.</li>
|
|
58
|
+</ul>
|
|
59
|
+<h1>Supported Hardware</h1>
|
|
60
|
+<ul>
|
|
61
|
+<li>Gyroscope L3GD20, code based on the <a href="https://github.com/adafruit/Adafruit_L3GD20">Adafruit Example</a>.</li>
|
|
62
|
+<li>Accelerometer and Magnetometer LSM303DLHC, code based on the <a href="https://github.com/pololu/LSM303">Pololu Example</a>.</li>
|
|
63
|
+<li>I got both of these Sensors on the <a href="http://www.pololu.com/catalog/product/1268">MinIMU-9 v2</a>.</li>
|
|
64
|
+<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>
|
|
65
|
+<li>BTM-222 Bluetooth UART Bridge (<a href="http://xythobuz.org/index.php?p=bt">PCB</a>)</li>
|
|
66
|
+</ul>
|
|
67
|
+<h2>External Memory (xmem.h)</h2>
|
|
68
|
+<p>The external memory consists of a 512Kx8 SRAM, bank-switched onto the 16bit avr address space.
|
|
69
|
+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.
|
|
70
|
+This gives us 8 banks with 56KB each, resulting in 448KB external RAM.</p>
|
|
71
|
+<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>
|
|
72
|
+<h2>Orientation Calculation (orientation.h)</h2>
|
|
73
|
+<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>
|
|
74
|
+<h1>PC and Android Tools</h1>
|
|
75
|
+<p>You can find some PC Software in the 'tools' directory. Each one should be accompanied by it's own Readme file.</p>
|
|
76
|
+<h2>UART-Flight Status Packet Format</h2>
|
|
77
|
+<pre><code>printf("t%.2f %.2f %.2f\n", kp, ki, kd);
|
|
78
|
+printf("u%.2f %.2f\n", pid_output[1], pid_output[0]); // Pitch, Roll
|
|
79
|
+printf("v%i %i %i %i\n", motorSpeed[0], ..., motorSpeed[3]);
|
|
80
|
+printf("w%.2f\n", orientation.pitch);
|
|
81
|
+printf("x%.2f\n", orientation.roll);
|
|
82
|
+printf("y%.2f\n", orientation.yaw);
|
|
83
|
+printf("z%.2f\n", getVoltage());
|
|
84
|
+</code></pre>
|
|
85
|
+<h1>Software used</h1>
|
|
86
|
+<ul>
|
|
87
|
+<li><a href="http://homepage.hispeed.ch/peterfleury/avr-software.html">Peter Fleurys TWI Library</a></li>
|
|
88
|
+</ul>
|
|
89
|
+<h1>License</h1>
|
|
90
|
+<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>
|
|
91
|
+<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>
|
|
92
|
+
|
|
93
|
+ <span id="flattr">
|
|
94
|
+<a class="FlattrButton" href="http://www.xythobuz.de/xycontrol.html" title="xyControl">AVR base Quadrocopter Flight Controller</a>
|
|
95
|
+</span>
|
|
96
|
+<span id="twitter">
|
|
97
|
+<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>
|
|
98
|
+</span>
|
|
99
|
+<span id="reddit">
|
|
100
|
+<script type="text/javascript">reddit_url = "http://www.xythobuz.de/xycontrol.html";</script>
|
|
101
|
+<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
|
|
102
|
+</span>
|
|
103
|
+<span id="github">
|
|
104
|
+<a href="https://github.com/xythobuz/xyControl" class="gitforked-button gitforked-forks gitforked-watchers">Fork</a>
|
|
105
|
+</span>
|
|
106
|
+
|
|
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
|
+
|
|
120
|
+ </div>
|
|
121
|
+ <div class="nav">
|
|
122
|
+ <h3>Thomas Buck</h3>
|
|
123
|
+
|
|
124
|
+ <div id="logo"><img id="logoImg" src="http://www.gravatar.com/avatar/8d18fec40a74782052fb4c007d212475?s=180" alt="Avatar"></div>
|
|
125
|
+
|
|
126
|
+ <p id="bio">
|
|
127
|
+ 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>.
|
|
128
|
+ </p>
|
|
129
|
+
|
|
130
|
+ <ul id="menuList">
|
|
131
|
+ <li><a href="/index.html">Home</a></li>
|
|
132
|
+<li><a href="/blog.html">Blog</a></li>
|
|
133
|
+<li><a href="/contact.html">Contact</a></li>
|
|
134
|
+<li> </li>
|
|
135
|
+<li><a href="/ledcube.html">8x8x8 LED Cube</a></li>
|
|
136
|
+<li><a href="/yasab.html">YASAB AVR Bootloader</a></li>
|
|
137
|
+<li><a href="/avrnetstack.html">avrNetStack</a></li>
|
|
138
|
+<li><a href="/xycontrol.html">xyControl</a></li>
|
|
139
|
+<li><a href="/avrserial.html">AVR Serial Library</a></li>
|
|
140
|
+<li><a href="/serialdebug.html">Serial Debug</a></li>
|
|
141
|
+<li><a href="/ledmatrix.html">LED Matrix</a></li>
|
|
142
|
+<li><a href="/ssop28.html">SSOP28 - DIL Adapter</a></li>
|
|
143
|
+<li><a href="/xyrobot.html">xyRobot</a></li>
|
|
144
|
+<li><a href="/bluetooth.html">Bluetooth UART (BTM-222)</a></li>
|
|
145
|
+<li><a href="/k6x4008.html">K6x4008 SRAM</a></li>
|
|
146
|
+<li><a href="/xyrobotremote.html">xyRobotRemote</a></li>
|
|
147
|
+<li><a href="/rremote.html">rRemote</a></li>
|
|
148
|
+<li> </li>
|
|
149
|
+<li><a href="/c250.html">Mio C250 Unlock</a></li>
|
|
150
|
+<li><a href="/nas.html">IB-NAS6210 Linux</a></li>
|
|
151
|
+<li><a href="/ultimatenotifier.html">Ultimate Notifier Script</a></li>
|
|
152
|
+<li><a href="/serialhelper.html">Serial Helper</a></li>
|
|
153
|
+ </ul>
|
|
154
|
+
|
|
155
|
+ <div id="recent">
|
|
156
|
+ Recent blog posts:
|
|
157
|
+ <ul id="recentList">
|
|
158
|
+ <li class="recentList"><a href="/2013_05_05_debian.html">Debian Update</a></li><li class="recentDate">2013-05-05</li>
|
|
159
|
+<li class="recentList"><a href="/2013_04_26_iphone_lens.html">iPhone Linse</a></li><li class="recentDate">2013-04-26</li>
|
|
160
|
+<li class="recentList"><a href="/2013_04_24_bitrot.html">Softwareverrottung</a></li><li class="recentDate">2013-04-24</li>
|
|
161
|
+<li class="recentList"><a href="/2013_04_23_pad.html">PCB Pads suck</a></li><li class="recentDate">2013-04-23</li>
|
|
162
|
+<li class="recentList"><a href="/2013_04_19_ekstasie.html">Just Dance</a></li><li class="recentDate">2013-04-19</li>
|
|
163
|
+ </ul>
|
|
164
|
+ </div>
|
|
165
|
+ </div>
|
|
166
|
+ </div></div>
|
|
167
|
+
|
|
168
|
+ <img id="dude" alt="The Dude abides..." src="/img/dude.png">
|
|
169
|
+ <img id="walter" alt="Mark it zero!" src="/img/walter.png">
|
|
170
|
+
|
|
171
|
+ <div id="footer">
|
|
172
|
+ Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a>
|
|
173
|
+ ·
|
|
174
|
+ Licensed as <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
|
|
175
|
+ ·
|
|
176
|
+ <a href="http://validator.w3.org/check?uri=referer">Validate HTML</a>
|
|
177
|
+ ·
|
|
178
|
+ <a href="http://jigsaw.w3.org/css-validator/validator?uri=xythobuz.de%2Fstyle.css&profile=css3">Validate CSS</a>
|
|
179
|
+ ·
|
|
180
|
+ <a href="http://feed1.w3.org/check.cgi?url=http://www.xythobuz.de/rss.xml">Validate RSS</a>
|
|
181
|
+ ·
|
|
182
|
+ <a href="http://www.validome.org/google/validate?url=http://www.xythobuz.de&googleTyp=SITEMAP">Validate Sitemap</a>
|
|
183
|
+ </div>
|
|
184
|
+ <img src="/stats/count.php?img" alt="Analytics">
|
|
185
|
+ <script src="http://gitforked.com/api/1.1/button.js" type="text/javascript"></script>
|
|
186
|
+</body>
|
|
187
|
+</html>
|