三轴位置传感器模块设计与实现 - 图文 联系客服

发布时间 : 星期五 文章三轴位置传感器模块设计与实现 - 图文更新完毕开始阅读4185a2ddf8c75fbfc77db2c8

目录

摘要 ....................................................................................................................................................................I ABSTRACT..................................................................................................................................................... II 引言 ................................................................................................................................................................... 1 1 绪论 ............................................................................................................................................................... 2 1.1 传感器技术 ............................................................................................................................................. 2 1.1.1 什么是传感器 ................................................................................................................................. 2 1.1.2 传感器的分类 ................................................................................................................................. 3 1.1.3 传感器的基本特性 ......................................................................................................................... 3 1.2 三轴加速度传感器 ................................................................................................................................. 4 1.2.1 加速度传感器的原理 ..................................................................................................................... 4 1.2.2 加速度传感器的应用 ..................................................................................................................... 5 2 三轴位置传感器模块设计方案 ................................................................................................................... 6 2.1 理论基础................................................................................................................................................. 6 2.1.1 坐标分析 ......................................................................................................................................... 6 2.1.2 静止到运动的判断 ......................................................................................................................... 7 2.1.3 位置的计算 ..................................................................................................................................... 7 2.2 系统框架................................................................................................................................................. 9 2.2 本章小结............................................................................................................................................... 10 3 三轴位置传感器的硬件设计 ..................................................................................................................... 11 3.1 系统的硬件架构 ................................................................................................................................... 11 3.2 硬件设计............................................................................................................................................... 11 3.2.1 8051单片机模块 ........................................................................................................................... 11 3.2.2 三轴加速度传感器 ....................................................................................................................... 13 3.2.3 单片机外围电路 ........................................................................................................................... 14 3.3 电路设计............................................................................................................................................... 15 3.3.1 I2C总线技术 .................................................................................................................................. 15 3.3.2 原理图设计 ................................................................................................................................... 17 3.4 本章小结............................................................................................................................................... 18 4 三轴位置传感器的软件设计 ..................................................................................................................... 19 4.1 单片机常用操作 ................................................................................................................................... 20 4.1.1 系统的复位及初始化 ................................................................................................................... 20 4.1.2 计数器/定时器 ............................................................................................................................. 20 4.1.3 中断 ............................................................................................................................................... 22 4.2 程序设计............................................................................................................................................... 23 4.2.1 加速度采集 ................................................................................................................................... 23 4.2.2 位置计算 ....................................................................................................................................... 24 4.2.3 显示模块 ....................................................................................................................................... 26 4.3 实验结果............................................................................................................................................... 27 4.4 本章小结............................................................................................................................................... 45

5 结论与展望 ................................................................................................................................................. 46 致 谢 ............................................................................................................................................................... 47 参考文献 ......................................................................................................................................................... 48

摘要

在电子技术高度发达的今天,加速度传感器扮演的角色也越来越重要。加速度传感器在航天领域,汽车领域,以及人们的日常生活中都有着广泛的应用。

三轴加速度传感器是加速度传感器的一种,它可以测量三个坐标轴的加速度,从而准确反映物体的运动状态,确定物体的空间位置。

本课题主要的内容是用三轴加速度传感器结合单片机设计出基于人体位置变化的三轴位置传感器模块,并实现该模块。传感器使用的是ADI公司的ADXL345,它小而薄、超低功耗,并且具有多个功能。使用8051单片机作为主控芯片,能够比较容易的实现该模块,完成预期目标。

本课题的重点,一方面是对空间上各轴的加速度准确的采集,其次是设计出合理的算法,根据采集到的加速度信息计算出人体运动状态下位置的变化。

根据本文提出的方案,设计并实现的模块,能够实时的采集到加速度信息,并且准确计算出人体距离初始状态的位置变化,正确的显示出来。

关键词:三轴加速度传感器;ADXL345;8051单片机

I

ABSTRACT

In the electronic technology is highly developed today, the acceleration sensor is playing an increasingly important role. Automobile acceleration sensor in the field of aerospace, areas, and people's daily life have a wide range of applications.

Three axis acceleration transducer is a kind of acceleration sensor, it can measure three coordinate axis acceleration, so as to accurately reflect the state of motion object, determine the position of an object in space.

The main content is to use three axis accelerometer with MCU design three shaft position sensor module based on the change of body position, and the realization of the module. The sensor is used ADI company’s ADXL345, which is small and thin, and low power consumption, and has a plurality of functions. Using 8051 microcontroller as the main control chip, can the module easier, achieved the expected target.

The focus of this topic, on the one hand on the space axis acceleration accurate acquisition, the second is to design a reasonable algorithm, calculate the change of human body motion position according to the acceleration information acquisition to.

According to the scheme proposed in this paper, the design and implementation of the module, real-time acquisition to the acceleration information, and accurately calculate the position changes of the human body from the initial state, displayed correctly. Keywords:Three axis acceleration sensor;ADXL345; 8051 single chip microcomputer

II