# Simple pulse-width modulation project help

Discussion in 'General Electronics Discussion' started by Fwahm, Apr 9, 2012.

1. ### Fwahm

1
0
Apr 9, 2012
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?

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,419
2,790
Jan 21, 2010
You need to make an oscillator where you can control the mark-space ratio.

Then you (probably) need a pass element to provide current gain.

The former can be done with either the op-amp or a schmitt trigger inverter (plus some diodes a pot, some resistors and a capacitor). The latter with a transistor and a couple of resistors.

You can put that OR gate back on the shelf.

3. ### poor mystic

1,067
31
Apr 8, 2011
or you could just use a 555

https://www.circuitlab.com/circuit/z242cn/555-timer-as-pulse-width-modulation-pwm-generator/

(edit) It all really depends on how serious you are. I suppose the best way to generate pulses over quite a large field of description is digital, nowadays, and depends on high frequency clocks and counters. It's pretty hard to guess just how well you could get such stuff to work for just how little cash though. Some of the PIC's have A to D converters and might even be the cheapest solution.

Last edited: Apr 10, 2012