From: gstopp@fibermux.com Date: Tue, 05 Dec 95 09:35:24 PDT Encoding: 89 Text Subject: Re: Pulse width circuit?????? Here's a circuit that will create a variable width pulse waveform output from a sawtooth or triangle wave input: PWM1 91K 100K 0---\/\/\/\-o----/\/\/\/--+ | | 91K | |\ | 0---\/\/\/\-o----|- \ | PWM2 | \---o---+ | / | +----|+ / | | |/ IC-1 | ----- | |\ IC-2 PULSE --- +---|- \ 3K OUTPUT - | \---o--\/\/\/\-o--0 | / | | +---|+ / | \ | |/ | / WAVEFORM IN | | 1.5K \ 0---------------------\/\/\/\-+---\/\/\/\--+ / (SAW or TRIANGLE) 10K 1M \ | ----- --- - Inputs "PWM1" and "PWM2" are the pulse width modulation inputs. Typically one will go to the wiper of a pot that is connected between V+ and V-, to serve as the initial pulse width pot. The other will then serve as a pulse width modulation control voltage input. The values of the 91K input resistors to this pulse width control voltage summing amplifier (IC-1) can be adjusted up or down to suit individual requirements. A lower value will mean a wider range at the (-) input of comparator IC-2. A higher value will mean a narrower range. The "WAVEFORM IN" input should come from either a sawtooth, triangle, or sine wave source. The positive and negative peaks of this waveform should fall just within the pulse width control voltage range as mentioned above. If the waveform is smaller in amplitude than the control range, then there will be a "dead zone" on either side of the initial pulse width pot. This is a good thing because you can dial in teeny weeny narrow pulses that are right on the edge of existence if you want. Op-amp IC-1 can be any run-of-the-mill op-amp - 741, 307, half a 1458, half a TL082, quarter of an LM324, etc. There are no slew rate or bandwidth needs here. Op-amp IC-2 should be a 748. If you can't get that use an LM301. Both of these are externally compensated, and in this circuit the intention is to leave off the external compensation cap entirely so the slew rate is the highest possible. This will provide the most vertical edges possible on the output pulse wave. If you really just want the basic pulse width modulation sound you can use the same "normal" op-amp types as listed for IC-1 - in fact if you use a dual you can cut the parts down. However you will miss out on the really high harmonics if you compromise here. Since the output of the comparator IC-2 bangs against the positive and negative power supply rails, the 3K/1.5K attenuator is used to bring it back down to a level that is less harmful to VU meters. As shown the values are chosen for plus and minus 15 volt supplies, with the pulse width control voltage range matching the amplitude of the input waveform. The output is set to plus and minus 5 volts with an output impedance of 1K. - Gene gstopp@fibermux.com Date: Tue, 5 Dec 1995 23:39:57 -0800 From: ftom@netcom.com (Tom May) Cc: gstopp@fibermux.com, analogue@hyperreal.com, electronica@andrew.cmu.edu Subject: Re: Pulse width circuit?????? Don Tillman writes: >Warning; nerdy electrical content. "I'd turn back if I were you." >(Wizard of Oz reference.) > From: gstopp@fibermux.com > Date: Tue, 05 Dec 95 09:35:24 PDT > > Op-amp IC-1 can be any run-of-the-mill op-amp - 741, 307, half a 1458, > half a TL082, quarter of an LM324, etc. There are no slew rate or > bandwidth needs here. > > Op-amp IC-2 should be a 748. If you can't get that use an LM301. Both > of these are externally compensated, and in this circuit the intention > is to leave off the external compensation cap entirely so the slew > rate is the highest possible. This will provide the most vertical > edges possible on the output pulse wave. > >No no no, you're generalizing. An uncompensated opamp will only be >faster than a compensated one if the devices are otherwise identical; >and of course they never are. Especially if there's been a decade of >semiconductor development between the opamps you're comparing. > >The 748 doesn't even have a guaranteed slew rate spec, though it can >be roughly deduced from one of the "typical" curves to be around 4.4 >V/us. Same with the LM301. > >For comparison the TL082 has a minimum guaranteed slew rate of 8 >V/us, typically 13. (Whatever happened to "op-amps are for weenies"?) PWM circuits seems like a likely topic to have been thrashed out previously, but: In Gene's circuit, the op-amp is slewing from rail to rail and the output is going through a voltage divider with 3K on top and 1.5K on bottom, essentially throwing away 2/3 of the slew rate. It seems like if you're in search of the maximal slew rate, you've got to eliminate that divider somehow. And maybe keep the op-amp from hitting the rails. What about using a dedicated voltage comparator chip? Is there any merit to the comparator in the Odyssey II (differential pair driving a (CMOS?) NAND gate)? Logic gates should switch in a few ns, right? I guess it may depend on what it's driving, though; I never thought CMOS could drive much but more CMOS. fTom. Date: Wed, 6 Dec 1995 12:30:14 +1100 (EDT) From: The drink coaster formerly known as Damien Miller Subject: Re: Pulse width circuit?????? On 5 Dec 1995 PPilgrim@Teleglobe.CA wrote: > Hello again, > > Can anyone describe how to build a pulsewidth circuit? I would like to > add pulse width to the osc's in my prodigy. > > All i have to start with is a square, tri, or ramp waveform. Unfortunately > all my schematics have curtis chips with pw pins on the chip. With the > prodigy, I am dealing with discrete VCO's :) take the sawtooth out, add a CV and stick the lot thru a comparator. thus: saw o-----/\/\/\/-----| |\ o------------|+\ CV o-----/\/\/\/-----| | \ | |-----o PW out | / ---|-/ | |/ | ----- / / / gnd I would use a TL071 for the opamp, they are cheap and pleantiful. the resistors should be about 10k from memory (I don't think that they are critical), also you might need a resistor between ground and the input to the op amp. Hope this helps, Damien /-------------------------------------------------------------------------\ | Damien Miller a.k.a s9506190@minyos.xx.rmit.edu.au a.k.a Silicon Dreams | | http://minyos.xx.rmit.edu.au/~s9506190 || No nuclear testing, thanks! | | CAUTION: WEIRD LOAD | \-------------------------------------------------------------------------/