SoPC+GPS/GSM realizes vehicle condition monitoring system

introduction:

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 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, programming, building and debugging with GNUPro software development tools. 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.

The school research fund project "SOPC-based vehicle safety monitoring system" is funded. 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.



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.





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.

GSM system

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.

This article refers to the address: http://



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;/ignoring useless data

}

The GSM management 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);

/waiting 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 Routine

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 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.

The Samsung A8 Battery   allows you to enjoy talk and have long standby time.It has the same capacity as the original Samsung A8 battery.Adopt with grade A level battery core with famous brand IC to ensure the quality and high performance.There will keep 80% capacity after 500times charge cycle,it is very durable.

As a professional manufacturer over 7 years experience,we Hequanqingnuo technology owns the brand of HQQNUO involved in different kinds of Cell Phone Battery such as  IPhone Battery , Huawei Battery , Samsung Battery  and other Cell Phone Accessories such as iPhone Charger Case, Qi Car Charger ,Wireless Phone Charger etc.

OEM/ODM and more forms of customization are supported by us.

Flexible in order volume, orders can be done in LCL or full container, MOQ can be discussed accordingly.

Samsung A8 Battery Replacement



Samsung A8 Battery

Samsung A8 Battery ,Battery For Samsung A8,Galaxy A8 Battery,Samsung Galaxy A8 Battery

Shenzhen Hequanqingnuo Electronic Technology Co., Ltd. , https://www.hqqnbattery.com