基于单片机的计步器设计及实现模板 下载本文

内容发布更新时间 : 2024/5/14 22:01:59星期一 下面是文章的全部内容请认真阅读。

基于51单片机计步器的设计

基于单片机的计步器设计及实现

摘要: 计步器是一种颇受欢迎的日常锻炼进度监控器,可以激励人们挑战自己,增强体质,帮助瘦身。早期设计利用加重的机械开关检测步伐,并带有一个简单的计数器。晃动这些装置时,可以听到有一个金属球来回滑动,或者一个摆锤左右摆动敲击挡块。

计步器功能可以根据计算人的运动情况来分析人体的健康状况。而人的运动情况可以通过很多特性来进行分析。与传统的机械式传感器不同,ADXL345是电容式三轴传感器,由它捕获人体运动时加速度信号,更加准确。信号通过低通滤波器滤波,由单片机内置A/D转换器对信号进行采样、A/D转换。软件采用自适应算法实现计步功能,减少误计数,更加精确。单片机STC89C51控制液晶显示计步状态。整机工作电流只有1-1.5mA,实现超低功耗。

关键字:计步器;加速度传感器;ADXL345;低功耗

I

基于51单片机计步器的设计

Design and realization of pedometer-based microcontrollers

Abstract:Pedometer is a popular daily exercise progress monitor, can motivate people to challenge themselves, enhance physical fitness, to help lose weight. Early designs used a weighted mechanical switch detects the pace, and with a simple counter. When shaking the device, you can hear a metal ball to slide back and forth, left and right, or a pendulum swinging percussion stopper.

Pedometer function can calculate the movement of people to analyze the situation of human health. And the movement of people can be analyzed by many features. With the traditional mechanical sensors differ, ADXL345 three-axis sensor is a capacitive acceleration signal by its human motion capture, and more accurate. Signal through a low pass filter, the microcontroller built-in A / D converter for signal sampling, A / D conversion. Software uses an adaptive algorithm pedometer function, reduce error count is more accurate. STC89C51 SCM control LCD pedometer state. Machine operating current of only 1-1.5mA, ultra-low power consumption.

Key Words: pedometer; Acceleration sensor; ADXL345; low power consumption

II

基于51单片机计步器的设计

目 录

1绪论 ............................................................ 1

1.1论文研究的背景、目的及意义................................... 1 1.2国内外研究现状............................................... 1 1.3本文研究的内容............................................... 2 2方案设计及选择 ................................................... 2

2.1设计要求..................................................... 2 2.2传感器的选择................................................. 2 2.3 MCU微处理器的选择........................................... 4 2.4系统的总体设计............................................... 4 3系统的硬件设计 ................................................... 5

3.1微处理器电路模块............................................. 5 3.2计步器传感器采集模块......................................... 6 3.3显示模块..................................................... 9 4软件设计 ....................................................... 11

4.1软件流程图.................................................. 11 4.2计步器算法的实现............................................ 11 5测试及分析 ..................................................... 16

5.1系统调试及功能.............................................. 16 5.2系统的测试.................................................. 16 6总 结 .......................................................... 18 [参考文献] ....................................................... 19 附录1 ........................................................... 20 附录2 ........................................................... 20 总结 ............................................................. 36

III