Home

LPC2104-based design of intelligent lighting controller circuit

LPC2104 has a rich peripheral interface resources, and have a high reliability and speed, very suitable for the design of the system, intelligent lighting controller principle as shown in Figure 1.
Introduction to 3 x features LPC2104 is the PHILIPS company designed for embedded applications with high performance micro-controller solutions.
It used ARM company of 16 bit/32 bit RISC structure, kernel is ARM7TDMI-S,CPU operation frequency can up 60MHz, tablets Shang integrated: has ISP and IAP function of 128KB Flash program memory, and 16KB static RAM, and 2 a UART, and 1 a I2C serial interface, and 1 a SPI serial interface, up to 6 Road output of PWM, and 2 a timer, respectively has 4 road capture/comparison channel, and real-time clock and the watch dog timer,, to and common of perimeter device implementation seamless connection, function powerful, this article to LPC2104 for core, design structure simple, and performance stability of intelligent lighting controller.
4 design of wireless data-transmission module
4.1 Introduction Realization of wireless communication there are three options: Bluetooth, infrared, use short distance wireless remote control wireless data-transmission devices. Programme for Bluetooth, transmission distance and device cost is worth considering that problem, Bluetooth is mainly used for short distances (up to 10m), and the cost has been high.
Infrared transmission although without consider cost problem, but from handheld device by can provides of power view, it can transmission of distance is too near, only several m, and on infrared launch angle has must requirements, exists "must guarantee transmission information of two device are on, and middle cannot has obstructions", fatal of defects, and Qian two species programme compared, used short distance low power of wireless RF devices nRF401 is best select.
NRF401 wireless communications transceiver device integrated has high frequency launch/received, and PLL synthesis, and FSK modulation/demodulation and more channel switch, function, in low cost digital communication application in the has highlight of technology advantage, its main technology features has: (1) work in international General of two a channel: 433.92MHz and 434.32MHz, without for channel application to using; (2) used DSS+PLL frequency synthesis technology, external components only has 1 a crystal oscillator and several resistance capacitance and inductance, basic without debugging on can work, and stability good; (3) digital communication used has higher of anti-interference ability of FSK modulation way, support directly data entered output operation, can directly and MPU of UART serial mouth connection; (4) has 2 a can select of work channel, used half duplex work mode, highest data transfer rate can up 20bk/s; (5) work voltage for 2.7V-5V, standby state power only for 8 μ-a, can meet low power device of requirements.
NRF401 devices do not need to be initialized and configured, do not require data to be Manchester encoding, and can use cheaper PCB antenna, no complex RF circuit design and debugging, development and application of the product more convenient.
4.2 connection to LPC2104 NRF401 connection to LPC2104 there are several ways to select, such as GPIO, I2C, UART, etc, from the perspective of hardware connectivity and communication protocols simplify, select serial port connected to the wireless module is the best solution, UART1 TXD1, RXD1 DIN, DOUT connection and nRF401 respectively.

LPC2104-based design of intelligent lighting controller circuit 4

NRF401 and LPC2104 interface circuit as shown in Figure 2. Can be seen from Figure 2, main control interface of the embedded CPU for wireless module is composed of 5 signal cable, respectively is the DIN, DOUT, TXEN, and PWR_UP, and CS. Among them, enable TXEN is sent, achieved through TXEN set and reset send switch status and receive the status of, and controlled through GPIO ports, PWR_UP is the energy-saving control port, programming it with LPC2104 a GPIO port, wireless module mode and Hibernate transitions;
CS for channel selection, by GPIO settings, you can use LPC2104 DIN, DOUT signal UART1 serial control.
To energy saving, nRF401 most cases should be off, wireless hardware is not on auto-wakeup feature, software must use a reasonable amount of communication protocols to ensure that energy-saving at the same time the data is not lost.
5 dimming control circuit design I/O ports to fight the current methods of using single chip microcomputer control realization of thyristor switching and dimming control.
Internal with a zero-crossing detection circuits of optocoupler MOC3041 as thyristor drive, at the same time to achieve strong, weak isolation.
Traditional of adjusting light method are used moved phase triggered Crystal gate tube, control Crystal gate tube of guide pass angle to control output power, not only synchronization detection circuit complex, and in Crystal gate tube guide pass moments will produced high times harmonic interference, caused grid voltage waveform distortion, effect other electricity device and communications system of normal work, this system in the used had zero triggered Crystal gate tube guide pass and closed broken of time ratio to Regulation lamps of power, because had zero triggered does not change voltage of waveform and only change voltage full wave by of number, does not on grid caused pollution, therefore, this system used had zero triggered way.

LPC2104-based design of intelligent lighting controller  circuit 1

MOC3041 internal contains had zero detection circuit, dang entered introduction feet 1 entered 15mA of current, output end 6 introduction feet, and 4 introduction feet Zhijian of voltage slightly had 0 o'clock, internal bi-directional Crystal gate tube guide pass, triggered external crystal gate tube guide pass, dang MOC3041 entered introduction feet entered current for 0 o'clock, internal bi-directional Crystal gate tube closed broken, to external crystal gate tube also closed broken, its adjusting light control circuit as Figure 3 by as shown in.
6 wireless module software design
Wireless module with UART serial port connected to the system, you must initialize UART, LPC2104 UART serial port RS232 standard, 550 also supported industry standards.
LPC2104 has two common asynchronous serial interface (UART), UART status is not available by default on startup, you must programmatically GPIO can register to them. This system connects using the UART1 and nRF401, UART1 with modem interface, 16-byte receive and transmit FIFO.
Built-in baud rate generator, and contains standard modem interface signals.

LPC2104-based design of intelligent lighting controller  circuit 2

In UART1, TXD1, RXD1 pins to set before connection, and then set the baud rate of serial port and operating mode, you can send and receive data, the system uses 11.0592MHz crystal oscillator, PLL,VPB shall not apply to 4 divider set UART1 baud rate of 9600bit/s, in addition to numerical N=18, that 12H,UART1 initialization procedures are as follows:
In operating system environment Xia, system started Shi will automatically initial of serial mouth, so application called serial mouth resources will became more easy, worth note of is, application often is more any system, to real-time monitoring serial mouth message, in operation environment in the General single open a serial mouth scan task, guarantee information does not lost, in a has some engineering file of main function in the added serial mouth of hosting device initial of code, and added serial scan task, because on wireless module of control also has system of GPIO, so scan program in the also to including on I/O of operation, dang system received serial information Shi, will will active to main task sent a serial mouth information, main task received to the information will will called response function, response the message.
7 closing statement Wireless communication module nRF401 launch, receive in one, greatly simplifying the complexity of the lighting controller design, intelligent lighting controller RS485 interface is easy to group networks, for the realization of the intelligent home network provides convenience.

LPC2104-based design of intelligent lighting controller  circuit 3