This is a circuit diagram for a light-activated switch using the comparator IC LM 311 from National Semiconductors and an…