基于单片机的红外遥控智能小车毕业设计报告 联系客服

发布时间 : 星期六 文章基于单片机的红外遥控智能小车毕业设计报告更新完毕开始阅读

答 辩 小组 意 见 分项得分:准备情况 分; 陈述情况 分; 回答问题 分; 仪表 分 答辩成绩: 答辩小组组长(签字): 年 月 日 成绩计算方法 (填写本院系实用比例) 指导教师成绩 20 (%) 评阅成绩 30 (%) 验收成绩 20 (%) 答辩成绩 30 (%) 指导教师成绩 评阅成绩 验收成绩 答辩成绩 总评 学生实得成绩(百分制) 答辩委员会意毕业论文(设计)总评成绩(等级): 院答辩委员会主任(签字): 学院(签章) 见 年 月 日 备 注 西安邮电学院毕业论文(设计)成绩评定表(续表)

目录

摘要 .............................................................................................................................................. I Abstract .................................................................................................................................... II 第1章 引言 ............................................................................................................................. 1 第2章 系统硬件设计及原理简介 ......................................................................................... 2

2.1 单片机控制系统 ........................................................................................................ 2

2.1.1 AT89S52各引脚描述 ..................................................................................... 2 2.1.2 定时器/计数器2 ............................................................................................. 4 2.1.3 单片机最小系统 ............................................................................................. 6 2.2 液晶显示 .................................................................................................................... 6

2.2.1 1602LCD接口引脚说明 ................................................................................ 7 2.2.2 LCD的控制方法 ............................................................................................ 7 2.2.3 液晶与单片机连接电路 ............................................................................... 10 2.3 温度测量电路 .......................................................................................................... 10

2.3.1 DS18B20产品的主要特点 .......................................................................... 10 2.3.2 DS18B20的引脚介绍 .................................................................................. 11 2.3.3 DS18B20的使用方法 .................................................................................. 12 2.3.4 DS18B20控制电路 ...................................................................................... 13 2.4 红外遥控 .................................................................................................................. 14

2.4.1 红外遥控器 ................................................................................................... 14 2.4.2 红外接收头 ................................................................................................... 15 2.5 直流电机驱动 .......................................................................................................... 16 2.6 按键中断电路 .......................................................................................................... 18 2.7 避障电路 .................................................................................................................. 18 第3章 系统软件设计 ........................................................................................................... 19

3.1 主程序 ...................................................................................................................... 19 3.2 液晶驱动子程序 ...................................................................................................... 19 3.3 温度检测子程序 ...................................................................................................... 20 3.4 电机驱动子程序 ...................................................................................................... 21 3.5 速度调整子程序 ...................................................................................................... 22 3.6 红外解码子程序 ...................................................................................................... 23 第4章 硬件安装及调试总结 ............................................................................................... 25 第5章 结论 ........................................................................................................................... 26 致谢 ........................................................................................................................................... 27 参考文献 ................................................................................................................................... 28 附录1:源程序 ........................................................................................................................ 29

1 main.c .......................................................................................................................... 29 2 1602c.h ........................................................................................................................ 31 3 ds18b20.c ..................................................................................................................... 33 4 TC9012.h ..................................................................................................................... 36 5 speed.h ......................................................................................................................... 38 附录2: .................................................................................................................................... 40

1 电路原理图 ................................................................................................................. 40 2 PCB图 ........................................................................................................................ 41 3 元件清单 ..................................................................................................................... 42

摘要

主要介绍了一款具有红外遥控、自动避障、温度检测等功能的智能小车的设计与制作,并详细介绍了单片机、温度传感器、1602LCD的原理及应用。

该小车以玩具小车为车体,以AT89S52单片机为整个系统的控制核心,控制由三极管组成的桥电路来驱动直流电机。使小车运动,采用HS0038红外一体接收头接收遥控信号,由单片机解码,实现对小车的遥控控制,红外二极管及HS0038红外接收头组成小车的自动避障电路。为了实时观察小车运行状态,还配备了指示灯以显示小车行进方向。另外,温度检测及显示电路可实现温度的实时监测。

本系统采用模块化设计,软件用C语言编写,采用了软件的多任务结构,提高了CPU的利用率和系统的灵活性。本设计结构简单,较容易实现,具有高度的智能化和自动化。

关键词:AT89S52 直流电机 红外遥控 HS0038 解码

第I页

Abstract

This article introduces an infrared remote control with automatic obstacle avoidance, the temperature detection function of the intelligent car design and production. The Principle and Application of microcontroller, temperature sensor and 1602LCD is the focus of the system.

The car to toy car for the body to AT89S52 microcontroller core of the w- hole system of control, control the composition of the bridge from the transis- tor to drive the DC Circuit. Make car movement, one infrared receiver with HS0038 first to receive remote control signals for the MCU decoding, achiev- ing control of the car's remote control, infrared diode and the composition of car HS0038 infrared receiving circuit of automatic obstacle avoidance. In or- der to observe the car running real-time, is also equipped with lights to show the car moving direction. In addition, the temperature detection and display circuit can realize real-time monitoring of temperature.

The system is modular in design, software written using C language, using the software's multi-task structure, increase the CPU utilization and system flexibility. The design is simple, relatively easy to implement, with a high degree of intelligence and automation.

Key words:MCU DC motor Infrared Remote Control HS0038 Decode

第II页