版本协议

GPL 3.0

标签
标准版
#第六届立创电赛#高精度红外体温计设计

创建时间:3年前

1805 6

视频

  • 立创电赛:《高精度红外体温计设计》-功能介绍.mp4

  • 立创电赛:《高精度红外体温计设计》-硬件方案.mp4

  • 立创电赛:《高精度红外体温计设计》-软件介绍.mp4

描述

<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" 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;">* 1、项目功能介绍</h3> <hr class="horizontal-splitline normal-bold-2"> <p><span style="font-family: 宋体;">   红外体温计因安全卫生、测量高效而备受青睐,发展迅速。但目前市场上的红外体温计存在测量误差大、成本高等缺点,应用受到限制。</span><span style="font-family: 宋体;">因此本文提出了一种基于</span><span style="font-family: Calibri;">STM32F103C8T6</span><span style="font-family: 宋体;">的高精度便携式红外体温计。</span></p> <p><span style="font-family: 宋体;">   首先给出了红外体温测量的系统方案,分析影响测量精度的因素,然后利用<span style="font-family: Calibri;">STM32F103C8T6</span></span><span style="font-family: 宋体;">作为控制核心,通过</span><span style="font-family: Calibri;">MLX90614</span><span style="font-family: 宋体;">红外传感器、</span><span style="font-family: Calibri;">DS18B20</span><span style="font-family: 宋体;">数字温度传感器、</span><span style="font-family: Calibri;">VL53L0x</span><span style="font-family: 宋体;">激光测距传感器等获取相关信息,利用串口导出原始温度与距离信息,根据最小二乘原理,设计相应补偿与标定算法,给出多项式拟合公式,拟合出实际人体体温值。</span><span style="font-family: 宋体;">硬件系统共包括有最小系统电路、锂电池充电电路、</span><span style="font-family: 宋体;">低压差降压电路、人机交互电路、电池电压测量电路、串口通信电路、传感器接口电路。用户按下测量键后可快速获得测量结果并显示在</span><span style="font-family: Calibri;">OLED</span><span style="font-family: 宋体;">上,体温不正常时蜂鸣器会报警提示。结合传感器特性与实际测量需求,设计了测量距离为</span><span style="font-family: Calibri;">2cm-70cm</span><span style="font-family: 宋体;">范围内的距离补偿公式,经实际实验测试,误差小于</span><span style="font-family: Calibri;">0.1</span><span style="font-family: 宋体;">℃,提高了测量精度,验证了距离补偿与标定的准确性。</span></p> <p><span style="font-family: 宋体;">   本项目创新点有一键多功能,一个按键可实现测温、开关机、历史数据查看等功能;双模式补偿,提出了基于距离与环境温度的补偿;三模式测温,可以实现环境温度、物体温度与人体温度的测量。本次设计具有容易实现批生产、成本低廉、补偿准确度高等优点,可应用于红外体温仪的生产中。</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;">*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: #95a5a6;"><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;">* 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: #95a5a6; font-size: 14px;">GPL3.0开源协议</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;">*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;"><strong>4.1 系统介绍</strong></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;">       如图4-1为整体硬件系统架构图,在硬件系统中,包括有充电管理单元、一键开机系统、电源处理系统以及各个子电路模块,图4-2为硬件系统的具体组成成分,包括电源管理单元、MCU最小系统、传感器接口、人机交互单元、3D外形设计组成,电源管理单元主要包括锂电池充电电路、一键开关机电路、低压差线性稳压电路、以及电压采集电路,人机交互单元又包括按键电路、OLED显示单元以及蜂鸣器驱动电路。</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/cWzW38tJdzyLS9xFgnk8CuG5vb7YTELCdqR1DjP5.png" width="392" 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; text-align: center;">图4-1 硬件架构图</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/XhOrxfyElITsYZVJ9qOE3WsxrX6ImYdfFl3EAVsA.png" width="433" height="338"></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; text-align: center;">图4-2 硬件系统组成</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; text-align: left;"><strong>4.2 电源系统</strong></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; text-align: left;"><strong>4.2.1 一键开关机电路</strong></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; text-align: left;">       图4-3为一键开机电路,默认选择锂电池作为供电输入,当插入USB接口时,MOS管Q4断开,切换成USB供电,Q5由MCU与按键控制,通过检测按键状态实现开关机与测温控制。</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/JqHuMMo5NfLmRdKHxJiEmEEUZSWzyMHDFyNyezfV.png" width="428" height="272"></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; text-align: center;">图4-3 一键开机电路</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; text-align: left;"><strong>4.2.2 锂电池充电与LDO电路</strong></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; text-align: left;">       图4-4为锂电池充电电路图,图4-5为低压差线性稳压器电路,锂电池充电电路采用TP4065,线性锂离子电池充电器,选用这个器件的原因一方面是其极小的封装,一方面是极低的价格,它本身具有防倒冲电路,可以通过外部电阻设置充电电流,非常适合本次的设计。稳压器则选择了较为常用的SPX3819,只需要几个外部电容,最大电流为500mA,满足本次设计需求。锂电池为100mA,通过电阻R2 18Kohm设置充电电流为0.5C,50mA,充电电流的计算公式为:</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/NCe5qJTnhz7aevniNXR0Hm7mru7r0R9KKZdAvcxG.png"></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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/rbKDfc5r6nyukhzDwKlfPoW1LWa7kaMuTnbi5L5V.png" width="460" height="379"></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; text-align: center;">图4-4 锂电池充电电路</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/lVqjZmUosEF5asffhpHb2k3dk3GZQSCWjkBCCWhT.png" width="464" height="158"></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; text-align: center;">图4-5 3.3V电路</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; text-align: left;"> </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; text-align: left;"><strong>4.3 人机交互系统</strong></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; text-align: left;">       人机交互单元有OLED显示电路,按键检测电路,蜂鸣器驱动电路。OLED采用的是SSD1306驱动的0.96寸裸屏,分辨率为128*64 。蜂鸣器使用的是3.3V有源蜂鸣器。如图4-6 、4-7所示。</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/0PCN1KJOaV1xswk25398X3y1dZB3qokLzly50d8t.png" width="417" height="266"></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; text-align: center;">图4-6 OLED驱动电路</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/rEXZuqagmnn5vgKwjvObFK0VQ4bkPcyJh7HFvLzq.png"></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; text-align: center;">图4-7 蜂鸣器驱动电路</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; text-align: left;"><strong>4.4 数据采集与存储电路</strong></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; text-align: left;">       数据采集包括环境温度采集、人体、物体温度采集、电池电压采集,环境温度采集使用单总线数字温度传感器DS18B20,通过采集环境温度用于后续的温度自适应补偿,体温测量传感器使用的是MLX90614,是测温的主要传感器,它的测温范围为-40-115摄氏度,分辨率为0.02,并且自带光学滤波器,可以大幅减少外界可见光干扰。激光测距传感器使用VL53L0x,测距范围为20mm---2000mm,主要用来进行距离补偿。并且测量距离不受目标反射率的影响。传感器如图4-8所示。数据存储使用的是AT24C02  EEPROM芯片,可以存储256字节数据,主要用于存储用户历史测温数据与系统数据。电路图如图4-9所示。电池电压采集采用了最简单的分压电阻形式,锂电池电压最大4.2V,所以使用的是二分之一分压网络。</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/NvLuColULOmu2FoUWiwfXy77giV1liBfGQW0MSPV.png"></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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/xoO9dcT06WnAKKdElKKbg7RpVk3fNsG4LHESdTcs.png"></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; text-align: center;">图4-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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/7gsRLpxM6e6kot5O7WKHjk0gveSXiHF3MBDeiZ84.png" width="374" height="305"></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; text-align: center;">图4-9 数据存储电路</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; text-align: center;"> </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; text-align: left;"><strong>4.5 系统实物图</strong></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; text-align: left;"> </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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/UwfWkKpooSZ4kxoL4R7DVkTTeZa8gPoV15XGxuUB.png" alt="" width="250" height="333"></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; text-align: left;"> </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; text-align: center;">图4-10 PCB正面</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/kHTDADfbid1zARmROS7hiulzCcX7F0lKq6tIbufl.png" alt="" width="446" height="335"></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; text-align: center;">图4-11 PCB背面</p> <p> </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;">*5、软件部分</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;"><strong>5.1 系统介绍与程序流程图</strong></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;">       图5-1为软件系统架构图,软件系统中,使用了包括基本的GPIO、ADC、IIC、SPI、串口、定时器与中断等基本外设驱动,建立了传感器底层驱动与功能实现的应用层驱动,通过串口导出相关数据,利用第三方平台进行数据处理与拟合,此外使用开源UGUI,并为此开源项目增加了数字显示的驱动函数,用在了本次的项目设计中。图5-2为整体系统流程图,首先开机后进行系统与传感器的初始化,然后进入开机界面,检测按键是否按下,按下后返回按键状态从而执行相应的任务,无按键按下后,开启定时器计时,一分钟内无任何操作则自动关机。整体的软件系统包括系统初始化、传感器初始化与数据读取、体温补偿与标定、UGUI使用、电池电量监测。</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/By5g04OpnaYpfSa4YzsmdJfdbwjBgC4mbux1TyXw.png" width="500" height="417"></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; text-align: center;">图5-1 软件系统架构图</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/AopkvcxRWAzIioXy6EO9bGxIof5qKhB3XISdoc4K.png" width="444" height="496"></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; text-align: center;">图5-2 软件系统程序流程图</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; text-align: left;"><strong>5.2 系统初始化与文件结构</strong></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; text-align: left;">       系统初始化包括时钟初始化——主要是设置使用外部晶振,GPIO初始化主要是设置所有需要使用到的GPIO的基础配置,定时器中断初始化,主要用于初始化TIM2,TIM3。一个是用于定时关机,一个用于定时调用功能任务。GUI初始化包括底层的OLED驱动与UGUI的库文件驱动。传感器通讯接口初始化是对各个传感器的驱动,主要是IIC、SPI、SMBus、One-Wire总线的底层通讯驱动。如图5-3所示。整体用户文件结构包括HARDWARE文件夹---存放底层传感器的驱动,GUI文件夹---存放显示驱动与底层GUI驱动函数,以及用户自定义GUI界面。Algorithm文件夹则主要是包括功能实现代码,与测温补偿算式。如图5-4所示。</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/byAzl4ToXuPf4sLA1yaIlqA9S4JznN1VSSywqH57.png" width="588" height="331"></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; text-align: center;">图5-3 软件系统初始化</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/n3rhX3PUHSz8fBbbhCKYujZJmZ6zk2b2a6NEFlRJ.png" width="609" height="198"></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; text-align: center;">图5-4 文件结构</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;"><strong>5.3 温度补偿</strong></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;">       使用MLX90614 红外测温传感器进行温度测量时,红外发射头距离测量表面的距离会对测量结果产生较大影响。另一方面,当测量距离增加时,在大气吸收的影响下,温度测量系统接收的辐射将减少,导致测温系统产生误差。因此,有必要进行温度补偿与数据标定。图5-5是串口导出的温度距离数据进行简单的数据处理后,得到的一个温度距离曲线,我们利用第三方平台(MATLAB数据拟合工具),结合最小二乘原理与传感器特性,最终选择多项式拟合,得到了补偿公式如式5-1,f(x,y)为补偿后的体温数据,x为传感器温度测量数据,y为测量距离。距离补偿后,还需要进行温度的二次补偿,图5-6为环境温度与测温结果的关系曲线,考虑到实验环境的限制,我们无法获得较多的数据,最终只通过这7组数据拟合,得出了式5-2的一个二次拟合曲线。Y 为最终拟合结果,x为距离拟合后的体温数据。</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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/GGx09yvkHhoOXESwjLJqXPhdXEAmCv96qCo7l3ct.png"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/gk86czrvUExEvs1iolt9hHxfTXiuND3oMrJjNutZ.png"></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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/rw7JFMlAvI8vRFYBW8MYFNiA7sKXOtcNdSzzEyxa.png"></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; text-align: center;">图5-5 测温结果与测温距离关系曲线</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; text-align: left;"> </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="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/H1ooWDpda9HMEDFt1kQ5KFq7BdiFYxUGr0bnJ5qy.png" width="672" height="281"></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; text-align: center;">图5-6 测温结果与环境温度关系曲线</p> <div> <img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/PwvacTUhVAMVV1fjxY4LjJYTlq3IVcLuHGIdeEBi.png" alt="未补偿" width="638" height="199"></div> <div style="text-align: center;">图5-7 未补偿前温度与距离变换关系曲线</div> <div><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/sVeykiowTqW28PD1QtBEgFP9ZKVzxOdmeilOuotW.png" alt="补偿后" width="629" height="521"></div> <div style="text-align: center;">图5-8 补偿后温度与距离变换关系曲线</div> <div> </div> <div> </div> <div> </div> <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; text-align: left;"><strong>5.4 电量测量</strong></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; text-align: left;">       电量测量任务,通过ADC采集数据至缓存数组,然后对数据排序,去最值、在求平均值,送入误差判断,两次误差值小于设定值,进行电量更新。流程图如图5-7所示。</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; text-align: left;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//image.lceda.cn/pullimage/XxuJkl9HC41y9tgZvItcYOV9htoGk9Ihzu3lln6X.png" width="269" height="555"></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; text-align: center;">图5-9  电量测量流程图</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> <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> <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;">*6、BOM清单</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;"><img src="//image.lceda.cn/pullimage/eXAPYueA5z99NUdM23lSGtIi7aulhuxtIlw3RdoN.png"></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;">*7、大赛LOGO验证</h3> <hr class="horizontal-splitline normal-bold-2"> <p style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/8dG2jkor6L1sUaRJ5aRtBjgakdoFqxu3Eojy2oIC.png" alt="" width="268" height="357"><img src="//image.lceda.cn/pullimage/c1YE1lFbzjqTp78R76C2lnEH032gb6hVeX0VkPOK.png" alt="" width="382" height="287"></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> <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;">* 8、演示您的项目并录制成视频上传</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;"> </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> <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="font-size: 14px;">更多详情:<a href="/posts/06c94d90c2c447dfbd9ed7339ff4a5b1" target="_blank">https://diy.szlcsc.com/posts/06c94d90c2c447dfbd9ed7339ff4a5b1</a></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>

文档

minitemper

minitemper

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part
1 BEEP B1 BEEP-TH_BD9.1-P5.00-D0.6-L-FD 1
2 100nF C1,C3,C5,C6,C7,C12,C14,C15,C16,C20,C23,C25 C0603 12
3 1UF C2,C17 C0603 2
4 2.2UF C4 C0603 1
5 10U C8 C0603 1
6 1U C13,C18,C19 C0603 3
7 4.7U C21 C0603 1
8 2.2U C22 C0603 1
9 8M CR1 OSC-SMD_3P-L3.2-W1.3-P1.2-L 1
10 LED0 D1,D6 LED0603-R-BI 2
11 SS14 D2,D3,D4,D8 SOD123 4
12 Pin HDR1X4 J1 CONN-SMD_ZH1.5-4P_SMD 1
13 Pin HDR1X2 J2 HDR-F-2.54_1X2 1
14 Pin HDR1X4 J3 HDR-F-2.54_1X4 1
15 3MM_ M1,M2,M3 M3 3
16 2mm_ M4,M5 螺丝孔2MM 2
17 DDTC143EUA-7-F Q2 SOT-23(SOT-23-3) 1
18 S8050 Q3 SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR 1
19 SI2301 Q4,Q5 SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR 2
20 4.7K R1,R7,R8,R11,R15,R17,R18,R19,R22,R23,R24,R25,R26,R27,R28 R0402 15
21 18k R2 R0402 1
22 100K R3,R4,R5 R0402 3
23 10K R6,R12,R13 R0402 3
24 910K R9 R0402 1
25 2K R10 R0402 1
26 47 R14 R0402 1
27 100k R16 R0402 1
28 20K R20,R21 R0402 2
29 0 R29 R0603 1
30 10k R30 R0402 1
31 SW-PB S2 KEY-SMD_L6.1-W3.7-P6.80 1
32 SW-PB S3 KEY-TH_TS-1038-A2B3-D2 1
33 SPX3819 U1 SOT23-5 1
34 STM32F103C8T6 U2 LQFP-48_L7.0-W7.0-P0.50-LS9.0-BL 1
35 CH340N U4 SOP8 1
36 TP4065 U5 SOT23-5 1
37 0.96-OLED-30Pin_JX U6 OLED_0.96-30P-P0.70-12864 1
38 MLX90614 U7 MLX90614 TO39-4 1
39 AT24CXX U8 SOP8 1
40 DS18B20 U9 DS18B20 1
41 TYPE-C-31-M-12 USBC1 USB-C_SMD-TYPE-C-31-M-12 1

附件

附件名 下载
1-源码.zip
2-原理图PCB.zip
3-温度距离数据.zip

评论(2)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
立创电赛 回复
<p> logo验证处记得上传实图~</p>
maxwill 回复
<p>楼主 能否 在分享一下,百度链接失效了</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