Design of a wireless switch system for intelligent home lighting control

Publisher:MysticSerenadeLatest update time:2011-12-22 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 System Design

With the continuous development of electronic technology, wireless technology plays an increasingly important role in intelligence. This design is a wireless remote control switch system that can realize long-distance lighting control. It consists of two parts: the transmitting system and the receiving system. The system uses a wireless transceiver module to form a radio frequency transmitting and receiving circuit. The transmitting part is mainly composed of a key addressing circuit, an encoding circuit and a transmitting module; the receiving part is mainly composed of a receiving module, a single-chip control circuit and a load circuit.

The transmitting system is powered by 1 12 V dry battery, the receiving system is powered by 3 1.5 V dry batteries, and the microcontroller is powered by 5 V DC power supply. The power supply system is energy-saving and simple.

2 System Implementation

2.1 Component Selection and System Block Diagram

Considering the compatibility, practicality, low cost and energy saving of the system, the AT89S52 single-chip microcomputer is selected, and the PT2262/2272 wireless transceiver module is used to realize 315 MHz wireless communication. The AT89S52 single-chip microcomputer is a low-power, high-density CMOS 8-bit single-chip microcomputer manufactured by ATMEL using non-volatile storage technology. It contains 8 KB ISP (In-system programmable) Flash read-only program memory that can be repeatedly erased and written 1,000 times. It is compatible with the standard MCS-51 instruction system and 80C51 pin structure, and can provide cost-effective solutions for many embedded control application systems.

PT2262/PT2272 is a low-power, low-cost general-purpose codec circuit manufactured by Taiwan Pucheng Company using CMOS technology. PT2262/PT2272 can have up to 12 bits (A0-A11) three-state address pins (floating, high level, low level), and any combination of 12 bits (A0-A11) three-state address pins can provide 531 441 address codes. PT2262 can have up to 6 bits (D0-D5) data pins, and the set address code and data code are serially output from pin 17 [2].

The system block diagram of the circuit is shown in Figure 1.

2.2 System Circuit Diagram

The system circuit consists of two parts: wireless transmitting system and wireless receiving system.

(1) Wireless transmission system circuit (as shown in Figure 2): It is mainly completed by PT2262 chip. Circuit PT2262 encodes the key signal and can control 4 channels. In Figure 2, pins 1 to 8 of PT2262 are the encoding address terminals. Each address terminal can be set to "high level" (this pin is connected to 12 V), "low level" (this pin is grounded), and "suspended". Pins 10 to 13 are the encoded data input terminals D3 to D0 (using 4-bit data). A button is connected to each data terminal to control different devices. When the button is pressed, the button adds 12 V voltage to the corresponding data terminal, and the data terminal information is transmitted through the crystal oscillator. PT2262 will encode according to the address code setting and the input data, and output the encoding pulse from pin 17. Wireless communication is controlled by coded pulses [2-3]. When the pulse at pin 17 is "1", the oscillator composed of V1 works, generates a 315 MHz high-frequency signal and transmits it; when the output pulse at pin 17 is "0", the oscillator composed of V1 stops working.

(2) Wireless receiving system circuit: The receiving system circuit is mainly composed of a receiving module (including a radio frequency module, a chip PT2272 and peripheral circuits), a relay circuit and a load circuit, as shown in Figure 3. Pins 1 to 8 of PT2272 are decoding address terminals. Each address terminal can be set to three states: "high level" (this pin is connected to 5 V), "low level" (this pin is grounded), and "floating". The setting of the decoding address corresponds to the address code of PT2272. When the RF module receives the signal sent by the transmitting circuit, PT2272 compares and checks the address code (decoding). If the address code is correct, the signal sent by the TE pin of the transmitting module (the coding start end is used for the coding transmission of multiple data, and the low level is effective) enters the PT2272 through the Din pin (pin 14) of the RF module, and the data enters the single-chip microcomputer through the data output pins D0~D3 (pins 10~13) of PT2272; otherwise, the data output pin of PT2272 does not have any action. When the signal enters the single-chip microcomputer, the single-chip microcomputer analyzes it and makes corresponding control. If the first signal received is high level, the digital display tube controlled by the single-chip microcomputer will display "11" (the first "1" indicates the first signal, and the second "1" indicates that the signal is high level), and the single-chip microcomputer sends a high level to the relay circuit, the relay is energized, and the load circuit works; when the high level is received for the second time, the corresponding port level is set to zero through the single-chip microcomputer; when the high level is received for the third time, it is set to 1 again, and so on; when the digital tube displays "1 1" (the first 1 indicates the first signal, and the second 1 indicates that the signal is low level), the single-chip microcomputer sends a low level to the relay circuit, the relay is disconnected, and the load stops working. Relays and digital tubes can be used to achieve flexible control and clear display.

3 Program Writing and Debugging

The control program is written into the AT89S52 microcontroller using Keil C51, and the output signal of the microcontroller is assigned different levels ("1" or "0") using the serial port debugging assistant. The test result can reach 100%, the maximum control distance can reach 50 m, and the response time is no more than 1 s.

This design uses the AT89S52 microcontroller and the PT2262/2272 chipset to implement a programmable 4-way wireless switch system for lighting control, avoiding the limitations of using dedicated decoding chips, making full use of system software and hardware resources, and providing a scientific solution for smart home lighting control with good scalability and flexibility, low cost and low power consumption.

Reference address:Design of a wireless switch system for intelligent home lighting control

Previous article:Research and implementation of stereoscopic display technology in virtual reality
Next article:Expert opinion: Detailed discussion on cloud storage deduplication technology

Latest Security Electronics Articles
Change More Related Popular Components

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号