毕业设计基于stm32的智能小车设计说明

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

摘要

本次试验主要分析了基于STM32F103微处理器的智能小车控制系统的系统设计过程。此智能系统的组成主要包括STM32F103控制器、电机驱动电路、红外探测电路、超声波避障电路。本次试验采用STM32F103微处理器为核心芯片,利用PWM技术对速度以及舵机转向进行控制,循迹模块进行黑白检测,避障模块进行障碍物检测并避障功能,其他外围扩展电路实现系统整体功能。小车在运动时,避障程序优先于循迹程序,用超声波避障电路进行测距并避障,在超声波模块下我们使用舵机来控制超声波的发射方向,用红外探测电路实现小车循迹功能。在硬件设计的基础上提出了实现电机控制功能、智能小车简单循迹和避障功能的软件设计方案,并在STM32集成开发环境Keil下编写了相应的控制程序,并使用mcuisp软件进行程序下载。

关键词:stm32;红外探测;超声波避障;PWM;电机控制

Abstract

This experiment mainly analyzes the control system of smart car based on microprocessor STM32F103 system design process. The composition of the intelligent system mainly including STM32F103 controller, motor drive circuit, infrared detection circuit, circuit of ultrasonic obstacle avoidance. This experiment adopts STM32F103 microprocessor as the core chip, using PWM technique to control speed and steering gear steering, tracking module is used to detect the black and white, obstacle avoidance module for obstacle detection and obstacle avoidance function, other peripheral extended circuit to realize the whole system function. When the car is moving, obstacle avoidance program prior to tracking, using ultrasonic ranging and obstacle avoidance obstacle avoidance circuit, we use steering gear under ultrasonic module to control the emission direction of ultrasonic, infrared detection circuit is used to implement the car tracking function. On the basis of the hardware design is proposed for motor control function, simple intelligent car tracking and obstacle avoidance function of software design, and in the STM32 integrated development environment under the Keil. Write the corresponding control program, and use McUisp program download software.

Keywords:STM32;Infrared detection;Ultrasonic obstacle avoidance;PWM;Motor control

目录

1.绪论.......................................................... - 5 - 1.1研究概况.................................................. - 5 -

1.2研究思路.................................................. - 5 -

2.软硬件设计.................................................... - 6 - 2.1中央处理模块.............................................. - 6 -

2.1.1 stm32f103部结构 ...................................... - 7 -

2.1.2 stm32最小系统电路设计 ................................ - 8 -

2.1.3 stm32软件设计的基本思路 ............................. - 11 -

2.1.4 stm32中断介绍 ....................................... - 12 -

2.1.5 stm32定时/计数器介绍 ................................ - 14 -

2.1.6 主程序设计流程图..................................... - 15 - 2.2 电机驱动模块............................................. - 16 -

2.2.1 驱动模块结构及其原理................................. - 16 -

2.2.2 驱动模块电路设计..................................... - 17 -

2.2.3驱动软件程序设计 ..................................... - 18 - 2.3 避障模块设计............................................. - 23 -

2.3.1 避障模块器件结构及其原理............................. - 24 -

2.3.2 HC-SR04模块硬件电路设计 ............................. - 26 -

2.3.3 HC-SR04模块程序设计 ................................. - 27 - 2.4循迹模块设计............................................. - 34 -

2.4.1 循迹模块结构及其原理................................. - 34 -

2.4.2 循迹模块电路设计..................................... - 36 -

2.4.3 红外循迹模块程序设计................................. - 37 -

3.软件调试..................................................... - 39 - 3.1 程序仿真................................................ - 39 -

3.2 程序下载................................................. - 40 -

4.系统测试..................................................... - 41 -

5.总结......................................................... - 45 - 致............................................................. - 47 - 参考文献....................................................... - 49 - 附录........................................................... - 50 -

相关文档
最新文档