selecting a photo transistor?

MrDEB

Well-Known Member
want to detect daylight so (the PIR triggers the PIC all day long so inserting a timing code to disable the PIR durring daylight) I can disable the PIR.
found two photo transistors but having never worked with them I am asking for suggestions.
the two I am looking at are
Fairchild QSC112 for 18 cents a piece
or
Orasham SFH309F for 42 cents each
cheap usually comes out expensive so I want something that will work.
 
that I have but ?

how to designate an input as high or low durring daylight then determing darkness as a cDs is a light sensitive resistor?
resistance increases? (decreases?) with light.
I need to disable the PIR in daylight
 
A CDS cell is a low resistance (300 ohms to 2k ohms) in light and a few Megohms in darkness. They take a few seconds to respond.
 
now its a matter which is easier?

a cDs just changes resistance while a photo transistor changes states.
need to configure a circuit for cDs. already have for photo transistor but maybe the photo transistor will consume more current than a cDs.
I even contemplated solar cells.
another option is the compariator in a PIC. I think the 18F1320 has one?? then just use that.
I recall seeing something about ADC using a PIC.
note I am just a newbi with PICs
 
An LED will generate a forward current depending on the ambient light. They can be a lot cheaper than phototransitors.

**broken link removed**
 
A CDS from the PIC pin to +5 V and a 100K resistor from the pin to 0V.

The voltage at the pin will be:

Daytime:

100 K / 100K + 2K * 5V = 4.9 V

nighttime:

100K / 100K + 1000K * 5V = 0.45 V

The PIC will see that as logic 1 and 0.
 
Last edited:
Would think that .45 is low??

depending on battery voltage.
the photo transistors I found are 18cents each
cDs ???
may do some experimenting.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…