germany
Offline
Newbie
Karma: 0
Posts: 40
|
 |
« on: April 22, 2011, 11:21:38 am » |
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.html1. 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: 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
|
|
|
|
« Last Edit: April 22, 2011, 11:29:53 am by zehneinsvierzehn »
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 89
|
 |
« Reply #1 on: April 22, 2011, 02:03:03 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 275
Posts: 25482
Solder is electric glue
|
 |
« Reply #2 on: April 22, 2011, 03:17:15 pm » |
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. (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. 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.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #3 on: April 22, 2011, 03:38:46 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 275
Posts: 25482
Solder is electric glue
|
 |
« Reply #4 on: April 22, 2011, 03:57:34 pm » |
They come in different range values and are very simple to use. But they don't work very well.
|
|
|
|
|
Logged
|
|
|
|
|
germany
Offline
Newbie
Karma: 0
Posts: 40
|
 |
« Reply #5 on: April 23, 2011, 05:28:01 am » |
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.PDFdistance 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? 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
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 275
Posts: 25482
Solder is electric glue
|
 |
« Reply #6 on: April 23, 2011, 01:16:05 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
CO, USA
Offline
God Member
Karma: 4
Posts: 706
|
 |
« Reply #7 on: April 23, 2011, 02:17:31 pm » |
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-ÜbergangI 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.
|
|
|
|
« Last Edit: April 23, 2011, 02:42:11 pm by justjed »
|
Logged
|
... it is poor civic hygiene to install technologies that could someday facilitate a police state. -- Bruce Schneier
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 89
|
 |
« Reply #8 on: April 23, 2011, 04:30:10 pm » |
im talking the join collector and the resistance, did you check the diagrams ?
|
|
|
|
|
Logged
|
|
|
|
|
germany
Offline
Newbie
Karma: 0
Posts: 40
|
 |
« Reply #9 on: April 24, 2011, 06:20:36 am » |
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.PDFthe 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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 89
|
 |
« Reply #10 on: April 24, 2011, 07:29:09 am » |
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???
|
|
|
|
|
Logged
|
|
|
|
|
Plano, TX
Offline
Full Member
Karma: 0
Posts: 101
|
 |
« Reply #11 on: April 24, 2011, 10:48:24 am » |
(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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 275
Posts: 25482
Solder is electric glue
|
 |
« Reply #12 on: April 24, 2011, 04:37:25 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Plano, TX
Offline
Full Member
Karma: 0
Posts: 101
|
 |
« Reply #13 on: April 24, 2011, 09:18:17 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 275
Posts: 25482
Solder is electric glue
|
 |
« Reply #14 on: April 25, 2011, 04:10:01 pm » |
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. 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.
|
|
|
|
|
Logged
|
|
|
|
|
|