Use smart digital-to-analog converters to generate pulse-width modulated signals

The technical article “Smart Digital-to-Analog Converter Science” introduces the Smart Digital-to-Analog Converter (DAC) and how it brings value to many applications. Smart DAC can reduce the burden of software development to improve design efficiency, and can also provide many useful functions. Without these functions, you need to use lower performance or similar but higher cost external components. The integrated characteristic of the intelligent DAC realizes high precision at low cost.

The technical article “Smart Digital-to-Analog Converter Science” introduces the Smart Digital-to-Analog Converter (DAC) and how it brings value to many applications. Smart DAC can reduce the burden of software development to improve design efficiency, and can also provide many useful functions. Without these functions, you need to use lower performance or similar but higher cost external components. The integrated characteristic of the intelligent DAC realizes high precision at low cost.

In this article, we will discuss how the smart DAC generates a pulse width modulation (PWM) signal directly controlled by an analog signal through the feedback pin of the device. The DAC53701 used in this example uses non-volatile memory (NVM), which is preliminarily programmed to store all register configurations even after power-off and power-up.

For remote control and fault management in automotive lighting and industrial applications, smart DACs can be used as PWM generators to provide configurable analog-to-PWM conversion, duty cycle conversion, and general-purpose input (GPI)-to-PWM conversion. Competitive solutions are lower cost and higher performance. Let’s start with simple PWM generation and understand each aspect in detail.

PWM function generation

Unlike microcontrollers (MCU) or timer-based solutions, smart DACs have a continuous waveform generation (CWG) mode that enables simple PWM generation. The function generator can output triangle waves, sawtooth waves with rising or falling slopes, and square waves. You can use the configuration register to customize the slew rate and high and low voltage levels of the waveform. The function generator can create a square wave with a limited number of adjustable frequencies and a 50% duty cycle.

Analog to PWM conversion

For applications such as temperature to PWM, the smart DAC can realize the analog-to-PWM conversion output by sending a sawtooth or triangle wave to one input of the internal output buffer and sending the threshold voltage to the other input. The DAC53701 feedback pin provides a feedback path between the output of the internal output buffer and the inverting input, thereby using the buffer as a comparator. In the example shown in Figure 1, the analog input voltage (VFB) generated by the resistor divider is applied to the feedback pin. By comparing the triangular waveform generated by the DAC53701 with the VFB, a square wave can be generated. Using a negative temperature coefficient resistor in place of a resistor in the resistance ladder produces a variable duty cycle.

Use smart digital-to-analog converters to generate pulse-width modulated signals
Figure 1: Analog to PWM conversion circuit and simulation

Equations 1 and 2 calculate the frequency setting of the input waveform to generate PWM. The registers in these formulas are programmed as smart DACs.

Use smart digital-to-analog converters to generate pulse-width modulated signals

Use smart digital-to-analog converters to generate pulse-width modulated signals

The high margin is the high voltage level of the waveform, and the low margin is the low voltage level of the waveform. The duty cycle of the PWM output is related to the high margin, low margin and VFB applied to the feedback pin, as shown in Equation 3:

Use smart digital-to-analog converters to generate pulse-width modulated signals

GPI to PWM conversion

In the dimming of LED car taillights based on GPI, the smart DAC provides additional digital interfaces by extending the feedback resistor divider network, as shown in Figure 2. Adding two resistors to the DAC53701 feedback network shown in Figure 1 will create two new GPI pins. The voltage on the feedback pin changes according to the levels of GPI1 and GPI2.

As mentioned in the previous section, the voltage on the feedback pin, as well as the high margin and low margin voltages of the triangular waveform or sawtooth waveform generated by the CWG, determine the duty cycle of the PWM output. GPI0 can provide turn-on and turn-off functions for the system by powering up and powering off the DAC53701, or provide start-stop functions for the CWG.

Use smart digital-to-analog converters to generate pulse-width modulated signals
Figure 2: GPI to PWM conversion circuit and simulation

555 timer replacement products

The PWM duty cycle of the smart DAC is controlled by changing the high margin and low margin voltage of the triangle wave or sawtooth wave, and the frequency is controlled by setting the slew rate of the DAC. These programmable settings eliminate the need for other timing circuits (such as 555 timers). There are many advantages to replacing the 555 timer with a smart DAC. The size of a typical 555 timer is 9mm x 6mm, which requires external components to set its operating frequency. The smart DAC adopts a 2mm x 2mm Quad Flat No-Lead package, which requires fewer external components, and its frequency is not controlled by any external components that are prone to temperature shift.

PWM duty cycle conversion

When you need to adjust the PWM duty cycle to match the input range of various devices in the system, the smart DAC can convert the duty cycle of the input PWM signal. Adding a resistor-capacitor (RC) filter to the PWM input signal will convert it into an analog voltage, which is suitable for the feedback pin of the smart DAC. In most cases, you need to invert the PWM input signal because the RC filter will provide a larger analog voltage for a larger duty cycle. The larger analog voltage on the DAC53701 feedback pin will produce an output wave with a smaller duty cycle.

After the input PWM is inverted and the RC filter is added, the duty cycle of the output can be changed by the following methods: use a resistor divider to divide the output of the RC filter, or adjust the output from the DAC53701 CWG according to formula 3. The high and low margin values ​​of the triangle wave or sawtooth wave. The schematic and simulation using Figure 3 show the inversion and filtering of the input PWM waveform, as well as the duty cycle conversion using the DAC53701.

Use smart digital-to-analog converters to generate pulse-width modulated signals
Figure 3: PWM duty cycle conversion circuit and simulation

Concluding remarks

Smart DACs are very suitable for most designs or subsystems that need to generate PWM, and provide access to internal components as well as storage and programmability. Smart DACs can help utilize multiple inputs and convert temperature, resistance or GPI inputs into accurate and controllable PWM signals.

The Links:   SKM145GB128D 2DI75M-120