iR Range finder

I am working on a self driving robot. I have an ultrasonic range finder as the front main distance sensor but I want to use two iR sensors on the side. The only thing is I want to create most of this robot by myself. What I mean by that is I know that I can just go and buy an iR range finder for like 15\$ but thats not really fun. I want to create almost all of it on my own. SO, with that being said, I need help.

Right now I have an ir led hooked up with a 15 ohm resistor and using arduino for power supply (5v).

for the reciever I have it a bit more complex. Its a ir transistor type thing. Basically when it recieves ir it acts like a switch, switching on my transistor turning on my LED. I eventually have to get the arduino to get a reading from a circuit like this. I think I will use my own power supply at the end but I will be able to figure that part out. Now I have a resistor going from the emitter on the ir transistor to the base of my NPN transistor. Now according to my friend, I am using to much ohms of resistance there because if I hold a tv remote over the reciever part of my circuit. It only works from 1 ft away. What is the lowest you think I can bring my resistor down to without ruining anything. is the resistor necessary? I probably will only be taking measurements within 3 ft. I don't think any further is necessary.

Also how would be the best way to measure. I was thinking by the intensity since the led brightness does depend on the how close the ir source is but someone suggested i use timing. Any ideas of this. Any other advise on this would be great.

thanks

but someone suggested i use timing

Your IR beam travels at about 30cm every nanosecond, and your Arduino excutes a single instruction in a minimum of 62.5 nanoseconds.

I wouldn't suggest trying to use a time-of-flight method.

Brightness also depends on the reflectivity of the surface.
This may be different to the reflectivity at normal visible wavelengths, so be very careful.

Now according to my friend, I am using to much ohms of resistance there because if I hold a tv remote over the reciever part of my circuit. It only works from 1 ft away.

Yes I had friends like that, idiots.

To increase the range you want to increase the size of the resistor. That is have more ohms of resistance in your speak.
However 1ft from a remote sounds about right for a detector connected directly to the arduino, you won't get much more.

To get more you have to amplify it. However the problem with that is as you put up the gain the signal from the remote gets swamped by all the background IR. So a technique that IR remotes use is to modulate the IR beam. That is turn it on an off rapidly at 32,000 to 38,000 times a second. That's 32 - 38KHz in myspeak. This allows you to put a filter in the amplifier and only amplify these modulated signals.

"The receiver portion of these new detectors is actually a precision lens that transmits the reflected light onto various portions of the enclosed linear CCD array based on the angle of the triangle described above. The CCD array can then determine what angle the reflected light came back at and therefore, it can calculate the distance to the object. "

I found this on a website when I was looking up on sharp ir sensor.
http://www.acroname.com/robotics/info/articles/sharp/sharp.html

So does that mean they use a really fancy circuit to do this or can I make it work with basic circuitry? Sorry I sound like I'm new to this. I know my way around electronics though. Although I've never heard of a small linear CCD array. The only way I can think of is intensity but like someone in this post mentioned, different materials have different reflecting properties. This is the final and hardest step for my robot.

I do want to learn and not just be told but I am so stumped right now. I spent some time thinking about the comments and I still am stumped. I was thinking maybe I can amplify the receiver and use a 555 timer or something to blink at a certain rate and then the reciever will have to decode that but that may give more problems then it solves. I am not trying to fly this thing to the moon lol. I want to have it all controlled as a seperate module so it just send one data wire to the arduino.

@grumpy_mike. I had to resistors laying around i switched them to compare and i got more range with less resistance. I dont understand how more resistance would mean a greater range. can you please explain.

Also I got another problem that just started. I was using a 15ohm resistor going from ir led to 5v. When I looked at the ir led it was glowing red a little which I figure if I leave like that it will burnout and not work anymore. SO, I replaced the resistor with a 62 ohm resistor (next smallest i had laying around) Now the problem is when I bring my arduino near the wall or an object it doesnt light the led. I can see in my camera that it is emmiting. It still works from the same distance with a remote so I know its the transmitter. What do you think the smallest I can go with resistor wise. 30 ohm around?

I appreciate you guys giving me advice/feedback. I would love to see this thing get built. This post is kind of all over the place because I have a lot on my mind about it. I will try and post schematics soon of my values and how its laid out. But I really need help on getting this working. :-/

Sorry to double post but I came along this:

There was a forum talking about this and they suggested that he uses PWM to create the emitting frequency. I dont understand it too much. Any ideas