Help Creating A Long Range Sensor

Hey guys, I'm new to Arduino but I'm really excited to jump in and learn. I've done some basic electronic work before and a very small amount of programming, but I am hoping to learn more before I start college next year. Anyway, I had an idea for what my first project would be, but I'm having troubles figuring out how exactly I would do it. I was hoping some of you seasoned veterans could point me in the right direction.

So basically what I'm hoping to make is this: One central device that I would put in my room or something connected to an LED and maybe a speaker. A second, portable device that would be fairly small and possibly be able to attach to someone's car. What I'm hoping to do is make it so that when the two devices got close enough together (I'm hoping for as long a range as possible, but a few hundred feet would work fine), the central device would start to light up and make noise.

Now, my current idea is to use two XBees attached to Arduino's. The central Arduino would be searching for the signal of the second, and as they got closer together, the signal would get stronger, and the device would get louder. Now, I'm fairly certain that I could pull something like that off (please tell me if I am wrong and why, as I am hoping to learn). However, as I said earlier, I am headed for college next year, and well, money doesn't grow on trees. Buying two Arduino's and two XBees would be a decent chunk of change, especially if I wasn't certain that it would work. So I am looking for some input on my ideas. Is there any way that I could do this that would be a little bit cheaper?

Thanks guys!

Looking further into it, would something like this ( http://www.seeedstudio.com/depot/2km-long-range-rf-link-kits-w-encoder-and-decoder-p-321.html ) work?

Assuming you are going to be using this for good, and not evil....

Keep in mind that most of the radios are going to be rated in line-of-sight range. The radio you list in the second post may hit 2 km, but that would be in an open field where both the transmitter and reciever can see each other.

XBees are going to work the same way. Some are rated in miles, but again, line-of-sight. Keep that in mind when picking your radio.

With that in mind, you won't need an Arduino on both ends if you are using XBees. You could just program both radios to only work with certain serial numbers, and plug the transmitter in. I think you also have to turn on beacon-ing. That way it would continue transmit, and the reciever would keep looking. The arduino would just have to monitor the signal strength pin, and trigger the alarm when appropriate.

Haha, yes this is definitely a project for good, not evil.

For the XBees, it seems like I'd have to pay about twice as much for less range. To get a decent amount of range, I'd have to pay about $80, and that's just plan too much. And while I realize that the range will not be ideal, how much do you think it would be affected? If I went with the model I posted (or you could tell me about the XBee if that's what you know better) and was using it in the small suburb I live in, would it get...half that range? Less? Would it be completely useless? Also: you said if I went with the XBee I wouldn't have to use two Arduinos. Awesome. If I went with the parts that I posted, would I have to buy a second Arduino? Or would I be able to use the one I have now?

I would be cautious of this sort of things for two reasons.

1) The regulations in your country may not permit the transmissions of signals in this band without a licence. You must check what is allowed in your country.

2) I would be surprised if it worked as claimed. With only 2.5mA power consumption at 5V that gives a total power of 12.5mW. That means the transmitter power is much less than this. Couple this with the very crude antenna and you will struggle to get the distance. Yes you might get this on an open field site, that is no obstructions or reflections or interfering signals but in practice the range will be much much lower that this.

Do you have any idea of how much lower? Low to the point of unusable?

No firm idea, but anything reliable over 100 yards in an urban environment would surprise me.

Hmm. Thanks for the help, I do appreciate it. I think I'll probably end up going with that though because even if it did work for only about 100 yards, anything that would significantly increase that distance would be a LOT more money. And in the end, 100 yards is 100 yards. It might not be HUGELY practical, but at least I'll have gotten the project done.

And you are sure it is legal where you are?

It's right in the AM radio spectrum, so I'm going to have to make sure that there's nothing broadcasting at that frequency. But I don't think it's illegal to broadcast AM radio (could be wrong).

It's right in the AM radio spectrum

No?

But I don't think it's illegal to broadcast AM radio (could be wrong).

Yep your wrong. What country are you in?

Well damnit. I'm in the US.

So you have to ask if this product has FCC type approval? I suspect this product does not.

It is not sufficient to just transmit in the required licence free band, the product should have FCC certificates and have been tested at an FCC approved test house. I have been through these hoops in my day job and certification is time consuming and expensive, most far east makers don't bother with this and say it is all your risk. Or they try and pretend that everything is fine just because it is in a permitted band.

So you doubt that the chip would work? Hmm. Well, i guess I'll look more into the XBee I guess. At least with the XBee I could get more use out of it outside of that project.

So you doubt that the chip would work?

No I am not saying that, what I am saying is I doubt if it is legal.

Oh I see. Hmm. Maybe I'll look into seeing how strictly these kind of things are enforced. Thanks for your help!

Sorry, missed what the frequency was earlier. Those are illegal in the US, unless you have a Ham radio license.

Do not use this radio! Unless you have the license of course.

Sparkfun used to have a review of the different ranges of the different radios they sold. I can't find the review I am remembering, but they do have this:

http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=128

It should give you an idea of what to expect in range, and in price.

OK, So I am fairly decided that I'll use the XBee. Now I just need to figure out exactly what to get. Now, if I bought one of these ( http://www.sparkfun.com/commerce/product_info.php?products_id=8767 ) and put it on my Arduino, what would I need to communicate with it? Another one?

You need two of them One acts as a sender; the other acts as a receiver. If your plan is for the Arduino to remain stationary, and have it's xbee (by the way, you'll need a xbee shield) listening for the other one to come within range, you'll need some way for the other xbee to be sending a constant stream of data.

The xbees are radios. The send data when there is something to send. They receive data when something has been sent. They can't sense the presence of each other, unless one is sending. So, the sender needs to be sending something all the time.

By itself, the xbee won't output a steady stream of chatter.

OK, that's what I figured. For the mobile one, would I need another arduino? Or could I put it on something else do that it would send the signal?