标准版
#第七届立创电赛#基于N32G430的实时姿态仪

创建时间:2年前

7337 2

描述

<div class="document"> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 1、项目介绍</h3> <hr class="horizontal-splitline normal-bold-2"><p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       本设计是基于N32单片机设计的项目——基于N32G430的实时姿态仪,能够采集MPU6050的姿态数据然后将其实时显示在0.96 OLED上。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       本项目的设计架构如图所示,主要由主控制器 N32G430C8L7, MPU6050 传感器,OLED 显示模块等几部分组成,能够通过 MPU6050 传感器采集原始的加速度与陀螺仪加速度,N32G430 接收到数据后换算成模块的姿态,使用 OLED 显示出来。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/rYhzCTZQNsy8xW5ptaNCtVt2fuK8NCayojwmZOSB.png" alt="" width="627" height="321"></span></span></p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*2、项目属性</h3> <hr class="horizontal-splitline normal-bold-2"><p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       </span></span>本项目是在【训练营官方案例】基于N32G430的实时姿态显示的基础上进行的改进,由于个人水平有限,本作品一定存在不足,希望与大家相互交流共同进步。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*3、硬件部分</h3> <hr class="horizontal-splitline normal-bold-2"><p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       硬件结构如原理图所示,其主要由主控制器 N32G430C8L7, 六轴传感器 MPU6050 ,显示模块 0.96OLED 等几部分组成。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       (1)主控制器 N32G430C8L7</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">         N32G430C8L7 微控制器产品采用高性能 32 位 ARM Cortex™-M4F 内核,集成浮点运算单元(FPU)和数字信号处理(DSP),支持并行计算指令。最高工作主频 128MHz,集成高达64KB 片内加密存储 Flash,并支持多用户分区权限管理,支持 16KB 的嵌入式 SRAM。内置一个内部高速 AHB 总线,两个低速外设时钟总线 APB 及总线矩阵,支持40个可复用 I/Os,提供丰富的高性能模拟接口,包括 1 个 12 位 4.7Msps ADC,支持16个外部输入通道和3个内部通道,同时提供多种数字通信接口,包括 4个U(S)ART、2个I2C、2个SPI/I2S、1个CAN 2.0B通信接口。N32G430C8L7 微控制器产品可稳定工作于-40°C 至+105°C 的温度范围,供电电压 2.4V至 3.6V,提供多种功耗模式供用。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">         更多资料:<a href="https://www.nationstech.com/" target="_blank">国民技术-创新服务全民 (nationstech.com)</a></span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       <span style="font-size:16px;">(2)六轴传感器 MPU6050</span></span></span></p> <div><span style="color:#000000;"><span style="font-size:14px;">         </span></span><span style="font-size:16px;">MPU6050是InvenSense公司推出的全球首款整合性6轴运动处理组件,相较于多组件方案,免除了组合陀螺仪与加速器时之轴间差的问题,减少了安装空间。MPU6050内部整合了3轴陀螺仪和3轴加速度传感器,并且含有一个第二 IIC 接口,可用于连接外部磁力传感器,并利用自带的数字运动处理器( DMP: Digital Motion Processor)硬件加速引擎,通过主 IIC 接口,向应用端输出完整的9轴融合演算数据。有了DMP,我们可以使用 InvenSense 公司提供的运动处理资料库,非常方便的实现姿态解算,降低了处理运算对操作系统的负荷,同时大大降低了开发难度。</span></div> <div><span style="color:#000000;"><span style="font-size:14px;">         </span></span>MPU6050 的特点包括</div> <ul><li>以数字形式输出 6 轴或 9 轴(需外接磁传感器)的旋转矩阵、四元数(quaternion)、欧拉角格式(Euler Angle forma)的融合演算数据(需 DMP 支持)</li> <li>具有 131 LSBs/° /sec 敏感度与全格感测范围为± 250、± 500、± 1000 与±2000°/sec 的 3 轴角速度感测器(陀螺仪)、</li> <li>集成可程序控制,范围为± 2g、± 4g、± 8g 和± 16g 的 3 轴加速度传感器、</li> <li>移除加速器与陀螺仪轴间敏感度,降低设定给予的影响与感测器的飘移;</li> <li>自带数字运动处理(DMP: Digital Motion Processing)引擎可减少 MCU 复杂的融合演算数据、感测器同步化、姿势感应等的负荷;</li> <li>内建运作时间偏差与磁力感测器校正演算技术,免除了客户须另外进行校正的需求;</li> <li>自带一个数字温度传感器;</li> <li>带数字输入同步引脚(Sync pin)支持视频电子影相稳定技术与 GPS;</li> <li>可程序控制的中断(interrupt),支持姿势识别、摇摄、画面放大缩小、滚动、快速下降中断、 high-G 中断、零动作感应、触击感应、摇动感应功能;</li> <li>VDD 供电电压为 2.5V± 5%、 3.0V± 5%、 3.3V± 5%; VLOGIC 可低至 1.8V± 5%;</li> <li>陀螺仪工作电流: 5mA,陀螺仪待机电流: 5uA;加速器工作电流: 500uA,加速器省电模式电流:40uA@10Hz;</li> <li>自带 1024 字节 FIFO,有助于降低系统功耗;</li> <li>高达 400Khz 的 IIC 通信接口;</li> <li>超小封装尺寸: 4x4x0.9mm( QFN)</li> </ul><p><span style="color:#000000;"><span style="font-size:14px;">         更多资料:参考数据手册</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       <span style="font-size:16px;">(3)显示模块 0.96OLED</span></span></span></p> <span style="font-size:16px;"><span style="color:#000000;">         </span>OLED,即有机发光二极管(Organic Light-Emitting Diode),又称为有机电激光显示(Organic Electroluminesence Display, OELD)。因为具备轻薄、省电等特性,因此从2003 年开始,这种显示设备在MP3 播放器上得到了广泛应用,而对于同属数码类产品的DC与手机,此前只是在一些展会上展示过采用OLED 屏幕的工程样品。自2007 年后,寿命得到很大提高,具备了许多LCD 不可比拟的优势。</span></div> <div class="document"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><span style="font-size:16px;"><span style="color:#000000;">         本项目采用0.96寸4管脚OLED,驱动采用SSD1315,本项目采用的OLED屏幕采用IIC接口。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><span style="font-size:16px;"><span style="color:#000000;">         IIC 接口:<br>         GND: 电源地<br>         VCC: 2.2V~5.5V<br>         SCL: CLK 时钟(高电平2.2V~5.5V)<br>         SDA: MOSI 数据(高电平2.2V~5.5V)</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><span style="font-size:16px;"><span style="color:#000000;">         注:OLED 显示屏不同于LCD,OLED 上电是没有反应的,需要程序驱动才会有显示!</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><span style="font-size:16px;"><span style="color:#000000;"><span style="font-size:14px;">         更多资料:参考数据手册(所购买模块)</span></span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*4、软件部分</h3> <hr class="horizontal-splitline normal-bold-2"><p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       由于个人时间问题,软件将在之后优化整理更新……</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*5、外壳结构</h3> <hr class="horizontal-splitline normal-bold-2"><p style="line-height:1.8;"> </p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">       出对电路的保护以及美观考虑,我使用SolidWorks绘制了一个底座,并经过了测试,STL文件将分享在工程附件位置。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">注:螺丝我采用的是M2×6规格的。</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/AGWFfNnLU6M3fWtgx7VzbFaZljY7JefvvFJi9Aug.png" alt="" width="602" height="366"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img style="margin-left:auto;margin-right:auto;" src="//image.lceda.cn/pullimage/JAFSt7p2ztokvZ8aMhjR4fQsZAuHrwcm3OHutWJH.png" alt="" width="602" height="327"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 6、过程视频</h3> <hr class="horizontal-splitline normal-bold-2"><p style="line-height:1.8;"><span style="color:#000000;"><span style="font-size:14px;">      bilibili视频链接:<a href="https://www.bilibili.com/video/BV1xB4y1x7sL?spm_id_from=333.999.0.0" target="_blank">https://www.bilibili.com/video/BV1xB4y1x7sL?spm_id_from=333.999.0.0</a></span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> </div>

文档

原理图

PCB图

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 100nF C1,C2,C5,C9,C10,C11,C12 C0603 7
2 22uF C3,C4 C0603 2
3 16pF C6,C7 C0603 2
4 4.7uF C8 C0603 1
5 MPU6050 H1 HDR-F-2.54_1X8 1
6 0.96OLED H2 HDR-F-2.54_1X4 1
7 DOWMLOAD J1 HDR-M-2.54_1X6 1
8 RST KEY1 KEY-SMD_2P-L6.2-W3.6-LS8.0 1
9 BOOT KEY2 KEY-SMD_2P-L6.2-W3.6-LS8.0 1
10 SZYY0603B LED1 LED0603-R-RD_BLUE 1
11 1kΩ R1 R0603 1
12 10k R2,R3 R0603 2
13 MSS3-Q-T/R SW1 SW-SMD_MSS3-Q-T-R 1
14 918-418K2023S40006 TYPE-C USB-C-SMD_918-418K2023S40006 1
15 AMS1117-3.3_C2992570 U1 SOT-223-3_L6.4-W3.5-P2.30-LS7.0-BR 1
16 N32G430C8L7 U2 LQFP-48_L7.0-W7.0-P0.50-LS9.0-BL 1
17 8MHz X1 OSC-SMD_4P-L3.2-W2.5-BL 1

附件

附件名 下载
BOTTOM.STL

评论(1)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p>logo验证需要实物图哦</p>
goToTop
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow