Two Arduinos

So I'm posting in here because I have tried searching but I'm not entirely sure where to start searching.

Have purchased an Arduino board and have gotten the hang of it. Now I want to be able to create two separate objects, which aren't connected with wires, to be able to talk to each other.

The example i have is two teddy bears. If you sit them next to each other (say within 20cm) for 30 seconds or more, they both output serial data saying they are friends. This transmits to the computer which then updates a Facebook profile saying they're friends.

If you pull one away from the other one in less than 30 they will output that they aren't friends.....

I am sure it is possible using IR, kind of an extension to Furby's functionality. But I would rather do it with Bluetooth or WiFi and possibly GPS for positioning...

Any help would rock!

  • Cheers from New Zealand!

My first general recommendation would be to get hold of the book "Making Things Talk". It's an excellent resource for learning about this sort of thing.

The book "Physical Computing" is also a good resource but it uses the Basic Stamp as the microcontroller.

http://books.google.com/books?id=6JRcqhVUszEC

I don't think GPS would work for detecting those sorts of distance changes but it could tell you if they were in the same house or not.

Andrew

Interfacing With Hardware --> Communication
Scroll down to wireless and enjoy :slight_smile:

Now I want to be able to create two separate objects, which aren't connected with wires, to be able to talk to each other.

Hmm, that sounds like this newfangled "wireless" stuff. :slight_smile:

Off the top of my head, I would guess that Xbee would be a decent compromise between cost and usability, although I don't know how easy it is to work with on the Arduino.

Bluetooth would work but is expensive. Dumb RF modules would be cheap but tough to code (and maybe build, especially with >2 units).

GPS won't work (reliably, accurately) indoors, and 20cm is way too much resolution to expect from GPS, even outdoors. That may even be too much to expect with a differential GPS setup, but DGPS is probably beyond the scope of a teddy bear project. :slight_smile:

Not sure if Xbee has RSSI (received signal strength indicator). That could be useful in determining distance.

Maybe the Nordic wireless comm stuff would work? I haven't dealt with those, either, although IIRC there is some Arduino code for them out there.

-j

Is the arduino fast enough to time a ping resonse? Have one set itself up as a master and the other a slave, then ping many times between them, timing the resonse. Calibrate it to account for any delay in processing etc and you get a distance.

Hmmm, a rough estimate seems to be a very short time period, probably too short for the arduino to pick out. I got 0.67 nanoseconds at 20cm.

EDIT: What about the same, but with sound and a mic? Give out an omnidirectional sound at unheard frequencies and detect travel time. 20 cm = .6 milliseconds

If you can afford to have them closer i'd go with RFID.

Hi,

Where in New Zealand are you based? There's other people with Arduino interest and keen to meet in at least Auckland, Wellington and Christchurch.

The 433MHz modules might be a possibility. More details on what you're hoping to achieve is always helpful to enable us to provide better advice.

--Phil.

Woah, you guys are nuts!

Our internet has been down for 5 days (cheers Telstra Clear), and I come back and there's all of this!

I am going to start researching more into all of your comments.

Bought 'Making Things Talk' and it's pretty awesome, I'll see where I get before I get the other book.

Had kinda assumed GPS wouldn't be what I was looking for, and at the price i'm glad it's not! & In terms of speed, it doesn't need to be exact - it's a concept mockup at the moment.

Phil - I'm in Wellington, and would love to meet other Arduino users. Also tips on where to buy as the people at Jaycar are lovely, but don't have what I want most of the time. The guy there almost wet himself when I showed him the Arduino.... Odd for an electronics shop...

Will keep you posted of where I get to (beware, when products are coming from the states it may be a good week or two between responses).

-Cheers

Hi Jamie,
Not sure it will do what you want (just getting into it myself) but you might like to check out virtualWire (Arduino library). It uses those 433MHz modules Phil mentioned.
The supply situation doesn't seem any better here in Australia. I got my Freeduinos etc from nkcelectronics. I'd certainly use them again, even though the exchange rate is much worse now. :frowning:
Sad to see the only local electronics mag, Silicon Chip, doesn't seem interested in Arduino either. I told them about it last year, but I think they have a vested interest in Pic & Picaxe. Hence the local supply situation.

Is this what you're talking about when you say the 433MHz? From the description it seems like it would integrate pretty seamlessly. Though for what I'm looking for, this is quite pricey.

This looks promising, it's cheap and small.. Really sounds perfect. But how easy would it be to integrate. The information here: Arduino Playground - Nrf2401 says it can only do either send or receive at once. How much of a problem is this in most applications?

The Xbee stuff looks great. But looking at one of the tutorials on Arduino.cc it looks insanely difficult to setup.

WHAT I WANT TO DO-----------------------------------------

Really, all I want for this part of my app is to have two or more arduino boards (ideally an unlimited number, all with different IDs).

Each one of them outputs a signal with their ID.

Each one of them is constantly listening for other IDs. Preferably also be able to pickup the strength (RSSI as someone pointed out). So in the first instance, I could set it so a light on the arduino pulsed if it was close to another arduino based on the distance away - as well as outputing the ID of the sending arduino onto a small LCD display on the receiver.


What system would work best here? I don't know enough about any of the systems from the tutorials to base purchasing a set of two...

Cheers

No this is what they mean...

Transmitter: http://www.sparkfun.com/commerce/product_info.php?products_id=8946

Receiver: RF Link 2400bps Receiver - 434MHz - WRL-08949 - SparkFun Electronics

By the way Seeedstudio has them even cheaper - US$4.90 for the PAIR http://www.seeedstudio.com/depot/433mhz-rf-link-kit-p-127.html. Seeedstudio got them to me in Australia in under a week using the cheapest shipping.

They also have the Nordic transceiver you liked cheaper http://www.seeedstudio.com/depot/24g-rf-module-nrf24l01-p-214.html

If the two objects are close enough for optical line-of-sight communication, how about an infra-red beacon and receiver? There are quite a few threads on the fourm about IR communication, usually something to do with an IR remote control.

Alright, so after a long wait, next post :slight_smile:

I ordered the pair of receiver/transmitters from SeeedStudio. They have been incredibly fantastic. I really recommend them. BUT If you're in NEW ZEALAND, get DHL - NOT NZ POST. NZ POST LOST IT.

So not over a $100 (including a new arduino) out of pocket, i've re-ordered and am hoping for the best with DHL.

What i'm interested in is if it's possible to read the signal strength of the RF pair? I would like to be able to tell if they're right next to each other or 5 meters or in another building?

Seeing as you are in Wellington, you should make contact with these people: http://makerspace.org.nz/

--Phil.