Here the circuit diagram of Interior Light Fader for Automobile. The circuit is build using low power operational amplifier LM324 which only need around 3mA of current, so it won't bother the battery supply if left connected for extended periods. This circuit is similar to the fading eyes circuit above and is used to slowly brighten and fade interior lights of older cars.
The top two op-amps circuit module (pins 1,2,3 and 5,6,7) form a triangle wave oscillator running at about 700Hz while the lower op-amp (pins 8,9,10) produces a linear, 5 second ramp, that moves up or down depending on the position of the door switch. The two transistors and associated resistors serve to limit the ramp voltage to slightly more and less than the upper and lower limits of the triangle waveform. These two signals (700 hZ. triangle wave and 5 second ramp) are applied to the inputs of the 4th op-amp (pins 12,13,14) that serves as a voltage comparator and produce a varying duty cycle square wave that controls the IRFZ44 MOSFET and lamp brightness. The 5 second fade time can be adjusted with the 75K resistor connected to the door switch. A larger value will increase the time and a smaller value will speed it up.
When the door switch is closed (car door open) the voltage on pin 8 slowly increase above the negative peaks of the triangle wave producing a short duty cycle output and a dim light. As the ramp moves farther positive, a greater percentage of the triangle wave will be lower than the ramp voltage producing a wider pulse and brighter light. This process continues until the ramp is 100% above the positive peaks of the triangle wave and the output is maximum. When the door switch is open, the reverse action takes place and the lamps slowly fade out.
The MOSFET IRFZ44 shouldn't need a heatsink if the total load is 50 watts or less but the temperature of the MOSFET should be monitored to make sure it doesn't overheat. The on-state resistance is only 0.028 ohms so that 4A of current (48 watts) is only around 100mW. For larger loads, a compact heatsink can be added to keep the MOSFET cool. - Interior Light Fader for Automobile circuit diagram