I'm trying to make a circuit where you can adjust the brightness of an LED (or series of LEDs) using pulse-width modulation, but I only have access to relatively simple components; namely, power sources, resistors, potentiometers, capacitors, diodes, transistors, operational amplifiers, and single logic gates.
Currently, I've been thinking of using an OR gate to control whether the LED has power to it or not, and a feedback loop that shuts off the OR gate somehow (perhaps using a transistor connected to a section that saps current when on?) when the part of the circuit with the LED has power. Optimally, I want a potentiometer placed somewhere to control how quickly this feedback shuts off the LED part of the circuit, and thus controlling how bright the LED is.
However, I'm not sure how to set it up so it'll work. Can anyone give me some tips, or maybe a suggestion on how to set up the circuit?
Currently, I've been thinking of using an OR gate to control whether the LED has power to it or not, and a feedback loop that shuts off the OR gate somehow (perhaps using a transistor connected to a section that saps current when on?) when the part of the circuit with the LED has power. Optimally, I want a potentiometer placed somewhere to control how quickly this feedback shuts off the LED part of the circuit, and thus controlling how bright the LED is.
However, I'm not sure how to set it up so it'll work. Can anyone give me some tips, or maybe a suggestion on how to set up the circuit?