PC817 is your standard optocoupler. Use this IC to isolate two parts of a circuit. Isolation prevents ground loops and prevents trasmission of unwanted noise.Input LED has a forward voltage of 1.2V and a forward crrent fof 50mA. Please use a current limiting resistor as not to blow out the input LED. requency depends on the pull up resistor you use on the output transistor.
Internal Connection Diagram: