phototransistor problem

coin12

New Member
i have a opb704 sensor it consists of phototransistor and IR LED
photo transistor interfaced to microcontroller input , IR LED to 5v
anyway the phototransistor works fine and it sense the reflected reds of the IR and it provides logic one to the microcontroller

the problem is the sun........ when the phototransistor gets any sun light it provides logic one to the microcontroller at night it works fine the problem happens on day when there's sun, my home electric lights do not make problem

i just want to make the photo transistor sense the reds coming from the IR LED
not from the the sun

*mcu picaxe 18X
 
Last edited:

coin12

New Member
thxxx i'll give it a try
btw, i have an old remote control it has a black plastic piece infront of the LED
is that a filter !!!!
i think im going to use it
 

boriz

Senior Member
IR systems always have this problem. That’s why they often use modulation, (Flashing the IR LED and rejecting signals that are not flashing at that frequency). That’s how the TV remote works. Usually flashing at 38Khz.

“is that a filter”

Yes.

I have never tried a bin-bag, but I can recommend two other filters that I have tried.

-An old 3.5” floppy disk. Open it up and retrieve a section of the read/write surface.

-The end section of a 35mm film negative. The end few frames that appear dark.

Filtering is useful up to a point, but for some applications, modulation will be necessary.
 

BeanieBots

Moderator
Modulation won't make a blind bit of difference in this instance.
If it's showing a logic "1", it's saturated. (it can't go any higher!).
ONLY filtering of the light level (as mentioned earlier) will help.
 

Dippy

Moderator
Sadly, the sun gives out plenty of IR as well as lots else.
I'm afraid IR LEDs don't give out a magic IR that only IR photo-transistors can detect.

If in the full sunlight a filter will have little effect.
You will need some shrouding/shielding to keep light away.

More experienced people use photo-diodes and , as said by boriz, modulation.

So, unless you wish to dabble with modulation and use something like the IR receiver module, you will have to be very cunning with your shielding.

If, however, shielding/shrouding is not possible, or the ambient light is very high, then you will have problems.

If you have a camcorder or camera with 'nightshot' (or similar marketing-speak) then just have a look.

This problem is precisely why most IR receivers are modulated using a photo-diode. Photo-transistors are very on-offy and are really only for applciations where you can protect them from strong ambient light. Photo-diodes charactersitics mean they can be used in higher light conditions and still give a response when extra IR lands on them - and it's easier to gain up a drop of AC.
 

slurp

Senior Member
This may be covered in one of the links (unread) but it's usual to have the IR sensor mounted in close proximity to the object being sensed and for the area to be shrouded to reduce visible light.

Have you considered mechanical changes such as changing the orentation of your sensor or providing some sort of cover over the affected area?

Placing the sensor closer to the object can help as the ratio can be improved between signal (reflected IR) and noise (sun).

Have you tried adjusting for differing photo-transistor currents yet? Do you know the magnitude daylight current? The "on" signal may be a function of your supporting circuitry rather than sensor itself.

do you have an analogue input available? it might be worth considering analogue thresholds rather than digital as it may be a little easier to adjust/calibrate. With a switched IR output you can also consider the on vs off signal.

Best regards,
Colin
 

Tim036

Member
Afternoon Coin

http://calipsooutreach.hamptonu.edu/workshop/handouts/photo_tran_ir.pdf

found this on google, does it help.. it recommends a filter to absorb daylight but transmit IR

Rapid stock a Radiometer for GBP 9.95 plus tax. Presumably the amount of power has a linear ? relationship to rpm.

An led uses half of it power for heating itself and the other half for radiation.

So a detector for measuring rpm could be calibrated in mW of power offered to the radiometer ? A picaxe IC doing the rpm to mW dispay ?

Hmmmm... Anyone care to shoot holes in that ? Very welcome to point out the drawbacks ! and a non linear relation in power to rpm ?

:)

Tiim
 

BeanieBots

Moderator
"Anyone care to shoot holes in that ?"

That idea is so way off the planet, I wouldn't even know where to start.

Keeping with your way of thinkig though.
Water evaporates at a rate proportional to its temperature.
If you pointed your IR at a bucket and had a condenser above, the PICAXE could count the drips comming off the condenser.
 

Tim036

Member
"Anyone care to shoot holes in that ?"

That idea is so way off the planet, I wouldn't even know where to start.

Keeping with your way of thinkig though.
Water evaporates at a rate proportional to its temperature.
If you pointed your IR at a bucket and had a condenser above, the PICAXE could count the drips comming off the condenser.

Thermal inertia in a Radiometer is a little less than a bucket of water. I think I stay with the Radiometer.

:)

I'll let you know how the build of Mk1 goes.

Tim
 

Dippy

Moderator
Umm... what has this got to do with the original question?

So, you're going to all that effort to measure light?
Why not use a photodiode like every lux lightmeter in existence uses?

The thermal interia in a radiometer is much more than a photodiode.

Just buy one and use it as an ornament. Very pretty.
But @ £9.95 I doubt if it has a linear relationship to anything.
 

Tim036

Member
Umm... what has this got to do with the original question?

So, you're going to all that effort to measure light?
Why not use a photodiode like every lux lightmeter in existence uses?

The thermal interia in a radiometer is much more than a photodiode.

Just buy one and use it as an ornament. Very pretty.
But @ £9.95 I doubt if it has a linear relationship to anything.
The radiation absorption of a Radiometer (bolometer) is relatively flat over the 700nm to 1100nm is IR I'm interested in and the photodiode isn't necessarily flat.. I'm after an Absolute measurement which bolometers give... Thermal inertia between the diode and the bolometer isn't of great interest as if it all takes half an hour to settle thats ok, but knowing how many mW is landing on the sensor is.

And yes, this is very much as aside to the original post and my apologies for that, but the key to solve a problem was embedded in the pdf link.

:)

Tim
 

gengis

New Member
I don't know how much electronics you want to deal with but the problem you have may be solvable with circuitry.

A. You can't have too much gain at the modulation frequency you intend to detect -

oh yeah, modulate the beam and look for the same modulation in the received signal - or use some remote control sensor module - they detect and demodulate the carrier and only pass the "intelligence" to the output. The amplifier and electronic filter circuitry is already designed for you, and they are cheap.


B. Optical filters are not all that useful with a powerful broad spectrum light like the sun - plenty of IR comes from the sun. A light trap or shield so the detector can only see in the direction of the emitter will do wonders (like a piece of rigid black tube over the sensor).


C. The photo transistor may be pushing close to saturation with an overload of ambient light. This lowers the gain and the carrier is very weak with respect to the DC signal present from the ambient sources. The work around for that is to control the current to the photo transistor so that it stays in the linear range and doesn't approach saturation. The DC or low frequency response of the current limiter is lots slower than the modulation frequency (typically ~40 KHZ).


If you just wanted to plug a transistor into an axe and have it work in sunlight you're probably going to be disappointed. If shielding or optically filtering the detected light doesn't work, it will take circuitry. Modulate the carrier and detect only that carrier is a better bet - lots of the amateur robotic sites show how to apply the ready made remote control modules. That's fairly easy to do.
 
Top