EveryCircuit
Contact
Reviews
Home
ViolationMad
modified 8 years ago

Amplitude to PWM

3
3
188
01:36:33
So im trying to create a PWM from a music signal depending on its amplitude. What i thought of was to controll the current through current mirrors which will cause the cap to charge/discharge faster/slower and so change the dutycycle of the orange mark. But whenever i add a bjt or sth else in series with the 1k resistors it comes up with the cfs. Is there any chance this basic idea could ever work? If it works it would need to be rather high frequency to compansate for the changing current right? Ignore the stuff at the top. That was just me trying to split the input so i could controll the current mirrors individually.
published 8 years ago
Valveman11
8 years ago
That's an interesting thought, but I think you're over-thinking this! The way it's done is to use a high-frequency triangle or sawtooth generator (triangle works best), running at 4 Mhz, the higher the better, and feed that into one side of a comparator. Feed the audio signal into the other side, and the comparator will output your PWM. Google Class-D amplifiers. Hope this helps!
ViolationMad
8 years ago
@Valveman11 Yes it does help so thanks alot for your comment. Also really appreciate that you have created a nice example right away.
rich11292000
8 years ago
Slow down sim speed

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy