The land-to-ground ratio of urban high and low voltage transmission cables has become one of the symbols of urban management level. In recent years, urban power transmission and distribution cables are gradually changing from overhead lines to power cables. As the channel of cable lines, the construction speed of cable trenches is accelerating year by year, and the construction mileage is increasing year by year. In the future, it will be carried out on a large scale.
A cable trench detection system is developed, which uses modern equipment and means to transmit the cable trench environment and cable operation status in real time, monitor the whole process, display the status, critical alarm, predictive prompts, event analysis and statistics, etc. Through this equipment, the management of cable trenches is transformed from manual periodic inspection and post-event remediation to a management mode that combines full-time real-time monitoring, manual periodic maintenance and event emergency response processing. Eliminate potential accidents in the bud, prevent them before they happen, reduce the accident rate and personnel costs, improve power supply quality, and increase economic benefits. Based on the LPC2292 controller and CAN field bus technology, considering economic and practical factors, a distributed cable trench monitoring system with simple structure, high cost performance, flexible expansion and strong versatility is proposed and designed.
2 Overall system design
The design is a power cable trench monitoring system with a hierarchical (level) distributed multi-CPU structure. The monitoring system can be divided into three levels according to the structural function, namely: lower computer signal acquisition layer; upper computer data processing layer; network communication service layer. The system structure block diagram is shown in Figure 1.
(1) The control device of the lower computer signal acquisition layer is LPC2292, which has an embedded ARM7 microprocessor. The μC/OS-II operating system is transplanted on this device. The main responsibilities of this layer are: when a thief enters the channel, the lower computer generates an early warning signal to the upper computer, that is, the anti-theft function; and it has moisture-proof, explosion-proof, anti-virus and other functions, so this layer also has sensor equipment for collecting monitoring information, including: temperature sensor, anti-theft sensor, water level sensor, etc.
(2) Upper computer data processing layer The upper computer is the connection device between the CAN bus and the IP network, and the control device of this layer is also LPC2292. However, this layer does not connect sensors, but network connection modules, LCD interfaces, keyboards, and CAN communication modules. In addition to the functions related to CAN communication with the lower computer, the power channel information obtained from the lower computer is also displayed on the LCD, and the system parameters can be set through the keyboard. It is also necessary to organize the detection signals from all monitoring points on the CAN bus into IP packets in chronological order and send them to the central communication server when the IP link is unblocked.
(3) The network server layer is mainly composed of network communication servers and data servers. Cable channel information, sensor information, location information and alarm signals are sorted and stored, and combined with the data of the geographic information system (GIS) according to the business logic and required format, and then published to the authorized management system personnel and leaders of the power supply bureau at all levels in the form of WEB to complete the management and maintenance of the system, including database servers, GIS systems, application servers, management machines, etc.
3 System hardware design
The hardware composition of the lower computer system equipment is shown in Figure 2: control device LPC2292, CAN communication module, JTAG, Flash, SRAM memory, power module, current-to-voltage module, sensor and interface circuit. The hardware composition of the upper computer system equipment is similar to that of the lower computer.
3.1 Introduction to LPC2292
The core control device of the control system adopts LPC2292 microprocessor, which integrates 2 CAN controllers. Its main features are: 16/32-bit ARM7TDMI-STM CPU that supports real-time simulation and tracking; 16-bit Thumb mode can be used for applications with strict control of code size, which reduces the code size by more than 30% with little performance loss; LPC2290 has a 144-pin package, extremely low power consumption, multiple 32-bit timers, 8-way 10-bit A/D converter, 2-way CAN, PWM channels and up to 9 external interrupts. LPC2292 not only has the function of the main controller, but also serves as the node controller of CAN to realize data transmission and exchange with other nodes in the network.
3.2 CAN interface circuit
The CAN interface circuit is the key to CAN communication of the entire circuit. Its hardware circuit is shown in Figure 3, which consists of ARM microcontroller LPC2292, CAN bus transceiver TJA1050T, high-speed optocoupler 6N137 and power isolation module B0505S. Pin P0.23 RD2 and pin P0.24 TD2 are the transceiver pins of the CAN control module of LPC2292.
The two-way CAN controller integrated in LPC229 complies with the CAN specification CAN2.0B and ISO11898-1 standard. The bus data baud rate can reach 1 Mb/s, and 32-bit registers and RAM can be accessed.
The transceiver TJA1051T is the interface between the CAN protocol controller and the physical bus, which is fully compatible with the ISO11898 standard. CANH and CANL are ideally matched to reduce electromagnetic radiation to a minimum. CANH and CANL of LPC2292 are connected to RXD and TXD of TJA1050T respectively through high-speed optical coupler 6N137. The two power supplies used in the optical coupler circuit must be completely isolated. The complete isolation of the power supply uses a low-power power supply isolation module B0505S. Although the circuit is more complex, it improves the stability and safety of the node.
4 Analog sensor interface circuit design
Methane, carbon monoxide sensors, water level sensors, and temperature sensors are all analog sensors. The principles of analog sensors are similar. Only temperature sensors are introduced here. Common analog sensors are two-wire and three-wire. The difference is: in the three-wire system, two power lines are connected, one is connected to the positive power supply, one is grounded, and the other is the signal line to output current signals. In the two-wire system, one line is connected to the positive power supply, and the other is used as a signal output line to output current signals. The temperature sensor used in the system is a two-wire system. The basic principles of the two-wire system and the three-wire system are the same, but the connection methods are different.
The system analog sensors all use linear output, which makes it easy to calculate the voltage converted into the real value. Just select two test temperatures and measure the voltage value at the same time. The two points determine a straight line, and the relationship between the measured voltage and temperature can be listed. The use of other analog sensors such as water level and methane is the same. Its circuit connection is shown in Figure 4.
[page]
The CON8 socket is the connection socket for analog sensors. 24 V is used to power analog sensors, and the signal output pin is directly connected to the input pin of the op amp LF347. The temperature sensor outputs a 4-20 mA current signal that is linear with the measured temperature. Therefore, the system uses an emitter follower to first let the current flow through a 125 Ω resistor to the ground, and convert the 4-20 mA current signal into a corresponding 0.5-2.5 V voltage. The voltage input signal passes through the emitter follower, and the voltage signal output by the op amp remains unchanged, and is directly connected to the A/D pin of the LPC2292. In this way, the lower computer converts and collects various signals of digital and analog sensors through the A/D converter, and then packages them and uploads them directly to the upper computer through the CAN bus. The upper computer then converts the values to obtain the true values of various information in the channel. This current-to-voltage design is not only simple, but also has high precision and good stability.
5 CAN communication software design
The design uses μC/OS-II embedded real-time operating system to implement CAN communication. After successful transplantation on LPC2292, it can be used as the kernel to write the control software of the monitoring system.
5.1 Run μC/OS-II operating system
The CAN implementation of the project is mainly achieved by establishing two tasks, namely CAN sending task and CAN acquisition task. In the main function main, first use OSInit() to initialize the μC/OS-II operating system, establish a semaphore and clear the semaphore counter, then use OSTaskCreate() to create the first task Tasksend(), and then use OSStart() to start the multi-task scheduling mechanism of the operating system to start running the main application of the system. The main function code is as follows:
5.2 Data transmission
and reception Data can be received in query mode or interrupt mode. In order to improve efficiency, data reception adopts interrupt mode. Among the two tasks, the priority of task Tasksend() is set to the highest, and the priority of task Taskrev() is the second highest. Task Tasksend() is mainly responsible for initializing CAN, initializing timer 0, initializing VIC, establishing semaphores for task Taskadrev() to communicate with interrupts and establish a new task Taskrev(), and processing collected data. Task Taskadrev() is always in a waiting signal state. Once a signal is received from the interrupt, data is collected immediately, and the collected data pointer is sent to task Tasksend() through the mailbox.
The task flow chart of CAN receiving data and sending data based on μC/OS-II is shown in Figures 5 and 6.
6 Conclusion
The embedded system with ARM7TDMI core embedded microcontroller LPC2292 as the main controller and CAN bus as the data transmission mode has been widely used. At the same time, the excellent reliability of CAN communication has become the key to the performance of the system. Based on the successful transplantation of μC/OS-II, the CAN communication software design is studied with LPC2292 as the development platform. The experimental results show that the system design is feasible and meets the requirements of fast, accurate and high information volume.
Previous article:Implementation of multi-sensor data fusion fire alarm system based on ARM9
Next article:Design of LCD driver terminal based on ARM9 & Linux
Recommended ReadingLatest update time:2024-11-16 16:34
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Dating Spring---I am only one step away from nature working overtime
- Wanted FRDM-KL25Z
- Analysis of Embedded C Language Pointers
- APM32E103 MINI development board information (software resource package, schematic diagram, user manual, etc.)
- Is there a dual Schottky diode similar to BAT54x that can pass a larger current (0.6A*2)?
- Right angle turn without amplitude
- Intelligence at the Edge Powers Autonomous Factories
- One minute to understand: World Industrial History (video explanation)
- EEWorld's "Search Device" applet is now online, allowing you to easily check device data and make chip selection easier
- Wireless transmission distance calculation