J
Joerg
Guest
Tim Wescott wrote:
Yeah, I've looked at the Cypress PSoC for that. The bigger ones can do
it without redlining. Probably some others as well. But I'd need someone
to do the uC coding, that's really not my turf.
Another option would be to use the 4046 as Whit3rd mentioned. But this
would need to be heavily filtered to make a nice sine, or followed by a
DDS module where the 4046 acts as a reference. Also, the XOR results in
a frequency-dependent phase error which I can't have. So I'd have to
plop a PID between that and the VCO to get rid of the phase error.
Possible, but gets busy. However, someone wrote that one don't need no
Ph.D. for a PID
--
Regards, Joerg
http://www.analogconsultants.com/
On Sun, 14 Jul 2013 08:19:09 -0700, Joerg wrote:
Bill Sloman wrote:
On Sunday, 14 July 2013 08:35:57 UTC+10, Joerg wrote:
Folks, Has anyone tried this? I have to lock a PLL around 10kHz into a
certai odd phase angle. No problem to do that with a bunch of hardware
like usual. If one were to do that with the PC via a USB sound card,
the PC could measure the phase angle and then adjust a software tone
generator (output via sound card) to always match the phase angle even
if stuff in the outside resonant structure changes. I need the PLL to
follow within 10msec or so. Seems like the 1msec USB latency could get
in the way. Or is there a trick to circumvent that? Since sound chips
have frequency responses up to 22kHZ and rarely hiccup I could imagine
there is a way.
If the oscillator in the phase-locked loop were a DDS chip, where you
can manipulate both phase and frequency digitally, it could be
reasonably straightforward. The messy bit is that it is going to take
your sound card an appreciable time to accumulate enough data on the
oscillator to which you are locking and the oscillator that you are
trying to lock, to let you calculate your frequency correction, so you
probably have to get the frequency pretty much exactly right before you
can start fiddling with the phase - as long as the frequencies aren't
locked, the desired phase correction will drift with time, and if you
don't know precisely when the USB link will dump the phase correction
into the DDS chip, you won't be able to get it exactly right.
But you should be able to get close enough for all practical purposes
pretty rapidly. As in the old engineer/physicist joke.
I would do this differently, not via sound card. The oscillator can be
controlled via direct register write into a FTDI-sumpthin' chip, and the
phase error can be read back the same way. The plant response is a bit
sluggish, a few hundred Hz bandwidth. Control response needed to get the
PLL to within a few Hertz can be 10-20msec.
It's all doable, I just don't know whether the USB link will hold up.
Use a microprocessor that talks to the Windows machine via USB, and
implements the PLL?
Yeah, I've looked at the Cypress PSoC for that. The bigger ones can do
it without redlining. Probably some others as well. But I'd need someone
to do the uC coding, that's really not my turf.
Another option would be to use the 4046 as Whit3rd mentioned. But this
would need to be heavily filtered to make a nice sine, or followed by a
DDS module where the 4046 acts as a reference. Also, the XOR results in
a frequency-dependent phase error which I can't have. So I'd have to
plop a PID between that and the VCO to get rid of the phase error.
Possible, but gets busy. However, someone wrote that one don't need no
Ph.D. for a PID
--
Regards, Joerg
http://www.analogconsultants.com/