J4 ›› 2012, Vol. 30 ›› Issue (1): 95-99.

• 论文 • 上一篇    下一篇

基于飞思卡尔单片机的木棒长度测量系统

闫冬梅1,康冰2,王有维1   

  1. 吉林大学 a.网络与教育技术中心|长春 130062;b.通信工程学院,长春 130023
  • 收稿日期:2011-08-11 出版日期:2012-01-29 发布日期:2012-03-20
  • 作者简介:闫冬梅(1978—)|女|吉林伊通人|吉林大学工程师|主要从事网络控制及智能控制技术研究|(Tel)86-13943017022(E-mail)ydm@jluhp.edu.cn;王有维(1961—)|男|哈尔滨人|吉林大学教授,博士|主要从事计算机网络及控制理论的研究,(Tel)86-431-87836504(E-mail)wyw@jluhp.edu.cn

Stick Length Measurement System Based on Freescale Microcontroller

YAN Dong-mei1,KANG Bing2,WANG You-wei1   

  1. 1.Center of Network &|Educational Technology, Jilin University, Changchun 130062,China;2.College of Communication Engineering, Jilin University, Changchun 130023|China
  • Received:2011-08-11 Online:2012-01-29 Published:2012-03-20

摘要:

为解决工业生产中长度测量的问题,设计了基于飞思卡尔单片机的木棒长度测量系统。该系统以飞思卡尔单片机为核心控制器,利用匀速转动的直流电机带动履带,履带两侧等距离放置三组红外发射与接收管。将木棒放在履带上,当木棒通过红外对管时利用飞思卡尔单片机的内部计时器计时,得出木棒的移动时间,从而算出木棒的长度,并用1602显示屏显示出木棒的长度。通过实验验证,该系统的测量误差小于0.05%。

关键词: 飞思卡尔单片机, 直流电机, 红外对管, 计时器

Abstract:

In order to solve the problem of the length measurement in industrial settings ,we designed a system measuring the stick length based on freescale microcontroller. This system used a freescale microcontroller as the key controller. There is a track driven by a DC (Direct Current) motor which is turning with a constant speed. We placed three groups infrared transmitting and receiving devices whose distance was equal on both sides of the track. Place the stick on the track and the internal timer began to  countime when the stick crossed the infrared device. Then we can get the moving time of the stick and obtaining the length of the stick. Finally, we used a 1602 monitor to display the length of the stick. Through the experiment ,the measurement error of this system was less than 0.05%.

Key words: freescale microcontroller, direct current motor, infrared device, timer

中图分类号: 

  • TG156