Hi there,
Im not sure if anyone mentioned speed yet so i'll do that now...
I like to test my opto's for speed too. The reason for doing this is because
some opto's can be used for higher speed data transmission and some cant
because they are too slow.
The way i do it is quite simple too...
I connect an LED series resistor to the LED and connect that to a frequency
generator that puts out a square wave. I then use a collector resistor to
some voltage like +5v and look at the output with a scope (emitter grounded)
while also looking at the input square wave. I compare the input rise to
the output delay and rise time too, and this tells me how far i can go up in
speed (frequency can be around 100Hz to start with). If the frequency is
raised too far, the opto can no longer produce an output as it gets more
narrow as frequency goes up.
I then start by connecting some base resistors to the base of the output
transistor if it has that pin available. Connecting a base resistor often
allows the opto to respond to higher frequencies than would be possible
without it. 100k is a typical value, so starting there would be a good idea.
We might want to go as high as 1Meg, and as low as 1k, but for each resistor
we repeat the test with the generator and scope. At the end of these tests
we get a very good idea what speed we can use the opto with.
Some of the very cheap ones wont make it up to 9600 baud for example,
but they usually will do lower rates like 2400 or so.
Another thing to think about is the LED series resistor value. Going too low
will cause the opto to die faster than with a higher value, but will sometimes
make the whole thing faster. That means the data sheet has to be checked
for the best current to run the LED at. Choosing a current on the high end
means less life for the opto (will start failing sooner) and choosing too low
a current will mean it wont operate quite as nice as we would like, so a
typical value is somewhere in between. Sometimes 2ma is enough.
The LEDs brightness diminishes over time (ages) much faster with higher current,
so that's always something to keep in mind.
What this all means is that it works out pretty well if we decide beforehand what
current we want to run the LED at in the final application(s), and do all the
testing at that current level. This will provide us with the information about
how fast we can switch the opto and how long it should live in the application.
I like to shoot for five years or longer and at least 9600 baud.
Some people dont have scopes and some dont care to get one either, so a
substitute might be a frequency counter. A freq counter with pulse width
detection would be best as that would allow the measurement of the input
pulse width vs the output pulse width so we can know what frequency we
start loosing the full pulse width at.
Some of the frequency counters have a 'percent duty cycle' readout, which
would tell us how wide the pulse is too. With a perfect square wave input
and the meter reading 50 percent, that would mean the whole pulse is
getting to the output, but if it reads 40 percent or 60 percent, that means
we are starting to loose pulse width (either for the HIGH or LOW parts of the
pulse, respectively).