基于STM32 智能抓物小车的设计 电子设计II课程报告

摘 要

本实验主要分析把握对象的智能车基于STM32F103的设计。智能系统的组成主要包括STM32F103控制器、伺服驱动电路、红外检测电路、超声波避障电路。本试验采用STM32F103微处理器作为核心芯片,速度和转向的控制采用PWM技术,跟踪模块、检测、障碍物检测和避免功能避障模块等外围电路,实现系统的整体功能。

小车行驶时,避障程序跟踪程序,具有红外线跟踪功能的汽车检测电路。然后用颜色传感器识别物体的颜色和抓取。在硬件设计的基础上提出了实现伺服控制功能,简单的智能车跟踪和避障功能的软件设计和控制程序,在STM32集成开发环境IAR编译,并使用JLINK下载程序。

关键词:stm32;红外探测;超声波避障;颜色传感;舵机控制

ABSTRACT

This experiment mainly analyzed the grasping object intelligent car based on

STM32F103 design. The composition of the intelligent system mainly includes STM32F103 controller, servo drive circuit, infrared detection circuit, ultrasonic obstacle avoidance circuit. This test uses the STM32F103 microprocessor as the core chip, the speed and steering control using PWM technology, tracking module and detection, obstacle avoidance module for obstacle detection and avoidance function, other peripheral circuit to achieve the overall function of the system.

The car is moving, obstacle avoidance procedures prior to tracking program, car tracking function with infrared detection circuit. Then use color sensor to recognize object color and grab. On the basis of the hardware design is proposed to realize the servo control function, simple intelligent car tracking and obstacle avoidance function of the software design, and the control program is compiled in the STM32 integrated development environment IAR, and download the program using Jlink.

Key words: STM32; infrared detection; ultrasonic obstacle avoidance; color sensing; steering control

目 录

第一章 绪论 .............................................................................................................................. 1

1.1研究意义概况 .............................................................................................................. 1 1.2研究思路 ..................................................................................................................... 1 第二章 硬件设计部分 .............................................................................................................. 2

2.1中央处理模块 ............................................................................................................. 2

2.1.1 stm32f103内部结构 ..................................................................................... 3 2.1.2 stm32最小系统电路设计 ............................................................................. 3 2.1.3 stm32软件设计的基本思路 ......................................................................... 6

2.2 避障模块设计 ............................................................................................................ 6

2.2.1 避障模块器件结构及其原理 ........................................................................ 7 2.2.2 HC-SR04模块硬件电路设计 ......................................................................... 8 2.3循迹模块设计 ............................................................................................................. 9 2.3.1 循迹模块结构及其原理 ................................................................................ 9 2.3.2 循迹模块电路设计 ...................................................................................... 11

第三章 软件调试及实物展示 ................................................................................................ 12

3.1 程序仿真 ................................................................................................................ 12 3.2 程序下载 .................................................................................................................. 12 3.3 实物展示 .................................................................................................................. 13 第四章 总结 ............................................................................................................................ 14 致 谢 ........................................................................................................................................ 15 参考文献 .................................................................................................................................. 16

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4