0

I'm trying to convert a linear voltage to a 21kHz PWM signal using passive and active components.

Do you have any idea how I can achieve this ?

I tought about comparing my linear voltage to a sawtooth signal at 21kHz with this scheme:

enter image description here enter image description here

but making this signal with passive components is really hard and not accurate.

I can use any comparator, amplifier etc..

Gragon
  • 5
  • 2

1 Answers1

1

Yes, basically make a sawtooth and feed that to a comparator. The venerable 555 can do this, although rather crudely. See here: https://www.falstad.com/circuit/e-555pulsemod.html

The key to making a good sawtooth is to use a current source to charge the cap. This makes the linear ramp, improving the accuracy of your PWM.

Another way to make a PWM modulator is to use a square wave generator followed by an integrator fed into the comparator. Example here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/4362. However I foresee issues with that approach in getting the DC offset right - always a problem with integrators.

You could ‘cheat’ and use a microcontroller to sample the analog waveform and convert that to PWM via software. I suspect that’s not the point of this question.

hacktastical
  • 53,912
  • 2
  • 49
  • 152