I'm building custom circuit that has this SMD Ambient Light Sensor: ALS-PT19-315C/L177/TR8
I never dealt with these before, but I did built stuff with LDRs.
Will circuit be same as for regular Light resistor? Meaning AVR analog pin will read voltage from Ambient Light Sensor and will have 10K resistor between second lead of sensor and ground?

The circuit design will be similar to that for an LDR, but you MUST consult the data sheet, which has an example circuit and all the other information you will need to properly design the interface and interpret the results.
Note: you might wish to revise your description of the circuit you posted. They don't agree.
jremington:
Note: you might wish to revise your description of the circuit you posted. They don't agree.
Sorry about that, you are right, I revised it.
jremington:
The circuit design will be similar to that for an LDR, but you MUST consult the data sheet, which has an example circuit and all the other information you will need to properly design the interface and interpret the results.
On DataSheet pg 6 there's a circuit, but I don't understand it. Is it internal circuit of the device? What is Capacitor doing there?
EDIT: I think I understand more now. Device I'm talking about is Phototransistor (right?). Application is probably the same as LDR, 10K resistor should work? I'm building simple LED badge that will dim LED's (via AVR's PWM) when it's dark and make them brighter when it's a lot of ambient light. From what I'm reading Phototransistor sense light changes faster, but for my purpose I don't care that much. It's more important to have light sensor in SMD package, and I couldn't find any easily sourceable LDRs in SMD packages ![]()
I had to do the same transition for a project, I have built. Originally built with an LDR, the device would fail because of the damp climate. So every time I had to replace the faulty LDR. Eventually I switched to a phototransistor from Vishay and no problem ever since.
Depending on the type of sensor you have a phototransistor or a photodiode, the circuit will be slightly different. The value of the resistor in series needs to be chosen carefully so you get the sensitivity in the range you like. In my case I only cared about the transition from dusk/night and dawn/day.
Anyhow, there's an excellent document from VIshay which gives a lot of explanation on how to properly use an ambient light sensor
Great, thanks for the link!
Application is probably the same as LDR, 10K resistor should work?
No, it is not the same an LDR and a 10K resistor probably will not work well. The resistor you choose depends on the light levels and the expected current, which is small. The data sheet has some guidelines on what to expect in different light levels.