Home > Other > Circuit design of multi-machine wireless short-range communication system based on single-chip microcomputer

Circuit design of multi-machine wireless short-range communication system based on single-chip microcomputer

Source: InternetPublisher:已注销 Updated: 2021/08/21

The rapid development of modern communication technology has led to the use of wireless communication methods for data transmission in many application fields. The circuit composed of codec chips PT2262 and PT2272 is widely used in various types of wireless remote controls, wireless alarms, toys and other small electrical devices due to its small size, low power consumption, strong functions, and low cost. However, this kind of circuit is rarely used in communication of multiple bytes of data and has certain limitations. This article mainly introduces the use of 433 MHz high-frequency transmitting module and receiving module to produce multi-machine wireless ASCII code format SMS communication. This communication method is to define a wireless transmission protocol based on the 433MHz high-frequency transmitting module and receiving module to realize multi-byte data communication between any two machines.

Host circuit design

Since the amount of programs involved in the system is relatively large, the storage capacity of the Flash program memory must not be too small; to store the transmitted and received text messages, an EEPROM data memory module is used. The contents stored in the EEPROM data memory will not be lost when the power is turned off. ; Receiving and decoding requires pulse width capture and comparison functions, and the capture/compare/pulse width modulation CCP module is required; independent timers are required for transmission, reception and clock, and the number of required timers is not less than 3. Based on the design needs, Microchip's PICl6F877A chip is used as the main controller of the system. The circuit is mainly composed of a main control chip, a crystal oscillator circuit and an online simulation interface, as shown in Figure 2. In the design, three interfaces, MCLR, RB6, and RB7, are used as online simulation interfaces.

Circuit design of multi-machine wireless short-range communication system based on single-chip microcomputer

Design of transmitting and receiving circuits

Using 433 MHz high frequency transmitting and receiving modules. The 433 MHz high-frequency transmitting circuit starts to oscillate and transmit high-frequency signals with constant amplitude when the control pin is at high level, and stops oscillating when the control pin is at low level. Therefore, the control pin can be used to complete amplitude keying (ASK modulation) of the high-frequency circuit, which is equivalent to amplitude modulation with a modulation degree of 100%. When the receiving module receives a 433 MHz constant-amplitude high-frequency signal, the signal pin outputs a high level, otherwise it outputs a low level. Therefore, the high and low level changes of the receiving signal pin will correspond to the high and low level changes of the transmitting control pin. Multiple receiving modules can receive signals from the same transmitting module at the same time, enabling one machine to send and multiple machines to receive at the same time. The circuit shown in Figure 3 is a transmitting and receiving module for a high-frequency 433 MHz carrier. When the control pin B5 is high in the 433 MHz high-frequency transmitting circuit, the transistor T1 is turned on, and the T2 emitter is grounded to start oscillating and transmit a high-frequency 433 MHz signal with equal amplitude; when the control pin B5 is low, it stops. oscillation. Therefore, control pin B5 can be used to complete amplitude keying (ASK modulation) of the high-frequency circuit, which is equivalent to amplitude modulation with a modulation degree of 100%. When the receiving module receives a high-frequency signal with a constant amplitude of 433 MHz, the signal pin outputs a high level to the C2 port. If it does not receive a high-frequency signal with a constant amplitude of 433 MHz, it outputs a low level. Therefore, the high and low level changes of the receiving signal pin will correspond to the high and low level changes of the transmitting control pin. For example, if the waveform shown in Figure 4 is input to the B5 pin, the same waveform will appear on the C2 pin of the receiving module. Note that the control signals of B5 and C2 are respectively sent by RB5 and RC2 of the main control chip PICl6F877A.

Circuit design of multi-machine wireless short-range communication system based on single-chip microcomputer

Design of LCD Peripheral Control Circuit

Using Nokia 3310 LCD display module. The LCD is an 84&TImes48 dot matrix LCD screen. One screen can display 4&TImes7 (12&TImes12 dot matrix) Chinese characters, or 6&TImes14 (6×8 dot matrix) English, numbers, punctuation marks and other characters. This LCD display is light, thin, short, has low power consumption, and is often used for mobile phone display. The LCD peripheral circuit is shown in Figure 5.

Circuit design of multi-machine wireless short-range communication system based on single-chip microcomputer

In this design, the Nokia 33lO LCD is powered by 3 V. Among them, pin 1 is the power pin, pin 6 is the ground wire, pin 2 is SCLK, and pin 3 is SDIN. Pin 4 is the data/address selection terminal, giving high and low levels to pin 4 respectively, which can control the microcontroller to write data or write commands to the Nokia 3310 LCD. Pin 5 is the enable terminal and is active at low level. Pin 8 is the reset terminal and is active at low level. Pin 11 is connected to the positive stage of the backlight power supply, and pin 12 is connected to the control stage of the backlight power supply. 9. Pin 10 is the speaker that comes with the Nokia 3310 LCD. The sound effect of this speaker controlled by a microcontroller is not ideal, so a DC built-in oscillation buzzer is used instead. In order to avoid the impact of the buzzer and backlight on the LCD power supply when they are working, the buzzer and backlight are powered by a 5 V power supply, which is separate from the LCD power supply.

The design method described in this article integrates encoding and decoding technology, communication protocol technology, anti-interference technology, text message editing technology, and liquid crystal dot matrix display technology. Any two machines can send text messages of 70 ASCII characters to each other, and text messages can be edited like ordinary mobile phones. The machine can be named by the user to distinguish it from other machines, realizing one-to-one communication. Universal names can also be used ( "WDX") realizes one-to-multiple machine communication. You can store a sent text message, a newly received text message and old text messages. The entire system has a friendly human-computer interaction interface, similar to an ordinary mobile phone system, with operation prompts and easy operation. The layered protocol used in this design can easily replace the wireless communication module with other wireless modules with better performance.

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号