(完整版)基于单片机的遥控小车的设计毕业设计 下载本文

内容发布更新时间 : 2024/5/12 6:27:11星期一 下面是文章的全部内容请认真阅读。

滨江学院

毕业论文(设计)

题 目 基于单片机的遥控小车的设计

院 系 自动控制系 专 业 电气工程与自动化 学生姓名 王枫 指导教师 毛鹏 职 称 讲师

二O一五 年 五 月 二十五 日

目 录

1.绪论. ................................................ 5 2.整体设计 .............................................. 5

2.1 小车方案 ............................................................ 6 2.2 控制方案 ............................................................ 6 2.3 系统组成 ............................................................ 7

3. 单片机遥控小车的硬件介绍 ............................. 8

3.1 单片机介绍 .......................................................... 8 3.2 发射模块 ............................................................ 9 3.2.1 2262编码器 .................................................... 9

3.2.2 315M射频发射电路 ............................................. 10 3.2.3 遥控电路 ...................................................... 11 3.3 接收与主控模块 ...................................................... 13

3.3.1 2272译码器 ................................................... 13 3.3.2 315M超再生接收电路 ........................................... 13 3.3.3 主控电路 ...................................................... 14 3.3.4 电机与舵机 .................................................... 16

3.4总体电路图 .......................................................... 16

4. 软件设计与介绍 ...................................... 17

4.1 Keil简介 ........................................................... 17 4.2.电机与舵机的程序设计 ................................................ 17

4.2.1 PWM脉冲宽度调制与中断系统介绍 ................................. 18

4.2.2 电机与舵机具体控制程序介绍 .................................... 20 4.3遥控部分的程序设计 .................................................. 22 4.3.1 矩阵键盘的介绍及与独立键盘的对比 .............................. 22

4.3.2 遥控部分具体程序介绍 .......................................... 23 4.4.总程序介绍与总程序流程图 ............................................ 26 5.结果展示与分析 ...................................... 26

5.1 电路焊接调试 .................................................................................................................. 26 5.2 小车功能展示 .................................................................................................................. 27

6.小结 ................................................. 29 参考文献: .............................................. 30 致 谢 .................................................. 31

基于单片机的遥控小车设计

南京信息工程大学滨江学院自动控制系,南京 210044

摘要:随着单片机技术的日渐成熟,单片机在各个领域的应用逐渐增多,与此同时,无线控制技术业发展至成熟阶段。因此,将单片机与无线控制技术相结合,采用51单片机,编码解码器,并采用无线控制的方式来达到对小车的实际控制。而在本次毕业设计的实际运用中,使用的是89C52单片机,在信号的传输过程中通过2262与2272编码译码其对单纯的电平信号向脉冲进行变化,随后采用315M射频发射电路与接收电路对脉冲信号与正弦波信号进行相互转化,并且通过其进行接收与发送。对于接收到的信号使用PWM调制从而改变电机转速与舵机的角度。本设计采用C语言编程,从而通过程序实现对小车的实际控制。

关键词:2262/2272 315M发射接收电路 51单片机

The design of car by based on single chip

microcomputer remote control

Major of Electrical Engineering and Automation of College of BinJiang of Nanjing University of

Information & Technology,Nanjing 210044

Abstract :With the single-chip technology matures, microcontroller applications in various fields

gradually increased, at the same time, wireless control technology industry to a mature stage.Therefore, the MCU and wireless control technology, the use of 51 microcontroller, codecs, and the use of wireless controlled way to achieve effective control of the car. In the practical application of this graduation design, the use of the 89C52 microcontroller, the transmission signal coding and decoding through 2262 and 2272 the leve