# Limiting phototransistor current.

Hello all,
I built a directional photosensor for my project using 4 of these Osram phototransistors: https://media.osram.info/media/resource/hires/osram-dam-2495914/SFH%203310.pdf

It worked great for a few days, then failed, as in all 4 phototransistors now read high values even in the dark.
I belatedly noticed that they have a max current of 20 milliamps, so I reasoned that they were passing too much current.

I will try to post a circuit diagram if it would be helpful, but they are hooked up according to the examples I have seen here and elsewhere, that it, I have 5V VCC connected to the collector (short leg), and the emitter leg is connected to an analog pin on the mega, with a 7.5K resistor connected one end to ground, and the other end connected to the emitter (in a regular voltage divider arrangement.

My questions are: Am I reasonable in assuming they are passing too much current, given that, to the best of my knowledge, the arduino can sink up to 40 ma, and, if that is correct, what is the best way to limit this current? Should I add a resistor in the 5V VCC wire, or should it go in the wire from the emitter led to the analog pin?

The 7.5K resistor will limit the current from Vcc to GND to 5V/7.5K = 0.67 mA at most, so that is not the problem.

Are you absolutely certain that you did not connect the devices backwards, connect the emitter to ground, or apply more than 5.5V to the collector?

Image posting guide

5V / 7.5k = 0.67mA maximum.

If you are using the pin as an INPUT it takes no current at all (well less than you can measure without specialist test equipment!)

Making the pin an OUTPUT would be a mistake. Connecting the phototransistor direct between 5V and ground would be a mistake.

By the way don't use lead-length as a guide to polarity, the flat on the plastic housing is the true reference, and the datasheet shows the collector has the flat.

The datasheet also has a picture of the internals of the device for extra re-assurance of polarity.

Why not connect the emitter to ground, and put a 10k resistor between the collector and 5V and tap off the collector for the analog input ?

Because then the output value isn't proportional to light flux. A photodiode or transistor produces a current, the resistor that's the bottom of the divider converts that to a voltage.

Because then the output value isn't proportional to light flux. A photodiode or transistor produces a current, the resistor that's the bottom of the divider converts that to a voltage.

Makes total sense.
+1

jremington:
The 7.5K resistor will limit the current from Vcc to GND to 5V/7.5K = 0.67 mA at most, so that is not the problem.

Are you absolutely certain that you did not connect the devices backwards, connect the emitter to ground, or apply more than 5.5V to the collector?

Image posting guide

I experimented with a breadboard arrangement before building the sensor, and found that if the phototransistors were hooked up backwards, they didn't return any reading at all.

The entilre circuit is powered by a voltage regulator that convertes 12 volts to 4.99 volts, and is hooked to the 5V pin on the arduino. That part of the system has been running fine for a year and a half, so, while not impossible, nevertheless I honestly don't think the phototransistors ever see more than 4.99 volts.

MarkT:
By the way don't use lead-length as a guide to polarity, the flat on the plastic housing is the true reference, and the datasheet shows the collector has the flat.

The datasheet also has a picture of the internals of the device for extra re-assurance of polarity.

Yes, I'm careful putting them together. I use a magnifying visor, and check the internal arrangement of the elements to be sure I'm using the right wires. As I said, I found that when hooked up backwards, they don't work at all, just return a zero reading.

The 7.5K resistor will limit the current from Vcc to GND to 5V/7.5K = 0.67 mA at most, so that is not the problem.

That is what I originally thought when I put the circuit together, and thanks for reminding me that the sink current for a pin set to input is negligible. I had forgotten that.

Now I am completely mystified as to the problem....given the power arrangement, I really don't think over-voltage is the problem; they work initially, thus I'm pretty sure that they aren't hooked up backwards, and it doesn't look like it is possible for them to pass too much current.
Yet, they all failed, so either one of my above assumptions is incorrect, or something else is going on. It would seem to be a systemic problem, vs merely a bad part.

SMH

I'm going to double-check the voltage to the transistors, as it may be that my multimeter is in error, and I'lll dial the power source down to 4.9 volts from 4.99, as it appears that the arduino will work ok down to 4.75 volts.

I also forgot to mention that I added a 1K resistor in the 5V line supplying power to all 4 transistors, and other than lowering the readings by a few percent, it still works fine. (I print the sensors on my 3d printer, so they are pretty cheap, just some ABS filament and the transistors, thus I don't mind experimenting)

Since the amount of current through the phototransistors plainly is not the problem, the title of this thread is not accurate. Should I change the title, or just leave it alone?

You could change it to “WTF ?”

raschemmel:
You could change it to "WTF"

LOL. That's about where I'm at. I have no idea what the problem is at this point.

Did you measure the 7.5k resistors ?

Did you measure the transistor resistance
with the negative meter lead on emitter
using a flashlight ?

if the phototransistors were hooked up backwards, they didn't return any reading at all.

That very likely damaged them. See the data sheet.

jremington:
That very likely damaged them. See the data sheet.

That's what I figured. I threw the one that I was experimenting with away. The 4 in the sensor were brand new. I'm wondering now if they were damaged some other way, like soldering. I clipped the leads short and soldered wires on instead, and may not have been diligent enough with the heatsink, still it seems odd that all 4 would fail within a short time of each other.....

raschemmel:

They draw power from the 5v rail of the arduino, which is powered by a voltage regulator board like this:

https://www.amazon.com/gp/product/B01GJ0SC2C/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

set for 4.99 volts out.

raschemmel:
Did you measure the 7.5k resistors ?

Yes.

raschemmel:
Did you measure the transistor resistance
with the negative meter lead on emitter
using a flashlight ?

I'm not sure what you mean. Can you elaborate?

Using a DMM on diode scale, you put the black lead on the emitter and the red lead on the collector and
shine a flashlight on it.

raschemmel:
Using a DMM on diode scale, you put the black lead on the emitter and the red lead on the collector and
shine a flashlight on it.

Oh. No, I have not. I'll tear the bad sensor apart and test the failed units against the values for a new one. I'm not sure if that will help me, though, since I will be comparing values of suspected bad ones against presumed good ones. But, I'll try it anyway. Thanks!