Trying to build a gps device

So I am new to arduino. And I am having trouble finding out some particular info. I want to build two possibly more gps devices that light up when they are getting close. How can I accomplish this with arduino?

The use for this is that my friends and I are regularly going to festivals, and I thought it would be a great device for hide and seek or a way to know when we are near each other while we are running around these events.

If anyone could lend some advice it would be greatly appreciated.

Joe

A smartphone would be a far better platform for this, as well as saving you from having to lug some DIY device around. You could write your own app, or look for an existing one such as Loopt.

We tried that, but the problem we run into is service area coverage. We have pretty much no service at festivals like electric forest or burning man.

What sort of range are you aiming for? If you're relying on GPS presumably you aren't expecting very good resolution on the position so a very short range solution wouldn't be much use.

Do you really just want an LED? A direction/range indication would seem more useful to let you find where another person is.

The GPS part is pretty simple. The hard part is transmitting the location to the other unit(s). Consider that you need to have all units broadcasting their positions, without stepping on each others' broadcast. The size of a packet and how often they are sent, will probably be the primary factor for determining how big a battery you use.

It would be great if I could have a range of about 2000ft

An led was the plan, it would be awesome if it could have a light point in the direction or light up once it is pointing in the right direction. I wasn't sure how to do this just yet but I figured that step would be easier to figure out. If rf or Bluetooth is an option that would be great, but I am not sure they would have the range.

Lar3ry

Could you point me in the right direction as to set this up? I am not very familiar with gps, and I am not sure how to accomplish this task. If it is specific to only being able to link two devices, or can I link more devices?

As Iar3y said, the GPS is the easy part. Basically you have a bit of code on an Arduino that gets lattitude and longitude data from the GPs attached to it. Forget about that part of your project for the moment.

Assume you have several Arduinos that each know its own current latt and long. Think about what has to happen next.

If Arduino A is to figure out whether Arduno D is close to it Arduino A must also know the latt and long of Arduino D. And if you have 5 Arduinos then each Arduino must know the latt and long of each of the other 4.

Even if you assume you have a working transmission and rececption system how are you going to ensure that each Arduino gets the latt and long from every one of the others?

And to make matters more complicated, I think you must assume that the tranmission/reception system will not be perfect. Sometimes A will get a message from C, other times it may not.

You may also experience problems with GPS position reception. The GPS signal is very weak and easily hidden by buildings and trees.

And as @PeterH has said, you also need to consider whether the resolution of the GPS position system is good enough.

I suspect you should start with a lot of outdoor testing with the simplest code and hardware you can create. Don't bother about practical matters such as durability at the early stages.

An interesting project and a challenging one.

...R

Thank you robin 2 for clarification details. I am new to arduino and so I am a little uninformed and uneducated on a lot of these topics. I would like to try and perfect this with the gps, but I feel this project is going to take a lot of time. Which is fine. Curious could this be accomplished with rf transmitters?

I guess would it be possible to make devices with transmitter and receivers built into them, and then when a frequency from one device gets close to another it would light up?

Again thank you for everyone's time in responding.

Jadams327: Thank you robin 2 for clarification details. I am new to arduino and so I am a little uninformed and uneducated on a lot of these topics. I would like to try and perfect this with the gps, but I feel this project is going to take a lot of time. Which is fine. Curious could this be accomplished with rf transmitters?

I guess would it be possible to make devices with transmitter and receivers built into them, and then when a frequency from one device gets close to another it would light up?

I think that RF transmitters/receivers is probably the only option if the cell phone has been ruled out.

There are a number of RF solutions... low cost 415-433 or 915 MHz transmitters and receivers; WiFi modules, etc. Bluetooth only has a reliable range of about 35 ft., and that would be without interference in the form of prople or buildings between the units. WiFi is an option.. range more like 100-150 ft. One thing in your favour is that because you are looking at two GPS unit outputs when they are close together, the accuracy in absolute position is less important than the relative positions of the units. GPS units in close proximity will all have the same amount and direction of errors that are caused by satellite geometry, geographic terrain, atmospheric conditions, and more.

The first thing to consider is what sort of range you would want to have your units indicate proximity? 15 ft? 50 ft? 100 ft? A GPS of the type you would find attached to an Arduino is fairly accurate, in best conditions, about +/- 3 ft., and, more typically, +/- 10 ft. Of course, in bad conditions, it could be as bad as +/- a continent or two.

So, let's say you want to go with "light the LED when closer than 50 ft.". The nRF24L01 transceiver modules would likely do the trick, and if you get the ones with the power amp and "stick" antenna, the range will be boosted.

The hardest part, as I mentioned will be to communicate without interference. There are a number of schemes that can be used to separate the signals in time. Time-slots allocated by address is a common way of doing it. It's fairly complex, but not overly difficult to implement.

Again, battery drain will be an important consideration.

Like @Iar3y I would try the NRF 2.4GHz transceivers.

You won't be able to get any useful distance information just from the strength of the signal - there will be too much variation due to external conditions.

You have to arrange for the devices to transmit data to each other.

At this stage I think you need to work separately on two different problems.

The first problem is the ability of the wireless transceivers to work reliably in the conditions you want to use them. That probably means buying a pair of them and a couple of Arduinos, writing some simple code - perhaps A sends a message to B and B sends it straight back - and then doing some field trials in a typical location. If that doesn't work nothing else will.

The second problem (assuming you have figured out reliable communication between 2 devices) is to figure out and test a protocol for communication between several devices. This would be much easier if one of the devices could be treated as a master and the others as slaves. But that will be no use if you want slave D and slave E to know they are near each other when master A is out of wireless range.

After all that, actually getting and sharing the GPS data will be trivial.

I don't know if it is of any interest to you but I have these Deltino devices for radio control of model trains. They are very small boards with an Atmega 328, a Cypress 2.4GHz transceiver (and a h-bridge, which is probably of no use to you). They are also used for flying model aircraft so they should have decent range. The Cypress transceiver is similar to the NRF. If you are interested you could email David T of Deltang for more information about range - he is very helpful. I published some demo code here.

...R

If you know your friend's position & you know yours, here is the math: http://www.movable-type.co.uk/scripts/latlong.html

Ray

If you have a solid 3D lock, the newer GPS modules should be accurate to around 2.5 Meters.