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
  • 2
    In that case: check https://electronics.stackexchange.com/questions/378517/formula-mathematical-expression-for-pwm – Huisman Jun 18 '19 at 10:33
  • 1
    Search internet on "ic voltage to pwm": [TL594](https://www.onsemi.com/pub/Collateral/TL594-D.PDF) or [https://www.ti.com/lit/ds/symlink/tl5002.pdf](https://www.ti.com/lit/ds/symlink/tl5002.pdf) – Huisman Jun 18 '19 at 11:23
  • "I can use any comparator, amplifier etc." -- homework? I believe you're defining a transistor as a "passive component". Transistors are considered to be active. I believe you're confusing "passive" (i.e. it can't amplify) with "discrete" (i.e., there's just one thing in the package). – TimWescott Jun 18 '19 at 15:05
  • Resistors, inductors and capacitor are passive components. Comparators and amplifiers ARE NOT passive components. – Andy aka Jun 18 '19 at 15:11

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
  • 49,832
  • 2
  • 47
  • 138