Design of Automobile Safety Monitoring System Based on SoPC

introduction

This article refers to the address: http://

The SoPC-based automotive safety monitoring system uses Altera's latest SoPC (Programmable System-on-Chip) solution, the Nios processor soft core, to monitor the parking and operating status of the car with GPS and GSM systems. The system monitors, records and stores various data of the car during driving. Once a safety problem occurs, it immediately uses GSM wireless communication to notify relevant personnel and units, and sends data such as the position of the car obtained through GPS at any time to provide solutions to the problem. Timely, accurate and reliable information, remote control of the car via GSM if necessary.

The SoPC-based vehicle safety monitoring system can be widely used in the anti-theft, routine maintenance and traffic accident handling of automobiles, providing an effective test method for vehicle faults.

1 system hardware components

The design uses Altera's SoPC development tools. The development of the system includes two major parts of hardware and software. Using SoPC Builder to generate Nios embedded processors, Nios embedded processor development tools allow users to configure one or more Nios CPUs, add peripherals from the standard library, integrate custom systems, and compile the system with Quartus II design software. The steps of software development are: using the software files generated by SoPC Builder, writing assembly language or C/C++ source program with text editor, developed with GNUPro software.

Tools for programming, building and debugging. GNUPro builds source programs (including assembly/compilation and linking) into executable programs, and debugs and runs executable programs through download cables. Quartus II design software provides a comprehensive and efficient design environment that integrates design, synthesis, layout and validation, as well as third-party EDA tool interfaces in a seamless environment. You can create your own Nios CPU system with SoPCbuilder integrated in the Quartus II 3.0. Nios is a 16/32-bit embedded processor soft core developed by Altera Corporation. * Funded by the school research fund project "SOPC-based vehicle safety monitoring system".

Altera Corporation has introduced a new generation of FPGAs. The design uses the low-cost Cyclone series EP1C12, which has 12 060 logic cells, 52 M4K RAM blocks, 239 616 RAM bits and 2 phase-locked loops. I/O pin 249.

The block diagram of the system hardware consists of two parts, the Nios system and the external device, as shown in Figure 1.

11.jpg

Nios system includes CPU (Nios), memory (memory), timer (timer), bus and parallel/serial interface (key_pio, led_pio, lcd_pio, ccs_pio, uart_0, and uart_1), etc., and the serial interface is implemented separately with the keyboard. , LED and LCD displays, automotive central control systems, and connections to external devices such as GPS and GSM systems. The Nios system design and design results are shown in Figure 2 and Figure 3, respectively.

22.jpg

33.jpg

The Nios system is relatively simple to connect to external devices such as keyboards, LEDs and LCD monitors, automotive central control systems, and GPS systems. The connection to the GSM system is complex, as shown in Figure 4.

44.jpg

The whole system works as follows: information from the car's central control system and GPS system can be displayed on the LED and LCD display, or wirelessly via the GSM system. The user can control the system through the keyboard, or remotely control the car's central control system through the GSM system.

2 system software components

The system software mainly consists of the main program, the GPS management subroutine and the GSM management subroutine.

The main program completes the initialization of the system, as well as the operation management of the keyboard, LED, LCD display and car central control system.

The GPS management subroutine is primarily responsible for receiving time and location information from the GPS system.

The binary command to request the GPS system to return ASCII time position information is:

@@EqmC

Wherein, when m is 0, the response information (query) is output once, and when m is 1 to 255, the response information is output every 1~255 s (continuous);

C is the checksum (Eqm is XORed by byte);

For carriage return (hex 0d);

Wrap (hex 0a);

The command length is 8 bytes.

The response information for the command is:

@@Eq,mm,dd,yy,hh,mm,ss,dd,mm.mmmm,n,ddd,mm.mmmm,w, shhhhh.h,sss.s,hhh.h,m,t,dd. d,nn,rrrr,aa,CCC

Date: mm is the month (01~12), dd is the day (01~31), and yy is the year (99~19).

World Time (UTC): hh is the time (00~23), mm is the minute (00~59), and ss is the second (00~59).

Latitude: dd is degree (00~90), mm.mmmm is minute (00~59.9999), and n is direction (N is north and S is south).

Longitude: ddd is degree (000~180), mm.mmmm is minute (00~59.9999), w is direction (W is west, E is east).

The message length is 96 bytes.

The corresponding management subroutine is:

Int eq[8]={'@','@','E','q',1,'C',0x0d,0x0a};

.

Void gps_txd(int data[], int n) {

Volatile int m,sum=0;

For(m=0;m

While(~na_uart_0->np_uartstatus & 0x40);

//waiting to send ready

If(m!=n-3) {

Sum^=data[m];//calculate checksum

Na_uart_0->np_uarttxdata=data[m];//Send data

}else

Na_uart_0->np_uarttxdata=sum; //Send checksum

}

}

Int gps, gps_buf[46];//Define global variables

Void gps_rxd(int context) {// Receive interrupt service routine

Gps_buf[gps]=na_uart_0->np_uartrxdata; //Receive data

If(gps_buf[gps++]=='q') gps="0"; //Data positioning

If(gps>46) gps="46";//Ignore useless data

}

GSM management

The subroutine is mainly responsible for data transmission and reception management of the GSM system.

The data transmission and reception of the GSM system is carried out in the form of short messages. The AT command for selecting the short message format is AT+CMGF, and the AT commands for sending and receiving short messages are AT+CMGR and AT+CMGS respectively. The corresponding management subroutine is:

Cmgf[20]={'A','T','+','C','M','G','F','=','1',0x0d};//SMS format void Gsm_txd(int data[], int n) {

Volatile int m;

For(m=0;m

While(~na_uart_1->np_uartstatus & 0x40);

//wait to send ready na_uart_1->np_uarttxdata=data[m]; //send data

}

}

Int gsm="2",gsm_buf[18]={'A','T'};

Void gsm_rxd(int context) {

/ / Receive interrupt service program

Gsm_buf[gsm]=na_uart_1->np_uartrxdata; //Receive data

If(gsm_buf[gsm]=='T') gsm="1";

/ / Data positioning

If(++gsm==18) gsm="2";

}

3 Design debugging methods and design results

The signal data of the nodes in the system can be observed in real time using the SignalTapII embedded logic analyzer in the Quartus II software. The observed signal can be displayed in multi-digit value or waveform, but it needs to occupy more resources of the chip. Therefore, after the test of a module is finished, the SignalTapII embedded logic analyzer can be cancelled in the settings. And recompile the build to reduce LE resource usage.

The actual trial results show that the SoPC-based vehicle safety monitoring system operates normally, with accurate positioning, reliable data transmission, and convenient operation and management. If equipped with GIS (Geographic Information System), the whole system will be even more powerful.

Solar road light is a crystalline silicon solar battery power supply, valve control type sealed and maintenance-free battery, gel battery) to store electrical energy, super bright LED as light source, lamps and lanterns and controlled by the intelligent charging and discharging controller, is used to instead of the traditional public power lighting lamps.

Solar Street Light Battery

Solar road light working principle

1. Using the microcomputer intellective controller to transfer the light energy to electrical energy.Easy to install since to wiring and trenching,energy conservation and environmental protection.

2. The microcomputer intellective controller is composed by advanced special-purpose integrated circuit,high conversion efficiency,prevent over-load and over-discharge,Output short circuit protection,extend work life,on the safe side,convenient usage.

3. High effective Non-maintaining accumulator cell,strong storage,durable usage.

4. Automatic track type time controller,Automatically adjust the working time along with different illumination time in various seasons.For extending the work time energy conservation intellective controller with automatic shut-off the light at Deep-night.

Solar Street Light

 

 



Solar Street Light

Solar Street Light ,Solar Street Light Pole,Solar Street Light Battery,Solar Street Light Advantages

Jiangsu chengxu Electric Group Co., Ltd , https://www.satislighting.com

This entry was posted in on