Football robot infrared communication system based on SC6121 chip

Publisher:第二眼帅哥Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: Based on the characteristics of football robots, an infrared communication system design based on the SC6121 chip is proposed. It has more advantages than the previous infrared communication system based on the chip M50462.

    Keywords: football robot infrared device

    In September 1995, Professor Kim Jong-hwan of the Korea Institute of Science and Technology (KAIST) put forward a proposal to hold a World Robot Football Competition. In November of the same year, an international organizing committee was established at KAIST to hold the Micro Robot World Cup Football Competition. The Micro Robot World Cup Football Competition was held for the first time at KAIST from November 9 to 12, 1995, and has been held four times so far. The football robot is mainly composed of CPU board, sensor, drive part, communication system, vision system, host system and other parts. The author of this article once published an article studying the infrared communication problem of football robots. At that time, M50462 was used as the encoding chip to study. It has two shortcomings. One is that the reliability is not high enough; the other is that the user code that M50462 can select is only 2 bits, and there are only 4 user codes at most to form network communication. SC6121 has high reliability and has 8 user codes to choose from. The communication network system can have 256 user codes. Therefore, it is more appropriate to choose SC6121 as the encoding chip in the football robot infrared communication system. This article will discuss how to use the coding chip SC6121 to realize network communication of football robots.

1 System configuration

    Time Division Multiple Access (TDMA) technology is a technology often used in network communications. In communication systems that do not require high communication speeds, the reception and transmission of information are sometimes designed on the same channel. This technology is called time division duplex (TDD) technology, which is a variant of TDMA. The football robot infrared communication system we designed based on the SC6121 chip uses TDD technology. In this system, the communication device connected to the computer RS232C is regarded as the base station of the communication system, which is responsible for controlling the communication system. Consider the communication device on the football robot as a user, thus forming a football robot communication system as shown in Figure 1. Each football robot communication device occupies two user codes of the SC6121 chip, one of which is used as the identification code of the communication device's receiving time slot, and the other is used as the identification code of the sending time slot. The base station allocates receiving time slots and sending time slots to each robot through the user code of the control chip SC6121. SC6121 has 256 user codes and can constitute 128 communication devices using TDD technology. If one of them is used as a base station, the maximum number of communication devices in the system is 127, which is enough to meet the communication requirements of football robots.

2 Encoding circuit

    The transmitting part adopts the special chip of SC6121 infrared remote control system, which is composed of oscillation circuit, timing generator and control circuit, keyboard input scanning circuit, keyboard input/output scanning circuit, code generation circuit and output control circuit. The oscillator generates a signal with a fixed frequency (we choose 455kHz). After the signal is gated by the timing generator (frequency divided by 12), it generates a clock pulse and a carrier frequency signal (when the fixed frequency is 455kHz, it is 38kHz), in which the clock pulse It is sent to the code generation circuit; the carrier frequency signal is sent to the output control circuit. The command code output by the code generation circuit is modulated on the carrier frequency signal. This signal is then amplified by the buffer amplifier and output from the integrated circuit. The output signal drives the transistor (8550), thereby controlling the current flowing to the infrared light-emitting diode (PH303). When the infrared light-emitting diode (PH303) has a forward current flowing, it emits infrared rays outward, thereby achieving the purpose of emitting coding. The output waveform of SC6121 is shown in Figure 2.

    As can be seen from Figure 2, a frame code transmitted by SC6121 contains a pilot code, a 16-bit user code and an 8-bit key data code. The complement of the key data code is also transmitted at the same time. The pilot code consists of a 9ms carrier waveform and an off-time of 4.5ms, which serves as a guide for subsequent transmitted codes. In this way, when the receiving system is composed of a microprocessor, it can more effectively handle the timing relationship between code reception, detection and various controls. The SC6121 chip encoding adopts pulse position modulation methodPPM, using the time interval between pulses to distinguish "0" and "1". When the 8-bit codes are transmitted, their inverse codes are also transmitted, thus greatly reducing the system bit error rate. M50462 does not transmit the complement code, so from this point of view, SC6121 has higher reliability than M50462.

    The principle of SC6121 sending circuit is shown in Figure 3. As can be seen from Figure 3, the infrared communication network based on the SC6121 chip can have 256 user codes, while the M50462 can only have 4 user codes at most. It can be seen that SC6121 is more suitable for network communication.

3 Decoding circuit

    The receiving part is composed of PH302 infrared receiving tube and preamplifier circuit KA2184. The amplified signal is directly sent to the AT89C51 microcontroller, which is decoded by software. See Figure 4 for the receiving circuit principle.

4. Decoding software

    According to ② in Figure 2, it can be obtained that the "0" code pulse spacing is 1.125ms, and the "1" code pulse spacing is 2.25ms. In this way, the decoding can be easily obtained through the timer of the AT89C51 microcontroller.

    See Table 1 for the SC6121 coded integrated circuit key data code.

Table 1 Relationship between SC6121 matrix keys and key data codes

Keyboard number matrix contact data code
         K0 K1 K2 K3 KI/O D0 D1 D2 D3 D4 D5 D6 D7
K1 *         0 0 0 0 0 0 0 0/1
K2   *       1 0 0 0 0 0 0 0/1
K3     *     0 1 0 0 0 0 0 0/1
K4       *   1 1 0 0 0 0 0 0/1
K5 *       KI/01 0 0 1 0 0 0 0 0/1
K6   *       1 0 1 0 0 0 0 0/1
K7     *     0 1 1 0 0 0 0 0/1
K8       *   1 1 1 0 0 0 0 0/1
K9 *       KI/O2 0 0 0 1 0 0 0 0/1
K10   *       1 0 0 1 0 0 0 0/1
K11     *     0 1 0 1 0 0 0 0/1
K12       *   1 1 0 1 0 0 0 0/1
K13 *        KI/O3 0 0 1 1 0 0 0 0/1
K14   *       1 0 1 1 0 0 0 0/1
K15     *     0 1 1 1 0 0 0 0/1
K16       *   1 1 1 1 0 0 0 0/1
K17 *       KI/O4 0 0 0 0 1 0 0 0/1
K18   *       1 0 0 0 1 0 0 0/1
K19     *     0 1 0 0 1 0 0 0/1
K20       *   1 1 0 0 1 0 0 0/1
K21 *       KI/O5 0 0 1 0 1 0 0 0/1
K22   *       1 0 1 0 1 0 0 0/1
K23     *     0 1 1 0 1 0 0 0/1
K24       *   1 1 1 0 1 0 0 0/1
K25 *       KI/O6 0 0 0 1 1 0 0 0/1
K26   *       1 0 0 1 1 0 0 0/1
K27     *     0 1 0 1 1 0 0 0/1
K28       *   1 1 0 1 1 0 0 0/1
K29 *       KI/O7 0 0 1 1 1 0 0 0/1
K30   *       1 0 1 1 1 0 0 0/1
K31     *     0 1 1 1 1 0 0 0/1
K32       *   1 1 1 1 1 0 0 0/1

    We use timer 1 of the AT89C51 microcontroller for timing, and pin 12 of the AT89C51 as an external interrupt. After obtaining the key data code through software decoding, we then look up Table 1, so that we can analyze the meaning of the information and realize software decoding. See Figure 5 for the interrupt program flow chart.

    With encoding and software decoding, communication can be achieved. The base station transmits the information to the communication device of the football robot through coding, and the communication device of the football robot obtains the information content through software decoding. The same is true in reverse. The football robot communication device sends information through encoding, and the base station obtains the information through software decoding. The football robot communication device, base station and information transmission direction are all distinguished by the user code of the SC6121 chip.

Reference address:Football robot infrared communication system based on SC6121 chip

Previous article:Application of IrDA infrared communication in navigators
Next article:Distributed real-time hydrological monitoring system with wireless data communication

Latest Industrial Control Articles
Change More Related Popular Components
Guess you like
    502 Bad Gateway

    502 Bad Gateway


    openresty

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号