Saturday, December 20, 2008

A low cost GPS beacon

drawing design budget updates

For a long time I've been wanting a way to track things remotely using GPS technology. There are many types of systems that do remote vehicle tracking, UPS and other trucking companies use them. There are also emergency beacons that use a network of satellites to track and report distress calls. These systems all require large invenstments in infrastructure in the form of towers, satellites, maintenance fees, licencing, etc. I want to create something that will work for the hobbyist or small volunteer groups who need this type of technology.

I came up with several possible uses for this remote tracking technology:

  • Wilderness search and rescue teams in the field
  • A recreational fishing fleet
  • Golf carts at a golf course
  • A fleet of small recreational aircraft
  • Wildlife tracking (also pets and service animals)
  • Lost child tracker, could be carried in a backpack or clipped to a belt
  • Recording ocean currents with a retreivable data logging device.

In order to accomplish something worthwhile, I've put some strict requirements together for this project:

  1. Total parts cost less than $150
  2. Zero operational costs (licensing, power, fees, etc, all zero)
  3. Transmit range of 100 miles ocean, 10 miles land
  4. One month or greater operation time
  5. Resistant to sea surface conditions for standard operational period
  6. Portable size and weight

Concept drawing:
Conceptual drawing of the GPS beacon

The prototype design stems from work a friend and I researched for building a vehicle computer. One element of the vehicle computer that was appealing was the possibility of inter-vehicle communication and establishing a network that would serve as a real time traffic monitor, and enable dynamic routing according to traffic information across the network. The radio protocols for sending packet radio transmissions to a central server were complex, and would have been costly to implement, quickly defeating the initial design requirement that this remain a hobbyist or amateur level project. Sending data over an analog radio communication requires signal processing of a modulated signal of which there are several options. As an experiment in very low cost methods, this project will attempt to encode the position information on an unmodulated continuous wave signal using Morse code. Using Morse as an encoding scheme is not as efficient, but requires much less processing power in the mobile units, and is readily understood by many open source encoder/decoder programs. It is also cool, and retro. Figure 1 shows a course prototype drawing of the elements needed to create a marine signal beacon. A five volt power supply will power the necessary electronics and the radio transmitter. If enough power can be generated by the solar cells to achieve a ½ watt signal, the system should have a range of several hundred miles over open ocean.

The current difficulty is the antenna design for the radio broadcast.

The budget for the project:

ITEMEXPECTED COSTACTUAL COSTCOUNTSTATUS
GPS processor$85$202bought 2 on eBay for $25 each on 10 Feb 2005
Solar cells10
8To be purchased
PIC board15151purchased for other project in 2002
housing5?2Planning on using a Nalgene bottle for its light transmitting and watertight construction

Progress log

13 May 2005:Wow! the dissertation work really gets in the way of working on this remote GPS project. Now that the proposal and a good chunk of the paper is out of the way, I can get back to some fun stuff. When I last left off, I had gotten the GPS modules in and began experimenting with coding the microcontroller. The prototyping chip I used was the OOPic. It's a great starter chip and made is really easy to prototype out the code functions I wanted. But it's really overkill for the processing i want to do. The design of the OOPic trades off ease of use and on board programmability for a higher cost and apparantly slower processing. I can put ten Motorola chips on the unit for the cost of one OOPic. But it was good for an initial cut. I've ordered some Motorola KS8 microcontroller units from Jameco. It will take a while to port the code over, to the new hardware, but it will be worth it in the end. I can replicate the entire system for much less cost this way.

12 Mar 2005:In order to have a more component style architecture, I'm separating the radio transmition function from the morse encoder. Even though the PIC micro will handle all the functions I need, it's not really necessary to have this unit that small, and it will be easier to test and prototype the functions independantly. The morse transmitter is working wonderfully, as is the receiver translator. I'll put schematics and source code up soon. i will have to modify the receiver program to act as a COM port however, so that remains to be done.

03 Mar 2005: The Lassen GPS modules came in and they are really amazing. The big dissapointment was that they have a custom cable connector that was designed specially for this unit and I haven't been able to find any without ordering thousands from the manufacturer. So I guess I'll have to make my own connector from scratch. Not too bad, but a pain nonetheless. So I'll put the micromodule on the back burner for a bit and work on the transmission hardware and the decoding software.

16 Feb 2005:While I'm waiting for the Lassen SQ GPS units to come in, I'm thinking about the backend architecture for what will happen to the transmitted morse code. At the client end, I'll need software to listen to the inputs of the radio signal and recreate the morse code from it. From a simple radio receiver, I'll use the sound card inputs to get the CW traffic. A simple thresholding program on the amplitude of the sound will let me classify a transmission as a dot, dash, or pause. These will be encoded as text and piped to another program that will decode the Morse into the NMEA string. That NMEA string will then be piped to a third program. I have two options at that point that I'm considering:

Option 1: The program will control objects on a tracking layer for a GIS interface, most likely as an ArcGIS entension.
PROS: Easier to track multiple objects, can make custom symbol changes based on data passed to the intermediate program.
CONS: Requires the expensive ArcGIS program.

Option 2: The program will open a TCP port and send the NMEA strings to that port. Then using a virtual COM port program like this, I can use any GPS compatible mapping software to plot the locations. The software will think that it is reading NMEA directly.
PROS: Any GIS program that supports serial GPS connections will be compatible, including many free and open source projects.
CONS: Software may only support a single GPS per client.

Normally a mapping program would not support multiple GOS units attached to one PC. They would approximately have the same information, and would be redundant. Since mine is remote, and I'd like to be able to track more than one beacon at a time, I need to be more flexible about the connectivity.

13 Feb 2005:In an effort to further reduce the processing needs for the PIC microcontroller, I've decided to take the signal generating component out of software and build a hardware component for it. In the original prototype, the PC generated the signal wave, sent it through the serial port to be added to the AM carrier wave. Looking back, this is an unnecesaary load for the processor, and while the PC can handle it easily, when using the PIC microcontroller, it makes much more sense to build a hardware component for the carrier wave and the signal wave, and simply use the PIC interface to turn the addition of the carrier wave on and off. Need to pick up a few capacitors for the circuit, but should be able to knock that out tomorrow night.

I also found out that the magnetic loop powered antenna is great for receiving, but crap for sending, so it's back to the drawing board on the antenna. I picked up an ARRL technician class manual and textbook for the first step test to get a HAM radio license.

10 Feb 2005: Lassen SQ from TrimbleToday I got a fantastic deal on eBay for two Lassen SQ GPS modules from Trimble. This module will allow me to reduce the weight tremendously. The best part though, is that I can use Trimble's software to configure the NMEA engine to only send the location sentences. Normally the NMEA stream, like I would get from my eTrex, would contain information on the satellite constellation, bearing, and other information that I don't need for this project.

By removing this extra data, I can cut the processing load on the ooPic by about 80%. I also found an article in the QST amateur radio magazine on making an inexpensive GPS antenna. Since the Lassen SQ requires an external antenna, I'll try this method before shelling out 70 bucks on a mag mount patch antenna. I'm a little skeptical about making a quality GPS antenna out of some PCB material and a butter dish (see the article), but I'll give it a shot. It would be worth the effort to find a cheap disposable solution.

05 Feb 2005: In taking stock of this project, I can see two major factors that I'll need to research heavily. One is the transmission frequency for the beacon. The FCC regulates all radio frequency usage. There are quite a few bands that the FCC allows for communication by amateurs and other recreational, non-commercial uses. Clearly I can't keep testing with my low power 1000 hHz signal. I'm interested in getting a long range signal with low power and a compact antenna. In general, I want to choose a frequency racge that has a good tradeoff between propagation distance, and antenna requirements. Longer wavelength signals can travel well along the ground and over terrain without attenuating (losing power). Since you can't get something for nothing, my hypothesis is that I can trade off signal fidelity and data throughput for distance. By using the CW transmission, I can encode smaller strings of informaiton, but need much lower power to do so. We'll see how it goes.

The second hurdle is the antenna design. I'm looking into textbooks in the field to get some advice on the type of antenna to use. The amateur radio community has also been a huge resource for me, and I'd like to get my HAM license as part of this project. I'm looking into the magnetic loop antenna, which should allow me to tradeoff some battery power for a smaller antenna size.

02 Feb 2005: After cruising and posting on the ooPic yahoo group, I found some useful posts on how to read in serial data and process it with the ooPic. I'll have to hold a good amount of the string in the EEPROM cache on board the ooPic, which is worrysome from a performance perspective, but hopefully I can get enough data out to make it worthwhile.

27 Jan 2005: The oscillator arrived and everything works perfectly. I cannibalized two serial cables to make a connector to the PC. Even with a simple random wire antenna I get a decent signal throughout the neighborhood. Next I have to get the ooPic to send out an encoded signal.

25 Jan 2005: I found a terrific site called scitoys.com that explains radio transmission, and even has a morse code program for the PC that you can use to drive the small radio project. I built the initial radio components, and have to wait for my 1 mHz oscillator to come in to test it out.

20 Jan 2005: Hooked my Garmin eTrex Legend up to my laptop to watch the NMEA sentences in HyperTerminal. Discovered that really all I need is one sentence. Unfortunately, I can't find an interface to the GPS to turn off sending of those other sentences. I found a great reference to the NMEA protocol here. After watching the data stream, I'm convinced that i can process the feed into a minimal amount of information using a PIC microcontroller. I have an ooPic prototype board that I'll use for testing, but those are too expensive for the final product.

15 Jan 2005: Started writing down ideas about this project and thinking about how to possibly get this done. That document became this webpage.

No comments: