Tracking System using 8051

System Overview

The overall goal is to create a simple tracking system that not only acquires GPS coordinates and displays them to the user but also sends that data to another system that monitors the location of the transmitter. This is done using two of the 8051 built-up boards that were brought up throughout the coursework to act as the transmitter and receiver. The device that allowed for GPS coordinates to be obtained was a NEO 6M GPS module while the device that allowed for communication between the two boards was the nRF24L01 wireless module.

Figure 1. System Block Diagram.

Board Design

Figure 2 shows a block diagram of the low-level hardware used. As it can be seen, the only parts from the labs that were actively used were the NVRAM and SPLD(decoder logic) while the GPS and the nRF are the new additions for the final project. These two additions are connected to the 8051 MCU through serial two different communication protocols; SPI and UART. However, the power supply for these two were from different sources. While the GPS is designed to be able to run off of the 5V just like the rest of the components of the board, the nRF module is not. The nRF module is specified for a max of 3.3 volts; so even though 5V CAN power it up, it could end up damaging the board. For reasons explained in Sections 3.2 and 5, the nRF board was powered using the 3V output from the development boards issued for the course.

Figure 2. Board Design.

Transmitter

The two codes start to diverge from each other after the decryption of the coordinates. At this point, the transmitter board takes the converted coordinates are compares them to a set of four predefined locations. Three of these locations are located outdoors while the remaining location is indoors. If any coordinates match within a certain tolerance, a character assigned to that location is transmitted to the receiver. If there are no coordinates that match, then the transmitter sends a character indicating that it is not within any of the predefined locations. As soon as the character is put into the TX register for transmission, the TX board starts polling for an acknowledgement from the RX board. If it does not get an ACK within ten retransmits each 500 μ seconds apart, it will acknowledge the transmission as a failure and get out of the polling loop. From here, the TX board loops back to the acquisition of the coordinates from the GPS module and repeats all stated steps.

Figure 3. Transmitter Flow Chart.

Receiver

As mentioned before the receiver code also performs the initialization of the modules, gets the block of text and calculates the coordinates from it. It then proceeds to poll for when its RX FIFO is full, meaning the transmitter has initialised a transmission and is awaiting the ACK. Once the receiver board confirms the FIFO is full of data, it sends back the ACK and proceeds to process the transmitted byte. As mentioned with the transmitter, the transmitted data is a character byte pertaining to a location. Once the receiver board’s logic matches the character to a location - or a no location - it proceeds to print out the location along with the coordinates of the location. Like the transmitter, once it is done, it loops back to the GPS acquisition and repeats the process.

Figure 4. Receiver Flow Chart.

Conclusion

This project provided many chances to learn about new things. These learning experiences included how to interface modules with a microcontroller, how to build a complete system by integrating multiple modules or multiple independent systems and be able to get the functionality up and running. Since the microcontroller used for the project had memory, IO, and other limitations, it provided an understanding of how to develop a system efficiently managing IO, memory space, etc.

This project was chosen due to how tracking systems are a common thing in today’s world. Thus, developing this project provided a basic understanding and familiarity with how tracking systems operate. Development of this project also provided an experience to learn about radio frequency devices, how to use them, and what RF frequency can be used legally.

Upon implementation of the batteries, it was observed that the boards consume power at a much faster rate than expected. This led to needing to buy more batteries to make certain that the boards could be powered through testing. This issue was first noticed when the outputs of the boards to the serial terminal seemed to be corrupted. On performing analysis on this issue, the GPS module was observed to draw a great amount of power due to the constant acquisition of data. This analysis showed the importance of power-saving modes and the use of interrupts as opposed to polling.

These learning experiences will be ones to carry on throughout the degree program and even beyond that.

Connect with me

LinkedInEmailGitHub