Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Simple PWM Circuit For Lamp Dimming, etc., Improves On 555 PWM Circuits 2017-01-29

Pulse Width Modulation (PWM) is useful for lamp dimming, motor control, or other applications where an efficient way to vary current or voltage is desired.
Here is a simple circuit to generate the PWM modulated signal that is an improvement over most 555 based PWM circuits, and uses a comparable number of parts.
The duty-cycle is controlled by a voltage (external or from a pot), and the duty-cycle can go from 0% (full-off) to 100% (full-on).
Most 555 circuits are capable of neither.
It also has a larger operating voltage range of 2V to 36V.

This circuit requires only two comparators, as in one LM393 package or one-half of a LM339 package, both common and inexpensive, along with seven passive components (besides the three in the optional pot control circuit).
It generates a PWM signal with a duty-cycle that can be varied continuously from 0% (full off) to 100% (full on) by either by an external control voltage (Mod_In) or the optional pot control circuit.

The LTspice simulation of the circuit is shown below.

upload_2017-4-20_20-26-14.png


U1 is configured as a relaxation oscillation with the frequency determined by the value of R1 and C1.
R3, R4, and R5 generate symmetrical plus and minus switching points (hysteresis) for the oscillator.
U1's output is a square-wave which charges and discharges C1 through R1, generating an exponential shaped sawtooth voltage on the capacitor going between about 1/4 and 3/4 of the supply voltage.
This gives an oscillation frequency of approximately 1/(2.2*R1C1).
This frequency varies very little with change in supply voltage, and does not vary with the PWM duty-cycle.
Since the circuit uses only high speed comparators it can operate at much higher frequencies than most op amp based PWM circuits.
Operation at frequencies upwards of 100kHz should be readily achievable, if needed.

This sawtooth at C1 is connected to one input of comparator U2.
The other comparator input is fed the modulation (Mod_In) voltage with range between 1/4V+ to 3/4V+ which gives a PWM range of 0% to 100%.
Thus the output can be adjusted from fully off to fully on.
This is greater than most 555 type PWM circuits, which cannot be voltage controlled, and are generally limited in their duty-cycle range to within a few percent of 0% and 100%.

The Mod-In duty-cycle voltage can be generated externally or by the optional pot.
The simulation is shown with a Mod_In voltage (V_Mod) going from 1/4V+ to 3/4 V+.
The PWM duty-cycle for this Mod_In range goes from 0% (full off) to 100% (full on) as shown in the bottom plot.
(The 1/4V+ offset can be readily generated if needed, by a differential op amp circuit, example below & here).
upload_2017-4-20_20-50-17.png

It you need an inverted output signal with respect to the control voltage, just interchange the input connections on U2.

U2's output can be fed to a MOSFET or whatever else you want controlled by the PWM signal.
A simple and inexpensive MOSFET push-pull gate driver for voltages up to 15V can be made using a CD4050 chip and tieing all 6 buffers inputs and outputs in parallel as shown here:

upload_2017-4-20_20-44-34.png


Connected to U2's output, this will drive considerably more MOSFET gate capacitance than U2's output can drive by itself, for higher PWM frequencies.

Since the waveform generated by U1 is not a true triangle-wave, the circuit's change of duty-cycle with control voltage is not quite linear as it would be with a precise triangle-wave as generated by a square-wave into a true integrator, but the deviation from linear is small and should be adequate for lamp dimming, dc motor speed control, and other applications where high linearity between the control signal and the PWM duty-cycle is not required.

The circuit will operate over the LM339/393's voltage range of 2v to 36V.
  • upload_2017-4-20_20-26-14.png
    upload_2017-4-20_20-26-14.png
    64.8 KB · Views: 10,999
  • upload_2017-4-20_20-44-34.png
    upload_2017-4-20_20-44-34.png
    57.6 KB · Views: 6,000
  • upload_2017-4-20_20-50-17.png
    upload_2017-4-20_20-50-17.png
    45.7 KB · Views: 1,428
  • PWM LM339 Pot Adj 2.asc
    2.8 KB · Views: 742
  • PWM LM339 Pot Adj 2a.asc
    2.8 KB · Views: 674
Author
crutschow
Views
9,821
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from crutschow

Latest threads

New Articles From Microcontroller Tips

Back
Top