PWM signals are used in a huge range of circuitry, often in power electronics, analog designs, and as control signals for certain ICs. It is not easy to design programmable PWM generators that exist outside of an MCU or FPGA, where the parameters in the PWM output can be configured with an input control voltage, digital input, or both.
If you need a programmable PWM generator, the solution often involves multiple ICs and a small MCU, or the PWM pin on a larger MCU like an STM32. But what if you need programmable, logic-based PWM generation with low propagation delay and full configurability? This can be implemented as a feature in specialized custom ASIC using a mixed-signal processor.
For static general-purpose PWM generation, the classic approach is to use a 555 timer circuit. These components are available from multiple vendors and in multiple packaging options as generic components. Most engineers should be familiar with these circuits as they are often taught in introductory electronics classes.
As a static PWM source, these sources are very useful and are easily configured with just a few pins and resistors. If you need a specific amplitude:
A simple 555 timer circuit is shown below. The main components for configuring the circuit are R1, R2, and C.
The reason this circuit is normally static and cannot be programmed on-the-fly is due to the usage of the resistors R1/R2 and the capacitor C. These are fixed components which determine the duty cycle and frequency as follows:
Because R1 and R2 form a voltage divider, it may be possible to make the duty cycle programmable by applying some voltages to the high and low pins (7 and 8 in the NE555 diagram above). This would require a DAC, or at minimum a digital switch to swap between different voltage sources or capacitor values. The programmability is clearly limited, and making a circuit programmable greatly increases the footprint of the PWM generation system.
A better way to create a PWM signal with some level of programmability is to use a VCO or triangle wave generator circuit, and pass the output through a comparator. A VCO operates by generating a wave with output frequency selected by a control voltage. They can be designed from discrete components or can be placed as an IC.
By passing the VCO output (e.g., sine wave output) through a comparator, the hysteresis window of the comparator can be used to define the HIGH and LOW signal times and thus define the duty cycle. A VCO that outputs a triangle wave can be used to produce better-defined transition times in the comparator output.
As long as there is a comparator with enough bandwidth (as determined from the gain-phase plot), it is possible to create a PWM generation circuit that operates up to very high frequencies. While this provides the desired programmability, it does not provide a very compact footprint as at least two chips are needed to build this generation circuit. An even more compact option is to generate the PWM signal in logic with a comparator, such as in a mixed-signal processor.
Counters can be used in digital logic with a digital comparator to generate a PWM signal. In order to produce the PWM output, a free running counter is input into a digital comparator, and the comparator output switches HIGH or LOW once the predefined thresholds are reached. Changing the upward and downward going thresholds defines a hysteresis window, which also defines the duty cycle of the PWM generator.
The level of programmability in these devices varies depending on how they are implemented. For example, in some microcontrollers, PWM generation might be implemented as code, but the implementation would be based on internal sequential+combinational logic to define the counter and comparator. In a CPLD, the circuitry can be implemented directly, but of course the remaining functionality is limited.
A mixed-signal processor allow a designer to build a custom PWM generation that also includes analog and digital processing. Based on analog and digital inputs, the mixed-signal processor can adjust the PWM duty cycle and output frequency. Inputs can be provided to these processors in multiple ways:
Highly integrated programmable PWM generation with a sensing interface is highly useful for digital control methods in DC/DC converters. Most DC/DC converters are analog devices, where logical conditions are not applied to implement a control scheme. Although digital control is slower than analog control, it permits much more sophisticated control algorithms to be implemented.
Digital control allows logical conditions to be applied to measurements from the DC/DC converter at multiple points in order to adjust the control algorithm. This simplifies many advanced control schemes, such as:
With Renesas GreenPAK, designers can build a fully custom PWM generator ASIC that implements reprogrammable custom logic and a fully custom analog front end. To accomplish this, Renesas provides the Go Configure Software Hub for configuring programmable logic cells, customizing the component pinout, and designing a fully-integrated analog front-end for analog signal processing.
To learn more, take a look at the GreenPAK components and reference examples.
Whether you need to build reliable power electronics or advanced digital systems, use the complete set of PCB design features and world-class CAD tools offered by Altium to implement your GreenPAK solutions. Altium provides the world’s premier electronic product development platform, complete with the industry’s best PCB design tools and cross-disciplinary collaboration features for advanced design teams. Contact an expert at Altium today!