In "Applications of Monolithic Bridge Drivers" from ST there's an application circuit for PWM control of a DC motor which uses an L293 and a TBA820M. Here it is:

PWM control

I know how the L293 works and I've read the 820M datasheet but I don't get the PWM signal part.

  • why using an audio chip to get a triangle wave?
  • how does this particular oscillator works?
  • how are the DC offset and triangle signal added?

Thanks for helping!

  • \$\begingroup\$ It's not an "audio chip" per say. It's a op-amp and since it's fast enough and cheap, why not make a triangle wave from it? Anyway, back in the 70's that was the case since there where few or none PWM ICs available. \$\endgroup\$
    – winny
    Commented Jan 2, 2017 at 15:36
  • \$\begingroup\$ @winny It was (is) an audio amp not an op-amp and like any audio amp you can make them oscillate. You could also have used a 555 in this circuit as you're only using the voltage across the capacitor (exponential charge/discharge). \$\endgroup\$ Commented Jan 2, 2017 at 16:02
  • \$\begingroup\$ It should be noted that the L293, L298, etc are obsolete, poorly performing parts that should not be used in new designs - plenty of coverage of their issues in existing questions here. \$\endgroup\$ Commented Jan 2, 2017 at 17:41
  • \$\begingroup\$ @JImDearden Did I misread the schematic? Is it a high powered opamp, an amp per say? \$\endgroup\$
    – winny
    Commented Jan 2, 2017 at 22:19
  • \$\begingroup\$ @winny Its a 1.5W audio amp but it does have an inverting (gain setting) and non-inverting input (normal 'input') so it looks a like an op amp. The main difference is that the output is (internally) biased to mid voltage. This allows you to build a simple single supply relaxation oscillator which has the same basic configuration as the op amp version. \$\endgroup\$ Commented Jan 3, 2017 at 10:39

1 Answer 1


Why using an audio chip to get a triangle wave?

Short answer - Because you can.

Most of the time we don't want an audio amp to oscillate but they have a natural tendency to do so. The 'designer' probably had a few of these chips lying around and decided they would do the job.

Strictly speaking it doesn't produce a triangular wave but two exponentials as it charges and discharges the capacitor.

One possible advantage of the audio amp chip is its drive capacity so a low value resistor could be used to charge and discharge the capacitor. The 'triangular' signal is taken across the capacitor so a high impedance drive would be problematic.

How does this particular oscillator work?

enter image description here

Regardless of the pin names the 820 internal circuit shows pin 2 and 3 as effectively the inverting and non-inverting inputs but unlike the op amp the output is internally biased to half the supply (making Vp1 = 2.5) so that it can give maximum swing. This allows the 820 to use a single supply without additional offset resistors.

The circuits shown compares the relaxation oscillator version and audio amplifier TBA820M pinout.

The output of the relaxation oscillator has two feedback loops. The resistors (R2 and R3) form a (switched) reference voltage at the 'non-inverting' input to compare the voltage across the capacitor at the other input.

The capacitor charges up to the more positive value (output is high). Once reached the output switches low. The capacitor then discharges to the lower level. Once reached the output switches high and so on.

What looks odd is that we don't use the normal output (squarewave) but take the signal from across the capacitor.

How are the DC offset and triangle signal added?

The two 47nF capacitors separate the triangle waveform from any DC they may have (2.5V). These are coupling capacitors.

The potentiometers, P2 and P1, are connected by 10k resistors to the other side of the 47nF capacitor plates. The DC level of the wipers is then added back to the triangular waveform.

  • \$\begingroup\$ I couldn't figure out the TBA820M behaves like the typical OP-AMP reading its datasheet. Anyway we have a single rail supply here so the circuit above shoudn't work as is. The circuit explanations says it's a triangle wave because the L293 itself has a 2 Volts threshold on the enable pin. \$\endgroup\$
    – dodod
    Commented Jan 2, 2017 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.