STM32F407 Based Smart Robot Design with Color recognition

来源 :中国科技博览 | 被引量 : 0次 | 上传用户:qq3264132
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
  [Abstract]STM32F407 is a very popular chip as a microprocessor. It allows faster responses than ARM mbed LPC1768, and it has more pins for connections. In this design, a smart robot is designated. It has abilities such as color recognition based on OV7670. The motors will be driven by a H-bridge circuit configuration, and the power will be supplied by a 12V DC battery. This article will briefly introduce the considerations of the design.
  [Key words]STM32F407, Smart robot vehicle, color recognition
  中圖分类号:TU334 文献标识码:A 文章编号:1009-914X(2017)42-0287-01
  Motor drive circuit and power system design
  The best way to control a motor with differential inputs is through a simple H-bridge circuit, an electronic circuit that enables a voltage to be applied across a load in either direction.[1]
  Figure 2.1:A diagram of H-bridge
  BJTs are used in the circuit which can be controlled by gate voltage and allow a sufficiently large current flowing through. To avoid short circuit, transistors on one side cannot be on at the same time. To prevent such hazard caused by turn-on and turn-off time overlap, a time gap is set before changing the turning direction of the motor.
  As a precaution against negative voltages on the chip, fuses are used between the inputs of each motors and supply voltage and ground to avoid reverse voltage. These fuses are often Schottky diodes that have a low forward voltage drop and a high reverse breakdown point. Side capacitors are also used to get rid of AC interference.
  Power supplies to the microprocessors are 5V regulated voltage.
  Camera design: colour recognition
  The recognition of colour block is realizedby a camera which will be demonstrated.
  OV7670 is chosen because it is cheaper. For OV7670, there are two different kinds. One is with FIFO(First In and First Out) and the other is without FIFO. The application of FIFO is working as a 3MB memory. It is designed for the MCUs which do not have enough processing capability for image. It can temporarily save the data transferred from camera.
  Table 1: Typical specifications of different cameras
  STM32F407 is especially appropriate when designing the camera. As there are 18 pins on the camera, a single microcontroller should be used to save the pins on the main MCU. This microcontroller is produced by ST microelectronic corporation. It has up to 140 I/O pins, 136 of which are fast with 84MHz so it has fast response. The programming of STM32 has two different editions. One is register edition and the other one is library function edition. Considering that image processing requires large memory occupation and fast processing speed, register edition is the better choice because the codes will directly initialize registers in the chip. In the register edition, targeted registers should be known by referring to the handbook. But in the function edition, the only job to do is to write corresponding pins’ name in the bracket.   To eliminate random error as much as possible, calculating the mean value of RGB is a way to achieve this purpose. First, sample 5000 pixels in one frame and average r, g, b values, and the next step is to average the mean values from 10 frames. The code of this method is indicated in Figure 5.9.
  Figure 5.9
  The recognition of colors cannot be simply achieved by setting a fixed threshold. Under different intensities of illumination, RGB values would vary a lot. Subsequently, another method is used: to make mutual comparison between RGB values. The color with the highest value will be the result. However, when detecting the blue block, the gap between B and R, G is not large enough, so the way to solve this problem is to add anoffset number to B value for compensation when comparing. The number is different under different illumination conditions so samples are collected under different sunlight.
  Conclusion
  After testing, this robot works properly except for some extreme sunlight conditions in which external infrared sources significantly biased the results obtained by the camera. This requires further investigation. For example, some other new approaches could be used to recognize the color correctly based on the RGB values and current weather conditions.
  Reference
  [1] Al Williams (2002). Microcontroller projects using the Basic Stamp. Focal Press.
  [2] Data sheet of L298N. SGS-THOMSON MICROELECTRONICS.
  [3] Data sheet of lm2596. TEXAS INSTRUMENTS.
  [4] An embedded real-time red peach detection system based on an OV7670 camera, ARM cortex-M4 processor and 3D look-up tables,Teixidó, Mercè. Published in: Sensors (Basel, Switzerland), v. 12 no. 10, pp. 14129 Date: 2012.
其他文献
[摘 要]LWD随钻测井仪器数量不断增加,现场使用、车间维修量任务加大。快速、准确的LWD信息跟踪系统的开发成为提高LWD上井成功率的关键。本文围绕LWD信息跟踪管理系统在长城钻探无线随钻仪器制造厂的应用,以车间生产运行流程为依托,开发了一套集现场使用、车间维修、数据统计功能于一体的LWD信息管理系统。  [关键词]MWD,LWD,信息管理  中图分类号:TU374 文献标识码:A 文章编号:10
期刊
中图分类号:TU214 文献标识码:A 文章编号:1009-914X(2017)42-0281-01  我国的机动车的数量出现了非常迅速的增长现象,而且由于交通事故导致的人身和财产的损失的数字急剧升高。引起交通事故的主要原因往往是驾驶员的不安全驾驶行为。  影响道路的交通安全因素很多,包括道路、气候、自然环境、地理条件,以及人的身体状况、心理因素、驾驶技能等等。但归纳起来,主要有两大因素,即人的不
期刊
中图分类号:TU254 文献标识码:A 文章编号:1009-914X(2017)42-0283-01  吕剧发源于东营区牛庄镇时家村,由民间说唱艺术山东琴书演化而来,迄今已有100多年的历史。作为吕剧故乡,她最能代表东营区文化的根与魂。历史和现实告诉我们,推动东营区文化大发展大繁荣,必须将吕剧传承与发展摆上重要位置,在吕剧发源地打造“吕剧故乡”品牌,切实发挥其引领和主导作用。  一、打造“吕剧故乡
期刊
[摘 要]伴随着我国第六次动车组全面提速,新形势下的铁路运营管理工作也在积极展开,此时,作为铁路客车服务主力军的检车员群体,就必须提升自身的从业素质,运用更高的从业规范准则去要求自身职责的实现过程。鉴于此,本文对新环境下客车检车员的从业素质培训问题及方案进行分析,通过阐述当前阶段从业素质培训问题着手,并提出了几点应对方案。此次研究的目的是为了更好的提升新环境下客车检车员的从业素质。  [关键词]客
期刊
[摘 要]领导班子建设的成功与否,对事业发展起着至关重要的作用。领导班子建设涉及到多方面的内容,而思想政治建设是加强班子建设的基础性工作。在改革不断深入、社会不断变化的时代背景下,在新矛盾、新事物、新问题不断出现的今天,如何才能加强党政领导班子的思想政治建设呢?笔者认为,首先要给当前党政领导班子的思想政治建设情况“把脉”,找出“病症”,然后对症“下药”。  [关键词]党政;领导班子;思想政治建设;
期刊
[摘 要]随着信息技术的发展和科技水平的提升,公众、社会对电力行业的安全质量等要求不断提高,只有建立与电力系统运行相适应的现代化电力调度系统,才能更好地满足生产运行需求,进而提供稳定安全可靠的电能支持。电力调度运行是一项技术性要求非常高的复杂工程,涉及到很多的设备,操作流程复杂,所以要全面加强风险监测和防控,及时排查风险点源,从而保证电力调度安全。  [关键词]电力调度运行;调度安全;风险分析;防
期刊
[摘 要]电气设备的安装调试既是保障电气设备的有效正常运行前提条件,也是保障企业所有生产设备正常运行最为关键的环节。因此,电气设备的安装调试工作有着非常重要的意义,必须重视企业工业生产电气设备安装调试重要性的研究。基于此,文章主要对电气设备的安装调试工作进行分析,以此来突出电气设备安装调试工作的重要性,希望能够为业界人士提供参考。  [关键词]电气设备;安装;调试;重要性  中图分类号:TU514
期刊
[摘 要]本文从机械特性和电器特性两个方面对无齿永磁同步曳引机在实际应用中存在种种问题进行分析,并对与此相关检验内容提出自己看法。  [关键词]永磁同步曳引机;电梯检验;问题  中图分类号:TU494 文献标识码:A 文章编号:1009-914X(2017)42-0294-01  上世纪九十年代,由于无齿轮永磁同步曳引机体积相对较小且实现能源节约、完成平稳运行、无需采取维护措施,进而广泛应用在电梯
期刊
[摘 要]近年来,随着我国大数据时代的到来,数据中心等基础服务设施的需求量不断的增加,在这样的大背景下,数据中心的散热就成了人们较为关注的话题之一,对于数据中心来说,其IT设备众多,导致散热密度大,再加上散热特点就会使得数据中心的热点分布不均匀,而且,设备的安全性需求提高了对内部空间温湿度和洁净度的要求,基于此,本文主要针对数据中心制冷系统冷源选择及能效进行了探究,以供参考。  [关键词]数据中心
期刊
[摘 要]随着我国社会经济的飞速发展,城市化的进程也随之加快,这就对市政交通提出了更加严格的要求,特别是市政道路网络的建设,所以说市政道路桥梁工程在城市发展中,有着十分重要的作用。可市政道路桥梁在近些年来也会经常出现一些质量问题,这对人们的生活环境和生命财产都带来了极大的安全隐患,所以需要相关部门对这些问题引起高度重视。本文中就针对市政道路桥梁工程中常见的通病进行详细的分析,并提出相应的预防措施。
期刊