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.
(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.
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
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
- Popular Resources
- Popular amplifiers
- New Energy Vehicle Control System Inspection and Maintenance (Edited by Bao Pili)
- Detailed explanation of big data technology system: principles, architecture and practice (Dong Xicheng)
- Automotive CAN embedded intrusion detection system based on deep learning
- Lightweight FPGA-based IDS-ECU architecture for automotive CAN networks
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- linux 0.1~ various versions mirror
- Supertex's new low-noise inductor-free EL driver is suitable for lighting displays
- NUCLEO-G431RB Review -> DAC Review
- Application skills/PIC series microcontroller programming basics
- 2015, 2017 real exam questions series!
- Advantages and Challenges of Single-Chip Mobile Phones
- How to create multiple C files in KEIL and what to pay attention to in modular programming
- Domestic Cortex-M0 microcontroller HR8P506, used for small appliances, toy models, fast charging power supplies, alarms, etc.
- Can wireless control modules from different manufacturers be used interchangeably?
- How wireless routers, mesh networks, and Wi-Fi 6 fit together