Shop OBEX P1 Docs P2 Docs Learn Events
100mV RF to Digital — Parallax Forums

100mV RF to Digital

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2012-07-14 10:21 in Accessories
I'm working on a project to control the VFO of a 40m MFJ Cub QRP transceiver, using a Prop in a digital PLL feedback loop. The VFO is a VCO controlled, nominally, by a potentiometer. By tapping the center pole of the pot and applying a voltage from an op amp fed with a DUTY-mode counter output, the Prop can control the transceiver's transmit and receive frequency. The challenge I've faced is getting the meager 100mV P-P sine-wave output from the VCO converted to a reliable digital feedback signal -- with no false edges -- that the Prop can read to determine the actual VCO frequency and phase. Here's the circuit that I'm using at the moment:

attachment.php?attachmentid=93928&d=1341286733

The J310 JFET provides a high-impedance input from the VCO with minimal loading feedback that could distort the VCO's waveform. The common-source output feeds a CMOS inverter configured as a high-gain amplifier (due to the 10M feedback resistor). The output of the amplifier is low-pass filtered and fed into an inverting buffer stage. The output of that stage feeds back through a 6pF cap to the input of the first stage to provide a little bit of hysteresis -- hopefully to reduce the effects of oscillation.

The circuit seems to work fine, but I wonder if there's a simpler (read "cheaper") way to accomplish the same end. A high-speed JFET-input op amp and a few passives could do the job, but for a lot more money. Feeding the VCO output directly to a sigma-delta-style Prop input distorts the VCO's waveform too much to use for transmitting, so that's out. Any ideas? Beau?

BTW, here's a photo of my test bed for the frequency controller: The PPDB has proven to be the perfect platform for testing the circuitry and DPLL code. The knob controls a contact-closure quadrature encoder for changing the target frequency, and the LED display shows the actual VCO frequency (subtracted from the 12 MHZ IF). Since the VCO ranges from 4.94 MHz to 5.00 MHz (7.06 MHz to 7.00 MHz RF input range), I found it necessary to change the Prop's 5MHz crystal to 4.9152 MHz (one that I had in stock). This prevents the long-term jitter from the Prop counter's PLL near the former 5 MHz clock frequency from causing similar jitter in the transceiver's VCO.

attachment.php?attachmentid=93927&d=1341286733

Thanks,
-Phil, AD7YF
648 x 486 - 81K
620 x 240 - 3K

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-07-03 01:20
    Dang... I was just getting ready to go to bed...

    What if you created a false ground reference that was close to the I/O threshold and lifted the current ground reference? ... I assume the the 100mV is at the 1k 220pF junction?

    You could also try increasing the 1k value off of the J-fet.

    ...let me sleep on it.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-03 09:14
    You said, "Feeding the VCO output directly to a sigma-delta-style Prop input distorts the VCO's waveform...", but is that true also with the FET follower? If more isolation or gain is required, maybe a second transistor stage. FET then direct to Prop does seem like the simplest, cheapest solution.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-03 10:07
    Thanks for the feedback, guys!
    What if you created a false ground reference that was close to the I/O threshold and lifted the current ground reference?
    I've done that when the signal level is much higher, but 100 mV is not adequate to guarantee straddling the logic threshold when the bias is fixed, let alone getting a 50% duty cycle, which I need for the phase detection.
    ... I assume the the 100mV is at the 1k 220pF junction? You could also try increasing the 1k value off of the J-fet.
    Both the JFET gate and the source. Since it's a follower, it doesn't amplify the voltage; it just isolates the VCO from what comes after.
    You said, "Feeding the VCO output directly to a sigma-delta-style Prop input distorts the VCO's waveform...", but is that true also with the FET follower?
    No, the FET seems to do a good job of isolating the VCO from the rest of the circuit.

    BTW, I tried a common-source JFET circuit to get some voltage gain. The Spice simulation showed a lot more gain than my circuit did, though.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-07-03 10:53
    A couple of circuits....

    The first one with the LC is a typical re-gen configuration. The second one is a derivative that should accept your 100mV signal just fine.

    The basic idea is the same for both. The 100k and 100nF cap automatically bias and track the transistor threshold across the B-E junctions. In the case of the LC it becomes part of the bias loop. In the case of the RF it's 'injected' into the bias loop.

    In a way this circuit is similar to connecting the output of your inverter to the input ... which forms a bias loop for that circuit.

    Which circuit is better? It's hard to say, but I think that the propagation delay and the high side driving of the inverters might be detrimental. With the bipolar transistors the propagation will be much lower.
    879 x 817 - 145K
    995 x 815 - 143K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-03 15:27
    Thanks, Beau. I tried the second circuit, and it gives me a 1V P-P signal centered on 1.5V. I could use that to feed a Prop pin directly, but I'll have to check my phase detector to see if the duty cycle matters. I have a feeling it does, but I can always capacitively couple it and use feedback from another pin to center it.

    -Phil
  • Kevin CookKevin Cook Posts: 159
    edited 2012-07-09 09:44
    It's been a few days; any luck on this yet?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-09 10:03
    I think so, but I've kinda thrown in the analog towel. I found a cheap, fast SOT23-5 comparator that should do the job with a minimum of extra parts. I'll know more when it shows up from DigiKey. This is basically just a zero-crossing exercise, and a comparator makes it simple -- well, theoretically anyway. Things like high offset voltages w.r.t signal level can affect the output waveform's symmetry. And if I have to add hysteresis, that adds a couple extra parts. So we'll see...

    In the meantime, Ken has tasked me with a project that has priority, so it may be awhile before I can get back to this -- unless I get stuck on Ken's project and need a break. :)

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-09 22:17
    What comparator, Phil? I was looking at the LT1719 for something else. It is listed as "ultraFast", with a propagation time of 4ns and operation up to ~ 65MHz. It has about 4mV of internal hysteresis, which the app notes claim can help with parasitic oscillations so long as the output is carefully shielded from the input. The input would have to be a pretty low impedance at that.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-09 23:11
    Tracy,

    I'm trying out several different ones:
    LMV7219: 7ns, push-pull, internal hysteresis, $1.295/M
    TS3011: 8ns, push-pull, $1.341/M
    TS3021: 38ns, push-pull, $0.558/M
    TLV3501A: 4.5ns, push-pull, $1.320/M
    MCP6566: 56ns, open-drain, $0.39/M

    Speed seems to be the biggest determinant of price. As long as the delay times are symmetrical, any of these -- including, hopefully, the slowest ones -- should work at 5 MHz, which is my frequency of interest. But I'll test them all and post scope traces of the results.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-09 23:40
    BTW, I plan to test the comparators in two different circuits:

    attachment.php?attachmentid=94091&d=1341902377

    I've seen circuit A touted for zero-crossing detection, but I'm not sure I trust it, even for comparators with rail-to-rail inputs. Depending on the input offset value, a common-mode input below ground may still register positive. As long as the input's DC component is within the comparator's common-mode range, I'm more inclined to go with B.

    -Phil
    246 x 340 - 2K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-10 10:30
    Some of those have a differential PNP input stage and a common mode range that extends 0.1V or 0.2V below ground. They state explicitly that even if one input goes below that range, it will not affect the output polarity, although it will affect propagation delay and input current.

    I'll be interested to hear what you find. Easy enough to swap the R and the C! The big issue with these chips is tight layout, bypassing, and shielding from parasitic feedback.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-10 11:25
    Looking at Beau's circuit #2 from post #5, I'm trying to digest how it works. It's easy to see the DC bias condition. The signal input impedance is going to be low, driving the emitter of the input transistor, but how about the gain?? The output stage is kind of like a Darlington (=slow?), except for the split collector load. That would be splitting the Early effect too. I wonder if it could be speeded up with a pulldown resistor from base to emitter on the output transistor, or by tweaking the ratio of the split.

    Here is another amplifier circuit that is good for high frequency performance. The bias in this case comes from matched transistors, where the bias in R3 is mirrored in R2. The signal is input at the emitter, low impedance, so it avoids the Early effect. The gain on paper is R2/R1. I see from the simplified schematic of the LMV7219 that it uses that configuration as a the second stage, after the PNP input, with R2 replaced by a current source.
    base_coupled.png
    basic common base amplifier with matched transistors.
    LMV7219_stage.png
    Input circuit of LMV7219.
    481 x 280 - 10K
    450 x 456 - 25K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-12 14:34
    Ugh! The comparator approach has turned out to be harder than I thought it would be. First, the really bad news: the fastest comparators exhibit uncontrolled oscillation that I am unable to reign in with my experimental setup -- SurfBoards plugged into a solderless breadboard:

    attachment.php?attachmentid=94132&d=1342128625

    That eliminates the TLV3501, LMV7219, and TS3011.

    The TS3021 works okay, but the output is nowhere close to a 50% duty cycle. That leaves the slowest (and cheapest) contender: the MCP6566. This is the only one that has an open-collector output, and it's rated to a maximum toggle frequency of 4 MHz at Vdd = 5.5V. (I need 5 MHz at 3.3V.) Nonethless, I do get a 50% duty cycle output from it. What's puzzling, though, is that to get any respectable rise time from it, I need to use a 680-ohm (or smaller) pullup resistor. Otherwise, the output looks like it's driving a huge capacitive load. (I may try adding a cascoded transistor to the output to see if that helps.) Anyway, here's what the input and its spectrum look like with the comparator powered down:

    attachment.php?attachmentid=94136&d=1342128627attachment.php?attachmentid=94133&d=1342128626

    Here's what they look like -- along with the comparator output -- with the comparator powered up:

    attachment.php?attachmentid=94135&d=1342128626attachment.php?attachmentid=94134&d=1342128626

    As you can see, there is quite a bit of noise fed back to the oscillator circuit, which is probably going to be unacceptable. This may entail a buffer stage ahead of the comparator to isolate the oscillator from the noise. But then we're getting back to too many components again.

    'Not sure what to try next...

    -Phil
    497 x 334 - 42K
    800 x 480 - 21K
    800 x 480 - 22K
    640 x 480 - 15K
    640 x 480 - 14K
  • Don MDon M Posts: 1,652
    edited 2012-07-13 05:48
    Phil- what model Rigol and Tek scope are you using?

    Sorry to sidetrack you here..
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-13 11:47
    Okay, rewind, rewind. Back to something simple:

    attachment.php?attachmentid=94152&d=1342205129

    Here's a scope trace of the input signal and counter feedback:

    attachment.php?attachmentid=94151&d=1342205129

    Virtually nothing got fed back to the oscillator either. The spectrum analyzer trace, sampled at the oscillator output, is clean, except for a sharp peak at 5 MHz.

    But ... the duty cycle is not 50%. This is because the Propeller's input threshold is not exactly Vdd/2. The way to fix this is to have the counter feedback drive a non-inverting op-amp integrator whose "ground" reference is Vdd/2. The output from the integrator would then be used to bias the counter input via the 1M resistor.

    More to come...

    -Phil

    P.S. Don: The scope, which I've had for years, is a Tektronix TDS 3014. The recently-acquired spectrum analyzer is a Rigol DSA 815 TG. I'm very happy with both.
    640 x 480 - 15K
    394 x 200 - 2K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-13 11:59
    Hmmm. Layout over a ground plane, and with a ground shield right under the chip, and a close-in bypass capacitor. Those things draw a big spike of current when they switch. The surfboard is not meant for that sort of thing. Is the source follower FET still in the circuit?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-13 12:17
    Tracy,

    My experimental setup was not the best, that's for certain. I'd have to do a custom PCB to improve matters, though -- or maybe dead-bug style on some bare copper-clad (ugh). As to the FET, no, I tried to do without it.

    I'm encouraged, though, by the simpler circuit above. I think that, by adding an integrator, I might end up where I want to be.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-13 14:22
    I tried the integrator circuit, and it worked the way I had hoped. Here's the circuit, using a plain ol' LM358 powered from 3.3V:

    attachment.php?attachmentid=94154&d=1342213994

    No particular reason for the component values I used. 'Just grabbed the closest parts atop my messy (again) bench.

    Here are the scope traces:

    attachment.php?attachmentid=94153&d=1342213993

    I think I'm happy now and have everything I need to start laying out a PCB for the transceiver.

    -Phil
    640 x 480 - 15K
    567 x 307 - 3K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-13 14:54
    Oh Smile! 'Looks like I need to add some hysteresis:

    attachment.php?attachmentid=94155&d=1342216409

    I noticed that the frequency the Prop was measuring for its feedback signal was higher than that of the spectrum analyzer for the oscillator. Sure enough: runts! Hysteresis is going to inject noise into the oscillator, though. Maybe I should just filter the counter output, feed it back into the Prop, and use that as my frequency input. Hmmm.

    -Phil
    640 x 480 - 15K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-13 15:45
    'Turns out the runty pulses were caused by crosstalk due to sloppy probe lead and USB cable routing. Once I got that mess untangled, the scope quit triggering on runts, and the Prop readings and spectrum analyzer readings started to agree. But it does serve as a warning that I'd better be very careful with the PCB layout!

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-14 09:43
    Nicely done, anything other than 50% duty cycle is an error that drives the integrator to reduce the error! It goes to show the power of KISI. (simple, yes, intelligent, stupid not.)

    Layout doesn't look so critical, except for the node closest to the Prop input pin. Should that node be close to the oscillator circuit? It might benefit from the follower to make a signal that can be delivered over a length of coax. I see that the transceiver does already have a follower, Q4, that samples the oscillator output and delivers it to the transmitter section.


    The topic of using external comparators in a sigma-delta loop has come up from time to time, as a way to avoid the ground bounce and threshold errors of the prop itself. Your experiment points out the difficulty of doing so. Layout counts!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-14 10:21
    Thanks, Tracy! I'm a little surprised the integrator worked right out of the gate, since none of the references I used showed that exact circuit topology. The usual single-op-amp, non-inverting integrator uses more passives. But I guess mine is actually an inverting integrator, with the filtered counter feedback providing the ground reference and the Vdd/2 divider providing the "signal" and, with the feedback cap, the RC time constant.
    I see that the transceiver does already have a follower, Q4, that samples the oscillator output and delivers it to the transmitter section.
    Yes, that's where I'm tapping the oscillator signal from. The top of the pot that controls the amplitude going to the transmitter is a convenient place to solder a wire -- or even a piece of coax, should that be necessary.

    I may replace the polystyrene caps in the oscillator with ones that have a lower profile. With a PLL, their temperature stability is no longer needed, and their high-profile loopy leads are going to make a nice antenna for picking up noise from the Prop.

    Overall, my plan is this: remove the two control pots from the font of the transceiver PCB. These will be replaced by a vertically-oriented PCB of my own, substituting encoders for the controls. The board will also have a six-digit, 7-segment frequency display. The encoders have built-in pushbuttons, which can be used to select alternate functions: step size for frequency and a narrow-band audio filter for the volume. I'll have to reamplify the audio, though, since it will be passing through the Prop.

    -Phil
Sign In or Register to comment.