Tl494 Ltspice ((hot)) -
Chapter 1: The TL494 Subcircuit Model
First, create this file as TL494.sub in your LTspice working directory.
* TL494 Subcircuit for LTspice * Pin order: 1IN+ 1IN- 2IN+ 2IN- FB COMP CT RT GND C1 C2 VCC OUT1 OUT2 * Simplified functional model: oscillator, PWM comparator, error amps, outputs.SUBCKT TL494 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Pin mapping:
1 = 1IN+ 2 = 1IN- 3 = 2IN+ 4 = 2IN- 5 = FB 6 = COMP
7 = CT 8 = RT 9 = GND 10 = C1 11 = C2 12 = VCC
13 = OUT1 14 = OUT2
Power supply clamps VCC_IN 12 0 DC 0 E_VCC 100 0 VALUE V(12,9) R_VCC 100 0 1MEG
Current source for RT/CT oscillator (typical ~1mA) G_RT 0 8 VALUE IF(V(12,9)>4, 1.2e-3, 0) R_RT 8 0 1G tl494 ltspice
Sawtooth oscillator on CT pin (pin 7)
Frequency = 1/(RT*CT), typical range 1kHz-300kHz E_OSC_TRIG 110 0 VALUE V(100)*0.7 ; ~70% duty cycle max G_OSC 0 7 VALUE IF(V(7,9) < V(110) & V(12,9)>4, 1e-3, 0) C_OSC 7 9 1n IC=0 R_OSC 7 9 1MEG
Dead-time control (pin 4 = DTC, but we simplify via comparator offset) E_DTC 120 0 VALUE 0.1 ; fixed ~10% dead time
Error amplifiers (simple transconductance)
Amplifier 1 (pins 1,2) -> output to COMP (pin 6) G_EA1 0 6 VALUE 0.001 * (V(1,2))
Amplifier 2 (pins 3,4) -> also to COMP G_EA2 0 6 VALUE 0.001 * (V(3,4))
Feedback input (pin 5) overrides if lower D_FB 5 6 DCLAMP .MODEL DCLAMP D(Vfwd=0.7) Chapter 1: The TL494 Subcircuit Model First, create
COMP pin pullup to internal reference (~3.5V) R_COMP 6 100 10K
PWM comparator: sawtooth (CT) vs COMP voltage
Outputs are active low, push-pull or open collector E_PWM 130 0 VALUE IF(V(7,9) > V(6,9), 0, 5) R_PWM 130 0 1MEG
Output steering: C1 and C2 (pins 10,11) are collector outputs
OUT1 and OUT2 (pins 13,14) are emitters (simplified: logic levels)
Alternate outputs on each oscillator half-cycle SAMPLE1 131 0 132 0 SW SAMPLE2 133 0 132 0 SW .MODEL SW VSWITCH(Ron=1 Roff=1G Vt=2.5 Vh=0.1)
Clock divider (toggle) E_CLK 132 0 VALUE PULSE(0,5,0,1n,1n,10u,20u) ; placeholder freq adjust Pin mapping:
Better: use oscillator half-cycle detection (simplified for stability)
Final outputs: active low, open collector to VCC pullups G_OUT1 0 13 VALUE IF(V(130) > 2.5 & V(132)>2.5, 1e-3, 0) G_OUT2 0 14 VALUE IF(V(130) > 2.5 & V(132)<2.5, 1e-3, 0) D_OUT1 13 12 DCLAMP D_OUT2 14 12 DCLAMP R_OUT1 13 0 1MEG R_OUT2 14 0 1MEG
.ENDS TL494
3. Adding the model to LTspice
- Download a TL494
.libor.subfile. - Place it in the same folder as your schematic.
- Add a SPICE directive:
.lib tl494.lib - Create a symbol (or use an existing generic opamp/PWM symbol and edit pin order).
4.2 Feedback Loop Design
The compensation network is connected to Pin 3 (Feedback/Compensation).
- The internal error amplifier compares the output voltage (divided down to 2.5V) against the reference.
- A Type II compensation network (Resistor and Capacitor in series from Pin 3 to Ground) stabilizes the loop.
Simulation Setup in LTspice:
- Place the TL494 symbol.
- Connect a pull-up resistor from Pin 8 and Pin 11 to $V_CC$.
- Connect Pins 9 and 11 to the gate of the power MOSFET through a gate resistor.
- Configure the soft-start circuit: A capacitor from Pin 4 to Ground (e.g., $10,\mu\textF$) charged via a resistor. This forces the duty cycle to start at 0% and ramp up slowly.
2. Getting a Working TL494 Model for LTspice
3. Oscillator Not Running
- Ensure Ct (pin 5) shows a sawtooth wave (1V to 3V). If flat, the model may require a resistor from Rt to GND, not to Vref. Consult the datasheet: Rt to GND, Ct to GND.
Troubleshooting common problems
- Oscillator too fast/slow: adjust RT/CT; verify ramp amplitude.
- No PWM: check COMP driven below ramp (error amp), SS clamp may be active.
- Shoot‑through in push‑pull: increase DTC or add gate deadtime.
- Unstable loop: reduce error‑amp gain, move crossover lower, add feedforward.
