
Ever had some sort of display sitting on your desk and by the time you turn the lights off and get into bed, you look at it shining directly back at you? M Given that I was studying EGB348 (Electronics) a course on Transistors and MOSFETS. I had the idea of using that knowledge to make a light box that could actively turn off or off depending on the light level within the room. Simply using some microprocessor would've been easier, but that's more of a coding challenge then electrical.

Figure 1 represents the first iteration of the driver. USB-C for power delivery, 5V input and a max current delivery of 3A allowed for 15W of total power. With the toggle switched rated for 100mA, running the current through a NFET who's Vgs was controlled by the toggle switch as the best choice.
Using a op-amp in a comparator configuration allowed the LDR (Light Dependent Resistor) to control the output of the op-amp. Q1, an NPN BJT had two uses, first was flipping the logic, to correctly turn OFF the light when Vn > Vp. The second reason was to allow the Vgs of the NFET to reach 5V. My original choice of op-amp was not rail-to-rail. The output of the op-amp was around 3.8V, that would have decreased the RDSON. The LED is always on due to a heavily current limited path via Q3, this gives the dim light effect that is appropriate for a dark room. The intensity in dim mode is controlled via R17, a 10k potentiometer. Users that always wanted the light to be on, could easily ground Vn via a sliding switch.



*Currently testing the new V2 of the PCB, will update soon*