Stepped sine wave

This is a continuation of the 50kHz VCO thread I started last week. I tried the stepped sine wave idea as suggested by James A, and Phil H. The circuit clocks a MC14017 at 10x(F) to make a stepped sine wave at frequency (F). The ten outputs from the 4017 are sent through appropriate resistors and into the summing junction of an opamp. Here=92s a =91scope shot of the stepped output overlaid with a sine wave.

formatting link

The resistor values were chosen to intersect the sine wave at each new phase. (R(n) =3D 1/sin^2(n*18degrees))

Approximate values, R0=3Dopen, R1=3DR9=3D105k, R2=3DR8=3D28.9k, R3=3DR7=3D1=

5.3k, R4=3DR6=3D11k, R5=3D10k. all 1% resistors.

Here=92s the spectrum as recorded by an SRS770 spectrum analyzer.

formatting link

The 2nd harmonic is only down by 50dB. I don=92t understand why it=92s so big. Is there some way to do better than this? The 9th and 11th harmonics are big and then the 19th and 21st.

Thanks George H.

Reply to
George Herold
Loading thread data ...

George, I don't remember the discussion. Probably didn't read it. But if you are using a 4017 (decade counter), then I'm guessing that you are enabling one resistor at a time while disabling others (they tie to the summing junction from each, moving output pin.) This worries me a little, mostly because of delay and the fact that you are turning off one while turning on another, but don't control that very well. I also don't know what you are doing to filter the steps.

Anyway, I'd have wanted to consider, instead, a Gray-coded (actually, the real inventor is Boudot, I think, but Bell Labs was patenting everything in a flurry in the mid 1900's and who could remember Boudot so long ago?) design where you only change one of the outputs at a time. Not two.

Anyway, I'll let the big hitters who probably did read the earlier thread tell you what is more likely. Just something that crossed my mind, is all.

Jon

Reply to
Jon Kirwan

=3D15.3k,

s so

Hi Jon, Thanks for that. The 4017 is just too simple! I'm hoping all the swithing transients can just be filtered away. I put a little tweaker pot on the smallest R5 resistor and was able to get everything down below 60dB, so I'm thinking this is just a resistor tolerance/ selection issue. I was just twisting different resistors together to get the approximate values, and didn't measure any of them. I'll try really nailing the values I want.

Oh I'll add some multi-pole low pass on the back end of this.. but that will do nothing for the lower order harmonics.

George H.

Reply to
George Herold

No problem. In the interim, I did a quick search for summing junctions and Gray codes and came up with this link:

formatting link

I have NOT read it. But it looks about right to me as a zero order approximation to what I was thinking about. I have never considered doing what you are doing, but your writing sprung two things immediately to mind. One is doing Fourier analysis (which you should have already done, I imagine) and the other is that you are possibly changing two outputs at once and with that plus ripple carry stuff I get kind of worried. All this would make me want to go to theory to calculate my expectations and make sure they matched experience in your testing. If I can't match them up, that means I don't know enough and need to read more.

Yeah. And you know what that means. Things should be as simple as needed but no more so.

I completely understand the problem in trying to filter out

2nd harmonics from the 1st. So yeah, that's not really a good answer. Which is why I didn't really suggest it, but instead went to Gray codes and the like.

Check out the link and see if it triggers anything. I will read it a little later on, it's interesting to me regardless. But it might apply from a cursory glance at it.

Jon

Reply to
Jon Kirwan

Better would be to have said, "and need to imagine, think, and possibly read more." It does more for the soul.

Jon

Reply to
Jon Kirwan

If you used 1% resistors, then getting 50dB was better than expectations (1% error is about 40dB down, and if everything adds the wrong way you'll get at least twice that).

0.1% resistors will, in theory, get you around 60dB down.

The rule of thumb for this sort of thing is that you can really only expect a "by the book" nulling circuit (which is what you have) to stomp things down by about 40dB, and if you really pull out the stops and hand- tweak things then you can maybe get 60dB -- until someone breaths.

Instrument makers _can_ do better than this, but its only "routine" inasmuch as the methods they use (shielding, tweaking, gold plating,

1000% overbuilt circuits, "Only Bob can do that" procedures, etc.) are routine.
--
www.wescottdesign.com
Reply to
Tim Wescott

We get over 60 dB in our arbs, but it's hard. We start with a 16 bit differential current output DAC. The tough part is the downstream amplifiers, especially past a couple of MHz.

There are major-brand RF signal generators with -20 dB harmonics.

John

Reply to
John Larkin

I

=92s

=3D15.3k,

=92s so

Thanks Tim, I kinda figured that out on my own.

George H.

Reply to
George Herold

=A0I

=92s

7=3D15.3k,

=92s so

l
-

That's a feature not a bug, you get a higher frequency generator 'cause of the big 3rd harmonic. :^)

We've got this el-cheapo RF generator that even has the 3rd harmonic frequencies listed on the dial.

George H.

Reply to
George Herold

50 dB is only 0.3%, which isn't too bad. That might easily be due to the output impedances of the 4017 drivers, or to the resistor tolerances. Does it get better or worse when you change VDD? If so, it's probably the output impedance.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

I posted this 8 years ago...

formatting link

I also have this book...

"Sequency Theory, Foundations and Applications" Henning F. Harmuth Academic Press, 1977 ISBN: 0-12-014569-3

which covers Walsh Functions in gruesome detail ;-)

...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

I

=3D15.3k,

=92s so

Yeah, I was thinking about the output impedance. (I didn't looked at the outputs from the 4017). When I decreased the supply voltage the

2nd harmonic was roughly constant while everything else went down. I added a tweaker on the lowest resistance output and got everything below the 9th close to 60 dB down. Which is almost beer time, except it's only at 1kHz.

George H.

Reply to
George Herold

I picke up Walsh's original paper (redone, actually, in Latex and error corrected as it had a few in the original article) from the web, today. The paper is "A Closed Set of Normal Orthogonal Functions." I will be reading it more thoroughly over the next couple of days. Also, already listed the above link which is a nice, short overview with two examples in it. Finally, there are a bevy of books (some of them nearly 1300 pages in length) on the subject regarding making and building synthesizers. I'll be ordering a few before the end of the week.

A whole world has opened up on this subject for me and I can bring over Laplace and Fourier. Actually, it is almost easy for me to see how to apply this with almost any starting wave shape, not just sine/cosine or square wave. Which probably isn't terribly practical, but interesting all the same. (Must be some mathematician out there has already explored the use of triangle, sawtooth, and pretty much any arbitrary basic shape.)

I will read your PDF, as well. :)

Jon

Reply to
Jon Kirwan

So -- how easily can you filter that out? IIRC you needed a 3:1 frequency span -- can you stand having nine filters or so, and switching between them (I suppose if you're frequency modulating the answer is "NO!").

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim

Well, they come in HC too. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
 Click to see the full signature
Reply to
Phil Hobbs

=A0I

w

R7=3D15.3k,

=92s so

to

so,

t

Cool. I didn't think they made those in 'HC, but DigiKey says you're right.

-- Cheers, James Arthur

Reply to
dagmargoodboat

It's the physicist's version of the 555. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
 Click to see the full signature
Reply to
Phil Hobbs

=A0I

w

R7=3D15.3k,

=92s so

o

o,

I posted (and Google lost) a long post, the gist of which was:

(view in fixed font) desired, G.H. desired, scaled to George's values theoretical 'scope actual (volts) (volts) (div) (div)

0.000 0.000 0.2 0.2 0.093 0.079 0.93 1.0 0.323 0.287 2.82 2.8 0.577 0.545 5.17 5.2 0.768 0.753 7.07 7.05 0.832 0.832 7.8 7.8

(1rst column is the expected outputs based on your resistor values)

So, the outputs are loaded, but you've tweaked the resistors from the reported values to compensate. That's device-dependent. Might wanna up the resistances or switch to 'HC.

The actual waveform looks pretty good. Some of the steps look a little mis-matched, e.g. 2-8 and 3-7

-- Cheers, James Arthur

Reply to
dagmargoodboat

I

=92s

=3D15.3k,

=92s so

e quoted text -

Oh, the single low pass has to start before the 9th harmonic of the lowest frequency (~30kHz*) so I'm thinking around 200 kHz. The resistors have to take care of the lower harmonics. (which is why the

2nd is so disturbing) 9 or 10, 0.1% resistors are not 'out of the question' only ~$2 + the cost of placing them. Though 1% would be nicer.

George H.

*the specs are still a bit fluid, which is a good thing.
Reply to
George Herold

=A0I

w

R7=3D15.3k,

=92s so

to

so,

t

The MC claims 16 MHz, and goes to 18V (it's nice running everything off +/-15 volt supplies) Should I have ordered some HC too?

George H.

t -

Reply to
George Herold

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.