Propeller Controlled Oscillator for ne602
Martin_H
Posts: 4,051
in Propeller 1
In Phil's radio thread I mentioned wanting to use a Propeller to control the oscillator for a ne602 based shortwave radio. The goal is to improve the stability over the colpitts oscillator which drifts. Ideally I could create a DDS VFO and have a full coverage receiver, but I'll settle for a simple feedback circuit to improve stability in the short term.
Attached is an image of the oscillator portion of the schematic. This should be familiar to anyone who's seen ne602 based radios, as they all use roughly this design. I attached leads to +9 volts, ground, ne602 pin 7, and the top of the diode D1. My plan is to first measure the existing oscillator frequency on pin 7, then worry about controlling it via PWM and a transistor.
My first concern is the voltage at pin 7 as I don't want to fry the Propeller. The ne602 is powered by 5 volts, but up to 9 volts is reverse biased across the diode. So I don't know what voltage is present at pin 7. I used a DMM on AC and DC voltage, and it seems close to zero with either measure.
Does this mean I can connect it directly to a Propeller pin, or should I use a resistor just in case?
Attached is an image of the oscillator portion of the schematic. This should be familiar to anyone who's seen ne602 based radios, as they all use roughly this design. I attached leads to +9 volts, ground, ne602 pin 7, and the top of the diode D1. My plan is to first measure the existing oscillator frequency on pin 7, then worry about controlling it via PWM and a transistor.
My first concern is the voltage at pin 7 as I don't want to fry the Propeller. The ne602 is powered by 5 volts, but up to 9 volts is reverse biased across the diode. So I don't know what voltage is present at pin 7. I used a DMM on AC and DC voltage, and it seems close to zero with either measure.
Does this mean I can connect it directly to a Propeller pin, or should I use a resistor just in case?
Comments
-Phil
I rechecked the connections and I didn't have a good ground with the DMM. The ne602 has 6 volts on pin 8 (DC supply), 5.51 volts on pin 7 (oscillator emitter), and 5.9 volts (oscillator base). I also checked the varactor and its voltage varies between 0-8.2 volts. The varactor voltage doesn't seem to change the pin 7 voltage.
I have an earphone in the jack and the radio is making sounds, so I would assume it is oscillating.
Probably best to AC couple pin 7, or pin 6, to a HC4060/LV4060/74AHC1G42xx (which includes a buffer amplifier), and feed a QN output to a Prop Pin, for your read and lock tracking.
I like the new 5 Pin Osc/Dividers
These nifty 5 pin 74AHC1G42xx come in 10,12,14 bit models, Amplifier/Dividers, and when I asked Nexperia, they said more choices are coming.
eg /2 or /4 would be useful to allow TCXOs to drive a P1....
A simple means to use a DMM around Oscillators, is to get a fast small signal diode (1N4148, BAW62 etc) and use DC meter to take TWO measurements, to GND and then VCC.
GND reading catches the positive going peak, minus diode drop and VCC relative reading catches the negative going peak.
The difference is the AC amplitude of the signal.
Works well on Crystal oscillators too.
Using the diode probe above, also check pin 6.
Based on the DC value, I'd expect ~1V p-p which is probably just enough to AC couple to a CMOS amp/divider - What MHz do you want to cover here ?
Update: I looked up values for an AC coupling capacitor and it suggested 100 pf.
Thinking some more on this, an alternative you could experiment with, would be to use the HC4060/LV4060/74AHC1G42xx amplifier as the LC-VCO oscillator, and ac couple the output of that, to the NE602.
With a higher swing on the CMOS Amplifier, drive is no issue - not sure about how the phase noise compares ?
Putting more money into a higher Q inductor likely helps there.
Next I hooked a logic probe to the output of the capacitor and it thinks there are pulses there. So I guess my question is that safe to hook up to a propeller pin and try to measure its frequency?
-Phil
I took the lead from pin 7 on the n602 and connected it to a 100 K resistor, to a 10 pF capacitor, and then into center of a voltage divider made out of 100 K resistors. I then ran a jumper to pin 8 on the quick start. But I get a value of zero hz.
I tried several other capacitors (47 pf, 220 pf, and 0.1 uf) and get zero for all of them. I put the pulsing pin output into the center of the voltage divider and get the expected value. I know the radio works, so I suspect that the oscillator doesn't have the oomph to trigger the output. But I don't have a way to prove it.
Did you test with your expected frequency - ~10Mhz ?
The amplitude is already low, and not much of 10MHz will make it thru 100k driving into Pin capacitance.
You may need an amplifier, like HCU04, or the Osc stage of HC4060/LV4060/74AHC1G42xx mentioned above,
And here is a circuit that uses a 74LV4046 PLL to clean up the Prop's clock jitters. It does not produce a sine wave, though.
-Phil
I am starting to think I need a scope to do this right, otherwise I am blind to what's going on, or how the interfacing works.
-Phil
The swing on a digital pin, is rather larger.
You may need an amplifier stage between the lower amplitude NE602, and the Prop pin.
A 74HC4060 can do both the amplifer and some divider stages, to give a clean digital output signal.
Try
https://assets.nexperia.com/documents/data-sheet/74HC_HCT4060.pdf
Fig 13. External component connection for a crystal oscillator
Shows SCH on how to bias as an amplifier.
For 10MHz in, omit R2,C2,Xtal, and replace C3 (eg 1nF) as a series coupling cap to your NE602 pin.
Rbias can be 1Meg Wire reset 4060.Pin12.MR to GND
When working, the Qn outputs will measure 50% Vcc when toggling, on a DC Multimeter.
IMO, the problem here is not one of buffering, but one of oscillation. Properly connected, the Prop has very high impedance inputs that should not load the oscillator. But without a scope, you really can't tell if the circuit is even oscillating. Based on my own experience with the similar SA612, getting it to oscillate is not a simple task. Can you at least borrow a scope to see if your circuit is putting out a frequency of any amplitude?
-Phil
But if all is linear and you are using suitable oscillator topology it will just contribute to the LC tank. The
OP's circuit only shows 18pF in the oscillator tank, so its quite a large contribution for that circuit.
One issue maybe that as the prop input transistors aren't operated linearly, their switching transients will
be capacitively pushed back into the VCO and perhaps disturb operation. Anyone know the reverse
transfer capacitance of the Prop input stage??
I'd suggest traditional VCO buffer design, a JFET source follower, or an IC dedicated to the purpose.
@Mark_T, this is a Ramsey Hr30 direct conversion receiver kit, and all the values were chosen by Ramsey. I built it a few years back, and while it works, the tuning stability is poor for a number of reasons. The biggest reason being the unregulated voltage from the battery used across the varactor. As the battery voltage drops the tuning of the radio drifts. This results in a change of pitch to CW or RTTY signals.
@Phil, can I assume that if the radio is tuned to a station, and I can hear it, that the oscillator is working? If so then I can try this again tonight and confirm oscillation is happening by listening to the radio. Also, this radio throws off enough RF that I can confirm the tuning frequency by with a second radio and tuning across the band.
I Googled and found a PDF of the manual online. On page 21 it talks about connecting a direct frequency readout. Their suggestion was to use a short piece of mini-coax to a 1 megohm resistor bridged by a 27 to 33pF capacitor. Obviously the capacitor is for AC coupling, but I have no idea what the 1 meg resistor in parallel with it is for. They mention this can effect the tuning of the receiver and introduce some noise.
-Phil
Bad news. The measurement significantly alters the oscillator frequency, plus the Propeller outputs some RF that reduces the sensitivity of the receiver. Moreover any coupling capacitor larger than 220 pf halts the oscillator, and that includes stray capacitance from the breadboard, your hand, or any other wires on the breadboard. So the whole thing is a bit unstable, and I think that was my problem before.
I got it to work by turning on the radio unconnected to anything, and tuned in a station to verify oscillation. I then connected pin 7 to one side of a 10 pf cap. On the other cap lead I added the 100 K resistors, then a jumper to the Propeller pin 16. I immediately saw a reading that was in the ballpark, but then it went crazy, dropped to zero, and the radio went dead. I then redid the set of steps being careful to avoid getting the lead from pin 7 near any other wires. Eventually I found just turning it on without the capacitor, then dropping a 22 pf cap into the board seemed to work reliably enough.
Now phase II is having the Propeller control the varactor voltage to trying and achieve a desired frequency. The problem I see with this is the general instability of the circuit and adding more wires to the breadboard making that worse.
That's expected, as any Cin of a Prop pin, or any amplifier, will add to the resonant circuit.
Also expected, all digital devices generate their own RF.
Needs separation, decoupling and shielding.
Some of the SCH you link above, used quite small coupling C's and so hinted there could be some loading effects.
Did you try a 4060 ? - 22pF series C should be fine there.
That could mount very close to the Oscillator & then a moderate series R (4k7?) can connect to a longer wire that is a divided freq to Prop..
You could also try the Crystal circuit of 4060, with Xtal replaced with an Inductor, to see how the 4060 works as an oscillator.
The Prop can also give you a Frequency Readout, via this code
http://forums.parallax.com/discussion/123170/propbasic-reciprocal-frequency-counter-0-5hz-to-40mhz-40mhz-now
-Phil
Why ?
The Prop was never designed to clock from low amplitude 10MHz sine waves, so that always going to be more erratic and unpredictable than a lightly coupled amplifier, placed very close to the VCO.
(or using the HC4060 as the VCO, which is what I'd also favour trying...)
This also better Isolates the analog from the digital ... A Cap to a P1 pin, drives 50% of the Vcc noise back thru that cap, into the oscillator.
Seriously, though, it derives from designing stuff that works reliably with the least possible component cost.
-Phil
In terms of the HC4060 buffer, I have two on the way, but if I can make do without it I probably will. The reason is there's no place on the existing PCB close to the ne602 to mount it. It might work to have it next to the Propeller generating the VFO, but that's a bigger change. I might consider that in the future if I try to make the radio multi-band.
For the Propeller control path. I need to be able to produce a voltage from 0 to 9 volts. So a Propeller pin as a duty mode counter seems the way to go. I will use a transistor as a switch with a signal from the collector connected to R5 on the Ramsey PCB. I think I would need a current limit resistor between the base and ground so when the transistor is open I don't have a short. The attached image is what I am thinking about: