Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

IR Photodiode or Phototransistor?

  1. Feb 9, 2010 #1
    Hi guys!

    I'm a beginning EE students, and haven't taken many courses yet (haven't even covered transistors in my circuits class yet-- we're up to diodes, woo!). For a "for fun" project, I've been messing around with the Arduino microcontroller (http://www.sparkfun.com/commerce/product_info.php?products_id=666) and I've come up with a little project I'd like to do.

    Basically, I want to make an IR LED "flashlight" that I'll place in the netting on my backpack. Then, I'm going to take the microcontroller and hook it up to some small dc motors I have and spare lego wheels. I'd like to use a couple of IR sensing elements to determine which motors should be driven, so the "robot" follows me at a certain distance :)

    My issue is, I'm not certain which is better to use: an IR photodiode or phototransistor. I'd like to keep this simple, so I was hoping that IR photoresistors were out there, but this doesn't seem to be the case... Ideally, I wanted to just use the Arduino's analog to digital ports to compare voltages (possibly using an op-amp before hand to get a larger voltage) and then having the robot move left or right depending on which resistor had a higher voltage.

    So, what do you guys think? What would be the best approach to take? Can I somehow use the output of a phototransistor to feed into an ADC? Or will I have to look into using the "small current approximation" with a photodiode? Or is there some way better and much simpler method I'm completely missing? :)

    Any and all insight is greatly appreciated. Thanks for taking the time to read this :)

  2. jcsd
  3. Feb 9, 2010 #2
    Sounds like a good project to work on especially if you have the microcontroller handy. There really isn't much of a difference between a photodiode and a phototransistor. As you'll inevitably learn in a device physics course a phototransistor is really just two photodiodes put together. One thing you should be thinking of while you plan out this project is signal noise. There is IR energy everywhere and if you are amplifying a weak signal from your receivers you may not be detecting the correct signal. A good way to overcome this is with frequency modulation. Basically you want to pulse the IR source at a certain frequency so that your receiver will be able to determine signal from noise better by looking for the modulation.

    That of course is one of many design challenges I can think of, you also need to consider how many receivers your will need, one wont give the directionality you need to let the mircocontroller "know" where your source is. You will probably need an array of sensors to determine position accurately.

    Good luck with your project
  4. Feb 9, 2010 #3


    User Avatar

    Staff: Mentor

    Good post by klouchis. Another fun project approach would be to use a simple CCD camera on your follower robot, and look for an IR beacon that your backpack is flashing. Regular/cheap digital cameras (lile USB cams) see in the IR well, and can pick up an IR flashing beacon. You would put some processing software on the follower robot to keep aiming the camera at the target (which gives steering info).
  5. Feb 10, 2010 #4
    That's a good idea, I've used a cheap CCD in my optical lab to make a quick IR microscope, those work very well for IR. I'm curious how large are the instructions and registers for your microcontroller?
  6. Feb 10, 2010 #5
    the idea with the two "eyes" of the bot is not bad, but could be difficult in reality. as mentioned there is a lot of IR radiation already. the idea with a small cam would theoretically work, but you need a very clever algo to filter out the blob (you ir beacon). That means lots of coding on a higher level and you probably need more than an arduino to run it.

    A common way to solve this situation is to take the IR sensor from the wii mote. this sensor is somehow special and i haven't come across anything similar on the parts market. it is actually a small cam that can identify up to 4 IR beacons (blobs). The special thing is that this cam will deliver the coordinates of the 4 blobs over the I2C bus. that means you get numbers you can directly work with to control your robot. you don't need any algo to turn a blurry picture into coordinates of ir blobs. this is a very popular project and you can finds lots of instructions in case you stuck.

    if you need more help you can contact me on my website.

    it's a german contact form but i guess you can figure it out http://www.freeduino.de/contact [Broken]
    Last edited by a moderator: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook