Go Down

Topic: phototransistor sensor (Read 4196 times) previous topic - next topic

Apr 22, 2011, 06:21 pm Last Edit: Apr 22, 2011, 06:29 pm by zehneinsvierzehn Reason: 1
hey there!

i want to build a very basic light sensor, as sort of a substitute for real distance sensing with ultrasonic
i want to put my hand above it and have higher (or lower) values if my hands covering it than if its more far away from it, so why not use a simple light sensor first... i'll try out using the data for audio control then, let's see...

i have a photoresistor here (which is quite easy to use, of course) and phototransistors, and i'm using a phototransistor now because the resistor reacts too slow
my phototransistors came in a light barrier set, its these ones: http://www.pollin.de/shop/dt/NzA0OTc4OTk-/Bauelemente_Bauteile/Aktive_Bauelemente/Optoelektronik/Infrarot_Lichtschranken_Paare_TEMIC_K153P.html

1. can i use them for sensing visible light, not infrared light, too? does it make any difference concerning the sensibility?

2. is this the right way to build the "circuit" up? i don't want to damage anything, so...:

(sorry, the labeling arrow should point to the little black box, not to the poti, of course...)

3. i found two different examples about how to use the phototransistor as a sensor, this one:
Quote
I built this circuit:

+5V----Resistor 18kohm----+------PhotoTransistor------GND
                                     |
                                     |
                                 Arduino


(here, the resistor is before phototransistor and analog pin is also before transistor... why is this and whats the difference? is mine better than this?)

...and this one:
http://dm.risd.edu/~pbadger/AM/pmwiki/uploads/Main/Phototransistor2.png
(here, they used a "reversed biased" transistor... i don't get it. i am not wrong connecting it just like i did, am i?)

4. how is the best way to build a sort-of-distance-sensor with a phototransistor? it should be influenced by holding a hand above it and coming closer or going more far away... maybe with infrared LEDs and reflection? or what do you think?

thanks,
jan

elandd2011

i never used the phototrasistor in this way ( in reverse), for me not sense. the best way in my opinion is tu use it in normal mode,
means use it like  5v--------4,7k to 10 k resistor-------------Collector --------------emitter, then collector to arduino ( the junction in the coelctor
see  the diagrams

Grumpy_Mike

Quote
can i use them for sensing visible light, not infrared light, too? does it make any difference concerning the sensibility?

I think you mean sensitivity, Jane Austin wrote a book called Sense and Sensibility and she wasn't talking about photon detection.

Basically yes, sensors are matched to specific wavelengths, so to get the maximum sensitivity you have to use the right wavelength.

Quote
(here, the resistor is before phototransistor and analog pin is also before transistor... why is this and whats the difference? is mine better than this?)

Yes it is better than yours because it uses the voltage gain of the transistor, the other way round has no voltage gain and so is less sensitive.

Quote
how is the best way to build a sort-of-distance-sensor with a phototransistor?

The best way is not to bother, if you give more detailed of what you want then maybe a better answer could be given but distance measurements using photo transistors are not very good, reliable or repeatable.


retrolefty

I like the Sharp IR distance sensors. They come in different range values and are very simple to use.

http://www.robotshop.com/sharp-gp2y0a21yk0f-ir-range-sensor.html?utm_source=google&utm_medium=base&utm_campaign=jos

Lefty

Grumpy_Mike

Quote
They come in different range values and are very simple to use.

But they don't work very well.

Quote
Basically yes, sensors are matched to specific wavelengths, so to get the maximum sensitivity you have to use the right wavelength.

how can i find out if i can use this sensor for "normal" daylight or lamplight, too?
datasheet:
http://www.pollin.de/shop/downloads/D120592D.PDF

Quote
distance measurements using photo transistors are not very good, reliable or repeatable.

yeah, of course, thats why i wrote about a "sort-of-distance-sensor" - i want to experiment with sensors, i want to stay as cheap as possible and not build something that can measure exact distances. nevertheless, i want to have an analog sensor that i can influence with my hand and with not touching it. do you have other suggestions?

Quote
i never used the phototrasistor in this way ( in reverse), for me not sense. the best way in my opinion is tu use it in normal mode,
means use it like  5v--------4,7k to 10 k resistor-------------Collector --------------emitter, then collector to arduino ( the junction in the coelctor
see  the diagrams

sorry, what do you mean with "junction"? i'm no native speaker, so could anyone explain this to me?

thanks a lot, jan

Grumpy_Mike

Quote
how can i find out if i can use this sensor for "normal" daylight or lamplight, too?

You look at the data sheet and find out the peak sensitivity wavelength. Then you compare that with the wavelength of the light you want to detect.
If you don't know the wavelengths of visible light then look here:-
http://en.wikipedia.org/wiki/Color

justjed

#7
Apr 23, 2011, 09:17 pm Last Edit: Apr 23, 2011, 09:42 pm by justjed Reason: 1

sorry, what do you mean with "junction"? i'm no native speaker, so could anyone explain this to me?

thanks a lot, jan


Wie Geht's!

p-n-√úbergang

I actually know Deutch only a little. So the above is what I got going to Wikipedia for "semiconductor junction", and then choosing the German version. Hope that helps.

ETA: You might try asking in the Deutsch forum too.
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

elandd2011

im talking the join collector and the resistance, did you check the diagrams ?

yeah, i got it now, thanks elandd2011, and thanks mike & justjed

anyway, i'll try at least to build a light barrier or to experiment with IR-LEDs and phototransistor for IR now
as i said, i have this: http://www.pollin.de/shop/downloads/D120592D.PDF

the datasheet says the emitter has a maximum forward voltage of 60 mA, the detector a maximum collector current of 50 mA.
it also says that basic characteristics for emitter are 1.25-1.6V forward voltage

i'm new to electronics, so: can i use those with an arduino without an extern voltage, without amplifying using a transistor?

what i don't get is: can i limit the current somehow so that emitter and detector just get 40 mA?
for example, if i put in a resistor (5v--------------emitter----resistor-----------Ground), i would limit the voltage, but not the current, right?
i always get a little confused about this, using U=R*I, i don't know how i should go on, because i want both current and voltage to be limited in this example, don't i?

do i at least get this right?: i have to limit voltage down to about 1.4V and current down to 40mA for the emitter. i have to limit the current down to 40mA for the detector.

thanks

elandd2011

do you want tu use the arduino for both?( Emitter and detector)
When you use a resistance do you limit both current and voltage
let see :V= IR, if R is a constant and V coming for the power yo have only
one value for I
Now in your case and for the data:

Emitter
Vcc-ForwardVolts-(35mamp(Rs))=0
where: Vcc= 5 volts ( from the arduino Power Vcc)
FowardVolts=1.25 (From emitter data sheet)
35 mamp ( no got to max. current form the arduino)
Rs the resistance that I need
so:
Rs=(5-1.25)/0.035= 107ohms
use 110 ohms
It not give you max power but i think it will work

Detector
You have work in the security region so you cant go more than 50 mamps for the detector (data sheet)
and all data that they give to us is for 5 volts and 5 mamps so:

Vcc - Vsat max - (IcRL)=0

5 -0.3 - (5(RL)=0
(5 - 0.3)/5=94 ohms
you have to use 100 ohms

Got it???









cjands40

Quote
Quote
(here, the resistor is before phototransistor and analog pin is also before transistor... why is this and whats the difference? is mine better than this?)

Yes it is better than yours because it uses the voltage gain of the transistor, the other way round has no voltage gain and so is less sensitive.

I don't follow this - why would the order of the phototransistor and resistor in the circuit affect sensitivity?  The phototransistor conducts current proportional to the amount of light received so either way should work the same, the only difference being that 5V-PT-res-GND produces a voltage proportional to light (brighter == higher ADC result) and 5V-res-PT-GND produces a voltage inversely proportional to light (brighter == lower ADC value).  Have I overlooked something?

Grumpy_Mike

Quote
Have I overlooked something?

Yes.

Photons, create electron hole pairs in the base region of the transistor. In other words photo current is injected in the base. With one configuration you have a common collector circuit, or emitter follower, this has a voltage gain of 1. With the other you have a common emitter circuit, this has a voltage gain equal to the Hfe of the transistor.

cjands40

But with a phototransistor, we don't have any knowledge of the voltage at the base - it's not pinned out of the device - so I have trouble applying CE vs CC.  The specs simply provide current vs. illumination in which case either topology should have the same sensitivity since a given amount of light would result in the same collector-emitter current.

Grumpy_Mike

Quote
we don't have any knowledge of the voltage at the base - it's not pinned out of the device

No but that is where the photo current is generated.

Quote
so I have trouble applying CE vs CC.

Why? With one you have a resistor in the emitter to ground, with the other you have the resistor from the collector to +ve. What is there not to understand?

Try it and see.

Go Up