国产日韩欧美一区二区三区三州_亚洲少妇熟女av_久久久久亚洲av国产精品_波多野结衣网站一区二区_亚洲欧美色片在线91_国产亚洲精品精品国产优播av_日本一区二区三区波多野结衣 _久久国产av不卡

?

STM32F407 Based Smart Robot Design with Color recognition

2017-12-13 12:12:33沈詹森
中國科技博覽 2017年42期
關(guān)鍵詞:詹森中圖標(biāo)識碼

沈詹森

[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 文獻(xiàn)標(biāo)識碼: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.

猜你喜歡
詹森中圖標(biāo)識碼
可憐的艾米莉
譯林(2022年3期)2022-05-30 10:48:04
我買兩臺
喜劇世界(2017年24期)2017-12-06 05:49:53
The Tragic Color of the Old Man and the Sea
Connection of Learning and Teaching from Junior to Senior
English Language Teaching in Yunann Province: Opportunities & Challenges
A Study of Chinese College Athletes’ English Learning
不只是外教,詹森的多重角色
詹森(Jensen)不等式在求幾何最值與證明幾何不等式中的應(yīng)用
Process Mineralogy of a Low Grade Ag-Pb-Zn-CaF2 Sulphide Ore and Its Implications for Mineral Processing
Study on the Degradation and Synergistic/antagonistic Antioxidizing Mechanism of Phenolic/aminic Antioxidants and Their Combinations
潤滑油(2014年3期)2014-11-07 14:30:02
陇南市| 阿勒泰市| 华坪县| 锡林浩特市| 绿春县| 安徽省| 绥滨县| 拜城县| 封开县| 壶关县| 含山县| 馆陶县| 浠水县| 独山县| 台中县| 潜山县| 谷城县| 鲁山县| 营山县| 深水埗区| 元氏县| 融水| 黎城县| 灵武市| 鄂尔多斯市| 葫芦岛市| 舟山市| 瓦房店市| 巴楚县| 原阳县| 那曲县| 新巴尔虎右旗| 刚察县| 沂源县| 澎湖县| 库伦旗| 平潭县| 东平县| 灯塔市| 新绛县| 阿巴嘎旗|