Led and phototransistor

Schematic

P1--- 500k OHM Trimmer

R1---470 OHM

Q1---BC547,BC337,9013 or other NPN

PT-Phototransistor

B1---2,5 to 9volts

LED-Red 5mm or other.