Measure distance and orientation from sensors to remote

Hello guys,

First of, I have to say I am a totally novice in both programming and electronics, so pardon any of my lack of knowledge.
I am working on a project from class to make a target following cart. We will have a person holding a navigation beacon and the cart trying to maintain the distance of 4 ft from the beacon. Initially, I tried to use the NXT IR Seeker V2 from Lego to get the orientation and the distance from my source. However, I couldn't make the sensor to work with my Arduino Uno and didn't get a lot of help from Lego Technical Support. So I decided to try another approach. There are two ways coming to my mind, first is to replicate whatever the NXT sensor suppose to do myself, as to my understanding it is essentially just 5 infrared receivers combined together. I was thinking I could put 5 infrared receivers I picked up from RadioShack like the schematic below and measure the distance from the IR LED to the 5 sensors, whichever the minimum distance is will be my distance and the direction my stepper motor on the cart to turn to.

The second approach I think of is to use the Parallax Ping sensors to talk to each other like the set up below to tell the distance with the same procedure as the infrared sensor. Since we have 2 Ping sensors already and I was able to make those talk to each other I will only have to buy another Ping. I think this would give me a better range, but the orientation wouldn't be as accurate as the other approach.

Since our robot don't need to have the orientation to be very exact, as long as it stay in the circle of 4ft around the target we are good with that, the second one is clearly better on me as there won't be as much work to do. However, I don't want to wast another week waiting for part to come in since we have to do demonstration on the 19th of Dec, so I just want to ask is it possible for me to get the first approach to work? I tried to do research on google and couldn't find any reference on how to do get the actual distance from my infrared sensor. If you could point me to anyway how I could do it would be a great help.

I'm not sure Arduino is fast enough to measure distance using IR.

Shpaget:
I'm not sure Arduino is fast enough to measure distance using IR

You would not measure distance by time of flight of an ir pulse at the speed of light, like you do with ultrasound. Even if you could, in this case the target is sending out continuous illumination, so you can't use timing anyway. You would need to use intensity of the received ir to estimate the distance. This would not be easy because of the way the ir sensor's sensitivity varies in different directions. Enen a small change in angle would cause a change in the received ir level, changing your distance estimate. It might be made to work with a lot of experimentation, but it sounds like you may not have enough time for that.

I would go for the ultrasonic sensors...

Paul

so I just want to ask is it possible for me to get the first approach to work?

No and neither would the second.
Your lack of success in a google search has to tell you something. It tells you that this is not something you can very easly do.

Thank you. After searching today and yesterday with no success, I had the feeling the first one would be very hard to do. I just need somebody to confirm it.
@Grumpy_Mike: Would you mind explaining me why wouldn't the second one work? And providing both would be impossible, can you point me to the direction I should be looking at?
Thanks

The second one needs a referance to time against so you can measure the time of flight to get the distance. Where is this going to come from?
You might consider having an IR LED flash on the robot and picked up on the beacon to act as a referance for the ping.

Haven't the patience to watch the whole of that video.

For distance sensing, you use ultrasound. There is no other option. You need a transceiver ("ping sensor") on both the target and the tracker. The tracker sends out a pair of "pings" which the target detects, then waits a pre-defined time longer than the longest travel time, then responds with a set of three "pings".

The pre-determined delay is subtracted from the apparent travel time since it is already precisely known, and doing this prevents spurious detection of reflection echoes, as does the difference between two and three "pings". The extra time also allows the receiver to be solidly immune to the transmitted "ping" and maximises sensitivity. The fact that you are using an active transponder effectively doubles the range.

Of course since these devices are highly directional, the sensors on the tracker sweep to determined the correct direction and the transducers on the target need to be fitted with ultrasonic diffusers - which reduces the gain somewhat but you are already benefiting from that range doubling effect.

I was able to make the 3 sensor seeing each other and with some help of trigonometry, I made the directional part of my robot working. Even though it's not very precise, we are using the stepper motor for steering, which can only move 7 degree at a time so we won't get perfect accuracy anyway, so I can live with that. Of course all of these were done with everything wired, now I only need to work on making the target sensor transmitting signal wirelessly. For this I am considering between doing it over wifi and with the xbees we have in the lab. Using Xbee like they did in the video might be able to save us about 50 bucks of buying the shield for the Arduino so I am going with that option first.

Thank you very much