Dirty sine wave generator

? The

t

to see

low slew rate can help it become more sine-like, at least if it doesn't ove rshoot wildly.

NT

Reply to
tabbypurr
Loading thread data ...

Another option might be to use a comparator to turn the analogue signal into digital and then correlate against the references with digital XOR. ISTR one 1980s's portable low frequency LBI system used one bit digitisation this way. If you do it well you can get about 60% (2/pi) of the available correlated signal detected on a good day.

--
Regards, 
Martin Brown
Reply to
Martin Brown

Some GPS receivers use a comparator to digitise the incoming signal.

John

Reply to
jrwalliker

Don't know what your point is. The Johnson ring counter gives you a number of phases with adjustable edges both leading and trailing. You can have h alf of the 50/50 duty cycle waveforms with no gates, the other half with a simple inverter. Quadrature square wave are no gate signals. Best of all, all these signals, 50/50 duty cycle or not, are glitch free! You would ne ed to be pretty ignorant of the circuit to want to use anything else or hav e some very odd and special needs. Both circuits use a 14 pin 7400 type de vice and an extra gate, XOR in one case and an inverter in the other (which can be an XOR with a pin pulled high). The Johnson ring counter has more bits of resolution, so it requires more resistors. That's the only differe nce.

--
  Rick C. 

  +-- Get 2,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

? The

t

to see

on

ars his

h

I suppose "good enuff" is an engineering criteria. But I don't know why yo u are tossing away the extra output on each phase? You can use four output s to drive your analog signals and get something much better for the cost o f a resistor. What you are doing is simply horrible and an offense to man and nature! Why???

--
  Rick C. 

  +-+ Get 2,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

I was just following e.g. fig 5 in:

It's not obvious to me how to get a quadrature output from your version in either four or 8 flop configuration, simply using a set of shifted resistor values on the not-Q outputs didn't seem to work. But maybe I did something wrong.

Reply to
bitrex

For quadrature, you have to take half of the outputs as is and the second half inverted and shift the resistors by half of the register length.

Just draw the waveforms.

--

-TV
Reply to
Tauno Voipio

y

ich

.

y you are tossing away the extra output on each phase? You can use four ou tputs to drive your analog signals and get something much better for the co st of a resistor. What you are doing is simply horrible and an offense to man and nature! Why???

I used a '4017 to make a stepped sine wave like that. First harmonics at the 11th (or something like that.) The only 'gotcha' was the output impeda nce of the '4017 which needed to be factored into the resistor values.

George H.

Reply to
George Herold

Okay, that works. It was the part about taking half the outputs from Q and half from not-Q for quadrature I wasn't getting. Thnx

Reply to
bitrex

Or, lengthen the chain by another quarter-cycle worth of flipflops. The added flipflops are going to replicate the inverse of the early FFs in the chain, because a half-cycle delay of a sine is its negative. Keeping it all flipflops takes more energy, but works to higher frequency because there's no inverter delay.

I keep getting confused; that makes this a good exercise!

Reply to
whit3rd

It would sure help if one of y'all could post a schematic of these ideas for e.g. 4 and 8 flop cases because I'm a bit confused at this point too, and I'm not sure if I've got it correct in my sim...

Thanks!

Reply to
bitrex

on

That can be done with no extra chips by using the 8 bit shift register the '164 with four FFs in the ring counter and two others as the follow on.

There is still an inverter delay limiting the FF clock speed at the end of the ring counter chain, but maybe you are referring to the delay of the out puts causing distortion in the waveform.

It's not that complex, although I was confused about the nature of the quad rature signal. I think someone mentioned needing only a square wave quadra ture signal which is easier to get than the sine wave quadrature signal eve n if that is also not too hard.

--
  Rick C. 

  ++- Get 2,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

On Monday, September 23, 2019 at 12:16:15 PM UTC-4, bitrex wrote:

y

ich

.

y you are tossing away the extra output on each phase? You can use four ou tputs to drive your analog signals and get something much better for the co st of a resistor. What you are doing is simply horrible and an offense to man and nature! Why???

I'm pretty sure fig 5 is wrong. The value of the resistors may be reversed , or just wrong. The middle step should be the big one since that is where the sine wave slope is steepest. They show that in the waveform, but that waveform does not match the resistor values. Look at your waveform vs. fi g 5.

Here are the waveforms...

formatting link

You will need to figure out your opamp biasing since LTspice digital parts are 1 volt logic default and I didn't feel like messing with the details. I actually got a better result with a passive filter but the issues are mos tly LTspice vs. the real world I believe.

Here is the schematic, 300 lines. I used 6 FFs of a 14 pin, 8 FF shift reg ister you can buy virtually anywhere, 74xx164 and an inverter you can use y our XOR for.

If you want to view the stepped waveform add small resistors in front of C1 and C2 and look at the voltage across these resistors.

Version 4 SHEET 1 2328 680 WIRE 1936 -624 1840 -624 WIRE 2016 -624 2000 -624 WIRE 1840 -544 1840 -624 WIRE 1872 -544 1840 -544 WIRE 2016 -544 2016 -624 WIRE 2016 -544 1952 -544 WIRE 2112 -544 2016 -544 WIRE 2176 -544 2112 -544 WIRE 2176 -512 2176 -544 WIRE 1552 -496 1456 -496 WIRE 1904 -496 1552 -496 WIRE 1904 -480 1904 -496 WIRE 656 -464 480 -464 WIRE 768 -464 656 -464 WIRE 1056 -464 768 -464 WIRE 1344 -464 1056 -464 WIRE 1488 -464 1344 -464 WIRE 1680 -464 1552 -464 WIRE 1840 -464 1840 -544 WIRE 1840 -464 1680 -464 WIRE 1872 -464 1840 -464 WIRE 2016 -448 2016 -544 WIRE 2016 -448 1936 -448 WIRE 1744 -432 1600 -432 WIRE 1872 -432 1744 -432 WIRE 480 -416 480 -464 WIRE 768 -416 768 -464 WIRE 1056 -416 1056 -464 WIRE 1344 -416 1344 -464 WIRE 1600 -400 1600 -432 WIRE 1904 -400 1904 -416 WIRE 2176 -400 2176 -432 WIRE 1936 -304 1840 -304 WIRE 2016 -304 2000 -304 WIRE 1840 -224 1840 -304 WIRE 1872 -224 1840 -224 WIRE 2016 -224 2016 -304 WIRE 2016 -224 1952 -224 WIRE 2112 -224 2016 -224 WIRE 2176 -224 2112 -224 WIRE 256 -208 -32 -208 WIRE 544 -208 256 -208 WIRE 656 -208 544 -208 WIRE 832 -208 656 -208 WIRE 1488 -208 832 -208 WIRE 1680 -208 1552 -208 WIRE 1840 -208 1840 -224 WIRE 1840 -208 1680 -208 WIRE 1456 -176 1456 -496 WIRE 1600 -176 1600 -320 WIRE 1600 -176 1456 -176 WIRE 1904 -176 1600 -176 WIRE 2176 -176 2176 -224 WIRE -32 -160 -32 -208 WIRE 256 -160 256 -208 WIRE 544 -160 544 -208 WIRE 832 -160 832 -208 WIRE 1904 -160 1904 -176 WIRE 1744 -144 1744 -432 WIRE 1744 -144 1616 -144 WIRE 1840 -144 1840 -208 WIRE 1872 -144 1840 -144 WIRE 1456 -128 1456 -176 WIRE 1616 -128 1616 -144 WIRE 2016 -128 2016 -224 WIRE 2016 -128 1936 -128 WIRE 1744 -112 1744 -144 WIRE 1792 -112 1744 -112 WIRE 1872 -112 1792 -112 WIRE 1744 -96 1744 -112 WIRE 1904 -80 1904 -96 WIRE 2176 -64 2176 -96 WIRE 1616 -48 1616 -64 WIRE 768 -32 768 -336 WIRE 768 -32 -704 -32 WIRE 1456 -32 1456 -48 WIRE 1744 0 1744 -16 WIRE -704 144 -704 -32 WIRE -608 144 -704 144 WIRE -464 144 -544 144 WIRE -288 144 -464 144 WIRE -64 144 -128 144 WIRE -32 144 -32 -80 WIRE -32 144 -64 144 WIRE 0 144 -32 144 WIRE 224 144 160 144 WIRE 256 144 256 -80 WIRE 256 144 224 144 WIRE 288 144 256 144 WIRE 480 144 480 -336 WIRE 480 144 448 144 WIRE 512 144 480 144 WIRE 544 144 544 -80 WIRE 544 144 512 144 WIRE 576 144 544 144 WIRE 768 144 768 -32 WIRE 768 144 736 144 WIRE 800 144 768 144 WIRE 832 144 832 -80 WIRE 832 144 800 144 WIRE 864 144 832 144 WIRE 1056 144 1056 -336 WIRE 1056 144 1024 144 WIRE 1088 144 1056 144 WIRE 1152 144 1088 144 WIRE 1344 144 1344 -336 WIRE 1344 144 1312 144 WIRE 1376 144 1344 144 WIRE 1440 144 1376 144 WIRE 1664 144 1600 144 WIRE 1728 144 1664 144 WIRE 1968 144 1888 144 WIRE -288 192 -320 192 WIRE 0 192 -32 192 WIRE 288 192 256 192 WIRE 576 192 544 192 WIRE 864 192 832 192 WIRE 1152 192 1120 192 WIRE 1440 192 1408 192 WIRE 1728 192 1696 192 WIRE -592 288 -704 288 WIRE -320 288 -320 192 WIRE -320 288 -592 288 WIRE -32 288 -32 192 WIRE -32 288 -320 288 WIRE 256 288 256 192 WIRE 256 288 -32 288 WIRE 544 288 544 192 WIRE 544 288 256 288 WIRE 832 288 832 192 WIRE 832 288 544 288 WIRE 1120 288 1120 192 WIRE 1120 288 832 288 WIRE 1408 288 1408 192 WIRE 1408 288 1120 288 WIRE 1696 288 1696 192 WIRE 1696 288 1408 288 WIRE -704 320 -704 288 WIRE -208 336 -208 240 WIRE -208 336 -544 336 WIRE -16 336 -208 336 WIRE 80 336 80 240 WIRE 80 336 -16 336 WIRE 368 336 368 240 WIRE 368 336 80 336 WIRE 656 336 656 240 WIRE 656 336 368 336 WIRE 944 336 944 240 WIRE 944 336 656 336 WIRE 1232 336 1232 240 WIRE 1232 336 944 336 WIRE 1520 336 1520 240 WIRE 1520 336 1232 336 WIRE 1808 336 1808 240 WIRE 1808 336 1520 336 WIRE -544 368 -544 336 WIRE -704 464 -704 400 WIRE -544 464 -544 448 WIRE -544 464 -704 464 WIRE -544 480 -544 464 FLAG -544 480 0 FLAG -592 288 CLOCK FLAG -16 336 RESET FLAG 2112 -224 OUT_A FLAG -64 144 Q0 FLAG 224 144 Q1 FLAG 512 144 Q2 FLAG 800 144 Q3 FLAG 1088 144 Q4 FLAG 1376 144 Q5 FLAG 1968 144 Q7 FLAG 1664 144 Q6 FLAG 1744 0 0 FLAG 2112 -544 OUT_B FLAG 656 -208 SUM_A FLAG 656 -464 SUM_B FLAG 2176 -64 0 FLAG 2176 -400 0 FLAG 1904 -400 0 FLAG 1904 -80 0 FLAG 1456 -32 0 FLAG 1552 -496 5V FLAG 1616 -48 0 FLAG 1792 -112 BIAS FLAG -464 144 Feedback FLAG 1680 -208 INV_A FLAG 1680 -464 INV_B SYMBOL Digital\\dflop 80 96 R0 SYMATTR InstName A1 SYMBOL Digital\\dflop 368 96 R0 SYMATTR InstName A2 SYMBOL Digital\\dflop -208 96 R0 SYMATTR InstName A0 SYMBOL Digital\\dflop 656 96 R0 SYMATTR InstName A3 SYMBOL Digital\\dflop 944 96 R0 SYMATTR InstName A4 SYMBOL Digital\\dflop 1520 96 R0 SYMATTR InstName A6 SYMBOL Digital\\dflop 1808 96 R0 SYMATTR InstName A7 SYMBOL Digital\\dflop 1232 96 R0 SYMATTR InstName A5 SYMBOL Digital\\inv -608 80 R0 SYMATTR InstName A9 SYMBOL voltage -704 304 R0 WINDOW 3 -118 -65 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value PULSE(0 1 0 10ns 10ns 250ns 500ns) SYMATTR InstName V1 SYMBOL voltage -544 352 R0 WINDOW 3 37 91 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value PULSE(0 1 0 10ns 10ns 510ns) SYMATTR InstName RESET SYMBOL res -48 -176 R0 SYMATTR InstName R1 SYMATTR Value 12.0k SYMBOL res 240 -176 R0 SYMATTR InstName R2 SYMATTR Value 4.99k SYMBOL res 528 -176 R0 SYMATTR InstName R3 SYMATTR Value 4.99k SYMBOL res 816 -176 R0 SYMATTR InstName R4 SYMATTR Value 12.0k SYMBOL res 464 -432 R0 SYMATTR InstName R5 SYMATTR Value 12.0k SYMBOL res 752 -432 R0 SYMATTR InstName R6 SYMATTR Value 4.99k SYMBOL res 1040 -432 R0 SYMATTR InstName R7 SYMATTR Value 4.99k SYMBOL res 1328 -432 R0 SYMATTR InstName R8 SYMATTR Value 12.0k SYMBOL res 1728 -112 R0 SYMATTR InstName R9 SYMATTR Value 2.45k SYMBOL res 1584 -416 R0 SYMATTR InstName R10 SYMATTR Value 4.99k SYMBOL cap 2000 -320 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C3 SYMATTR Value 1nF SYMBOL cap 2000 -640 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C4 SYMATTR Value 1nF SYMBOL res 1968 -240 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R11 SYMATTR Value 2k SYMBOL res 1968 -560 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R12 SYMATTR Value 2k SYMBOL res 2160 -192 R0 SYMATTR InstName R13 SYMATTR Value 100k SYMBOL res 2160 -528 R0 SYMATTR InstName R14 SYMATTR Value 1meg SYMBOL voltage 1456 -144 R0 WINDOW 3 34 72 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value 3.3 SYMATTR InstName V2 SYMBOL cap 1600 -128 R0 SYMATTR InstName C5

SYMBOL Opamps\\LT1215 1904 -192 R0 SYMATTR InstName U1 SYMBOL Opamps\\LT1215 1904 -512 R0 SYMATTR InstName U2 SYMBOL cap 1552 -480 R90 WINDOW 0 59 55 VBottom 2 WINDOW 3 32 -4 VTop 2 SYMATTR InstName C2

SYMBOL cap 1488 -192 R270 WINDOW 0 34 4 VTop 2 WINDOW 3 64 66 VBottom 2 SYMATTR InstName C1

TEXT -304 616 Left 2 !.tran 30us TEXT -8 616 Left 2 !.options gmin=1e-10 abstol=1e-10 cshunt=1e-16 TEXT 440 392 Left 3 ;74xx164 - 14 pin DIP TEXT 608 616 Left 2 !.IC V( INV_A)=1.1V V( INV_B)=1.1V V( SUM_A)=0.5 V(SUM_B)=0.5V RECTANGLE Normal 1920 368 -368 32 1

--
  Rick C. 

  +++ Get 2,000 miles of free Supercharging 
 Click to see the full signature
Reply to
Rick C

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.