<b>+5V -> resistor (e.g. 10k) -> collector of opto coupler transistor -> ground</b>