蓝牙计步器调试大致情况如上,调试时将计步器垂直放置,模拟人走路时的状态即可计步。可能是传感器的灵敏度不是很好,也可能是滤波算法的不完善,计步会有轻微误差,读取不到加速度信
摘 要:本设计主要由单片机,蓝牙模块,三轴加速传感器和LCD液晶显示屏等模块组成。单片机作为主控单元,驱动加速度传感器,对人体的运动状态进行实时监测。通过传感器感应被测物体角度的变化,再由芯片内部的模数转换把模拟信号转变成单片机能识别的数字信号,单片机通过读取传感器的数字量,然后由单片机输出信号控制显示。通过研究计步算法编写计步程序,控制 单片机读取传感器感受到的加速度信号,对信号识别成功,即算一步,计步加一。此外,单片机驱动屏幕显示模块,能够实时显示步数,而且能够通过蓝牙模块与手机通信,传输步数等数据,方便记录与进一步地分析,为使用者更真实详尽地了解自己的运动情况,合理地安排运动计划提供很好的价值参考。
关键词:电子计步器;加速传感器;单片机
ABSTRACT:The design is mainly composed of single chip microcomputer(SCM), Bluetooth module, three-axis acceleration sensor and LCD liquid crystal display and other modules. SCM as the main control unit, driving the acceleration sensor, the movement of the human body in real time monitoring. Through the sensor sensing the changes in the angle of the measured object, and then by the internal analog conversion of the analog signal into SCM can identify the digital signal, SCM by reading the digital sensor, and then by the SCM output signal control display. By studying the step-by-step algorithm to prepare the step-by-step procedure, the SCM reads the acceleration signal perceived by the sensor, and the signal recognition is successful, that is, step by step. In addition, SCM drive screen display module, real-time display of the number of steps, but also through the Bluetooth module and mobile phone communication, transmission steps and other data to facilitate the record and further analysis, for users to more real and detailed understanding of their own sports, To arrange a sports plan to provide a good value reference.
Key words:Electronic pedometer;Accelerometer;SCM
目 录
第一章 绪论 1
1.1 课题的背景和意义 1
1.2 国内外研究现状 2
1.3 本设计的主要内容 2
第二章 系统硬件设计 3
2.1 系统硬件结构方案设计 3
2.2 单片机 4
2.3 三轴加速度传感器 6
2.4 LCD显示模块 9
2.5 蓝牙模块 10
2.6 按键电路 11
第三章 系统软件设计 12
3.1 主程序流程图 12
3.2 系统编程语言和编程工具 13
3.3 加速度数据的采集 15
3.4 LCD显示的代码实现 16
第四章 实物调试 17
结束语 19
致谢 20
参考文献 21
附录 22
第一章 绪论
1.1课题的背景和意义
现今社会竞争激烈,优胜劣汰促进各方面的发展,人们也越来越享受生活,恩格尔系数抵达相当的水平以后,人们也要逐渐开始培养健康养生的生活方式。在面对竞争激烈的市场时,人们所承受的强度也在与日俱增,又因为人们一般比较缺乏锻炼和养生的意识,从而容易导致身体机能下降,容易诱发很多疾病,同时也会影响方方面面。这样就需要我们每天维持适量的运动,可以直接有效地避免或减少一些疾病的发生。适量的锻炼能够减少人体血液里的无用物质和脂肪,同时减轻了给心肺的负担,也让自己体态变得更轻盈了,百利无一害。
但运动量应该要合理控制,过少则乏,过满则亏。选择适当的运动量是比较重要的,既让人们体验到了运动的乐趣,又给了自己一个好的释放。如今人们越来越多地选择代步工具,但却忽视了步行是一种最简单且能锻炼人身体的方法,而人们盲目步行,不了解具体的步行方法,也是在浪费时间做无用功,此时,人们就需要一个辅佐工具来帮忙制定步行计划,而计步器就扮演了一个很重要的角色。