May 08, 2024

Embedded WSNs car anti-theft system

Embedded WSNs car anti-theft system

introduction

Wireless sensor networks (WirelessSensorNetworks) is a combination of communication technology, computer technology, sensor technology and network technology. The wireless sensor network is composed of a large number of randomly distributed sensor nodes with real-time perception and self-organization capabilities. It has the advantages of high monitoring accuracy, good fault tolerance and wide coverage area brought by distributed processing. It is used in environmental monitoring and consumption. It has broad application prospects in many fields such as quasi-electronics, military reconnaissance, and traffic management, and is one of the hotspots of recent international research.

1. System design

The basic unit of the wireless sensor network is an embedded node with information collection and communication functions, so the design of the wireless sensor network is also the design of the node. In this paper, according to the functional requirements of the wireless sensor network, according to the idea of ​​the embedded system genre, each functional module component is selected. The hardware structure of the embedded wireless sensor network node is designed by focusing on the cost performance and scalability of the node. According to functional requirements, each independent function is modularized, and the hardware architecture of the node is shown in Figure 1.

Hardware architecture

This article integrates the hardware platform factors, and the system software uses the embedded real-time operating system FreeRTOS. Since the cluster head node needs to have GPRS data transmission function, it is also very important to have TCP / IP protocol stack in the software system. This article selects the embedded real-time operating system FreeRTOS publicly released on the well-known open source website SourceForge as the basis of the system software system design, and selects uIP that has been ported to FreeRTOS as the system TCP / IP protocol stack. In the design of the node networking module, this paper transplants software that conforms to the ZigBee specification, thus providing a basis for the development of application layer programs such as node networking and routing. Figure 2 shows the software architecture of the system.

System software architecture

2 Wireless sensor network node hardware design

21ARM processor module communication circuit design

In the process of data transmission using GPRS module, in order to facilitate system testing, this article uses the one-wire two-wire serial port DBGCOM provided by AT91SAM7S256 to display the data sent by the CPU to the GPRS module, and the remaining USARTO to display the data sent by the GPRS module to the CPU. It realizes the monitoring and analysis of the sent and received data, and provides a good interface for the debugging of the system functions.

Module communication circuit design

2.2 Clock circuit design of ARM processor

AT91SAM7S series microcontroller system clock is provided by the clock generator, which includes a phase-locked loop (PLL), a main oscillator, and an RC oscillator. The clock generator provides the following clock for the system: SLCK slow clock. Provided by the RC oscillator, it is the only constant clock in the power management system. MAINCK main oscillator output clock. PLLCK frequency divider and PLL output.

Clock module circuit schematic

Figure 4 Schematic diagram of the clock module circuit

2.3 MC39i module circuit design

GPRS module design can be divided into three parts: SIM card interface circuit, start reset circuit and control interface circuit. Start the reset circuit design. After the MC39i is powered on, pull down its IGT pin for at least 100ms to turn on the MC39i; the MC39i has a SiM card interface that conforms to the ISO7816-3IC card standard. The user can easily connect an external SIM card reader ; MC39i provides a RS232 interface that conforms to the ITU-TDCE standard through the ZIF socket, and can send AT commands and data to the MC39i through the RS232 interface. This interface works in CMOS level. MC39i's RS232 interface supports 8-bit data, no parity, and 1 stop bit data format. The baud rate can be set from 300bps to 115kbps. Support RTS / CTS hardware handshake signal and XON / XOFF handshake signal.

2.4 Design of vibration sensor module

In this paper, the detection of vibration signals is implemented by ADXL202. ADXL202 is a new single-chip dual-axis acceleration sensor designed and produced by American Analog Devices. The acceleration measurement range is ± 2g; the dynamic test bandwidth is 0 ~ 5kHz, which can measure static acceleration, vibration and inclination . This article uses an acceleration sensor to monitor large vibrations or movements to prevent theft. Since vibration is the rapid change of object acceleration in microscopic view, this article uses this principle to monitor vibration signals. Connect the X-axis and Y-axis acceleration output pins of the ADXL202 to the CPU's timing counter, and use the TC to capture the PWM signal of the chip to get the current acceleration. If the rapid change of the chip's acceleration is continuously monitored, the generation of vibration and acceleration can be determined. The degree of change corresponds to the strength of the vibration. Set the resistance value connected to the T2 pin of the chip to 1.25MS2, so that the period of its output signal is l0ms, so as to obtain better resolution. The schematic diagram is shown in Figure 5.

Vibration sensor module design

3. System software design

3.1 GPRS module software design

The GPRS module is used for communication between wireless sensor networks, and it is one of the important components of the node. The data transmission through the GPRS module essentially uses the interconnection between the mobile communication network and the Internet network, so the data to be transmitted needs to conform to the TCP / IP protocol standard of the Internet network. The process of wireless sensor network node using GPRS to achieve data transmission is: first use the ARM processor to control the MC39i module to connect to the Internet network, obtain the IP address through the PPP protocol; then pass the TCP / IP and PPP protocol encapsulated data through the RS232 serial port Send to MC39i. According to the communication regulations of GPRS dial-up Internet access and the control instructions of MC39i module, this paper designs the system flow chart shown in Figure 6 to complete the GPRS module dial-up Internet access and subsequent data transmission processing, including PPP negotiation processing and data TCP / IP and application layer Packaging processing is the focus and difficulty of this module design.

System flow chart

3.2 MC39i driver design

MC39i module driver design mainly includes USART driver program design under FreeRTOS, MC39i module initialization and GPRS network parameter setting. Under the premise of ensuring the availability of the GPRS module, it provides a channel for data transmission and a convenient interface for the realization of the link layer and upper layer protocols.
The working process of the serial port driver is: when a task needs to send data through the serial port, you must first get the semaphore of the serial transmission queue before sending the data, and release the semaphore after the end of the transmission; if the semaphore cannot be obtained, hang up This task is waiting for the semaphore to be valid. The driver establishes two queues for the USART: send queue and receive queue. When the send queue is not empty, the send interrupt is enabled, thereby sending the data in the send queue to the serial port through the serial port interrupt service program. If you need to send data, just call the xSerialPutChar function to send data to the send queue; if you need to receive data from the serial port, you need to call the xSerialGetChar function, waiting for the data to be received from the queue, the serial port driver can enable the USART receive interrupt to receive data In preparation, the serial port receive interrupt service will automatically send the received data to the serial port receive queue.

The code to establish the send and receive queues is as follows:

Code to create send and receive queues

3.3 Task design of vibration sensor

This article uses the timing counter of the AT91SAM7S256 processor to realize the measurement of the PWM signal output by the vibration sensor ADX202. The acceleration sensor is used to measure the vibration signal for monitoring large vibration or movement, so as to prevent theft. Since vibration is the rapid change of object acceleration, this article uses this principle to monitor vibration signal. Test. Finally, it is determined that when the acceleration changes twice in a row for more than 0.03m / s2, a vibration alarm is issued, which can sensitively monitor events such as vehicle movement and collision, and exclude signal fluctuations caused by other conditions. The core code of the acceleration sensor processing task is given below:

The core code of the acceleration sensor processing task

The core code of the acceleration sensor processing task

4 Summary

The innovation of this article: Wireless sensor network is a brand-new information acquisition and processing method, which has a wide range of application prospects. Based on the analysis of domestic and foreign research status and wireless sensor network functional requirements, this paper proposes and implements an overall plan for designing wireless sensor network car anti-theft system using ARM processor and embedded technology Research, using embedded ARM processor, combined with GPRS communication module MC39i, vibration sensor has realized a high-performance wireless sensor network node hardware design, in actual use, the system has high sensitivity, stable operation, and has high practical value

Yixing Futao Metal Structural Unit Co. Ltd. is com manded of Jiangsu Futao Group.
It is located in the beach of scenic and rich Taihu Yixing with good transport service.
The company is well equipped with advanced manufacturing facilities.
We own a large-sized numerical control hydraulic pressure folding machine with once folding length 16,000mm and the thickness 2-25mm.
We also equipped with a series of numerical control conveyor systems of flattening, cutting, folding and auto-welding, we could manufacture all kinds of steel poles and steel towers.
Our main products: high & medium mast lighting, road lighting, power poles, sight lamps, courtyard lamps, lawn lamps, traffic signal poles, monitor poles, microwave communication poles, etc. Our manufacturing process has been ISO9001 certified and we were honored with the title of the AAA grade certificate of goodwill"
Presently 95% of our products are far exported to Europe, America, Middle East, and Southeast Asia, and have enjoyed great reputation from our customers,
So we know the demand of different countries and different customers.
We are greatly honored to invite you to visit our factory and cheerfully look forward to cooperating with you.

Lamp Pole

Lighting Pole, Steel Lamp Pole, Street Light Poles, Garden Lamp Post

YIXING FUTAO METAL STRUCTURAL UNIT CO.,LTD( YIXING HONGSHENGYUAN ELECTRIC POWER FACILITIES CO.,LTD.) , https://www.chinasteelpole.com