分类:
无人机
版权声明:本文为博主原创文章,未经博主允许不得转载。
Maple Lite User manual
基于flymaple项目修改而来,重新设计原理图,陀螺仪更换为mpu6050,完全兼容上位机Mission Planner,功能与APM完全保持一致,主控芯片采用stm32f103rct6,256k flash、64k ram,无外扩flash,移植后的代码、原理图、pcb原件,BOM完全托管于Github,欢迎关注我的github
Overview
1. 搭建编译环境
2. 获取源码
3. 编译固件
4. 使用J-flash通过jtag口烧写固件
5. 使用串口工具测试硬件
6. 串口连接Mission Planner
7. 使用Mission Planner设置飞行参数
8. 连接接收机、电调动力装置进行试飞
搭建编译环境
关于环境的搭建这里不做详细描述,大致可以分为以下步骤:
1. 安装虚拟机(VMware + ubuntu)
2. 配置交叉编译工具(arm-none-eabi-)
3. 安装git版本控制器
关于上述详细步骤可以在谷歌度娘上寻找详细教程
获取源码
1. 使用网页打开https://github.com/ShilinGuo520/flystm32_ardupilot
2. 克隆该项目到本地
将github上的工程克隆到本地
克隆完成后的目录文件
编译固件
1. 到libmaple/目录下运行make jtag生成maple的库文件
2. 到ardupilot/ ArduCopter/目录下运行make flymaple
3. 编译完成后将在/tmp/ArduCopter.build/目录下生成
ArduCopter.elf
ArduCopter.eep
ArduCopter.hex(可以直接烧写)
关于编译,可以直接运行./make_sh.sh 将自动完成上述步骤,并且生成ArdCopte.bin到当前目录,ArdCopre.bin文件是纯二进制文件不含带地址信息,在烧时需要手动添加地址
使用J-flash通过jtag口烧写固件
关于J-Flash如何安装这里不做详细描述,可以在谷歌百度上寻找详细答案
1. 将maple-lite与jlink使用SW模式连接,并且供电
2. 打开并且配置J-Flash为SW下载模式
3. 烧写固件(将编译生成的ArduCopter.hex或者ArduCopter.bin拖入J-Flash工具)
4. 输入F7工具自动下载固件
5. 固件下载成功,断开连接
使用串口工具测试硬件
1. 将maple-lite通过串口连接到PC
2. 使用串口工具连接maple-lite
上图是由于进入了正常启动流程,通信内容为Mavlink的非ASCII码的输出,所以显示为乱码,对maple-lite重新上电,并且在5s内输长按空格键,将进入命令行模式:
3. 在命令行模式下输入test,进入test
4. 选择相应的测试项目进行测试(主要测试项为:baro、compass、ins)
这里以ins为例:
可以看到首先进行初始化,然后输出对应的值,晃动maple-lite值会随之变化,表示Gyro传感器工作正常,其他硬件测试方法类似,测试完成后进行 MissionPlanner 连接前需要重新上电
串口连接Mission Planner
硬件测试完成后,接下来使用Mission Planner连接maple-lite,硬件连接和上述方法一样
1. 打开Mission Planner,选择串口号、设置波特率
2. 点击CONNECT连接maple-lite
连接过程中的读取参数,在连接完成后,可以看到参数显示、ins输出
使用Mission Planner设置飞行参数
上述连接完成后,即可进行飞行参数设置、compass校准、ins校准(目前还存在bug)、遥控器校准等,使用方法和APM完全一样
连接接收机、电调动力装置进行试飞
1. 接线说明(参考下图):
2. SW调试下载接口(参考下图):
附:装机图
配置:
机架:F550机架
GPS:ublox-7M
电机:飓风2212 980Kv
电调:好赢 10A 无EBC输出
电池:5200mA 3S
视频链接:
http://v.youku.com/v_show/id_XMjY4MzAwNjk3Ng==?spm=a2h3j.8428770.3416059.1
http://v.youku.com/v_show/id_XMjY4MzAwNjU0OA==?spm=a2h3j.8428770.3416059.1
<script type="text/javascript">var fileName = '68950875'; var commentscount = 3; var islock = false</script>
<script type="text/javascript">$(function () { $("#ad_frm_0").height("90px"); setTimeout(function(){ $("#ad_frm_2").height("200px"); },1000); });</script>
<script type="text/javascript">$(function(){ setTimeout(function(){ $(".comment_body:contains('回复')").each(function(index,item){ var u=$(this).text().split(':')[0].toString().replace("回复","") var thisComment=$(this); if(u) { $.getJSON("https://passport.csdn.net/get/nick?callback=?", {users: u}, function(a) { if(a!=null&&a.data!=null&&a.data.length>0) { nick=a.data[0].n; if(u!=nick) { thisComment.text(thisComment.text().replace(u,nick)); } } }); } }); },200); setTimeout(function(){ $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); }) },5000); setTimeout(function(){ $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); }) },10000); setTimeout(function(){ $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); }) },15000); setTimeout(function(){ $("a img[src='http://js.tongji.linezing.com/stats.gif']").parent().css({"position":"absolute","left":"50%"}); },300); }); function loginbox(){ var $logpop=$("#pop_win"); $logpop.html(' src="https://passport.csdn.net/account/loginbox?service=http://static.blog.csdn.net/callback.htm" frameborder="0" height="600" width="400" scrolling="no">'); $('#popup_mask').css({ opacity: 0.5, width: $( document ).width() + 'px', height: $( document ).height() + 'px' }); $('#popup_mask').css("display","block"); $logpop.css( { top: ($( window ).height() - $logpop.height())/ 2 + $( window ).scrollTop() + 'px', left:($( window ).width() - $logpop.width())/ 2 } ); setTimeout( function () { $logpop.show(); $logpop.css( { opacity: 1 } ); }, 200 ); $('#popup_mask').unbind("click"); $('#popup_mask').bind("click", function(){ $('#popup_mask').hide(); var $clopop = $("#pop_win"); $("#common_ask_div_sc").css("display","none"); $clopop.css( { opacity: 0 } ); setTimeout( function () { $clopop.hide(); }, 350 ); return false; }); } var articletitle='用STM32自制APM四轴飞行器';</script>
访问:5801次 积分:118 等级:
排名:千里之外
<script type="text/javascript">$(function () { $("#btnSubmit").unbind("click"); $("#btnSubmit").click(function () { search(); }); $("#frmSearch").submit(function () { search(); return false; }); function search() { if ($("#inputSearch").val() == "") { alert("请录入搜索关键词!"); return false; } //var url = "http://so.csdn.net/so/search/s.do?q=" + encodeURIComponent($("#inputSearch").val()) + "&u=" + username + "&t=blog"; var url = "https://www.baidu.com/s?wd=" + encodeURIComponent($("#inputSearch").val()) + "%20site%3Ablog.csdn.net" window.location.href = url; } });</script>
<script src="http://dup.baidustatic.com/js/ds.js"></script>
<script>(function () { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: '4740887', container: s, size: '250,250', display: 'inlay-fix' }); })();</script>
<script src="http://dup.baidustatic.com/js/ds.js"></script>
<script>(function () { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: '4740890', container: s, size: '250,250', display: 'inlay-fix' }); })();</script>
<script>setTimeout(function () { var naviga_offsetTop = 0; function naviga_stay_top() { var scrollTop = jQuery(document).scrollTop(); if (scrollTop > naviga_offsetTop) { jQuery("#nav_show_top_stop").css({ "position": "fixed" }); jQuery("#nav_show_top_stop").css({ "top": "0px" }); } else { jQuery("#nav_show_top_stop").css({ "position": "fixed" }); jQuery("#nav_show_top_stop").css({ "top": naviga_offsetTop - scrollTop + "px" }); } } function onload_function() { naviga_offsetTop = jQuery("#nav_show_top_stop").position().top; jQuery(window).bind("scroll", naviga_stay_top); jQuery(window).bind("mousewheel", naviga_stay_top); jQuery(document).bind("scroll", naviga_stay_top); jQuery(document).bind("mousewheel", naviga_stay_top); } jQuery(document).ready(onload_function); }, 200);</script>
<script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script><script type="text/javascript">$(function () { function __get_code_toolbar(snippet_id) { return $("
" + "
"); } $("[code_snippet_id]").each(function () { __s_id = $(this).attr("code_snippet_id"); if (__s_id != null && __s_id != "" && __s_id != 0 && parseInt(__s_id) > 70020) { __code_tool = __get_code_toolbar(__s_id); $(this).prev().find(".tools").append(__code_tool); } }); $(".bar").show(); });</script> <script type="text/javascript" src="http://static.blog.csdn.net/public/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script> <script src="http://static.blog.csdn.net/scripts/csdn_blog_detail.min.js?v2017.041" type="text/javascript"></script> rel="stylesheet" type="text/css" href="//csdnimg.cn/pubfooter/css/pub_footer_2014.css" />
src="about:blank" frameborder="0" scrolling="no" style="z-index:-1;position:absolute;top:0;left:0;width:100%;height:100%;background:transparent">
您有
274 条新通知
<script id="noticeScript" type="text/javascript" btnid="header_notice_num" wrapid="note1" count="5" subcount="5" src="//csdnimg.cn/rabbit/notev2/js/notify.js?9d86d94"></script>
<script type="text/javascript" src="http://c.csdnimg.cn/blog/csdn_public_blog_detail.min.js?20170719001"></script> <script type="text/javascript" src="http://medal.blog.csdn.net/showblogmedal.ashx?blogid=5661508"></script>
<script id="adJs52b5334" src="http://ads.csdn.net/js/opt/52b5334.js?t=0.010872324752313478"></script> <script>document.getElementById("adJs52b5334").src = "http://ads.csdn.net/js/opt/52b5334.js?t=" + Math.random();</script>
src="" id="fa" frameborder="0" width="100%" height="360" scrolling="no">
<script type="text/javascript">$(function () { var fromjs = $("#fromjs"); if (fromjs.length > 0) { $("#fromjs .markdown_views pre").addClass("prettyprint"); prettyPrint(); $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
3楼 qq_21333483 2017-08-17 16:36发表 [回复] [引用] [举报]-
-
可以用stlink的SW模式烧写吗,我在烧完BootLoader后测试时没有任何反应,还有你的晶振时16M还是12M,为啥照片上的看着像12M原理图是16M?
2楼 qq_21333483 2017-08-16 16:29发表 [回复] [引用] [举报]-
-
有没有做成功的?
1楼 ccbfu 2017-05-11 21:51发表 [回复] [引用] [举报]-
-
请问可以转载么?