SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By Nanonovice
#192884
Hi, I'm new hear and would appreciate some advice.
My aim is to build a swarm of robots for a college project (I'm a mature student).
I will use Arduino because they are available. I require some information regarding sensor selection.

I require 2 sensors:
one to measure local light levels (I'm thinking LDR)
one for object detection/avoidance (I'm thinking IR)

I need to be able to distinguish between the other robots (I will have more than 10 robots) and the walls of my test/experimental arena which will likely be cardboard or wood, I can paint/cover them to help with detection if necessary.

My concern is that multiple robots moving around in the arena, each emitting an IR signal will cause problems. Each robot will be unable to distinguish between the signal they heave sent, and the signal other robots have sent.

I have looked at some of the options available such as the Sharp GP2D120 and Panasonic PNA4601M. Cost will be a factor but I need to ensure that I can achieve a reasonable level of reliability.

Is it possible to modulate the frequencies of these or other sensors to give each robot its own distinct signature? Is there a filtering solution I can use? My aim is to build 2 or 3 robots, work out the issues and then scale up. Any advice on the options available would be great. I have included a link to a video of the system I am basing my project on so you can get a sense of what it is I am trying to do.

https://www.youtube.com/watch?v=BOEP603VRdE

Thanks in advance for any replies.
By Valen
#192892
Why the concern? Isn't that the objective of your experiments? To figure out how to deal with that.Obviously you need to generate code for them that make them send different codes in IR transmission to distinguish themselves. Something like "Hello, my name is swarmunit#x". Either it receives this as a reflection of a wall or something, which you can use as a primitive range detector to semi-static objects. Or some other unit receives it and replies "Hello swarmunit#x, I call myself swarmunit#y." But probably more succinct than that. They'd better behave themselves in the frequency of their transmissions so they allow each other the time to speak. But hey, that is the challenge in researching swarm-cooperation.

The Sharp GP2D120 are clearly range sensors. And are not suitable for communication. Except maybe for really slow crude on/off key-ing/morse code. If you also have the proper wavelength sensitive IR diode for that. And they comparatively expensive and use a lot of power. (with nasty voltage spike noise)

But the Panasonic PNA4601M, or similar IR carrier-wave detector chips like the TSOP38238, is better suited for communication. Basically you need to have a timer in the arduino generate the carrier signal, and modulate it with another digital pin to emit from a IR LED. i.e. IR LED with cathode to serial TX and anode to oscillator output-pin would be the simplest way in parts-count. Then the output of the PNA4601M/TSOP38238 will go low if it detects enough of the carrier pulses of the right frequency. This then generates a (demodulated) sequence of low going pulses which the RX serial pin of the arduino can decode to numbers/ASCII characters.

As for range detection with these IR-detectors, I've read on a german forum years ago that some were successful in getting range-dependent detection by changing the carrier-wave pulse width. Narrower pulses means less light on the detector and thus the object would need to be closer to give enough reflection. By scanning the pulse-width of the carrier-pulses for successful reception (disable serial and use RX-pin as input GPIO pin.) you'd get an approximate (probably non-linear) indication of range. I have not tried this myself yet, although I do have the robot (Asuro; atmega8 based and mostly programmed in C, not arduino). So I can't say if it is easy or very effective in practice. But cheap in parts this is for sure!

(German Forum thread for whatever Google Translate is worth: http://www.roboternetz.de/community/thr ... ight=10026 )
By Nanonovice
#192912
Thank you Valen for your reply.
The objective is to figure it out, I just need to ensure that it was possible with the sensors I buy.
By Nanonovice
#192927
Another question regarding the IR receiver.
If I were to use a receiver such as the TSOP38238 with an appropriate IR LED.
Is there a way to calculate/estimate what kind of accuracy of distance measurement I might be able to achieve using the method above? Or will this data be experiment only?
By Valen
#192928
I'd say this requires experimentation/calibration. There seems to be quite some variables at play. Background illumination, IR Led current, aspect angle/complex reflections of the target robot. And probably the most 'black-box' the part variability in filtering characteristic. Just to name a few. But with just a couple of bucks on parts you can't expect much.