You are on page 1of 5

CircuitStew.

com - DIY Electronics Projects

1 of 5

Home
PCB Designs
Projects
Howto's
Etc

http://www.circuitstew.com/pcbs/pwm_power_supply.html

PWM Power Supply


v1.2

7) Complete

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.

About

PWM output from LMC555 timer (pin 3): 1% duty cycle

PWM output from LMC555 timer (pin 3): 50% duty


cycle

4/4/2012 1:48 PM

CircuitStew.com - DIY Electronics Projects

2 of 5

http://www.circuitstew.com/pcbs/pwm_power_supply.html

PWM output from LMC555 timer (pin 3): 99% duty


cycle

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

4/4/2012 1:48 PM

CircuitStew.com - DIY Electronics Projects

3 of 5

http://www.circuitstew.com/pcbs/pwm_power_supply.html

terminals to prevent back EMF in inductive loads from


destroying the transistor.

Completed PWM power supply board

PWM power supply with two white LEDs as a load (low


duty cycle)

4/4/2012 1:48 PM

CircuitStew.com - DIY Electronics Projects

4 of 5

http://www.circuitstew.com/pcbs/pwm_power_supply.html

PWM power supply with two white LEDs as a load


(high duty cycle)

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.

Eagle Design Files

4/4/2012 1:48 PM

CircuitStew.com - DIY Electronics Projects

5 of 5

http://www.circuitstew.com/pcbs/pwm_power_supply.html

Cadsoft Eagle pcb schematic [ .PNG | .SCH ]

Cadsoft Eagle pcb layout [ .PNG | .BRD ]

References
1. Afrotechmods page with original schematic. Also
has a simple tutorial video on PWM
2. LMC555 datasheet - Design is similar to Figure 4
except Rb is two halves of a potentiometer instead
of one resistor. Each half is made directional by a
diode
3. PN2222A NPN transistor datasheet

Copyright 2011 by Derek Wolfe - Modified March 6, 2012 11:50 PM

4/4/2012 1:48 PM

You might also like