I have an Osram SFH 3310 Silicon Phototransistor. I would like to use it to record the changing light levels throughout the day and the sensor would be mounted externally in sunlight.
Has anyone any experience of using one of these? How would it be wired up as it only has 2 legs (so not sure it is a real transistor).
I haven't used one but looking at the data sheet you would need to put the emitter to ground, and the collector to an analogue input. Then connect that analogue input as well to 5 volts through a resistor. The value of this resistor will affect the sensitivity. Start off with a 10K and see where you get with that. It could be anything between 1K and 200K to get the right trade off between sensitivity and range.
It is a real transistor but the base is not brought out, that is supplied with current via the photons you are measuring.
Looking at the schematic on this blog - Synchronizing Fireflies NG – tinkerlog - I am guessing a 100k will suit. I will have to experiment as I want it to record changing light levels for daylight and moonlight.
I think you will struggle to get such a large dynamic range out of a sensor. I assume you will also want to detect dark, that's no moonlight.
That sort of thing usually calls for either switched ranges (switch an amplifier with various gains between sensor and input) or a log law amplifier and those are very tricky to make.
I'm building a Cloud Sensor. The ambient light sensor is just so the device can know when it is dark or not. I thought it would be interesting to produce graphs of light levels also purely for interest sake. The readings are not critical to the device running successfully.