Keeping progressing, Pursuing integrity, Embracing future
Lighting is needed by people, whether it is at home or in the office, so ordinary lighting is just a form and color, and the smart home control system harness can control the lighting through mobile phones and networks. There are actually many uses in real life, so how to do the wiring harness of the smart home lighting control system? How to design the circuit?
This paper introduces the indoor lighting control system and its principle based on the single chip AT89C51, and proposes an effective energy-saving control method. The system adopts today's more mature sensing technology and computer control technology, and uses multiple parameters to control the indoor lighting of school classrooms. The system is composed of a single-chip microcomputer plus a variety of interface circuits. There are six main parts: AT89C51 chip, optical signal acquisition circuit, human body signal acquisition circuit, clock control circuit DS12887, output control circuit, and timing monitor circuit.
Main controller circuit design
The main controller adopts AT89C51 single-chip microcomputer as the microprocessor. AT89C51 is a low-voltage, high-performance CMOS 8-bit single-chip microcomputer produced by ATMEL in the United States. The chip contains 4Kbytes of rewritable Flash read-only program memory and 128bytes of random access data memory. (RAM), the device is produced by ATMEL's high-density, non-volatile storage technology, compatible with the standard MCS-51 instruction system, and has a built-in general-purpose 8-bit central processing unit (CPU) and Flash storage unit. The interface circuit of the main controller system is composed of keyboard, digital display and drive circuit, crystal oscillator, watchdog circuit, communication interface circuit and so on. The hardware circuit schematic diagram of the main controller system is shown in Figure 1.
Smart Home Lighting Control System
Design of RS485 Communication Circuit Harness
In various distributed distributed control systems, one single-chip microcomputer is often used as the host, and multiple single-chip computers are used as slaves. The host controls the operation of the entire system; the slaves collect signals to realize on-site control; the host and the slave are connected by a bus , as shown in Figure 2-4. The master sends information to each slave (point-to-point) or multiple slaves (broadcast) through TXD, and each slave can also send information to the master, but the slaves cannot communicate freely, and they must pass the master. .
The wired communication method of this system adopts RS485 bus for communication. The RS485 standard supports half-duplex communication. It only needs three wires to send and receive data. It also has the ability of common mode interference. Communication distance, the communication distance can reach 1200m at 100Kbps rate, and if the communication distance is shortened, the rate can reach 10Mbps. The master-slave communication method is used here, the master is acted by the master controller, and the slave is the sub-controller. The master is in a dominant and dominant position. The slave receives and sends data in an interrupted manner. The information sent by the master can be transmitted to all slaves or designated slaves. The information sent by the slave can only be received by the master, and cannot be sent between slaves. direct communication. The communication circuit diagrams of the master and the slave are shown in Figure 2 and Figure 3 respectively.
Smart home lighting control system wiring harness
Slave Communication and Optical Signal Sampling Circuit Harness Design
The RS485 communication transceiver chip selected by the host and the slave is MAX485, which is a low-power transceiver device produced by MAXIM for RS485 communication. It works with a single power supply +5V, the rated current is 300μA, and it adopts half-duplex communication. It completes the function of converting TTL level to RS485 level. The MAX485 chip contains a driver and . The RO and DI terminals are the output and the input terminal of the driver respectively. When connecting to the single-chip microcomputer, they only need to be connected to the RXD and TXD of the single-chip microcomputer respectively; the RE and DE terminals are the enable terminals for receiving and sending, respectively. When the RE terminal is a logic terminal When it is 0, the device is in the receiving state; when the DE terminal is logic 1, the device is in the transmitting state, because the MAX485 works in the half-duplex state, so just use one pin of the microcontroller to control these two pins, the host and the The slave uses P2.6 and P1.0 pins for control respectively; A and B are the differential signal terminals for reception and transmission, respectively. When the level of A pin is higher than B, the data sent is 1; when A When the level is lower than the B terminal, the data sent is 0. When communicating, only one signal is needed to control the receiving and sending of the MAX485. At the same time, a matching resistor is added between the A and B terminals, and a 120Ω resistor is selected here.
Smart home lighting control system wiring harness
In order to improve the anti-interference ability of the system, the photoelectric coupler TLP521 is used to optically isolate the communication system. The slave uses P1.0 of the single-chip microcomputer to control the working state of the communication transceiver MAX485, and usually sets P1.0 to be a low level, so that the serial port of the slave is in a listening state. When a serial interrupt occurs, judge whether it is the local number. If it is the local address, set P1.0 to high level, send the response information, and then set P1.0 to low level to receive the control command, and continue to maintain P1 .0 is low level, the serial transceiver is in the receiving state; if it is not the local address, P1.0 is low level, so that the serial transceiver is in the receiving and listening state.
Optical signal sampling circuit wiring harness
The optical signal sampling circuit is shown in Figure 4, which is mainly composed of the optical signal acquisition circuit and the A/D analog-to-digital conversion circuit, of which the analog-to-digital conversion is the circuit. After the signal is collected and sent to the A/D conversion circuit, after being processed by the single-chip microcomputer, it is finally used as the basis for the system application program to judge whether to turn on and off the light. The number of bits of the A/D converter should be selected according to the measurement range and accuracy of the signal, so that it has sufficient data length to ensure that the quantization error is within the accuracy range required by the design. In this system, the voltage of the measurement range of the signal: 0.00-9.99V, and the accuracy is 0.01V. In this design, the 10-bit analog-to-digital converter TLC1549 with serial control is selected, which is produced by Texas Instruments (TexasInstruments abbreviated as TI), it adopts CMOS technology, has automatic sampling and holding, and adopts differential reference voltage High impedance input, good anti-interference performance, can calibrate the conversion range according to the proportional range, the total unadjustable error reaches (±) 1LSBMax, and the chip size is small. At the same time, it adopts Microwire serial interface, so it has fewer pins and the interface is convenient and flexible. Compared with the traditional parallel interface A/D converter (eg ADC0809/0808), the interface circuit of its single-chip microcomputer is simple and occupies less I/O port resources.
Smart home lighting control system wiring harness
This paper presents the design principle and implementation method of the intelligent lighting control system based on the AT89C2051 microcontroller. First, draw the schematic diagram with ProtelDXP software according to the design requirements, then select the components according to the schematic diagram, arrange the components on the breadboard and connect the lines, test the hardware circuit, check whether the serial port is wrongly selected, and measure whether the power supply is normal. Whether the reset level is correct, whether the microcontroller starts to vibrate, etc. Since this design is designed in a relatively ideal situation, in practical application, the lighting control system and the power supply of the projection equipment need to be separated. When used in other workplaces, some modules can be added or reduced according to actual needs. For example, when used on roads, no time control circuit is required; when used indoors, wireless modules can also be added to facilitate control.
Disclaimer: All information indicated as other sources is transferred from other platforms, the purpose is to convey more information, and is not responsible for the views and positions of this site and its authenticity. If there is any infringement or objection, please contact us to delete it.
Inquiry
LATEST BLOGS
INQUIRY
RELATED PRODUCTS