PWM Power Supply
This circuit provides a pulse width modulation (PWM) signal for varying the duty cycle of a load from 1-99% using a potentiometer. This is a useful way to control motor speed, LED brightness, etc.
This design is based on a tutorial and schematic at Afrotechmods. I changed a few of the components and made my own board layout but it's basically the same design. It's a simple and inexpensive solution using a LMC555 timer in the astable configuration. A variable duty cycle is produced by forcing the timing capacitor to charge and discharge through different variable resistors using two diodes. Therefore it will take different periods of time to charge and discharge making the LMC555 stay in one state longer than the other based on the variable resistors.
If you're looking at my schematic, the timing capacitor C1 charges through resistor R2, diode D1, and the left half of potentiometer R1. When the voltage on C1 reaches the high threshold voltage, the LMC555 switches state and the discharge pin opens up to ground. C1 then discharges through the right half of potentiometer R1 and diode D2 into the discharge pin. When the low threshold voltage is reached, the LMC555 again changes state, the discharge pin closes, and C1 starts charging to begin a new cycle.
This PWM signal is then used to control a transistor switch for powering the load (up to 500mA for the PN2222A transistor). If you have a huge load you can remove the transistor section of this circuit and connect the PWM output control signal into a power MOSFET. A flyback diode is included near the load terminals to prevent back EMF in inductive loads from destroying the transistor.
This design doesn't include any type of voltage regulation, you need to provide the voltage that you want to PWM control. Make sure your power supply for this board is less than +15V or the LMC555 will die (personal experience). It's especially important to check your voltages if you're using a cheap wall wort. I typically use a simple power supply (like my SOS) to power both the circuit and the PWM controlled load. It would be possible to include a power supply on board here but it's better to stick with modular designs (i.e. a separate power supply and PWM controller) when possible for flexibility and design reuse.