I had some problems setting up a Opto Coupler today. The data sheet is here. I set it up putting a 470 ohm resistor to ground from the cathode (pin 2). I am understand the selection of this resistor as it is used to set the current through the LED to about 10mA when he ANODE(pin 1) is given 5 Volts. What I don't understand is why a 270 Ohm resistor(as shown in the test circuit) is needed between pin 4 and 6. From testing I know that with the 270 resistor I get a range of about .2 to 5 volts on the output, and without the outputs range is 0.08 to 1.4 volts. I know its something to do with the biasing the circuit and the gains from the internal transistor... Wondering if someone could point me towards a source that actually explains how to bias a opto coupler... its been a few years since I played with transistors.
Page 1 of the datasheet clearly says 'open collector output'. Without a pull-up, the voltage is undefined.
The purpose of 270 \$\Omega\$ on the test circuit is simply to provide a defined amount of current for the output logic to sink during the test. Whatever pull-up value you use is up to you, just don't exceed the sinking capability of the output stage.
When it comes to biasing an opto, the best practice is to choose a resistor that will allow the minimum amount of current needed to do the job over the expected current transfer ratio (CTR) distribution of the batch. Generally, the lower the current, the longer the expected life of the part.