Jump to content
Sign in to follow this  
jelledebock

Photodiode as proximity sensor

Recommended Posts

I'm relatively new to the MSP430. I've gone through the blinking leds, interfacing dc motors and pushbutton and potentiometer analoginput projects but now I'm trying to build a simple robot. I want to navigate the robot using a self made IR proximity sensor. So I'm trying to receive IR-light emitted by an IR-led with a photodiode (OSRAM SFH 203 FA). As I was reading through the datasheet of the Osram I found Vr = 5V. I looked online to find which is the 'R' standing for. I eliminated a few abbreviations and now I'm doubting whether the R is 'recommended' or 'reverse'. I tried to connect the photodiode reverse biased to the 3,5V MSP430 VCC but there wasn't a voltage change at my input pin at all. So, does it means that the photodiode realy needs 5V?

Then I started looking how to connect the diode to 4 AAA batteries (4,8V). I added my scheme and datasheet to this post. But as I'm afraid to ruin my MSP430 (too high voltage) I'd like to hear your experiences with this problem. I'm afraid the input pin will reach higher values then the max supported 3,5V's.
 

post-36097-0-67046400-1391853985_thumb.jpg

datasheet photodiode.pdf 
 

Share this post


Link to post
Share on other sites

Vr is the reverse potential applied during the test. To classify the photodiode, a constant reverse voltage is applied, the light is varied, and the photocurrent is measured.

 

I will suggest that you do NOT use 5V. Use your microcontroller supply This will protect the microcontroller from overvoltage on the input.

 

I think that your problem is more likely the resistor you are using to convert current to potential, and the low output of photodiodes. The max classified current is less than 100 microamps. With your resistor, this will give 1V. This is at approximately 1mW/cm^2. This is a pretty high intensity. At high noon on a bright day in the desert, the intensity of solar flux is of the order 1000W/m^2, which is 100mW/cm^2. I would guess that you are working at intensity much, much less than that. Typical bright interior lighting is about 1/100th of that, and reflected light from even a bright IR LED will be much lower yet. At 100microamps, you would see 1V across your resistor. You are likely several factors of ten less. Photodiodes are generally used when high linearity and sensitivity are needed, such as in precision measurement, or high speed is required, such as high speed optical communication. Other devices are usually used for low precision/low speed  tasks like proximity.

 

Typically, with a photodiode, you need to amplify the output. Several techniques are common, including using the photocurrent to drive the base of a transistor, using an op-amp circuit designed for photodiode amplification (not complicated, but needs to be right to get good performance), or using an op-amp circuit that keeps the photodiode operating in photovoltage mode.

 

 

For your application, I would use a phototransistor, which can be described as a transistor where the base-emmitter junction acts as a photodiode. Cheap, high output, easy.

 

Or, go to an amplified sensor like the OPT101 or similar (there are a lot of options. This is just what came to mind first)

 

Edit: fixed intensity value and spelling

Share this post


Link to post
Share on other sites

Thank you! That was the extra information I needed. So the alternation of the voltage is way to small to be noticeable by an analog input. I like your idea to use an additional transistor to amplify the signal. I found an scheme online for that, is it correct? What would be an appropriate value for Rl, considering the spec's of an MSP430 launchpad? You also mentioned that my resistor could be a problem. With my basic knowledge of electricity, Ohm's law tells me if I would take an higher resistance my voltage will also be higher, or am I making an enormous error?

9FFA076C5D8F886C319E944239368CA0_14_06_P
 

Share this post


Link to post
Share on other sites

I managed to solve the issue... I used the photodiode I was initially using together with an transistor so I was in fact making my own "homemade" phototransistor. I added my scheme. Finally, after around 10hrs of trial and error I heard the otherwise so annoying sound of a buzzer beep indicating my hand was coming too close :D.
 

czxd2L8.jpg

Share this post


Link to post
Share on other sites

Excellent. that will do the job. Better linearity will come with constant potential across the photodiode. You can do this in your configuration using a PNP transistor, with the photodiode to ground, Or by putting the current-to-voltage conversion resistor on the collector of the NPN transistor and grounding the emmitter. Not worth it if what you have is doing the job.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...