On a sunny day (Mon, 10 May 2010 12:32:38 -0700) it happened Joerg wrote in :
VCO,
Well, if that takes so much time, say more then 2 hours, I think you need more time to go shopping or order the soundcard thing. Plus put it in a PC, plus write the soft, plus it is not real time adjustable with a pot, plus it is not GREEN, it sucks power, plus well it is all so obvious. Who knows, you may not reach your pension... may as well build it now!
Some manufacturers make 4-6 channel codecs suitable for sound cards and home theater systems. These are typically specifies for frequencies above 3 Hz.
How low does a typical COTS stereo amplifier go ? While the amplitude response may be bad, why would the phase shift characteristics suffer from this ?
The cap tolerances would indeed cause problems.
For low production run devices, it would be perfectly feasible to use production measurements and software to compensate for the capacitor variations.
In discussing, which is the "best" way of implementing something, you always must consider the expected size of the production run. It is quite different to design a one off product or design a product for
100, 10,000 or 1,000,000 unit production / year, each requiring a different approach.
The one I use for testing small power supplies for international power standards or 400Hz aircraft supplies goes to under 10Hz. My sound card on the lab bench goes to 3Hz where it's 6dB down.
Yup, that's what messes up the phase down there.
It's temperature and often drive voltage dependent, for example if they used a Z5U cheapie in there. You can't tell even when looking at it.
Sure, that's why cost thinking has to go all the way, not just parts and labor.
--
Regards, Joerg
http://www.analogconsultants.com/
"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
If you are going to a digital approach, programming a cordic would be my advice. In the pre-internet days, the cordic was a great secret bit of code stolen from the early scientific calculators, and who knows where they got it. Nowadays it is all over the internet. The cordic was the heart of many a modem. We did one where the cordic was used in DTMF dialer. Needless to say it set a new standard in DTMF due to the quality of generating twin tones via DSP. Of course, it was a quality level that wasn't needed, but once you have a cordic programmed, you might as well use it. We even used the cordic in the FSK fallback, both in generating the FSK and in demod. For demod, the incoming signal was sampled and phrase unwrapped via the cordic, then the ramp (unwrapped phase versus time) was fitted via least mean squares to get the slope, which in turn yielded the incoming frequency.
Sitting over in Terman is a really great Phd dissertation on the cordic, better than any book I every read regarding the algorithm. My recollection is the author's name is Ahmed. Searching Stanford's Socrates doesn't seem to dig it up though.
There is a circuit that will do it, but it isn't electronic. It's a motor driving two AC generators (permanent magnet stepping motors are suitable) with angle adjustment for the stators to get to exactly the 120 degree shift you want.
If you want the audio range, an AIFF file with sine on left channel and cosine on the right channel is possible (but that doesn't have a continuous frequency adjust knob). The
120 degree shift is a linear combination of sine and cosine waves (look at the angle-sum formula). Your iPod or a sound card can reproduce the (audio-range) waveforms from the file, of course.
The so-called all-pass Hilbert filter is not generally a practical project to cobble together in an afternoon. What one CAN do, is to make a square wave master clock, use flip-flops to generate slave clocks locked to the master, and then phase-lock sinewave generators to the slave clocks.
Another approach is to heterodyne. Mix up to some lowish IF, filter, mix back down. Apply phase shift at the IF to make the overall phase delay approximately 90 degrees. This works pretty well if the input frequency range (in octaves) isn't too wide, but it takes some care.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Perfectly OK, if the channels are truly discrete (no psychoacoustic matrix surround generation) and transparent (no band limiting in the .1 channel etc.).
You can precalculate a few (thousand) future samples into memory buffers (queue) and then let the sound card output the buffer at the speed specified by the sample clock. The buffers need to be updated, before the sound card has consumed all previous samples.
The actual sample generation is done in the same way as in DDS with a numerically controlled oscillator (NCO).
You need a 32 bit integer variable "phase accumulator" which is updated with a specific value at each iteration of a program loop, which defines the frequency. Take the high bits from the phase accumulator and use it to index a sine table. The value from the sine table is inserted into the queue going into the sound card (or written e.g. to a .WAV file).
To generate signals with a fixed phase relative to the master signal, take the current phase accumulator value, add a constant (the phase shift) and using the upper bits, access sine look up table and insert result into the queue for a different audio channel.
If the sample values are written into a .WAV file, the data can be replayed using any audio player.
The sine instruction is surprisingly fast on some x86 processors, so it could replace the sine look-up table. However, the phase accumulator must be an integer register, which overflows in a predictable way. A floating point register can not be used as a phase accumulator, since after long time, the least significant bits are lost and the sine function returns a constant value.
0.1% resistors are cheap these days. Where can you buy PS caps of any tolerance ? NPO ceramic parts are available, but $$$$.
Best regards, Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
** Still about 25 times the cost of 1% MF and of no benefit when the caps used are only 1% tolerance.
** LCR Components make polystyrene caps of 1% tolerance & Farnell / Newark sell them - among others.
formatting link
$1.54 each in *one off* cheap enough for you - eh ???
** Really ???
1% tolerance * silvered mica * caps are available in values like 10nF for big bucks.
BTW:
What the HELL is the point of your TEDIOUS BLOODY nit picking ????
Cheap enough. I've heard a lot of complaints about poor availability of PS caps and PP caps.
Yeah, 18125A103FAT2A AVX 10nF 1% NPO in 1812 form factor, but about five clams a pop in tens.
formatting link
Apparently, not at the moment, Phil. How about yourself?
Best regards, Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
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.