Design of power cable trench monitoring system based on LPC2292 controller and CAN field bus

Publisher:平和的心情Latest update time:2023-07-11 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

The human-to-land 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 have been gradually changed from overhead lines to power cables. Cable trenches serve as channels for cable lines. The construction speed is accelerating year by year, the construction mileage is increasing year by year, and it will be launched on a large scale in the future.


Develop a cable trench detection system, using modern equipment and means to conduct real-time transmission of the cable trench environment and cable operating status, full-process monitoring, status display, critical alarms, prediction prompts, event analysis and statistics, etc. Through this equipment, the cable The management of the channel has changed from manual periodic inspection and post-event remediation to a management model that combines full-process real-time monitoring, manual periodic maintenance and incident emergency response. Eliminate potential accidents in the bud, prevent them before they happen, reduce accident rates and personnel costs, improve power supply quality, and increase economic benefits. Based on LPC2292 controller and CAN fieldbus technology, and 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 plan

What is designed is a hierarchical (level) distributed multi-CPU structure power cable trench monitoring system. The monitoring system can be divided into three levels according to its structure and functions, 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.

Design of power cable trench monitoring system based on LPC2292 controller and CAN field bus

(1) Lower computer signal acquisition layer control device is LPC2292, which has an embedded ARM7 microprocessor. And transplant the μC/OS-II operating system on this device. The main responsibilities of this layer: when a thief enters the trench, the lower computer generates an early warning signal to the upper computer, which is the anti-theft function; it also has functions such as moisture-proof, explosion-proof, and anti-virus, so this layer also has sensing equipment for collecting monitoring information, including: Temperature sensor, anti-theft sensor, water level sensor, etc.

(2) Host computer data processing layer The host computer is the connection device between the CAN bus and the IP network, and the control device of this layer is also LPC2292. However, there are no sensors connected to this layer, but the network connection module, LCD interface, keyboard, and CAN communication module. In addition to the functions related to CAN communication with the slave computer, the power channel information obtained from the slave computer is displayed on the LCD, and 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 server and data server. Organize and store cable channel information, sensor information, location information and alarm signals, and combine them with geographic information system (GIS) data according to business logic and required formats, and then publish them to the authorized management system in the form of WEB Personnel and leaders at all levels of the power supply bureau 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 two CAN controllers. Its main features are: 16/32-bit ARM7TDMI-STM CPU that supports real-time simulation and tracking; applications with strict control of code size 16-bit Thumb mode can be used to reduce the code size by more than 30% with very little performance loss; LPC2290 has a 144-pin package, extremely low power consumption, multiple 32-bit timers, and 8-channel 10-bit A/D conversion processor, 2 CAN, PWM channels and up to 9 external interrupts. LPC2292 not only functions as the main controller, but also serves as a CAN node controller 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 in 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. Among them, pin P0.23 RD2 and pin P0.24 TD2 are the transceiver pins of the CAN control module of LPC2292.

The two-channel CAN controller integrated inside the LPC229 complies with the CAN specification CAN2.0B and ISO11898-1 standards. 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. It is fully compatible with the ISO11898 standard. CANH and CANL work together ideally to minimize electromagnetic radiation. CANH and CANL of LPC2292 are respectively connected to RXD and TXD of TJA1050T through high-speed optocoupler 6N137. The two power supplies used in the optocoupler circuit must be completely isolated. The complete isolation of the power supply uses the low-power power 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. Commonly used analog sensors have two-wire systems and three-wire systems. The difference is: three-wire system, two power wires are connected, one of which is connected to the positive power supply, one is grounded, and the other is a signal wire to output a current signal. In the two-wire system, one wire is connected to the positive power supply, and the other wire is used as a signal output wire to also output current signals. The system uses a temperature sensor that is two-wire. The basic principles of two-wire and three-wire systems are the same, but the connection methods are different.


The system's analog sensors all use linear outputs, which makes it easy to convert voltages into real values. Just select two points to test the temperature, measure the voltage value at the same time, and determine a straight line at the two points to list the relationship between the measured voltage and temperature. The method of use is the same as for other analog sensors such as water level and methane. The circuit connection is shown in Figure 4.

The CON8 socket is the connection socket for analog sensors. 24 V is used to power the analog sensors. The signal output pin is directly connected to the input pin of the operational amplifier 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 the 125 Ω resistor to the ground, and convert the 4-20 mA current signal into the 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 LPC2292. In this way, the lower computer converts and collects various signals from digital and analog sensors through the A/D converter, then packages them and uploads them directly to the upper computer through the CAN bus. The upper computer can then obtain the true values ​​of various information in the channel through numerical conversion. This current conversion voltage design is not only simple, but also has high accuracy and good stability.


5 CAN communication software design

The design uses μC/OS-II embedded real-time operating system to realize 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 Running μC/OS-II operating system

The CAN implementation of the project is mainly achieved by establishing two tasks, namely the CAN sending task and the 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 signal counter, then use OSTaskCreate() to create the first task Tasksend(), and then start it through OSStart() The multi-task scheduling mechanism of the operating system starts running the main applications of the system. The main function code is as follows:

5.2 Sending and receiving data

Data can be received in query mode or interrupt mode. In order to improve efficiency, data reception uses interrupt mode. Among the two tasks, the task Tasksend() has the highest priority, and the task Taskrev() has the second highest priority. Task Tasksend() is mainly responsible for initializing CAN, initializing timer 0, initializing VIC, establishing a semaphore for task Taskadrev() to communicate with interrupts, establishing a new task Taskrev(), and processing collected data. The task Taskadrev() has been waiting for the signal. Once the signal is received from the interrupt, the data will be collected immediately and the collected data pointer will be sent to the task Tasksend() through the mailbox.

[1] [2]
Reference address:Design of power cable trench monitoring system based on LPC2292 controller and CAN field bus

Previous article:LPC11C14 microcontroller is taken as an example to analyze the solution to the problem that IO cannot output high and low levels.
Next article:Design of vehicle navigation terminal based on microprocessor LPC2214 and GPS receiver

Recommended ReadingLatest update time:2024-11-24 10:20

Can Trillium, which has solved the problem of CAN bus encryption, become a good tool for automobile safety protection?
    It has always been believed that the CAN bus is almost impossible to protect, but Trillium's SecureCAN has clearly broken this "superstition".     Technology products in the field of automotive safety are becoming very popular. A large number of startups are pouring in, focusing on technology development while
[Automotive Electronics]
Can Trillium, which has solved the problem of CAN bus encryption, become a good tool for automobile safety protection?
Teach you 8 common faults and troubleshooting methods of CAN bus
When the CAN bus fails or data transmission is abnormal, there will often be a variety of strange fault phenomena, such as abnormal dashboard display, vehicle failure to start, failure to extinguish after starting, vehicle power performance decline, and some electronic control system malfunctions. This is because the
[Automotive Electronics]
Teach you 8 common faults and troubleshooting methods of CAN bus
Design and implementation of remote input and output module of CNC system based on CAN bus
1 Introduction         CAN is the controller area network, and its communication features outstanding reliability, real-time and flexibility. Its application is no longer limited to the automotive industry. The functions of CAN in machine tool numerical control systems mainly include: program management; machine tool
[Microcontroller]
Design and implementation of remote input and output module of CNC system based on CAN bus
Design of elevator call display panel based on CAN bus
With the development of modern society and the advancement of science and technology, many high-rise buildings and intelligent buildings have emerged. As an important means of transportation inside high-rise buildings, elevators are increasingly used. As an indispensable part of the elevator system, the application
[Industrial Control]
Parallel Hydraulic Hybrid Vehicle Control System Based on CAN Bus Structure
1 Introduction   At present, my country's urban public transportation mainly relies on buses, and the distance between stations is generally 500 to 1,000 meters. Buses brake and start several times between each stop. During peak traffic hours, braking and starting are more frequent, which leads to a series of proble
[Microcontroller]
Parallel Hydraulic Hybrid Vehicle Control System Based on CAN Bus Structure
Measuring automobile CAN-BUS bus signals and waveform analysis-auto repair oscilloscope
With the increasing number of automotive electronic devices, it is a reliable and economical approach to use serial bus to achieve multi-channel transmission and form an automotive electronic network. In the original traditional automobile circuits, the connection between the powertrain module and the body module is
[Test Measurement]
Measuring automobile CAN-BUS bus signals and waveform analysis-auto repair oscilloscope
PIC16-bit MCU CAN (1) New project test
I soldered the hardware yesterday, and there is no problem with the hardware. At first, I used the latest integrated development environment MPLAB X IDE v1.41, XC16 compiler. But I couldn't create a simple project, and KIT3 could not be found. I had to give up. I still use MPLAB IDE v8.88 integrated development environ
[Microcontroller]
Design of virtual instrument based on CAN bus and MiniGUI using ARM+Linux architecture
Today, fully digital automotive instruments are widely used in developed countries, and most of them are stepper motor automotive instruments, and are ready to develop in a higher direction. Due to cost constraints, domestic automotive instrument displays can only use field display screens, and cannot use dot matrix sc
[Microcontroller]
Design of virtual instrument based on CAN bus and MiniGUI using ARM+Linux architecture

Recommended posts

Which one has faster sampling speed, ADS1220 or AD7799?
Cananyonetellmewhichonehasfastersamplingrate,ADS1220orAD7799?Thankyou! "Whichonesamplesfaster,theADS1220ortheAD7799?" Can'tIfindthesetwotypesofchipsinthedatasheet? I'manewbieandIdon'tknowhowtoseeit.
chenbingjy Analog electronics
Revealing the secret! How can 100 MHz power decoupling hold Gbps high-speed signals?
OriginalarticlebyMr.Gaosu|JiangJie Mr.Gaosuoisoftenaskedquestionslikethis:ThesignalratehasalreadyreachedtheGbpslevel,sowhyisthePDNimpedanceinthepowersimulationreport(theredcurveinthefigurebelow,thehoriz
yvonneGan PCB Design
GPIO3_28, why is it still shown as occupied?
Q:IopenedGPIO3_28inthedevicetree,whyisitstillshownasoccupied?Howtochangeit?A:mount-tdebugfsnone/mnt
明远智睿Lan Analog electronics
What is the role of the circuit structure in which resistors and capacitors are connected in parallel to the ground?
Ioftenseeacircuitstructurelikethis:beforetheinputsignalenterstheopamp,aresistorandcapacitorareconnectedinparalleltotheground.Whatisthefunctionofthiscircuitstructure?Itisneitheralow-passnorahigh-pass,andit
乱世煮酒论天下 Analog electronics
How big should the bleeder resistor in the circuit be?
Howbigshouldthebleederresistorbeinthecircuit?Iwanttouse71ufcapacitorsinparalleltomakeachargingcircuit.Cananyteachergivemesomeadvice? Itisbestnottousethistypeofcapacitorvoltage-reducingcircuit,asitis
灞波儿奔 Power technology
[STM32H7S78-DK] Evaluation + I2S in MDK environment, registers cannot be found during debugging, and it gets stuck when reading IS_BIT
【question】 WhenIwasplayingmusicwithI2S,itkeptgettingstuck.Afterdebugging,Ifoundthatitwasstuckonline1512ofstm327rsxx_hal_i2s.c.ReadTx_requestisalreadyenablehere IwanttochecktheI2Sregisters,butIdon'tseeth
lugl4313820 stm32/stm8
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号