dl324
Posts: 122
Joined: Mon May 06, 2019 7:33 pm
Location: Pacific Northwest, USA

Re: light detector with photo transistor

Thu Jun 06, 2019 1:57 pm

rajbuddy007 wrote:
Tue Jun 04, 2019 7:31 am
It would be nice if anybody help me with making a circuit with it.
This circuit will give you a LOW when light is above below the threshold you set with R3 is detected:
EDIT: corrected polarity.
photoTranComp.jpg
photoTranComp.jpg (14.43 KiB) Viewed 696 times
If you want the opposite polarity, swap the comparator inputs.

BTW, if you're not going to use more than 2 comparators, you can use a dual (LM393) instead of a quad.

Also note that the input common mode voltage range is only 0-1.8V at room temp. Over full operating temperature range, it will be 0-1.3V. So choose the value of R1 appropriately.
Last edited by dl324 on Thu Jun 06, 2019 8:31 pm, edited 1 time in total.

rajbuddy007
Posts: 54
Joined: Fri Apr 05, 2019 3:03 pm

Re: light detector with photo transistor

Thu Jun 06, 2019 2:30 pm

PiGraham wrote:
Thu Jun 06, 2019 1:33 pm
rajbuddy007 wrote:
Thu Jun 06, 2019 12:43 pm

I have tried the cicrcuit with 100K resistor and exposing it to the camera flashlight but it is giving max 400mV.
So it is definitely responding to light level then?
Yes it is responding to light level but not to that smd led from the chip.

PiGraham
Posts: 3709
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: light detector with photo transistor

Fri Jun 07, 2019 7:55 am

rajbuddy007 wrote:
Thu Jun 06, 2019 2:30 pm
PiGraham wrote:
Thu Jun 06, 2019 1:33 pm
rajbuddy007 wrote:
Thu Jun 06, 2019 12:43 pm

I have tried the cicrcuit with 100K resistor and exposing it to the camera flashlight but it is giving max 400mV.
So it is definitely responding to light level then?
Yes it is responding to light level but not to that smd led from the chip.
How are you positioning the LED and phototransistor? Does the LED shine directly into the sensor lens? Do they touch?

pcmanbob
Posts: 7943
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: light detector with photo transistor

Mon Jun 10, 2019 10:06 am

So I just obtained a TEPt4400, as a simple test I wired it like this

Image

in a room with natural daylight on an over cast day I get 3.3v , if I cover the photo transistor with my fingers the voltage drops to 1.9v and if I cover it with a black out bag I get near zero volts

So it should be able to read your LED flashes if you remove all external light.

Edit.

with standard red LED with 220 ohm resistor power by 3.3v and the resistor and transistor point at each other 5mm apart in darkness you can detect LED switch on.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

rajbuddy007
Posts: 54
Joined: Fri Apr 05, 2019 3:03 pm

Re: light detector with photo transistor

Tue Jun 11, 2019 10:15 am

Please see the image. I dont know why i am not getting enough voltage. If i am exposing it to very bright phone led flashlight then only it is giving max 800mV. I built the circuit which was given above, Not able to find out where am i going wrong

https://imgur.com/a/JcznGAo

pcmanbob
Posts: 7943
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: light detector with photo transistor

Tue Jun 11, 2019 10:54 am

Are you sure the photo transistor you have is a TEPT4400 ?

The ones I obtained are much smaller , shown here next to a standard 5mm LED.

Image

even the data sheet you linked shows it as a small clear package.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

rajbuddy007
Posts: 54
Joined: Fri Apr 05, 2019 3:03 pm

Re: light detector with photo transistor

Tue Jun 11, 2019 1:01 pm

Sorry for all the misunderstanding. My colleague has interchanged the transistor. Moreover, I just connected the circuit as shown and is working fine for the flash of my phone (giving desired 3.3V) but when i tested it with the subject (SMD LED) its not responding. What should be my next step??

SMD LED which i want to detect :

https://www.mouser.de/datasheet/2/216/A ... 102303.pdf

pcmanbob
Posts: 7943
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: light detector with photo transistor

Tue Jun 11, 2019 1:52 pm

As I said in my previous post
in a room with natural daylight on an over cast day I get 3.3v , if I cover the photo transistor with my fingers the voltage drops to 1.9v and if I cover it with a black out bag I get near zero volts

with standard red LED with 220 ohm resistor power by 3.3v and the resistor and transistor point at each other 5mm apart in darkness you can detect LED switch on.
So the photo transistor and the LED need to face each other and be in total darkness.

Image

it may just be that the flash does not last long enough for the photo transistor to turn on, try testing it yourself with on of the LED's controlling the LED yourself.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

rajbuddy007
Posts: 54
Joined: Fri Apr 05, 2019 3:03 pm

Re: light detector with photo transistor

Wed Jun 12, 2019 11:17 am

Thanks for all the help. I checked my photo-transistor response to that SMD led and based on that i changed the sleep time of the code and final its detecting. Thanks for all the help people. Much appreciated ;) ;)

evansusu
Posts: 21
Joined: Sat Apr 13, 2019 5:06 am

Re: light detector with photo transistor

Tue Jul 09, 2019 6:41 am

Anyone has code for a light intensity sensor lamp? Light up when dark, dim when bright based on surrounding light intensity

Return to “General discussion”