Design of intelligent lighting controller for highway tunnel based on LPC2119 microcontroller design

Publisher:祝福的4号Latest update time:2023-03-06 Source: elecfansKeywords:LPC2119 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

Tunnels are an important part of highways, and tunnel lighting systems are an essential guarantee for vehicles to safely enter, pass, and leave tunnel areas. At present, the lighting of long tunnels is divided into entrance section, transition section, basic section and exit section. The lighting fixtures in each section are divided into emergency lights, full day lights and enhanced lights according to their functions. In addition to being used as emergency lighting during power outages, the emergency lights also serve as all-day lighting. The all-day lights work 24 hours a day, and the enhanced lights are turned on according to the different brightness of the hole. The brightness requirements of different areas in the tunnel are different. They are related to many factors such as brightness outside the tunnel, traffic flow, amount of exhaust gas in the tunnel, driving speed, maintenance cycle of lamps, etc., and even related to the material of the road surface and the decoration materials of the tunnel wall. . The control of these lights is currently basically controlled by switching the lighting circuit on and off. Generally, tunnels have seven or eight lighting control loops. The construction investment is large and the construction is difficult. After the tunnel is opened, managers can only control a limited number of loops, making it difficult to take into account operating costs and tunnel safety. We use Philips' microcontroller LPC2119 based on the ARM7 TDMI-S core to design and implement an intelligent lighting controller. It is applied in the highway tunnel lighting CAN network, which better solves the problem between the initial investment in tunnel lighting, operating costs and tunnel safety. contradiction and received good economic and social benefits.


Composition of CAN network for tunnel lighting system

CAN (Controller Area Network) is one of the most widely used fieldbuses in the world today. The CAN bus was originally designed by the German Bosch company for automobile detection and control systems. Because the CAN bus has unique design ideas, good functional characteristics, extremely high reliability, and strong on-site anti-interference ability, the international standards organization ISO has formulated the international standard for the CAN bus.

The CAN protocol is based on the open system interconnection reference model OSI of the International Standards Organization ISO, and mainly works on the physical layer, data link layer and application layer. Users can develop their own application layer communication protocols based on actual needs. CAN bus signal transmission can use twisted pairs, coaxial cables or optical fibers. The maximum communication rate can reach 1Mbps. When the data transmission is 5Kbps, the transmission distance can reach 10Km. There can be up to 110 network nodes on a CAN network segment, and the network segment can also be extended through CAN gateways/bridges or interconnected with various other networks.

These characteristics of the CAN bus make it very suitable for application in harsh highway tunnel monitoring systems or lighting control systems. The highway tunnel lighting control system CAN network mainly consists of a host computer, an intelligent lighting controller, a CAN gateway/bridge, etc. (Figure 1).

Design of intelligent lighting controller for highway tunnel based on LPC2119 microcontroller design

Figure 1 CAN network structure of tunnel lighting control system

The host computer is a PC with a PC-CAN interface card plugged in. The network topology adopts a bus structure and the transmission medium uses twisted pairs. In order to improve the anti-interference ability of the system, photoelectric isolation is adopted between the transmission medium and the intelligent controller. The host computer is connected to the tunnel vehicle detector group and light intensity detector, and is equipped with the corresponding software developed by us to intelligently control the lighting system of the entire tunnel.


The control strategy of the software is as follows: when no vehicle enters the tunnel, only the corresponding basic lighting is turned on in the tunnel according to the light intensity difference between the inside and outside of the tunnel detected by the light intensity detector. When the vehicle detector detects that a vehicle will enter the tunnel, , turn on the enhanced lighting at the tunnel entrance. When the vehicle enters the tunnel, the enhanced lighting at a corresponding distance in front of the vehicle is turned on. Once there is no vehicle following behind, the enhanced lighting behind the vehicle is turned off. At the same time, the light intensity meter can also be used to determine whether it is sunny, cloudy, day, or night and turn on or off the corresponding lighting. Individual lighting can be controlled individually or regional lighting can be controlled in groups. The control strategy can be modified at any time according to actual conditions. This saves a lot of electricity and effectively reduces operating costs.


Intelligent lighting controller hardware design

Figure 1 is the overall design block diagram of this intelligent controller, which is mainly composed of CPU module, power module, communication module, light intensity detection module, temperature detection module, current detection module, switch control module, etc. The communication module connects all controllers into a complete network, allowing the attendant to remotely control the entire lighting system in the monitoring room. Light intensity, temperature, and current detection are used to judge the work of the equipment by detecting these parameters. In this case, the switch control module is controlled through photoelectric coupling and high-power silicon controlled switch.


CPU module

The core of this intelligent controller uses Philips' LPC2119 microprocessor, which uses ARM's ARM7TDMI-S core, a microprocessor based on RISC reduced instruction set, with a 32-bit bus width, built-in 16KB SRAM, and 128 KB Flash memory. . Through the frequency multiplication of the external crystal oscillator by the on-chip PLL, the maximum CPU operating frequency of 60MHz can be achieved. At the same time, ISP in-system programming and IAP in-application programming functions can be realized through the on-chip Boot loader. Due to the LPC2119's smaller 64-pin package, extremely low power consumption, multiple 32-bit timers, 4-channel 10-bit ADCs, 2-channel CAN, 8-channel 10-bit ADCs, and up to 9 external interrupts, they can be easily used. Good to meet the design needs of the system. The system hardware circuit is shown in Figure 2.

Figure 2 Block diagram of intelligent lighting controller

Power module

LPC2119 is a dual power supply, with CPU operating voltage range: 1.65~1.95 V (1.8 V± 0.15 V), I/O operating voltage range: 3.0~3.6 V (3.3 V± 10%), and can withstand 5V voltage, while the temperature sensor and Both the photoelectric sensor and the optocoupler isolator require 5V DC power supply, so when designing the power module, 5V, 3.3V and 1.8V DC power supplies must be provided. A rectifier bridge and voltage stabilizing module are added to the power circuit, and a power isolator B0505S is used to isolate the input and output power supplies to shield the influence of power supply noise.


Communication module

Medium-long highway tunnels are generally about 1 to 2 kilometers, and extra-long tunnels can even reach more than ten kilometers. The number of tunnel lights also ranges from hundreds to thousands. In addition, the environmental conditions in the tunnel are harsh, and RS-485 communication has shortcomings such as poor anti-interference ability, high bit error rate, no error correction and retransmission mechanism, short communication distance, and inconvenient expansion, so it is not suitable to use RS485 communication network here. . LPC2119 integrates 2 CAN controllers inside, which provides convenience for us to use CAN network. CAN communication has high speed, good openness, long communication distance, and has the characteristics of multi-master station operation and decentralized arbitration serial bus and broadcast communication. Compared with other communication buses, CAN bus data communication has outstanding high reliability, Real-time and flexibility. Through the CAN bus, we can also integrate the control of ventilators, rolling shutter doors and other related equipment.


Light intensity, temperature, current detection module

LPC2119 integrates four 10-bit A/D converters internally, which provides great convenience for light intensity, temperature, and current detection. Light intensity detection uses a photosensitive transistor to detect environmental brightness parameters and provide them to the main program for automatic control. This parameter can also be used to judge the quality of the light source. The temperature parameters provide the temperature of the equipment itself and the surrounding environment to ensure safe and reliable operation of the equipment. The current parameter is to continuously monitor the working status of the light source. The AC signal is directly sent to the A/D converter integrated inside the LPC2119 after passing through the transformer and signal conditioning to collect and transform the current parameters.


switch control module

LPC2119 provides up to 46 general-purpose I/O ports, so it is very convenient to control lighting. A lighting controller can control 4, 8 or 16 lighting lamps respectively or simultaneously according to the actual situation. LPC2119 controls lighting through solid state relays.


In order to enhance the anti-interference of the system, this lighting controller adopts photoelectric isolation technology. All outputs use photoelectric couplers to isolate interference signals, which effectively improves the reliability of the system. At the same time, due to the limited I/O driving capability of the CPU, it is generally not enough to drive some electromagnetic actuators, so a driver interface circuit needs to be added. In order to avoid interference to the system, isolation measures must be taken. For example, the main circuit where the thyristor in this example is located is an AC high-voltage circuit with high voltage and large current, which is not easy to be directly connected to the CPU. An optocoupler can be used to isolate the CPU control signal from the thyristor trigger circuit. The optocoupler isolation drive circuit is shown in Figure 3.

[1] [2]
Keywords:LPC2119 Reference address:Design of intelligent lighting controller for highway tunnel based on LPC2119 microcontroller design

Previous article:How to write the startup code of ARM7 (LPC2119 as an example)
Next article:Development plan of serial port to network port dedicated protocol card for LPC2364

Latest Microcontroller 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号