Random thoughts on sinewave oscillators

Oct 16, 2024 Last reply: 1 year ago 55 Replies

Is the reason why this doesn't produce a better looking sinewave because the amplifier slew rate is faster going down than it is going up or some other reason?



Ignore the wild decoupling, it took me long enough to get the concept to work at all.



I'm aware that a single package containing two op amps could probably do a much better job.



Open the file in notepad++ (which you do use don't you?) and under encoding select Convert to ANSI. Save the file. That will fix issues with u symbols.



Version 4 SHEET 1 2772 1280 WIRE 112 -144 -304 -144 WIRE 352 -144 112 -144 WIRE 640 -144 352 -144 WIRE 1456 -144 640 -144 WIRE 1728 -144 1456 -144 WIRE 2064 -144 1728 -144 WIRE 352 -128 352 -144 WIRE 112 -112 112 -144 WIRE 640 -112 640 -144 WIRE 2064 -96 2064 -144 WIRE 1728 -80 1728 -144 WIRE 1456 -64 1456 -144 WIRE 352 -16 352 -48 WIRE 352 -16 256 -16 WIRE 112 0 112 -32 WIRE 112 0 0 0 WIRE 352 0 352 -16 WIRE 640 16 640 -32 WIRE 768 16 640 16 WIRE 2064 16 2064 -16 WIRE 2176 16 2064 16 WIRE 112 32 112 0 WIRE 256 32 256 -16 WIRE 1728 32 1728 0 WIRE 1728 32 1632 32 WIRE 1888 32 1728 32 WIRE 0 48 0 0 WIRE 768 64 768 16 WIRE 1456 64 1456 16 WIRE 1456 64 1360 64 WIRE 2176 64 2176 16 WIRE 640 80 640 16 WIRE 1632 80 1632 32 WIRE 1888 80 1888 32 WIRE 352 128 352 80 WIRE 576 128 352 128 WIRE 1456 128 1456 64 WIRE 1568 128 1456 128 WIRE 1984 128 1952 128 WIRE 2064 128 2064 16 WIRE 256 144 256 96 WIRE 0 160 0 112 WIRE 112 160 112 112 WIRE 208 160 112 160 WIRE 768 176 768 128 WIRE 1360 176 1360 64 WIRE 1456 176 1456 128 WIRE 2176 176 2176 128 WIRE 112 192 112 160 WIRE 208 192 208 160 WIRE 400 208 256 208 WIRE 640 208 640 176 WIRE 640 208 464 208 WIRE -304 256 -304 -144 WIRE 352 256 352 128 WIRE 112 304 112 272 WIRE 256 304 256 208 WIRE 256 304 112 304 WIRE 288 304 256 304 WIRE 640 320 640 208 WIRE 704 320 640 320 WIRE 880 320 784 320 WIRE 1024 320 944 320 WIRE 1056 320 1024 320 WIRE 1168 320 1120 320 WIRE 1296 320 1248 320 WIRE 1360 320 1360 240 WIRE 1360 320 1296 320 WIRE 1456 320 1456 256 WIRE 1456 320 1360 320 WIRE 1984 320 1984 128 WIRE 2064 320 2064 208 WIRE 2064 320 1984 320 WIRE 112 352 112 304 WIRE 1888 352 1888 176 WIRE 1888 352 1744 352 WIRE 208 384 208 256 WIRE 352 384 352 352 WIRE 352 384 208 384 WIRE -32 400 -144 400 WIRE 32 400 -32 400 WIRE 48 400 32 400 WIRE 352 400 352 384 WIRE 2064 432 2064 320 WIRE 2192 432 2064 432 WIRE -144 448 -144 400 WIRE 640 480 640 320 WIRE 656 480 640 480 WIRE 736 480 720 480 WIRE 848 480 816 480 WIRE 960 480 848 480 WIRE 112 496 112 448 WIRE 144 496 112 496 WIRE 448 496 144 496 WIRE 544 496 512 496 WIRE 640 496 640 480 WIRE 640 496 624 496 WIRE -32 512 -32 400 WIRE 16 512 -32 512 WIRE 112 512 112 496 WIRE 112 512 80 512 WIRE -32 528 -32 512 WIRE 112 528 112 512 WIRE 208 528 112 528 WIRE 352 528 352 480 WIRE 432 528 352 528 WIRE 2064 528 2064 432 WIRE 112 544 112 528 WIRE 352 544 352 528 WIRE 1632 544 1632 176 WIRE 1632 544 1536 544 WIRE 2192 544 2192 432 WIRE 1024 560 1024 320 WIRE 1456 560 1456 320 WIRE 640 576 640 496 WIRE 640 576 544 576 WIRE 272 592 256 592 WIRE 1632 592 1632 544 WIRE 1888 592 1888 352 WIRE 640 608 640 576 WIRE 848 608 848 480 WIRE 112 640 112 624 WIRE 208 640 208 624 WIRE 208 640 112 640 WIRE -32 656 -32 608 WIRE 352 656 352 624 WIRE 352 656 -32 656 WIRE 112 688 112 640 WIRE 112 688 -32 688 WIRE -32 720 -32 688 WIRE 112 720 112 688 WIRE 352 720 352 656 WIRE 432 720 432 528 WIRE -304 832 -304 336 WIRE -32 832 -32 784 WIRE -32 832 -304 832 WIRE -16 832 -32 832 WIRE 96 832 -16 832 WIRE 112 832 112 800 WIRE 112 832 96 832 WIRE 352 832 352 800 WIRE 352 832 112 832 WIRE 432 832 432 784 WIRE 432 832 352 832 WIRE 640 832 640 688 WIRE 640 832 432 832 WIRE 848 832 848 688 WIRE 848 832 640 832 WIRE 1024 832 1024 624 WIRE 1024 832 848 832 WIRE 1456 832 1456 624 WIRE 1456 832 1024 832 WIRE 1632 832 1632 672 WIRE 1632 832 1456 832 WIRE 1888 832 1888 672 WIRE 1888 832 1632 832 WIRE 2064 832 2064 608 WIRE 2064 832 1888 832 WIRE 2192 832 2192 608 WIRE 2192 832 2064 832 WIRE -304 864 -304 832 WIRE -16 880 -16 832 WIRE 96 896 96 832 WIRE 272 896 272 592 WIRE 1408 896 272 896 WIRE 1536 896 1536 544 WIRE 1536 896 1408 896 WIRE -144 1008 -144 512 WIRE -16 1008 -16 960 WIRE -16 1008 -144 1008 WIRE 96 1008 96 960 WIRE 96 1008 -16 1008 WIRE 208 1008 96 1008 WIRE 320 1008 272 1008 WIRE 544 1008 544 576 WIRE 544 1008 400 1008 WIRE 960 1008 960 480 WIRE 1104 1008 960 1008 WIRE 1232 1008 1104 1008 FLAG 768 176 0 FLAG 1104 1008 2khz-sine-out FLAG -304 864 0 FLAG 0 160 0 FLAG 256 144 0 FLAG 32 400 In+ FLAG 144 496 In- FLAG 2176 176 0 FLAG 1408 896 amplitude-control FLAG 1296 320 vdet DATAFLAG 592 208 "round(($)*100)/100" DATAFLAG 400 528 "round(($)*100)/100" DATAFLAG 160 640 "round(($)*100)/100" DATAFLAG -80 400 "round(($)*100)/100" DATAFLAG 224 496 "round(($)*100)/100" DATAFLAG 64 688 "round(($)*100)/100" DATAFLAG 160 160 "round(($)*100)/100" DATAFLAG 160 304 "round(($)*100)/100" DATAFLAG 256 384 "round(($)*100)/100" DATAFLAG 400 128 "round(($)*100)/100" DATAFLAG -192 -144 "round(($)*100)/100" DATAFLAG 688 16 "round(($)*100)/100" DATAFLAG 1520 128 "round(($)*100)/100" DATAFLAG 2128 432 "round(($)*100)/100" DATAFLAG 1824 352 "round(($)*100)/100" DATAFLAG 1584 544 "round(($)*100)/100" DATAFLAG 1408 320 "round(($)*100)/100" DATAFLAG 1824 32 "round(($)*100)/100" SYMBOL res 96 -128 R0 WINDOW 3 36 73 Left 2 SYMATTR Value 15k SYMATTR InstName R1 SYMBOL voltage -304 240 R0 WINDOW 123 0 0 Left 0 WINDOW 39 -151 71 Left 2 WINDOW 3 -79 36 Left 2 SYMATTR SpiceLine Rser=0.1 SYMATTR Value 12 SYMATTR InstName V1 SYMBOL npn 48 352 R0 SYMATTR InstName Q1 SYMATTR Value BC847C SYMBOL res 96 176 R0 WINDOW 0 -46 26 Left 2 WINDOW 3 -68 68 Left 2 SYMATTR InstName R2 SYMATTR Value 150k SYMBOL npn 576 80 R0 SYMATTR InstName Q3 SYMATTR Value BC847C SYMBOL res 336 -144 R0 WINDOW 3 35 73 Left 2 SYMATTR Value 1k SYMATTR InstName R3 SYMBOL npn 288 256 R0 SYMATTR InstName Q2 SYMATTR Value BC847C SYMBOL res 96 528 R0 WINDOW 3 -47 71 Left 2 WINDOW 0 -37 45 Left 2 SYMATTR Value 470 SYMATTR InstName R4 SYMBOL res 96 704 R0 WINDOW 3 37 67 Left 2 SYMATTR Value 39k SYMATTR InstName R5 SYMBOL res -48 512 R0 WINDOW 0 -41 40 Left 2 WINDOW 3 -66 68 Left 2 SYMATTR InstName R6 SYMATTR Value 270k SYMBOL cap 80 496 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C1 SYMATTR Value 470p SYMBOL polcap -48 720 R0 SYMATTR InstName C3 SYMATTR Value 220µ SYMBOL cap 464 192 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C5 SYMATTR Value 10p SYMBOL res 336 528 R0 WINDOW 0 35 32 Left 2 WINDOW 3 37 62 Left 2 SYMATTR InstName R10 SYMATTR Value 5.6k SYMBOL res 336 704 R0 WINDOW 0 -53 28 Left 2 WINDOW 3 -50 58 Left 2 SYMATTR InstName R11 SYMATTR Value 10k SYMBOL res 336 384 R0 WINDOW 0 -59 43 Left 2 WINDOW 3 -59 70 Left 2 SYMATTR InstName R12 SYMATTR Value 2.2k SYMBOL res -32 864 R0 SYMATTR InstName R15 SYMATTR Value 470k SYMBOL cap 80 896 R0 SYMATTR InstName C6 SYMATTR Value 270pf SYMBOL cap 208 1024 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C7 SYMATTR Value 270pf SYMBOL polcap -160 448 R0 SYMATTR InstName C8 SYMATTR Value 1µ SYMBOL polcap 416 720 R0 SYMATTR InstName C9 SYMATTR Value 100µ SYMBOL polcap 752 64 R0 SYMATTR InstName C10 SYMATTR Value 220µ SYMBOL polcap 656 496 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C11 SYMATTR Value 1µ SYMBOL res 832 464 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R16 SYMATTR Value 100 SYMBOL res 832 592 R0 SYMATTR InstName R17 SYMATTR Value 1Meg SYMBOL res 96 16 R0 WINDOW 3 36 73 Left 2 SYMATTR Value 33k SYMATTR InstName R18 SYMBOL polcap -16 48 R0 SYMATTR InstName C12 SYMATTR Value 22µ SYMBOL polcap 192 192 R0 WINDOW 0 -40 9 Left 2 WINDOW 3 -47 54 Left 2 SYMATTR InstName C2 SYMATTR Value 22µ SYMBOL res 336 -16 R0 WINDOW 3 35 73 Left 2 SYMATTR Value 22k SYMATTR InstName R19 SYMBOL polcap 240 32 R0 SYMATTR InstName C13 SYMATTR Value 22µ SYMBOL res 304 1024 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName R8 SYMATTR Value 470k SYMBOL polcap 512 480 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C4 SYMATTR Value 10µ SYMBOL res 624 592 R0 SYMATTR InstName R7 SYMATTR Value 3.3k SYMBOL res 640 480 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R13 SYMATTR Value 1.5k SYMBOL pjf 256 528 M0 WINDOW 0 -24 6 Left 2 WINDOW 3 -49 37 Left 2 SYMATTR InstName J1 SYMATTR Value J175 SYMBOL res 624 -128 R0 SYMATTR InstName R20 SYMATTR Value 470 SYMBOL res 800 304 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R22 SYMATTR Value 100 SYMBOL cap 944 304 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C16 SYMATTR Value 0.1µ SYMBOL diode 1008 560 R0 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL diode 1120 304 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL cap 1440 560 R0 SYMATTR InstName C17 SYMATTR Value 10µ SYMBOL res 1440 160 R0 SYMATTR InstName R23 SYMATTR Value 220k SYMBOL res 1264 304 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R24 SYMATTR Value 22k SYMBOL pnp 1568 176 M180 SYMATTR InstName Q4 SYMATTR Value BC857C SYMBOL res 1712 -96 R0 SYMATTR InstName R25 SYMATTR Value 10k SYMBOL pnp 1952 176 R180 SYMATTR InstName Q5 SYMATTR Value BC857C SYMBOL res 2048 112 R0 SYMATTR InstName R26 SYMATTR Value 22k SYMBOL res 2048 512 R0 SYMATTR InstName R27 SYMATTR Value 22k SYMBOL res 2048 -112 R0 SYMATTR InstName R28 SYMATTR Value 22k SYMBOL polcap 2160 64 R0 SYMATTR InstName C18 SYMATTR Value 220µ SYMBOL res 1616 576 R0 SYMATTR InstName R29 SYMATTR Value 22k SYMBOL res 1872 576 R0 SYMATTR InstName R30 SYMATTR Value 22k SYMBOL cap 2176 544 R0 SYMATTR InstName C19 SYMATTR Value 1µ SYMBOL res 1440 -80 R0 SYMATTR InstName R31 SYMATTR Value 220k SYMBOL cap 1376 240 R180 WINDOW 0 24 56 Left 2 WINDOW 3 24 8 Left 2 SYMATTR InstName C21 SYMATTR Value 10µ TEXT -424 800 Left 2 !.tran 100 TEXT 632 -200 Left 3 ;Edward Rawde's weird sinewave oscillator. October 2024



I assume this is an intellectual challenge and not a real project? I suspect the jfet gate-channel is forward biased so the amplitude control section is my first place to look?

piglet

Hmm, that forward biased gate only happens during startup. Some other ideas:

The amp input bias R6 loads the Wien network too much - try lowering the Wien network impedance?

Replace R7 with constant current sink if you think slew rate is the issue?

Rectifier load is too heavy on the follower - increase R22?

Q5 base reference is not stiff enough - lower R26-27-28?

Q4 base current flows through rectifier - reference D1 instead to +12 rail?

Maybe later I will find time to explore...

piglet

"piglet" snipped-for-privacy@hotmail.com wrote in message news:ver5b2$2p6tm$ snipped-for-privacy@dont-email.me...

...

Thank you for taking the time to look at this piglet.

Yes I'm not likely to be building it any time soon. There was talk of sinewave oscillators here recently so I decided to see how easy or difficult it would be to make a sinewave oscillator without using lamps or thermistors. I think it might be easier if I used standard op amps.

It has been lowered in the circuit below.

Done

Added separate follower.

When trying other suggestions, it's hard to get a stable amplitude control loop.

The circuit below produces a reasonable looking sinewave but the rise time still seems to be slower than the fall time. It may be that the amplifier in use is not ideal for this.

Circuit version 2 follows.

Version 4 SHEET 1 2888 1280 WIRE 112 -144 -304 -144 WIRE 352 -144 112 -144 WIRE 640 -144 352 -144 WIRE 880 -144 640 -144 WIRE 1008 -144 880 -144 WIRE 1808 -144 1008 -144 WIRE 2080 -144 1808 -144 WIRE 2416 -144 2080 -144 WIRE 352 -128 352 -144 WIRE 112 -112 112 -144 WIRE 640 -112 640 -144 WIRE 2416 -96 2416 -144 WIRE 1008 -80 1008 -144 WIRE 2080 -80 2080 -144 WIRE 1808 -64 1808 -144 WIRE 352 -16 352 -48 WIRE 352 -16 256 -16 WIRE 112 0 112 -32 WIRE 112 0 0 0 WIRE 352 0 352 -16 WIRE 640 16 640 -32 WIRE 768 16 640 16 WIRE 880 16 880 -144 WIRE 2416 16 2416 -16 WIRE 2528 16 2416 16 WIRE 112 32 112 0 WIRE 256 32 256 -16 WIRE 2080 32 2080 0 WIRE 2080 32 1984 32 WIRE 2240 32 2080 32 WIRE 0 48 0 0 WIRE 768 64 768 16 WIRE 1008 64 1008 0 WIRE 1136 64 1008 64 WIRE 1808 64 1808 16 WIRE 1808 64 1712 64 WIRE 2528 64 2528 16 WIRE 640 80 640 16 WIRE 1136 80 1136 64 WIRE 1984 80 1984 32 WIRE 2240 80 2240 32 WIRE 352 128 352 80 WIRE 576 128 352 128 WIRE 1808 128 1808 64 WIRE 1920 128 1808 128 WIRE 2336 128 2304 128 WIRE 2416 128 2416 16 WIRE 256 144 256 96 WIRE 0 160 0 112 WIRE 112 160 112 112 WIRE 208 160 112 160 WIRE 768 176 768 128 WIRE 1136 176 1136 144 WIRE 1712 176 1712 64 WIRE 1808 176 1808 128 WIRE 2528 176 2528 128 WIRE 112 192 112 160 WIRE 208 192 208 160 WIRE 1008 192 1008 64 WIRE 400 208 256 208 WIRE 640 208 640 176 WIRE 640 208 464 208 WIRE 640 240 640 208 WIRE 704 240 640 240 WIRE 944 240 784 240 WIRE -304 256 -304 -144 WIRE 352 256 352 128 WIRE 112 304 112 272 WIRE 256 304 256 208 WIRE 256 304 112 304 WIRE 288 304 256 304 WIRE 1008 320 1008 288 WIRE 1104 320 1008 320 WIRE 1248 320 1184 320 WIRE 1376 320 1312 320 WIRE 1408 320 1376 320 WIRE 1504 320 1472 320 WIRE 1536 320 1504 320 WIRE 1664 320 1616 320 WIRE 1712 320 1712 240 WIRE 1712 320 1664 320 WIRE 1808 320 1808 256 WIRE 1808 320 1712 320 WIRE 2336 320 2336 128 WIRE 2416 320 2416 208 WIRE 2416 320 2336 320 WIRE 112 352 112 304 WIRE 2240 352 2240 176 WIRE 2240 352 2096 352 WIRE 208 384 208 256 WIRE 352 384 352 352 WIRE 352 384 208 384 WIRE -32 400 -144 400 WIRE 32 400 -32 400 WIRE 48 400 32 400 WIRE 352 400 352 384 WIRE 2416 432 2416 320 WIRE 2544 432 2416 432 WIRE -144 448 -144 400 WIRE 640 480 640 240 WIRE 656 480 640 480 WIRE 736 480 720 480 WIRE 1200 480 816 480 WIRE 1312 480 1200 480 WIRE 1504 480 1504 320 WIRE 112 496 112 448 WIRE 144 496 112 496 WIRE 448 496 144 496 WIRE 544 496 512 496 WIRE 640 496 640 480 WIRE 640 496 624 496 WIRE -32 512 -32 400 WIRE 16 512 -32 512 WIRE 112 512 112 496 WIRE 112 512 80 512 WIRE -32 528 -32 512 WIRE 112 528 112 512 WIRE 208 528 112 528 WIRE 352 528 352 480 WIRE 432 528 352 528 WIRE 2416 528 2416 432 WIRE 112 544 112 528 WIRE 352 544 352 528 WIRE 640 544 640 496 WIRE 640 544 544 544 WIRE 1984 544 1984 176 WIRE 1984 544 1888 544 WIRE 2544 544 2544 432 WIRE 1376 560 1376 320 WIRE 1808 560 1808 320 WIRE 640 576 640 544 WIRE 272 592 256 592 WIRE 1984 592 1984 544 WIRE 2240 592 2240 352 WIRE 1200 608 1200 480 WIRE 880 624 880 96 WIRE 880 624 704 624 WIRE 112 640 112 624 WIRE 208 640 208 624 WIRE 208 640 112 640 WIRE 880 640 880 624 WIRE -32 656 -32 608 WIRE 352 656 352 624 WIRE 352 656 -32 656 WIRE 1008 656 1008 320 WIRE 112 688 112 640 WIRE 112 688 -32 688 WIRE 640 704 640 672 WIRE -32 720 -32 688 WIRE 112 720 112 688 WIRE 352 720 352 656 WIRE 432 720 432 528 WIRE 880 736 880 704 WIRE -304 832 -304 336 WIRE -32 832 -32 784 WIRE -32 832 -304 832 WIRE -16 832 -32 832 WIRE 96 832 -16 832 WIRE 112 832 112 800 WIRE 112 832 96 832 WIRE 352 832 352 800 WIRE 352 832 112 832 WIRE 432 832 432 784 WIRE 432 832 352 832 WIRE 640 832 640 784 WIRE 640 832 432 832 WIRE 880 832 880 800 WIRE 880 832 640 832 WIRE 1008 832 1008 736 WIRE 1008 832 880 832 WIRE 1200 832 1200 688 WIRE 1200 832 1008 832 WIRE 1376 832 1376 624 WIRE 1376 832 1200 832 WIRE 1504 832 1504 544 WIRE 1504 832 1376 832 WIRE 1808 832 1808 624 WIRE 1808 832 1504 832 WIRE 1984 832 1984 672 WIRE 1984 832 1808 832 WIRE 2240 832 2240 672 WIRE 2240 832 1984 832 WIRE 2416 832 2416 608 WIRE 2416 832 2240 832 WIRE 2544 832 2544 608 WIRE 2544 832 2416 832 WIRE -304 864 -304 832 WIRE -16 880 -16 832 WIRE 96 896 96 832 WIRE 272 896 272 592 WIRE 1760 896 272 896 WIRE 1888 896 1888 544 WIRE 1888 896 1760 896 WIRE -144 1008 -144 512 WIRE -16 1008 -16 960 WIRE -16 1008 -144 1008 WIRE 96 1008 96 960 WIRE 96 1008 -16 1008 WIRE 208 1008 96 1008 WIRE 320 1008 272 1008 WIRE 544 1008 544 544 WIRE 544 1008 400 1008 WIRE 1312 1008 1312 480 WIRE 1520 1008 1312 1008 WIRE 1584 1008 1520 1008 FLAG 768 176 0 FLAG 1520 1008 sine-out FLAG -304 864 0 FLAG 0 160 0 FLAG 256 144 0 FLAG 32 400 In+ FLAG 144 496 In- FLAG 2528 176 0 FLAG 1760 896 amplitude-control FLAG 1664 320 vdet FLAG 1136 176 0 DATAFLAG 592 208 "round(($)*100)/100" DATAFLAG 400 528 "round(($)*100)/100" DATAFLAG 160 640 "round(($)*100)/100" DATAFLAG -80 400 "round(($)*100)/100" DATAFLAG 224 496 "round(($)*100)/100" DATAFLAG 64 688 "round(($)*100)/100" DATAFLAG 160 160 "round(($)*100)/100" DATAFLAG 160 304 "round(($)*100)/100" DATAFLAG 256 384 "round(($)*100)/100" DATAFLAG 400 128 "round(($)*100)/100" DATAFLAG -192 -144 "round(($)*100)/100" DATAFLAG 688 16 "round(($)*100)/100" DATAFLAG 1856 128 "round(($)*100)/100" DATAFLAG 2480 432 "round(($)*100)/100" DATAFLAG 2176 352 "round(($)*100)/100" DATAFLAG 1936 544 "round(($)*100)/100" DATAFLAG 1760 320 "round(($)*100)/100" DATAFLAG 2176 32 "round(($)*100)/100" DATAFLAG 1056 320 "round(($)*100)/100" DATAFLAG 1056 64 "round(($)*100)/100" SYMBOL res 96 -128 R0 WINDOW 3 36 73 Left 2 SYMATTR Value 15k SYMATTR InstName R1 SYMBOL voltage -304 240 R0 WINDOW 123 0 0 Left 0 WINDOW 39 -151 71 Left 2 WINDOW 3 -79 36 Left 2 SYMATTR SpiceLine Rser=0.1 SYMATTR Value 12 SYMATTR InstName V1 SYMBOL npn 48 352 R0 SYMATTR InstName Q1 SYMATTR Value BC847C SYMBOL res 96 176 R0 WINDOW 0 -46 26 Left 2 WINDOW 3 -68 68 Left 2 SYMATTR InstName R2 SYMATTR Value 150k SYMBOL npn 576 80 R0 SYMATTR InstName Q3 SYMATTR Value BC847C SYMBOL npn 288 256 R0 SYMATTR InstName Q2 SYMATTR Value BC847C SYMBOL res 96 528 R0 WINDOW 3 -47 71 Left 2 WINDOW 0 -37 45 Left 2 SYMATTR Value 470 SYMATTR InstName R4 SYMBOL res 96 704 R0 WINDOW 3 37 67 Left 2 SYMATTR Value 39k SYMATTR InstName R5 SYMBOL res -48 512 R0 WINDOW 0 -41 40 Left 2 WINDOW 3 -66 68 Left 2 SYMATTR InstName R6 SYMATTR Value 270k SYMBOL cap 80 496 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C1 SYMATTR Value 470p SYMBOL polcap -48 720 R0 SYMATTR InstName C3 SYMATTR Value 220µ SYMBOL cap 464 192 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C5 SYMATTR Value 10p SYMBOL res 336 528 R0 WINDOW 0 35 32 Left 2 WINDOW 3 37 62 Left 2 SYMATTR InstName R10 SYMATTR Value 5.6k SYMBOL res 336 704 R0 WINDOW 0 -53 28 Left 2 WINDOW 3 -50 58 Left 2 SYMATTR InstName R11 SYMATTR Value 10k SYMBOL res 336 384 R0 WINDOW 0 -59 43 Left 2 WINDOW 3 -59 70 Left 2 SYMATTR InstName R12 SYMATTR Value 2.2k SYMBOL res -32 864 R0 SYMATTR InstName R15 SYMATTR Value 47k SYMBOL cap 80 896 R0 SYMATTR InstName C6 SYMATTR Value 2.7n SYMBOL cap 208 1024 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C7 SYMATTR Value 2.7n SYMBOL polcap -160 448 R0 SYMATTR InstName C8 SYMATTR Value 1µ SYMBOL polcap 416 720 R0 SYMATTR InstName C9 SYMATTR Value 100µ SYMBOL polcap 752 64 R0 SYMATTR InstName C10 SYMATTR Value 220µ SYMBOL polcap 656 496 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName C11 SYMATTR Value 1µ SYMBOL res 832 464 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R16 SYMATTR Value 100 SYMBOL res 1184 592 R0 SYMATTR InstName R17 SYMATTR Value 1Meg SYMBOL res 96 16 R0 WINDOW 3 36 73 Left 2 SYMATTR Value 33k SYMATTR InstName R18 SYMBOL polcap -16 48 R0 SYMATTR InstName C12 SYMATTR Value 22µ SYMBOL polcap 192 192 R0 WINDOW 0 -40 9 Left 2 WINDOW 3 -47 54 Left 2 SYMATTR InstName C2 SYMATTR Value 22µ SYMBOL res 336 -16 R0 WINDOW 3 35 73 Left 2 SYMATTR Value 22k SYMATTR InstName R19 SYMBOL polcap 240 32 R0 SYMATTR InstName C13 SYMATTR Value 22µ SYMBOL res 304 1024 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 0 56 VBottom 2 SYMATTR InstName R8 SYMATTR Value 47k SYMBOL polcap 512 480 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C4 SYMATTR Value 10µ SYMBOL res 624 688 R0 SYMATTR InstName R7 SYMATTR Value 270 SYMBOL res 640 480 R90 WINDOW 0 -37 54 VBottom 2 WINDOW 3 -34 54 VTop 2 SYMATTR InstName R13 SYMATTR Value 470 SYMBOL pjf 256 528 M0 WINDOW 0 -24 6 Left 2 WINDOW 3 -49 37 Left 2 SYMATTR InstName J1 SYMATTR Value J175 SYMBOL res 624 -128 R0 SYMATTR InstName R20 SYMATTR Value 470 SYMBOL res 800 224 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R22 SYMATTR Value 10k SYMBOL cap 1312 304 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C16 SYMATTR Value 0.1µ SYMBOL diode 1360 560 R0 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL diode 1472 304 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL cap 1792 560 R0 SYMATTR InstName C17 SYMATTR Value 10µ SYMBOL res 1792 160 R0 SYMATTR InstName R23 SYMATTR Value 220k SYMBOL res 1632 304 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R24 SYMATTR Value 22k SYMBOL pnp 1920 176 M180 SYMATTR InstName Q4 SYMATTR Value BC857C SYMBOL res 2064 -96 R0 SYMATTR InstName R25 SYMATTR Value 10k SYMBOL pnp 2304 176 R180 SYMATTR InstName Q5 SYMATTR Value BC857C SYMBOL res 2400 112 R0 SYMATTR InstName R26 SYMATTR Value 22k SYMBOL res 2400 512 R0 SYMATTR InstName R27 SYMATTR Value 22k SYMBOL res 2400 -112 R0 SYMATTR InstName R28 SYMATTR Value 22k SYMBOL polcap 2512 64 R0 SYMATTR InstName C18 SYMATTR Value 220µ SYMBOL res 1968 576 R0 SYMATTR InstName R29 SYMATTR Value 22k SYMBOL res 2224 576 R0 SYMATTR InstName R30 SYMATTR Value 22k SYMBOL cap 2528 544 R0 SYMATTR InstName C19 SYMATTR Value 1µ SYMBOL res 1792 -80 R0 SYMATTR InstName R31 SYMATTR Value 220k SYMBOL cap 1728 240 R180 WINDOW 0 24 56 Left 2 WINDOW 3 24 8 Left 2 SYMATTR InstName C21 SYMATTR Value 10µ SYMBOL npn 704 576 M0 SYMATTR InstName Q6 SYMATTR Value BC847C SYMBOL diode 896 736 M0 WINDOW 0 46 -1 Left 2 WINDOW 3 44 30 Left 2 SYMATTR InstName D3 SYMATTR Value 1N4148 SYMBOL diode 896 640 M0 WINDOW 0 44 2 Left 2 WINDOW 3 42 32 Left 2 SYMATTR InstName D4 SYMATTR Value 1N4148 SYMBOL res 336 -144 R0 WINDOW 3 35 73 Left 2 SYMATTR Value 1k SYMATTR InstName R3 SYMBOL res 864 0 R0 SYMATTR InstName R9 SYMATTR Value 10k SYMBOL npn 944 192 R0 SYMATTR InstName Q7 SYMATTR Value BC847C SYMBOL polcap 1120 80 R0 SYMATTR InstName C14 SYMATTR Value 220µ SYMBOL res 992 -96 R0 SYMATTR InstName R14 SYMATTR Value 100 SYMBOL res 992 640 R0 SYMATTR InstName R21 SYMATTR Value 3.3k SYMBOL res 1200 304 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R32 SYMATTR Value 100 SYMBOL cap 1488 544 M180 WINDOW 0 24 56 Left 2 WINDOW 3 24 8 Left 2 SYMATTR InstName C20 SYMATTR Value 0.1µ TEXT -424 800 Left 2 !.tran 0 100 0 0.0001 TEXT 632 -200 Left 3 ;Edward Rawde's weird sinewave oscillator. V2. October 2024

formatting link
has a pretty good example of a sine wave oscillator. I've speculated that a four quadrant analogue multiplier could offer a better gain control mechanism.

formatting link
though it is hideously expensive. The simulation I worked up used two with the second one controlling a quadrature input to give you smooth control of the frequency of oscillation in addition to its amplitude.

I thought about building one, but there's no obvious application.

"Bill Sloman" snipped-for-privacy@ieee.org wrote in message news:vesrnm$35jgr$ snipped-for-privacy@dont-email.me...

Thanks Bill.

It may be that there's something wrong with the concept I'm trying to use because the circuit below can't find a control point which produces sine waves. It just produces all or nothing at a repetition rate of about 80 Hz. I saw similar issues while simulating the discrete circuit.

Version 4 SHEET 1 2164 680 WIRE -384 -48 -560 -48 WIRE -240 -48 -384 -48 WIRE -80 -48 -240 -48 WIRE 144 -48 -80 -48 WIRE 864 -48 144 -48 WIRE 992 -48 864 -48 WIRE 1104 -48 992 -48 WIRE 864 -16 864 -48 WIRE 992 -16 992 -48 WIRE -240 32 -240 -48 WIRE -80 32 -80 -48 WIRE 64 64 -16 64 WIRE 192 64 64 64 WIRE 304 64 272 64 WIRE -560 80 -560 -48 WIRE -16 80 -16 64 WIRE 304 96 304 64 WIRE 336 96 304 96 WIRE 448 96 416 96 WIRE 544 96 512 96 WIRE 592 96 544 96 WIRE 688 96 656 96 WIRE 736 96 688 96 WIRE 864 96 864 64 WIRE 864 96 816 96 WIRE -384 112 -384 -48 WIRE 144 112 144 -48 WIRE 1104 112 1104 -48 WIRE 64 128 64 64 WIRE 112 128 64 128 WIRE 864 128 864 96 WIRE 1072 128 864 128 WIRE 304 144 304 96 WIRE 304 144 176 144 WIRE 1216 144 1136 144 WIRE -240 160 -240 112 WIRE -176 160 -240 160 WIRE 112 160 -176 160 WIRE 544 160 544 96 WIRE 688 160 688 96 WIRE 992 160 992 64 WIRE 1072 160 992 160 WIRE 864 176 864 128 WIRE -240 192 -240 160 WIRE -80 208 -80 112 WIRE -16 208 -16 144 WIRE -16 208 -80 208 WIRE -80 224 -80 208 WIRE -16 224 -16 208 WIRE 992 224 992 160 WIRE 96 288 32 288 WIRE -560 336 -560 160 WIRE -384 336 -384 176 WIRE -384 336 -560 336 WIRE -240 336 -240 272 WIRE -240 336 -384 336 WIRE -80 336 -80 304 WIRE -80 336 -240 336 WIRE -48 336 -80 336 WIRE -16 336 -16 320 WIRE -16 336 -48 336 WIRE 144 336 144 176 WIRE 144 336 -16 336 WIRE 544 336 544 224 WIRE 544 336 144 336 WIRE 688 336 688 224 WIRE 688 336 544 336 WIRE 864 336 864 240 WIRE 864 336 688 336 WIRE 992 336 992 304 WIRE 992 336 864 336 WIRE 1104 336 1104 176 WIRE 1104 336 992 336 WIRE -48 352 -48 336 WIRE -560 384 -560 336 WIRE 96 384 96 288 WIRE 1216 384 1216 144 WIRE 1216 384 96 384 WIRE -176 448 -176 160 WIRE -48 448 -48 416 WIRE -48 448 -176 448 WIRE 16 448 -48 448 WIRE 96 448 80 448 WIRE 304 448 304 144 WIRE 304 448 176 448 WIRE 432 448 304 448 WIRE 480 448 432 448 FLAG -560 384 0 FLAG 432 448 output SYMBOL OpAmps\\OP07 144 80 R0 SYMATTR InstName U1 SYMBOL voltage -560 64 R0 WINDOW 123 0 0 Left 0 WINDOW 39 24 124 Left 2 SYMATTR SpiceLine Rser=0.1 SYMATTR InstName V1 SYMATTR Value 12 SYMBOL res 192 432 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 12k SYMBOL cap 80 432 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C1 SYMATTR Value 15n SYMBOL cap -32 416 R180 WINDOW 0 -33 54 Left 2 WINDOW 3 -49 18 Left 2 SYMATTR InstName C2 SYMATTR Value 15n SYMBOL res 288 48 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 1700 SYMBOL res -224 128 R180 WINDOW 0 36 76 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName R4 SYMATTR Value 24k SYMBOL polcap -32 80 R0 SYMATTR InstName C3 SYMATTR Value 10µ SYMBOL res -224 288 R180 WINDOW 0 36 76 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName R5 SYMATTR Value 24k SYMBOL polcap -400 112 R0 SYMATTR InstName C4 SYMATTR Value 100µ SYMBOL pjf 32 224 M0 WINDOW 0 -28 43 Left 2 WINDOW 3 -53 90 Left 2 SYMATTR InstName J1 SYMATTR Value J175 SYMBOL res -96 208 R0 WINDOW 0 -39 37 Left 2 WINDOW 3 -48 70 Left 2 SYMATTR InstName R6 SYMATTR Value 1k SYMBOL res -96 16 R0 WINDOW 0 -48 37 Left 2 WINDOW 3 -69 66 Left 2 SYMATTR InstName R8 SYMATTR Value 220k SYMBOL res 432 80 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R9 SYMATTR Value 1k SYMBOL cap 512 80 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C5 SYMATTR Value 0.1µ SYMBOL diode 528 160 R0 WINDOW 0 39 34 Left 2 WINDOW 3 31 68 Left 2 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL diode 656 80 R90 WINDOW 0 64 31 VBottom 2 WINDOW 3 -30 29 VTop 2 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL cap 672 160 R0 SYMATTR InstName C6 SYMATTR Value 0.1µ SYMBOL res 832 80 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R11 SYMATTR Value 22k SYMBOL cap 848 176 R0 SYMATTR InstName C7 SYMATTR Value 1µ SYMBOL res 848 -32 R0 WINDOW 0 41 43 Left 2 WINDOW 3 37 73 Left 2 SYMATTR InstName R12 SYMATTR Value 100k SYMBOL OpAmps\\OP07 1104 80 R0 SYMATTR InstName U2 SYMBOL res 1008 80 R180 WINDOW 0 -53 70 Left 2 WINDOW 3 -49 43 Left 2 SYMATTR InstName R10 SYMATTR Value 10k SYMBOL res 1008 320 R180 WINDOW 0 36 76 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName R13 SYMATTR Value 2k TEXT -544 360 Left 2 !.tran 10

if noise is more important than waveform, I found amplitude control by clipping gave the lowest noise. The oscillators in this...

formatting link

...are amplitude stabilised by clipping.

On a sunny day (Wed, 16 Oct 2024 16:55:24 -0400) it happened "Edward Rawde" snipped-for-privacy@invalid.invalid wrote in <vep97r$2cpo$ snipped-for-privacy@nnrp.usenet.blueworldhosting.com>:

Cannot use your funny numbers but as you ask for oscillators and thoughts about those, here some of mine Long ago in the early IBM PC days, (19 eighties?) I needed some audio sweep sine generator programmed a sine wave table in an EPROM, 8 bits, added a DAC chip used a 4046 as variable oscillator, added a 4040 binary counter, used that to drive the EPROM. resulted in a nice audio range sweep. Of course with a decent sound card and Linux these days use 'sox' for the audio range to generate tones and sweeps etc:

formatting link
use sox in Linux on a Raspberry Pi... to make nice test tones. Good sound card helps. Sine tables you can of course use in a micro, using that in a Microchip PIC micro here for Fourier transform
formatting link
is a FPGA, ever higher frequencies, video DAC on FPGA I have here,
formatting link
for RF the good old LC Jfet makes a nice sinewave too, up to hundreds of MHz There are many more oscillator types, crystal, ceramic to several GHz, that come close to a sinewave for example as local oscillator in satellite LNBs, 2 ceramic resonator oscillators here:
formatting link
chips even output a sine wave, old modem chips

Not to mention my Fazley keyboard... press a key for a note, you can select 'distortion' by selecting an instrument.

more:

formatting link
more:
formatting link
formatting link
https://panteltje.online/pub/6MHz_xtal_oscillator.gif https://panteltje.online/pub/2.4GHz_twisted_oscillator_IMG_3629.GIF 40_mV_oscillator_IMG_3597.GIF that is a JFET

There are many more....

Could that just be second harmonic distortion? You could test the amplifier by uncoupling the Wien network and injecting test inputs.

Elsewhere I think your amplitude control problems could be simply due to too much gain.

Perhaps, but I've not so far been able to get the circuit I posted in response to Bill to produce a sine wave no matter what I do with the control loop gain. It either grows to clipping or dies.

If the gain of an oscillator loop is close to 1.00, say 0.98 to 1.02, one can add in a small tweak, a crude multiplier or even a clipper, to make up the difference.

Of course, with many-bit DACs being cheap nowadays, it's easier to do a DDS sine wave generator, and get super-precise frequency and amplitude. A 70 cent uP can do that, and even use PWM to eliminate the DAC.

All sorts of elegant analog circuits are blown away by cheap digital junk. Sigh.

I do a lot of instant-start LC oscillators as the timebase of triggered delay generators. I let them clip just a bit to stabilize amplitude.

That's the main purpose behind having a thermistor or filament bulb in the f/b path.

Put the output you get from that through a spectrum analyzer and it won't look quite so super-duper.

Of course a DDS needs a post-DAC lowpass filter, but a 16 or 20 bit DAC can make extremely good sine waves.

Just don't push the Nyquist rate.

Sure, but why use thermistors or filaments if you don't have to? Filaments don't last forever, particularly not if you drop your equipment, and filaments make me think of something like a 5U4. I forget when I last saw a filament. House lamps don't even have them now.

I'm trying to make a low cost oscillator which produces the cleanest 1K Hz sinewave I can get, using only resistors, capacitors and semiconductors.

There are plenty of examples online, but some of them don't seem to simulate. Whether that's because they do work in reality but not in simulation is hard to say.

A real-world oscillator needs some kind of stimulus to start up. This could be a voltage 'shock' at switch-on or just inherent noise in the circuitry. JL informs me LTSpice doesn't have such a stimulus unless you provide it yourself. I suspect that's the main reason you will find oscillators difficult to get started in simulation.

I don't seem to be having startup problems, startup is fine but then it goes up to clipping or dies to nothing. I don't find this surprising and I'm wondering whether a real circuit would do the same.

Yes, it's just what they do without some kind of dynamic gain control. The overall loop gain needs to be 1. Fixed resistors might give you that for a few seconds, but when something warms up, you're either damped or through the rails.

Yes. That's why I have a control loop which in theory should do that.

Any calculator will show that repeated multiplication of a number slightly greater than 1 increases without limit. In practice an amplifier will limit at or near the supply rail. And if the number it slightly less than 1 it will reduce to 0.

A Wien bridge has an overall voltage gain of 1/3 so the circuit needs to be held at a gain of 3.

As long as it starts up then the gain control loop should be able to hold the gain at whatever is needed for a specific output level. I'm still working on that.

Fixed resistors might give you that for a

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required