






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Project; Professor: Schubert; Class: Electrical Engineering Design; Subject: Electrical Engineering; University: University of San Diego; Term: Fall 2004;
Typology: Study Guides, Projects, Research
1 / 38
This page cannot be seen from the preview
Don't miss anything!
Final Design Review - Fall 2004
Electrical Engineering Department
Submitted By
Matthew S. Dominick Thomas J. Davis Project Lead Power Supply and Imagery Software
James D. Cervantes Brandon K. Bailey Micro-controller and GPS Wireless Modem and PCB Layout
Faculty Advisors
Dr. Kathleen Kramer Dr. Charles Pateros
December 3, 2004
Note: This document is best viewed in PDF format. All images are in color and references are hyper-linked. If this is a paper copy the most recent electronic version can be obtained on the web at www.signalmaps.com.
The information age has taken the Western World captive. Data reigns supreme. The populous demands instantaneous information. The fastest growing companies in the past decade have been those that could provide the best informa- tion the fastest. One of the most notable is the Internet search engine Google. Google constantly crawls the Internet with multiple “googlebots” that categorize and score every webpage for its keywords, relevance, and link popularity. Google achieved great success by providing the largest amount of reliable data the fastest without a price to the user. Their bottom line is fulfilled with plain unobtrusive advertisements on the right side of their web pages next to their unbiased search results. This data has proved invaluable. People have been found to “google” just about everything.
This proposed project aims to follow a similar service path. The engineered device records mobile phone signal strengths across a vast area. Additional data collection “bots” increase the data collection rate. The collected data is processed and presented in a graphical format laid semi-transparently over a map. Ideally mobile phone users would be able to access the information regarding cell phone carriers for their specific area via the Internet. The results would be freely available and would provide the populous with a free tool to make more informed decisions regarding cell phone service carriers.
The public demands more detailed coverage information regarding their cell phone carrier’s service as well as it’s rivals. The information needs to be easy to comprehend and easy to access. This project aims to solve these public desires. To be effective the solution must rapidly and repeatedly gather large amounts of cell phone signal strength data without much human effort.
The Autonomous Signal Strength Mapper provides a solution by creating a relatively inexpensive, mass-producible device capable of working autonomously to continuously gather data as it moves through its environment. Many of the devices are deployed on regularly moving vehicles in a city. Buses, taxi cabs, and pizza delivery vehicles are all excellent potential host vehicles. Each additional recording unit increases the data collection rate. The device regularly detects its current location on earth from a GPS unit and the signal strength from a cell phone modem. The data is centrally collected from the small army of the data collection devices and is processed and presented in a format for public consumption.
Once copious data is collected, analysis begins. The data points are merged together for placement on a map. Each data point’s proximity to other points and the value of it’s measured signal strength is taken into account when the data is colorized and placed with slight transparency over a standard map. The colorized maps allow the mobile phone consumer to easily view a mobile phone carrier’s performance where they live, work, and play.
This project is a technically ideal senior design project. It showcases many of the skills learned in the USD Electrical Engineering syllabus while remaining feasible within the time constraint of two semesters. The project has numerous design challenges coupled with the project’s diverse design constraints. The major design challenges encountered as a result of the constraints are described below.
Serial Communication This project uses a micro-controller that communicates serially with four different peripheral devices. The chosen micro-controller (PIC 18F252) only has one hardware serial port. Three software serial ports must be created. Each has varied parameters including baud rate and signal inversion. Additionally, each peripheral has different instruction sets to understand and utilize. This variation across four devices is a difficult design challenge to achieve on one small micro-controller.
Automated Mapping Software Mapping the data requires manipulation of complex matrices and image processing in MATLAB. Recorded data must be calibrated to a matrix map and contoured to give it an understandable appearance. Contouring data accurately involves many challenges such as interpolation and exponential decay with distance.
Signal Strength Measurement The mobile phone signal strength is gathered by reading the RSSI (Received Signal Strength Indicator) value from a cell phone modem. This requires requesting the information at regular intervals and saving the returned value.
Location Tracking Each signal strength measurement requires a precise location data point. The points are taken from a GPS that serially outputs latitude, longitude, and a valid data indicator. This data has to be received and only saved if valid.
Data Storage The signal strength and location data has to be stored in a medium that is quick to save to and easy to transfer from the micro-controller system to the data mapping software. A flash memory card module is used to accomplish these requirements.
Status Updates The device autonomously collects the data but the user needs to periodically check on its progress. A serial LCD is attached to the device for the user physically interacting with it. However, for remote management the system responds to preset text messages. Specific commands sent in a text message will result in reply. For example, sending the text message to the device saying “Status?” would result in the device replying in it’s own text message with latitude, longitude, and current signal strength reading.
Printed Circuit Board The PCB had to fit on a 2.5” x 3.8” footprint. This small size and numerous non standard connections make the PCB design challenging.
Power Supply The power supply must be suitable for the project. Because the unit is small, the power supply must also be small, so as not to be the dominant feature. Also, because data collection sessions might take long stretches of time, the power supply must have adequate total energy. Additionally, the power supply should be compatible with an automobile power supply such as a cigarette lighter adaptor.
This section outlines the required specifications that were specified and delivered by this project.
The deliverables have been organized in unique way. The first eight deliverables listed in Table 1 are required for this project to be a success. The remainder of the deliverables are desired but are considered a bonus. It is felt that they are accomplishable but are extraneous flashy displays of the value of the core project.
Table 1: Project Completion Deliverables # Objective Score Status 1 GPS data to flash memory at regular time intervals Required Complete 2 Signal strength stored in flash memory at regular time intervals Required Complete 3 System status viewable on LCD Required Complete 4 Usable data available on flash memory card Required Complete 5 MATLAB graphical interpretation of data (signal strength map) Required Complete 6 Static website showing data maps Required Complete 7 Usable and aesthetically pleasing user interface Required Complete 8 Printed Circuit Board Required Complete 9 Remote system status updated via text messaging 10 bonus points Complete 10 Data able to be retrieved remotely via cell phone modem 20 bonus points Incomplete 11 Dynamic web application showing map and data interface 20 bonus points Incomplete 12 Additional service provider for signal strength comparison 15 bonus points Incomplete 13 Live remote location tracking of sensor units 15 bonus points Impractical 14 Live remote signal strength tracking 15 bonus points Impractical 15 Live mapping of data resulting from live data link 30 bonus points Impractical
All project required items were completed in addition to a 10 point bonus item. Project time constraints resulted in not completing items 10, 11, and 12. Remote data retrieval was achievable through text messaging but the expense in text messaging all the data when messages are limited to 160 characters was too great at $0.10 a message. Other remote data transfer techniques are in testing, but are not far enough developed to be a success within the given time contraints. GSM and GPRS wireless internet connections are complex to accomplish with only a PIC interfaced with a cell phone modem. It is estimated that an additional two weeks of dedicated time would be required to develop these technologies. Note however, the time restraints were appropriately considered when this project was first proposed and remote data transfer was labeled a bonus item.
Items 13, 14, and 15 were determined to be possible but in fact an impractical use of the hardware. Adding the capability to constantly report back each data point as it is collected to the central computer would slow the data collection rate. Slowing the collection rate results in lower data resolution. On a truck moving at 65 MPH down the freeway each second counts in data point resolution.
All parts necessary were acquired and successfully utilized. Table 12 in Appendix F lists all the parts and costs used in the development of one prototype data collection device.
communicate using some of the additional pins available on the PIC. The hardware serial port sits on pins RC6 and RC7 which goes through a MAX232A to convert from TTL to RS-232 serial levels for communication with the cell phone modem. A software serial port sitting on Pins RC4 and RC5 also goes through the same MAX232A to output RS-232 levels with the GPS. Pins RB4 and RB5 are also made into a software serial port and communicate on TTL levels with the flash memory card. The fourth serial port, also achieved through software, is only used for transmitting updates to the LCD on Pin RB0.
The PIC reads in location and time from the GPS. It then retrieves the signal strength from the cell phone modem. This data is then placed in a row in a comma-separated-variable (CSV) file on the flash memory card. The GPS feeds location data every second, so each second results in a new location and a new signal strength value being added to an additional row in the flash memory file. The current status of the system is output to the LCD.
Figure 3: Micro-controller Software Block Diagram
The process described above is the main operational mode of the PIC micro-controller for this project. However, the PIC is programmed to digress from its data collection mode into a data communication mode. When the user first turns the device on the LCD prompts the user for specific data collection setup options. These options include requesting the number of data points to collect as well as the data collection rate. The user selected options are saved as variables and checked throughout the data collection mode. Once set to collect data the device will record data points until the specified number have been obtained. When this occurs the device will send a text message either to the user’s cell phone or AOL instant messenger account regarding its data collection status. The current latitude, longitude, signal strength, and the number of data points collected will be contained in the text message.
The PIC can also go into the remote communication mode if a text message is sent to the device via a cell phone or AOL Instant Messenger. The PIC has been programmed to detect specific incoming messages and reply accordingly. The exact syntax of these messages is not posted here in order to prevent others from remotely requesting information from the device. An example text message command sent to the device could be ”Status?” The PIC would detect this message through the cell phone modem and respond with it’s latitude, longitude, signal strength, and the number of data points collected. A few other message commands have also been created. Software version and error codes are current examples of text commands.
Figure 4: Garmin GPS 15L
A Garmin 15L-Flex OEM GPS unit model, seen in Figure 4 is used to receive location data. There are two types of OEM units in the 15 series, the 15L and 15H, each provide very accurate readings along with low power consumption. These two units are similar in every aspect except for the voltage needed to run the units themselves. The input voltage for the 15H unit is 8.0Vdc to 40Vdc with the input current ranging from 15mA to 60mA compared to the 15L being 3.3Vdc to 5Vdc and 85mA to 100mA of current. The choice to use the Garmin 15L was easy considering that the rest of the components involved in the project use fairly low input voltage and draw about the same amount of current. The 15L unit purchased for the project has an eight pin LIF Flex Cable connector, however interfacing and testing with the flex cable became very difficult, so the group created its own homemade version of the 15L wire connector. This GPS unit is ideal for the project because of its weight and size. The size of the GPS unit is about the same as an American quarter and the unit weighs less than 0.50 oz. The Garmin 15L operates at a variety of user selectable NMEA 0183 baud rates, but the default baud rate of 4800 is used since other components used in our project operate at the same baud rate. The GPS unit has been interfaced with the PIC micro-controller and software has been written so that the only NMEA sentence read serially is $GPGGA. This sentence provides longitude and latitude, and also indicates whether or not our GPS has a true fix on an active satellite. The GA27C antenna is used with our Garmin 15L GPS unit. The GA27C has a BNC connection but a converter is used to get to the MCX connection found on the Garmin 15L. It has the required 10dB to 30dB electrical gain and operates at 3.3V. These specifications not only make it the ideal antenna for the Garmin 15L OEM sensor GPS unit, but the project as a whole. It is a small, light weight antenna that is very easy to move around and secure when gathering data.
Figure 5: Rogue Robotics UMMC Serial Flash Module
A flash memory storage device is used to store a comma separated variable (CSV) database of signal strength and its
cell phone. More importantly for this project, it is capable of measuring an RSSI value and sending it serially to a micro-controller. In the device, the modem receives a command from the PIC called an AT(tention) command. The command, “AT+CSQ” is the AT command that returns the measured signal strength. The operation is much faster than the refresh rate of the GPS and therefore will not decrease the rate of data collection.
An LCD is serially interfaced with the PIC as well. It is used by the device mainly during setup before initiating data collection. Text is presented on screen to let the user know about the device’s current operations. The power source is hardwired to a switch on the control panel so that when not in use the LCD can be shut off without affecting the rest of the system. This allows the device to continue to collect data without losing battery power to the LCD when it is unnecessary.
Figure 7: Data Mapping Software Block Diagram
To image signal strength on the University of San Diego campus, both a background map image and overlying signal strength data are necessary. In order to obtain the background image, a 17x11 inch scale USD map was scanned into the computer at high resolution. This map was converted to a “jpeg” image and imported into MATLAB using the “imread” command. The result is a background image of USD in which the dimensions of the campus are scaled down and locations are referenced by a two-dimensional matrix.
In order to correctly scale GPS location data it was necessary to calibrate the USD map using two known GPS lo- cations. The two points selected were the West Entrance Kiosk and the parking lot turnaround circle in Manchester Village. These points were selected because they are easy to visualize on the map and are far apart. The farther apart the calibration points are, the more likely it is that the data scaling will be accurate. Absolute GPS latitude and
Figure 8: Datapoints collected during Tom’s Data Collection Bike Ride
longitude, as well as MATLAB row and column, were found for these two points. From these, vertical and horizontal scaling constants for the actual data were derived. In order to match points, the software computes distances from the West Kiosk, applies scaling constants to those distances and shifts the data to its appropriate MATLAB location. In tests, sample points were found to be accurate within a few meters.
GPS location and signal strength data will be saved to a file by the mapping device. The imaging software accepts tab-delimited columns of longitude, latitude, and signal strength. MATLAB separates these columns into vectors and latitude and longitude are shifted using the aforementioned scaling code. Signal strength now assumes values only at the points at which it was recorded. These points can be plotted over the USD map to ensure location match. A map of all recorded data points for a comprehensive USD test is shown in Figure 8. However, to create a useful signal strength representation, it is necessary to interpolate between points, to create a continuous map. Three different methods are employed for this crucial step. Each method has positive and negative aspects in terms of accuracy and computing time.
Figure 9: Filter2 Rendered Plot of USD Campus
The least accurate, but fastest method of data contouring is a two dimensional filter. A matrix of zeros is created with peaks at locations that correspond to collected data. The MATLAB command “filter2” convolves this map of peaks with a square matrix of ones, which is a Gaussian low-pass filter. This smoothes the peaks and creates continuously contoured data. This method is good for a quick view of collected data, but it has fatal flaws in its portrayal. Closely spaced points are additive in this method and therefore data reflects density of points as much as it does signal strength. For example, a dark red spot corresponding to high value could represent either strong signal strength of high density
Since the device will likely be run from a car’s 12V battery, the simplest solution for a power supply is the DC cigarette lighter adaptor. A LM340-5 is used to step down the 12-volt source to 5-volts. Approximate power requirements of the system are shown in Table 3. All other components will be powered by a single 5-volt regulator. Setup in this configuration, the voltage regulator will never receive more than one ampere of current which is its maximum rated current. The car’s electrical system has more than enough power to power the system. The device can also be made more portable with batteries. Any combination of batteries that creates more than 9 volts is sufficient. To maintain small size, the default batteries are size AA. Put into a six-battery holder, the pack takes up little space in the system container. In tests, the AA batteries collected data for three hours straight without replacement.
For protection against reverse bias of the power supply, a diode bridge is installed at the power input. This creates an initial voltage drop of 1.5 volts. For this reason, the minimum operable voltage is 7 volts. The maximum input voltage is 35 volts and is set by the LM340-5. In addition the diode bridge there are several smoothing capacitors and an LED to indicate power.
Table 3: Power Requirements Device Voltage Operating Current Peak Current Cell Phone Modem 5-32V 400mA @ 5V 2A @ 5V GPS chip 3.3-5.4V 85mA @ 3.3-5.0V 100mA @ 3.3-5.0V Flash memory 5V 100mA @ 5V 200mA @ 5V PIC and misc. chips 5V 100mA @ 5V 200mA @ 5V
The project progressed on schedule. A working prototype was successfully tested and developed. The device retrieves signal strength from the modem and location from the GPS. It then stores it on the flash card. The data has been successfully retrieved from the card and imports into Microsoft Excel and/or MATLAB. The USD campus has been thoroughly sampled by Tom Davis on bicycle with the device running on battery power in his backpack. Below you will find project schedule information and details regarding the current state of each section of the project.
The project is following the developed Gannt Chart. Small changes have been made in minor task assignments but major tasks have remained true to plan. Team member task distribution is seen later in Table 11 which is part of the personnel section.
Figure 11: Project Gantt Chart
Numerous tests have been conducted in each area of design. A short summary and a table summarizing tests are available for each design element.
7.2.1 Micro-controller
The first half of the Fall semester focused on using the PICDEM 2 Plus Demo Board to develop software to interact with the peripheral components. The capabilities of the PIC were tested first. There are four interfaced serial compo- nents.
Each serial component was first tested with HyperTerminal. The devices were then each tested with their own uniquely written PIC software to test features and develop interfacing solutions. Once solid software techniques were developed for each component they were integrated one at a time with each other. The modem was integrated with the PIC and the flash to store signal strength at regular intervals on the flash card. The GPS was then integrated with the PIC and
Table 6: Flash Card Tests Test Status Completion HyperTerminal Interface Testing Pass September 24, 2004 PIC Software Testing Pass October 8, 2004 Save Data from GPS Pass October 10, 2004 Save Data from Modem Pass October 12, 2004 Save Data from GPS and Modem Pass October 20, 2004
7.2.4 Signal Strength Measurement
The signal strength component of this project has one goal in mind, having the PIC micro-controller communicate with our cell phone modem. The cell phone is connected through serial and operates using AT(tention) commands. The hardware part presented few problems, whereas the software part took a little more time to achieve. Two major tests were conducted. First, the cell phone modem was tested by itself with a personal computer. This was done by using Hyper Terminal to communicate with the modem using AT commands. The main goal was to test receiving a signal strength reading from a cell phone modem, also familiarize ourselves with the AT commands. Also, a side test was conducted successfully that proves the cell phone modem can communicate with an instant messenger program (AIM).
The second test, was a software test to integrate the cell phone modem with the PIC micro-controller. The modem was connected to the PIC via serial. The reset button was set as a call button. This test was successful, as the PIC communicated with another phone using the cell phone modem. The AT +CSQ command, which is essential to the project, also worked well.
Table 7: Cell Phone Modem Tests Test Status Completion Modem calls with HyperTerminal AT commands Pass September 17, 2004 Modem calls w/ PIC Pass October 8, 2004 Modem retrieving data Pass October 15, 2004
The chosen LCD was a more expensive choice as it uses serial communication. Parallel LCD’s are cheaper but more difficult to interface both in software and in the physical number of lines required on the PCB. For this reason a serial LCD was chosen. Testing of this device was simple and quick and does not warrant a table. The particular LCD chosen uses inverted TTL levels. Characters were successfully written to the device with the command provided in it’s manual.
7.2.6 Data Mapping
To create the imaging software, three specific milestones had to be met. First, the map had to be calibrated to GPS data. This was tested by walking down the sidewalk and recording several GPS points at known geographical locations. Once these data points were entered into the computer, their correspondence to map location was examined. This test was successful, as the GPS mapping is accurate to a few meters. The next milestone to be met was verification that signal strength at known locations can be represented with colored coded dots. This was tested by creating sample signal strength data at the GPS locations from the previous test. By zooming in on the map in MATLAB, it was clear that data was presented in color coded form. The last test was to map signal strength data as a continuous contour. This was tested by setting the sample signal strength to follow a known pattern of increasing and decreasing signal strengths along a linear path. This test was successful and testing for the imaging software, at this stage of development, was complete.
Table 8: Imaging Software Tests Test Status Completion GPS Map Calibration Pass Spring 2004 Signal Strength Point Verification Pass September 10, 2004 Continuous Contour Mapping Pass September 24, 2004 1st Data Mapping Run Pass October 27, 2004 Full Data Mapping Run Pass November 15, 2004
7.2.7 Power Supply
The power supply for all devices consists of a single 5-volt regulator (TM340-5) from a twelve volt source. Each device, including development board, flash memory, cell phone modem, and GPS chip, were connected to the power supply. All devices worked properly. Power was connected to the power pins in reverse bias and the system still operated due to the diode bridge. Voltage was also varied from 0 to 25 volts and the expected operating ranges were verified (7-25VDC). All tests were successful.
Table 9: Power Supply Tests Test Status Completion Development Board Pass October 8, 2004 Flash Memory Pass October 8, 2004 Cell Phone Modem Pass October 8, 2004 GPS Chip Pass October 15, 2004 Reverse Power Inputs Pass November 16, 2004 Voltage Varied from 0-25VDC Pass November 16, 2004
A complete schematic was drawn for this project and all necessary components were included. It can be seen in Appendix B. The PCB layout was designed from the schematic. The final PCB layout is seen in Appendix C. The printed circuit board accomplishes quite a few things in its 2.5” x 3.8” footprint. It is laid out like a central hub where the GPS, Cell Phone Modem, Flash Card Reader/Writer, and LCD all plug in for data and power. The PCB and its components bring in and put out everything demanded by the project. Click in connectors were placed at each connection point with exterior peripherals. This makes assembly, disassembly, and modification easy. The PCB also has an onboard programming port for easy software upgrades.
All of the hardware for the project is contained in a Pelican watertight protective case. The heavy duty case was chosen because it is expected that the device will undergo heavy abuse while is transported around a city. The case if filled in with customizable foam cut to hold components. The GPS antenna is attached to the outside rear of the case via a bulkhead mounting BNC connector. On the inside a MCX to BNC conversion cable connects the GPS to the bulkhead BNC connector.
A custom aluminum panel has been designed to fit in the case. The panel has cutouts for switches and the LCD. There is an additional cutout for the programming port. This allows the device to reprogrammed without disassembly. The project and group member names are engraved in the aluminum. The product casing can be view in Appendix D.