Ron Michallick
When I started working on designing a pulse width modulator for my LED driver, there were two things I knew from the start: that the light-emitting diode (LED) driver needed a pulse-width modulated (PWM) signal and that I wanted to use hardware. I remembered that the test circuit in the TL494 data sheet shows a PWM generator circuit (see Figure 1) that needs minimal components for a very low bill-of-materials cost. The TL494 has many useful circuits inside: two amplifiers, an oscillator, comparator, flip-flop and two high-current outputs that can sink or source current. See Figure 2. Today I will use my LED driver as an example to explain how to use error amplifiers to remove error and variance.
I have two choices for modulation input: the dead-time-control (DTC) or FEEDBACK pin. I chose the FEEDBACK pin input because I can use one of the TL494’s two internal error amplifiers to scale my input signal to match the device’s feedback voltage range.
The only changes I made to the circuit in Figure 1 was to set pin 13 to ground and to replace the 12kΩ resistor with 6.8kΩ. Now, duty-cycle output can be up to 90% and the output frequency is 18kHz.
I know that maximum duty cycle occurs when FEEDBACK is 0.7V (per Figure 1) and that zero duty cycle is typically 4V, per Table 1.
![]() |
I built the circuit in Figure 1 and recorded the relationship between the FEEDBACK voltage and output duty cycle using an oscilloscope. The maximum duty cycle is 88% and the minimum duty cycle is 4%, with FEEDBACK between 1.1V and 3.4V, as shown in Figure 3.
I started to wonder how device-to-device variance for FEEDBACK and duty cycle might vary. I put that thought aside, however, and decided to check temperature performance first. I was surprised to find out that the actual duty cycle varied significantly from the desired duty cycle as the temperature changed. The duty cycle at low and high temperature changed as much as 4% from the result recorded in Figure 3. The duty cycle deviation due to temperature is shown in Figure 4. The shift is most serious when a small duty cycle is needed, such as 4%. Across temperature, the duty cycle will vary from 1.5% at -40°C to 5.8% at 85°C.This will be a substantial difference in LED brightness.
On the plus side, I was happy with temperature stability of the oscillator frequency shown in Figure 5.
I needed a way to control the output duty cycle that would be immune from temperature effects of the FEEDBACK-to-duty-cycle relationship and device-to-device variance that I expected would cause even greater variance in duty cycle. After some thought, it occurred to me that converting the duty cycle of the output to a voltage and comparing that voltage to my input would result in a duty cycle equal to my input voltage. The easiest way to convert the duty cycle of a PWM signal to a DC voltage is with a low-pass filter. I used the internal error amplifier to compare the signals. To avoid adding new sources of error, the PWM signal going to the low-pass-filter should have accurate and unchanging low and high output voltage levels. Many logic inverters have rail-to-rail output making them a good choice, but I went with a NPN transistor based inverter instead, which also has a rail-to-rail output. Figure 6 shows the new circuit.
There are design changes you should consider. As always, resistor and capacitor on the TL494’s RT and CT pins set the oscillator frequency. R3 multiplied by C3 in the low pass filter needs to be at least three times the oscillator time base to convert the duty cycle to a DC voltage. R2 and C2 control the frequency compensation for the control loop. Larger values for C2 and C3 can keep the ripple voltage to a minimum, while lower values allow for higher modulation frequencies of the input signal. The low output voltage at the TL494’s C1 pin doesn’t go all the way to ground; therefore you will need the resistor divider using R5 and R7.
Sending the duty-cycle information back to the error amplifier shown in Figure 6 reduces the difference between the actual duty cycle and the desired duty cycle, as Figure 7 shows. The error dropped to 0.2%, which is very good considering that the oscilloscope has a 0.1% resolution for its duty-cycle measurement.
Error amplifiers are a good way to remove error and variance from both simple and complex input to output relationships. Now, my LED driver duty-cycle will be accurate across temperature and from device to device.
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated