R
Rick C
Guest
On Friday, September 20, 2019 at 5:47:54 AM UTC-4, Martin Brown wrote:
Why screw with the integrator and the diode mess when you can use a single chip and a few resistors to get a pretty good approximation to a sine wave. A simple filter will get rid of the harmonics. The more steps you use, the more attenuation you get with the same filter. A 14 pin, 8 FF shift register (74xx164) and anything that inverts plus 8 resistors and a single capacitor gets you a pretty simple and effective circuit.
Fewer chips than the integrator/diode thing. Simpler. Easy to see if you have something wrong.
BTW, the 2 FF ring counter doesn't even give you as good an approximation as the other circuit since the timing is equal and the steps have to be equal. The original circuit has unequal timing on the two amplitude bits and unequal amplitude to give a better approximation. The OP's simulation is not correct. It appears his weighting resistors are approximately equal so the amplitudes are the same and it ends up looking like a triangle more than a sine.
--
Rick C.
+- Get 2,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209
On 19/09/2019 16:02, bitrex wrote:
On 9/19/19 4:52 AM, Martin Brown wrote:
On 19/09/2019 06:35, bitrex wrote:
Is there a way to extrapolate this D flip flop-based/XOR modified
sine-wave generator to be a little less "steppy" using a couple more
flops or XOR gates? or provide outputs of different phases?
I was thinking about a thing using the TinyLogic series flops/gates
to clock it very fast.
http://zpostbox.ru/digital_generators_of_sine_wave_signals_2.gif
The faster you try to clock it the worse things will get with
propagation delays in the flip flops as drawn.
To take out most of the 5th harmonic component you will need a divide
by 5 counter in the right phase. Each extra component you try to
compensate seriously limits the maximum output frequency that it will
work at. The fundamental will be lowered from f/3 to f/15 by adding
this factor.
The least bad fix might be to treat the output as a current source and
integrate it so that you get a step wise linear approximation.
(or aggressively low pass filter against the fifth harmonic and above)..
What are you trying to do?
I have an I/Q demodulator/detector scheme that has to run pretty fast at
very low voltage, the 0 degree phase path goes through some op amps with
somewhat limited bandwidth and slew rate because they're low voltage
types. it's fed by a reference clock.
the whole system would work fine with square waves if I had the budget
for infinite GBW and slew rate parts but the op amps I can afford on the
budget in the path don't really have enough GBW and slew rate to support
a square wave at the speed I need to go so, I don't want to shove a raw
square into them like a brutal person.
this would work fine to produce a modified sine and a quadrature square
wave and is just what I need, aside from the glitches which causes
problems down the line. using lower value resistors I can just drive the
input of the analog section directly from the flop outputs, the amps are
single-supply biased at the mid-point of the same supply and just drive
it in, nice.
https://imgur.com/a/IahCKuJ
I want to maintain a tight phase relationship between the two signals so
IDK if aggressive low passing is an option here. a couple flops and
gates is within my price/power budget so I'm wishing there was a way to
eliminate the glitch at the source without piling on parts, at that
point I'd likely just resort to DDS. but I'd prefer to be able to
provide a solution that works OK driven by a clock from whatever source
in this case
How about a 2 flip flop Johnson ring counter then?
That can be configured to generate the quadrature square waves.
Integrate them to a triangle wave and use diode shaping.
How wide a range of frequencies does this have to work at?
Why screw with the integrator and the diode mess when you can use a single chip and a few resistors to get a pretty good approximation to a sine wave. A simple filter will get rid of the harmonics. The more steps you use, the more attenuation you get with the same filter. A 14 pin, 8 FF shift register (74xx164) and anything that inverts plus 8 resistors and a single capacitor gets you a pretty simple and effective circuit.
Fewer chips than the integrator/diode thing. Simpler. Easy to see if you have something wrong.
BTW, the 2 FF ring counter doesn't even give you as good an approximation as the other circuit since the timing is equal and the steps have to be equal. The original circuit has unequal timing on the two amplitude bits and unequal amplitude to give a better approximation. The OP's simulation is not correct. It appears his weighting resistors are approximately equal so the amplitudes are the same and it ends up looking like a triangle more than a sine.
--
Rick C.
+- Get 2,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209