Saturday, March 4, 2023

Injection locking cheap crystal "can" oscillators to an external source

Figure 1:
The two generic "can" oscillators tested - both having been
found in my "box of oscillators".
Click on the image for a larger version.

Sometimes one comes across a device with one of those cheap crystal "can" oscillators that is "close" to frequency - but not close enough.  Perhaps this device is used in a receiver, or maybe it's used for clock generation or clock recovery. Such oscillator are available on a myriad of frequencies - although too-often not exactly the right one!

What if we want to "nail" this oscillator to an external (perhaps GPS) reference?  If this oscillator were variable, this task would be simplified, but finding a "VCXO" (Variable-Control Crystal Oscillator) on the frequency of interest is sometimes not even possible.

What if there were a way to externally lock a bog-standard crystal oscillator to an external source?

To answer this question, I rummaged through my box of crystal oscillators (everyone has such a box, right?) and grabbed two of them:  A standard 4 MHz oscillator and a 19.440 MHz oscillator that has an "enable" pin.

Comment:  

This article refers to standard, quartz crystal oscillators and not MEMs or "Programmable" oscillators where the internal High-Q resonating element likely has no direct relationship with the synthesis-derived output frequency.

Injection locking

This is what it sounds like:  Take a signal source of the desired frequency - typically very close to that of the oscillator that you are trying to nail to frequency - and inject it into the circuitry to lock the two together.

This technique is ancient:  It accounts for the fact that a (wobbly) table of pendulum-type metronomes set "close" to the same tempo will eventually synchronize with each other, and it is the very technique used in the days of analog TV to synchronize their vertical and horizontal oscillators to the sync signals from the incoming signal.

It's still used these days, one notable example being the means by which an Icom IC-9700's internal oscillator may be externally locked to an external 49.152 MHz source (see: http://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=352 ) - and this is done by putting a known-stable source of 49.152 MHz "very near" the unit's built-in oscillator.

Injection-locking a discrete-component crystal oscillator is relatively simple:  It's sometimes just a matter of placing a wire near the circuitry with the resonant element (e.g. near the crystal or related capacitors) and the light capacitive coupling will cause it to "lock" to the external source - as long as it's "close" to the oscillator's "natural" frequency.

Getting a signal inside the oscillator

Injection locking often needs only a small amount of external signal to be applied to the circuit in question - particularly if it's inserted in the feedback loop of the resonant circuit, but what about a "crystal can" oscillator that is hermetically sealed inside a metal case?

Figure 2:
Schematic depiction of power supply rail
to get the external signal "into" the can.
Click on the image for a larger version.
Because, in many cases, opening the can would compromise the seal of the oscillator and expose the quartz element to air and degrade it, this isn't really an option.  Another possibility would be to magnetically couple an external signal into the circuitry, but owing to a combination of its small size and the fact that these devices are typically in ferrous metal cans, this isn't likely to work, either.

So what else can one do to get a sample of our external signal inside?

Power rail injection

The most obvious "input" is via the power supply rail.  Fortunately - or unfortunately, depending on how you look at it - these oscillators often have built-in bypass capacitors on their power rails, putting a low-ish impedance on the power supply input - but this impedance isn't zero. 

Figure 3:
Top - The signal riding on the voltage rail
Bottom - The locked output of the oscillator
Click on the image for a larger version.
A simple circuit to do this is depicted in Figure 2.  The way it works is by decoupling the power supply via L1 and C2 and heavily "modulating" it with the signal to be locked with Q1.  For the test circuit seen in Figures 2 and 4, L1 and L2 were 10uH molded chokes, C1 and C2 were 0.1uF capacitors and Q1 was a 2N3904 or similar NPN transistor.  

When an external signal is applied to Q1 via C2 (I used +13dBm of RF from a signal generator) Q1 will conduct on the positive excursions of the input waveform, dragging the power supply voltage to the oscillator down with it.  With this simple circuit, Q1 has to dissipate quite a bit of power (the current was about 500 mA) and this action results in a fair bit of power dissipation, likely due to the fact that the bypass capacitance within the oscillator is being shunted and causing a significant amount of power to be lost.

This circuit has room for improvements - namely, it's likely that one could better-match the collector impedance of Q1 with the (likely) much lower impedance at the V+ terminal of the oscillator - possibly using a simple matching circuit (L/C, transformer, etc.) to drive it more efficiently.

Figure 4:
The messy test circuit depicted in Figure 2 used to inject the
external into the "can" oscillator via the power pin.
Click on the image for a larger version.

Despite its simplicity, with the circuit in Figure 2 shows how I was able to inject an external signal source into the oscillator and, over a relatively narrow frequency range (15 Hz for the 4 MHz oscillator, 60 Hz for the 19.44 MHz oscillator) it could be locked externally.

The oscillogram in Figure 3 shows the resulting waveforms.  The top (red) is the AC-coupled power supply rail for the oscillator showing about 2 volts of RF imposed on it while the bottom rail shows the square-ish wave output of the power supply.  Using a dual-trace scope, it was easy to spot when the input and output signals were on the same frequency - and locked - as they did not "slide" past each other.

As you might expect, the phase relationship between the two signals will vary a bit, depending whether one is at the low or high frequency end of the lock range and with changes in amplitude, so this - like about any injection-locking scheme - shouldn't be confused with a true "phase lock".

Is the lock range wide enough?

The "gotcha" here is that these are inexpensive oscillators, likely with 50-100 ppm stability/accuracy ratings meaning that they are going to drift like mad with temperature and applied power supply voltage.  What this also means is that these oscillators are not likely to be "dead on" frequency, anyway.

To a degree, their frequency can be "tuned" by varying the power supply voltage:  A 5-volt rated "can" oscillator will probably work reliably over a 3.5-5.5 volt range, often changing the frequency by a hundred Hz or so:  The 19.44 MHz oscillator moved by more than 1.5 kHz across this range, but never getting closer than 2 kHz above its nominal frequency - but this correlates with the often-loose specifications of these devices in terms of frequency accuracy, not to mention temperature!

If your oscillator is "close enough" to the desired frequency at some voltage - and it is otherwise pretty stable, this may be a viable technique, but other than that, it may just be a curiosity.  If one chooses an oscillator with better frequency stability/tolerance specifications - like a TCXO - this may be viable, but testing would be required to determine if a TCXO's temperature compensation would even work properly if the power supply voltage were varied/modulated with an external signal.

"Enable" pin injection

Figure 5:
Schematic depicting applying an external signal via the
"enable" pin.  The amplitude of the external signal must
have a peak-to-peak voltage that is a significant percentage
of the power supply voltage.
Click on the image for a larger version.
Many of these "can" oscillators have (or may be ordered with) an "enable" pin which turns them on and off - and unlike the power supply pin, this typically has pretty low parasitic capacitance compared to the V+ pin of the oscillator and it can provide a way "in" for the external frequency reference.  Figure 5 shows how this can be done.

For this circuit, resistors Ra and Rb (which may be between 1k and 10k, each) bias the "enable" pin somewhere around the threshold voltage and capacitively couple the signal - in this case, a +13dBm signal from a signal generator which had about 2 volt peak-to-peak swing.  If a logic-level signal is available, one can dispense with the bias resistors and the capacitor and drive it directly.

Note that some oscillators have a built in pull-up or pull-down resistor which can affect biasing and the selection of resistors should reflect that:  If its specs note that the pin may be left open to enable (or disable) the oscillator, this will certainly be the case.  If a pull-up resistor is present, the value of the corresponding external pull-down resistor will have to be experimentally determined, or "Rb" (in Figure 5) may be made variable using a 10k-100k trimmer potentiometer.

The 19.44 MHz oscillator shown in Figure 1 has such an enable pin and by injecting the 2 volt peak-peak signal from the external source into, it will reliably lock over a 900 Hz range.  Some degree of locking was noted even if the signal was quite low (around 250 mV peak-peak) but the frequency swing was dramatically reduced.  For optimal lock range it's expected that a swing equal to that of the supply rail would be used.

The precise mechanism by which this works is unknown:  Does the "enable" pin actually turn the oscillator on and off, does it simply gate the output of the oscillator while it continues to run or is it that this signal gets into the onboard circuitry and couples into the oscillator's feedback loop?  I suspect that it is, in most cases, the former as the "enable" pin often reduces power consumption significantly which would explain why it seems to work reasonably well - at least with the oscillators that were tested.

If the oscillator itself is "gated" (e.g. turned on/off) by the "enable" pin, then this is precisely the mechanism that we would want to inject an external signal into the oscillator.  In looking at the output waveform, however, I suspect that the answer to this question isn't that simple:  If it were simple logic gating one would expect to see the output waveform of the oscillator gated - and mixing - with the external signal once the latter was outside the "lock" range - but this was not the case for the oscillator tested.  I suspect that there might be some sort of filtering or debouncing in the gating circuit, but based on the ease by which locking was accomplished using this oscillator, there was clearly enough of the external signal getting into the oscillator portion itself to cause it to lock readily.

As noted previously, while the lock range was about 900 Hz, the oscillator itself was about 2.5 kHz high, anyway, so it could not be brought precisely onto the nominal frequency.  Again, it may be possible to do this with a TCXO equipped with an "enable" pin, but testing would be required for any specific oscillator to determine if this is viable.

"Locked" performance

The testing of spectral purity using either of these methods was only cursorily checked by tuning to the output of the oscillator with a general-coverage receiver and feeding the resulting audio into the Spectran program to see a waterfall display.  This configuration allows both the absolute frequency and the lock range to be measured with reasonable accuracy.

It can also tell us a little bit about spectral purity:  If there was a terrible degradation in phase noise, it would likely show up on the waterfall display - but when solidly locked, no such degradation was visible.

Although it wasn't tested, it's also likely that locking the oscillator - particularly using the "enable" pin - could be used to "clean up" an external oscillator that is somewhat spectrally "dirty" owing to the rather limited lock range and high "Q" of the "can" oscillator.  This is most likely useful for higher-frequency components (e.g. those farther away from the carrier than a few kHz) rather than close-in, low-frequency phase noise - a property which the most inexpensive oscillators likely don't have is anything resembling stellar performance, anyway.

Harmonic locking?

One thing that I did not try (because I forgot to do so) was harmonic locking - that is, the injection of a signal that is an integer fraction of the oscillator frequency (e.g. 1 MHz for the 4 MHz oscillator) - perhaps something to try later?

Is this useful for anything?

I had wondered for some time if it would be possible to lock one of these cheap oscillators to an external source and the answer appears to be "yes".  Unfortunately, most crystal oscillators have accuracy and temperature stability specifications that cause its natural frequency variance to exceed the likely lock range unless one gets a particularly stable and accurate oscillator.

If one presumes that the oscillator to be "tamed" is good enough then yes, it may be practical to lock it to an external source - particularly via the "enable" pin.  In many cases, such oscillators don't have this feature as they need to be active all of the time so it may be necessary to replace it with one that has an "enable" pin - and then one must hope that the replacement will, in fact, be stable/accurate enough and also capable of being locked externally - something that must be tested on the candidate device.

So the answer is a definite "Yes, maybe!"


This page stolen from ka7oei.blogspot.com

[END]


Friday, February 10, 2023

"CQ CQ - Calling all dielectric welders!" (Or, those strange curvy things seen on a 10 meter waterfall)

 If one owns a receiver with a waterfall display, the increased cluttering of the 12 and 10 meter bands with weird "swooping" signals could not have gone unnoticed.  Take, for example, this recent snapshot of the lower portion of 10 meters from the waterfall of WebSDR #5 at the Northern Utah WebSDR (Link)

Figure 1:
10 Meters as seen on a beam antenna pointed toward Asia showing QRM from a large number of different sources - presumably dielectric heaters/welders/seamers.  These things radiate badly enough that they should have their own callsigns, right?
Click on the image for a larger version.

 

In looking at this spectral plot - which comes from an antenna oriented to the Northwest (toward Asia and the Pacific) one could be forgiven for presuming that someone had somehow connected a can of "Silly String" to their coax and was squirting noodles into the ionosphere!

What, specifically, are we looking at?

Across the entire spectrum plot one can see these "curved" signals, some of them - like that near the bottom, just above the cursor at 28374 kHz - are quite strong while there are many, many others that are much weaker, cluttering the background.  These signals contrast with normal SSB and CW signals - the former being seen clustered around 28500 and the latter around 28100 kHz - which are more or less straight lines as these represent transmissions with stable frequencies.

What are these from?  The general consensus is that these are from "ISM" (Industrial, Scientific and Medial) devices that nominally operate around 26957 kHz to 27283 kHz.  Clearly, the waterfall plot shows many devices outside this frequency range.

What sort of devices are these?  Typically they are used for RF heating - most often for dielectric sealers of plastic items such as bags, blister packs - but they could also be used in the manufacture of items that require some sort of energetic plasma (e.g. sputtering metal, etching) in any number of industrial processes.

Where are they coming from?

The simple answer is "everywhere" - but in terms of sheer number of devices, it's more likely that much of the clutter on these bands originates in Asia.  Consider the above spectral plot from an antenna located in Utah pointed at Asia - but then consider the plot below, taken at about the same time from an antenna that is pointed east, across the continental U.S. and Canada - WebSDR #4 at the Northern Utah WebSDR (link):

Figure 2:
10 Meters on a beam pointed toward the U.S.
Click on the image for a larger version.

 

To be absolutely fair, this was taken as the 10 meter band was starting to close across the U.S, but it shows the very dramatic difference between the two antenna's directionality, hinting at a geographical locus for many of these signals.

Further proof of the overseas origin of these signals can be seen in the following plot:

Figure 3:
Spectrum from AM demodulation of some of the signals of Figure 1 showing 50/100 Hz mains energy.
Click on the image for a larger version.

This plot was taken by setting the WebSDR to AM and setting for maximum bandwidth, tuning onto a frequency where several of these "swoops" seen in Figures 1 and 2 are recurring and then, using a virtual audio cable, feeding the result directly into the "Spectran" program (link).

As expected this plot shows a bit of energy at the mains harmonic frequencies of 120, 240 and 360 Hz owing to the fact that this antenna points into slightly-noisy power lines operating at the North American 60 Hz frequency - but on this plot you can also see energy at 50 and 100 Hz, indicative of a lightly-filtered power supply operating from 50 Hz power mains - something that is NOT present anywhere in North America.

Based on other reports (IARU "Intruder Watch", etc.) a lot of these devices seem to be located in Asia - namely China and surrounding countries where one is more likely to experience lax enforcement of spurious radiation of equipment that is manufactured/sold in those locales.

Why the "swoop", "curve" or "fishook" appearance seen in Figure 1?  If these devices were crystal controlled and confined to the nominal 26957 kHz to 27283 kHz ISM frequency range, we probably wouldn't see them in the 10 meter amateur band at all, but many of these devices - likely "built to cost" simply use free-running L/C oscillators that are accurate to within 10-15% or so:  As these oscillators - which are likely integral to the power amplifier itself (perhaps self-excited) - warm up, and as the industrial processes itself proceeds (e.g. plastic melts, material cures, glue dries) the loading on the RF output of this device will certainly change, and this results in an unstable frequency.

Why do they radiate?

Ideally, the RF would be contained to the working area and in the past, reputable manufacturers of such equipment would employ shielding of the equipment and filtering of power and control leads to confine the RF within.  But again, such equipment is often "built to cost" and such filtering and shielding - which is not necessary for the device to merely function is often omitted.

Can we find and fix these?

In this U.S. and parts of Europe such sources are occasionally tracked down and RF interference mitigated - either voluntarily or with "help" from the local regulator - but the simple fact is that the intermittent nature of these sources - and the fact that they radiate on frequencies that are prone to good propagation when the sun is favorable to such - makes them very difficult to localize.  If the signal source is coming from halfway around the world, there's likely nothing that you can do other than point your directional antenna the other way!

If it so-happens that you can hear such a signal at your location at all times of the day - regardless of propagation - you may be in luck:  There may be a device with a short distance (a few miles/km) of your location - and perhaps you can make a visit and help them solve the problem.

* * * * * * * 

Related article:

 

This page stolen from ka7oei.blogspot.com


[End]

Monday, January 30, 2023

A 2 meter band-pass cavity using surplus "Heliax"

Figure 1:
Close-in responses of various filter combinations
Yellow:  Duplexer-only
Magenta:  Bandpass-only
Cyan:  Duplexer + Bandpass
Click on the image for a larger version.
The case for bandpass filtering

If you operate a repeater - or even a simplex radio such as a Packet node - that is located at a "busy" radio site, you'll no doubt be aware of the need for cavity-based filtering.

In the case of a repeater, the need is obvious:  Filtering must be sufficiently "strong" to keep the transmit signal out of the receiver, and also to remove any low-level noise produced by the transmitter that might land on the receive frequency.

In the case of a packet or simplex node of some sort, a simple "pass" cavity is often required at a busy site to not only prevent its receiver from being overloaded by off-frequency signals, but also be a "good neighbor" and prevent low-level signals from your transmitter from getting into other users' receivers - not to mention the preventing of those "other" signal from getting back into your transmitter to generate spurious signals in its own right.

Comments:

  • In this discussion, a "band pass" filter refers to the passing of ONLY a narrow range of frequency near those of interest and at odd multiples of the lowest resonant frequency - but nothing else.
  • It is HIGHLY RECOMMENDED that anyone attempting to construct this type of filter get and learn to use a NanoVNA:  Even the cheapest units (approximately $50US) when properly set up will be capable of the sorts of measurements depicted in this article.

A Band-Pass/Band-Reject (BpBr) duplexer may not be what you think!

A common misconception is that a typical repeater duplexer - even though it may have the words "band pass" written on its label or in its specifications - has a true "band pass" response.

Figure 1 shows a typical example of this fallacy.  The yellow trace shows the response of a typical 2 meter duplexer where we can see a peak in response at the "pass" frequency and a rather deep notch at the frequency that we wish to reject.

The problem becomes more apparent when we look over a broader frequency range.  Figure 2 shows the same hardware, but over a span of about 30 MHz to 1 GHz.

Figure 2:
The same as in Figure 1 except over a wider
frequency range showing the lack of off-
frequency rejection of a "BpBr" duplexer
(Yellow) that is significantly mitigated by the
addition of a band-pass filter (Cyan)
Click on the image for a larger version.

Keeping an eye on the yellow trace, you'll note that over most of the frequency range there is very little attenuation.  What this means is that the "BpBr" filter doesn't exhibit a true pass response once you get more than a few MHz away from the design frequency.

I've actually had arguments with long-time repeater owners that disagreed with this assertion, but hadn't actually "swept" a duplexer over a wide frequency range:  These days, with the availability of inexpensive test equipment like the NanoVNA, there's no good excuse for not determining this for yourself!

For more about this, see the related article linked here.

Why is this a problem?

In the "old days" radios that you would use at a repeater site were typically cast-off mobile radios - and even if you had a repeater, it was typically based on a mobile design.  These older radios - often from the 80s or earlier - typically used a bank of narrowband  (often Helical) filter elements, each tuned to the frequency of interest:  If several frequencies were used, the system planners often placed then near each other so that they could be covered by the receivers' narrow filters without undue attenuation and because of this, one could "get away with" a duplexer with filtering that didn't offer a "true" pass-band response.

Most modern radios used in amateur repeaters are "broadband" in nature meaning that they often have rather wide receiver front-end filters:  It is not practical to have electronically-tuned filters that are anywhere near as narrow as the Helical filters of the past which means that they simply lack the filtering to reject strong, off-frequency signals.

The poor filtering of some "new" radios:

When a modern radio is dropped in place of an old radio at a "busy" site with lots of other transmitters, disappointment is sometimes the result:  The "new" radio may seem less sensitive than the old one - or it might seem that sensitivity varies over time.  In reality, the "new" radio may well be being overloaded by the off-frequency signals that the old radio's resonator-based front-end easily filtered.  What's worse is that the precise nature of this overload condition may be masked by the use of subaudible tones or digital tone squelch - and if this is a digital radio system like D-Star, Fusion or DMR, there may be no obvious clues at all as to the problem at hand unless one has the ability to measure and monitor the analog "baseband" from the receiver itself.

To be sure, if the receiver in question can operate in carrier-squelch analog mode, the usual techniques to determine overload (Iso-Tee measurements, injection of a weak carrier and observing SNR, etc.) may be employed to determine if there is an issue - but this, too, may be misleading as problems may be intermittent, showing up only when a combination of transmitters key up.

A simple pass cavity:

While not a panacea, the use of a simple pass-only cavity can go a long way to diagnose - even solve - some chronic overload issues - particularly if these have arisen when old gear was replaced.  Suitable pass cavities are readily available for purchase new from a number of suppliers and used from auction sites - they are also pretty easy to make from copper and aluminum tubing - if you have the tools.  Because of the rather broad nature of a typical pass cavity, temperature stability is usually not much of an issue in that its peak could drift hundreds of kHz and only affect the desired signal by a fraction of a dB.

Another material that could be used to make reasonable-performance pass cavities is larger-diameter hardline or "Heliax" (tm).  Ideally, something on the order of 1-5/8" or larger would be used owing to its relative stiffness and unloaded "Q" and either air or foam dielectric cable may be used, the main difference being that the "Q" of the foam cable will be slightly lower and the cavity itself will be somewhat shorter.

Figure 3:
Cutting the (air core) cable to length
Click on the image for a larger version.

The "Heliax bandpass cavity" described here can be built with simple hand tools, and it uses a NanoVNA for tuning and final adjustment.   While its performance will not be as good as a larger cavity, it will - in many cases - be enough to attenuate strong, out-of-band signals that can degrade receiver performance.

Using 1-5/8" "Heliax":

The "cavity" described uses 1-5/8" air-core "Heliax" - and it is necessary for the inner conductor to be hollow to accommodate the coupling capacitors.  Most - but not all - cable of this size and larger has a hollow center conductor.  Cables larger diameter than 1-5/8" should work fine - and are preferred - but smaller than this may not be practical - both for reasons of unloaded "Q" and also if the center conductor is solid or if its inside diameter cannot accommodate the coupling capacitors described later on.

Preparing the "shorted" end:

For 2 meters, a piece of cable 18" long was cut.  For the air dielectric, it's recommended that one cuts it gently with a hand saw rather than a power tool as the latter can "snag" and damage the center conductor.

Figure 4:
The "shorted" end of the stub with the slits bent to the middle
and soldered to the center conductor.
Click on the image for a larger version.

For the "cold" (e.g. shorted) end, carefully (using leather gloves) remove about 3/4" (19mm) of the outer jacket and then clean the exposed copper shield with a wire brush, abrasive pad and/or sand paper.  With this done, use a pair of tin snips cut slots about 1/2" (12mm) deep and 1/4" (6mm) wide around the perimeter.  Once this is done, use a pair of needle nose pliers and remove every other tab, resulting is a "castellated" series of slots.  At this point, using a pair of diagonal pliers or a knife, cut away some of the inner plastic dielectric so that it is about 1/2" (12mm) away from the end of the center conductor.

Now, clean the center conductor so that it is nice and shiny and then bend the tabs that were cut inwards so that they touch the center conductor.  Using a powerful soldering iron or soldering gun - and, perhaps a bit of flux - solder the shield tabs to the center conductor all of the way around.  It's best to do this with the section of coax laying on its side so that hot solder/metal pieces do not end up inside the coax - particularly if air-core cable is used.  If you used acid-core flux, carefully remove it before proceeding.

With one end of the cable shorted you can trim back any protruding center conductor and file any sharp edges - again taking care to avoid getting bits of metal inside the cable or embedded in the foam.  At some point, you should cover the shorted end with RTV (silicone) and/or good-quality electrical tape to prevent contamination by dust or insects.

Preparing the "business" end:

Figure 5:
The "coupling tubes" soldered in place which
receive the wires for coupling in/out.
Click on the image for a larger version.
At this point, the chunk of coax should be trimmed again, measuring from the point where the center conductor is soldered to the shield:  For air-core trim it to 17" (432mm) exactly and for foam core, trim it to 16-1/8" (410mm).  Again, using a sharp knife and gloves, remove about 3/4" (19mm) of the outer jacket and, again, clean the outer conductor so that it is bright and shiny.

Making coupling capacitors:

We now need to make two capacitors to couple the energy from the "in" and "out" connectors to the center resonator and for this, I cut two 3" (75mm) long pieces of RG-6 foam TV coaxial cable and from each of these pieces, I removed and kept the center conductor and dielectric - removing any foil shield and then stripping about 1/2" (12mm) of foam from one end of each piece.

At this point, you'll need some small copper tubing:  I used some 1/4" O.D. soft-drawn tubing, cutting two 2" (50mm) lengths and carefully straightening them out.  To cut this, I used a rotary pipe cutting tool which slightly swedged the ends - but this worked to advantage:  As necessary, I opened up the end cut with the deburring blade of the rotary cutting tool just enough that it allowed the inner dielectric of the RG-6 to slide in and out with a bit of friction to hold it in place..

Comment:

The use of 1/4" (6mm) O.D. copper pipe and RG-6 center conductor/dielectric isn't terribly critical:  A different-sized copper or brass pipe could be used as long as two parallel pieces will fit inside the center conductor of the Heliax - and that the chosen center conductor and dielectric of the coax you use to make the capacitor will fit somewhat snugly inside it.
The reason for the two copper tubes is to prevent the two capacitors made from the center of the RG-6 from coupling directly to each other as all energy must first resonate the center conductor and using these tubes - soldered to the center conductor/resonator - prevents such direct coupling, and it offers good mechanical stability.

Figure 6:
The PC Board plate soldered to the end of the
coax.
Click on the image for a larger version.

Using a hot soldering iron or gun, solder the two straightened pieces of tubing together, in parallel, making sure that the ends of the tubing that you adjust to snugly fit the outside diameter of the piece of RG-6 are at the same end.  Once this is done, insert the two parallel pieces of tubing inside the Heliax's center conductor and solder them, the ends flush with the end of the center conductor, taking care not to heat them enough that they unsolder from each other:  A pair of sharp needle-nose pliers to hold them in place is helpful in this task.

Making a box:

On the "business" (non-shorted) end of the piece of cable we need to make a simple box with a solid electrical connection to the outer shield to which we can mount the RF connectors with good mechanical stability.  For the 1-5/8" cable, I cut a piece of 0.062" (1.58mm) thick double sided glass-epoxy circuit board material into a square that was 3" (75mm) square and using a ruler, drew lines on it from the opposite corners to form an "X" to find the center.

Using a drill press, I used a 1-3/4" (45mm) hole saw to cut a hole in the middle of this piece of circuit board material, using a sharp utility knife to de-burr the edges and to enlarge it slightly so that it would snugly fit over the outside of the cable shield:  You will want to carefully pick the size of hole saw to fit the cable that you use - and it's best that it be slightly undersized and enlarged with a blade or file than oversized and loose.

Figure 7:
Bottom side of the solder plate showing the
connection to the coax.
Click on the image for a larger version.

After cleaning the outside of the coaxial cable and both sides of the circuit board material, solder it to the (non-shorted) end on both sides of the board, almost flush with just enough of the shield protruding through the top to solder it.  For this, a bit of flux is recommended, using a high-power soldering iron or gun - and it's suggested that it first be "tacked" into place with small solder joints to make sure that it is positioned properly.

When positioning the box, rotate it such that the two "capacitor tubes" that were soldered into the center conductor are parallel with one of the sides of the square - this to allow symmetry to the connectors:  This is depicted in Figure 8 where the left-hand and right-hand tubes (more or less) line up with their respective coaxial connectors.

Adding sides and connectors:

With the base of the box in place, cut four sides, each being 1-3/8" (40mm) wide and two of them being 3" (75mm) long and the other two being 2-1/2" (64mm) long.  First, solder the two long pieces to the top, using the shorter pieces inside to space and center them - and then solder the shorter pieces, forming a five-sided (base plus four sides) box atop the piece of cable. As seen in the photo, the "short" sides are parallel to the two tubes in the center conductor.

Figure 8:
Inside the box with coupling/tuning stubs and lines and
stiffening bar installed.  Note the orientation of the tubes.
Click on the image for a larger version.

As can be seen in the picture, BNC connectors were used as they were convenient, but "N" type, SMA or even UHF connectors could be used - but the use of BNC connectors will be described.

The BNC connectors were mounted on opposite sides of the box, approximately 3/8" to the left of the center line and 3/4" from the bottom.  As can be seen in the photo, the connectors were mounted in the "short" wall of the box such that our "RG-6" capacitors more or less line up with the capacitor tubes.

Now, insert the ends of the RG-6 center conductor into the "capacitor tubes" and, bending the top in an "L" shape, solder the end with the exposed center conductor to the coaxial connectors. 

Also visible in Figure 8 - just to the right of the center conductor - are two pieces of copper strip, each about 3/4" (20mm) wide - one is soldered to the center conductor and the other to the ground inside the box.  These two tabs form a very simple capacitor which may be used to "fine tune" the center frequency of the pass response by bending them nearer/closer to each other.  While most of the adjustment of the center tuning will occur as one slides the two capacitors (made from RG-6) in and out, this method may also be used to provide a bit of additional tuning range.

Preliminary adjustment:

It is best to first set the RG-6 capacitors to obtain the desired pass response, taking into account the desired band-pass frequency, but once one has done this - and if the pass frequency is too high - one would then add the "copper tab" capacitors - perhaps more than one set.  If the frequency is too low, see if you can obtain a suitable passband width (and acceptable insertion loss) by pulling these coupling capacitors out to raise the frequency:  For most applications, an insertion loss of even 1 dB will not appreciably reduce receiver performance - particularly if the local noise at the site is rather high from other users and especially if the use of a band-pass filter like this is intended to minimize desense, anyway.

It is best to make them from metal (copper, brass) that is thick enough to not be springy on their own:  Saving a piece and flattening the copper material from the shield of the 1-5/8" coax as you prepare it for use is suggested.

At this point we are ready to do some preliminary tuning - and this will require a NanoVNA or similar:  It is presumed that the builder will have familiarity with the NanoVNA to make S11 VSWR and S12 insertion loss measurements on an instrument that has been properly calibrated at the frequency range in question.

Setting the NanoVNA to measure both VSWR and through-loss over a span of 130-160 MHz, connect it to the cable and you should see a pass response somewhere in the frequency range and if all goes well, the peak in the pass response will be somewhere in the 130-140 MHz range.

Adjusting the center frequency and passband response is an iterative process as reducing the coupling by pulling out the capacitors (the RG-6 center conductor) will also increase the frequency.  Practically speaking, only about 3/8"-1/2" (9-12mm) of center conductor is needed at most to attain optimal coupling so don't be afraid to pull out more and more of the capacitors.

A bit of experimentation is suggested here to get the "feel" of the adjustment - and here are a few pointers:

  • Figure 9:
    The band-pass filter sitting against a Sinclair
    Q2220E 2-meter Duplexer - a good combination
    for receiver protection at a busy repeater site!
    Click on the image for a larger version.
    Lowest SWR is obtained with the coupling capacitors are identically adjusted.  If the SWR isn't below 1.5:1, try pulling out or pushing in one of the capacitors slightly to determine the effect - but move it only about 1/16" in each iteration.  Generally speaking, pulling one out slightly is the same as pushing the other in slightly in terms of reducing VSWR.
  • The passband response will be narrower the less of the RG-6 center conductor is in the capacitor tubes - but the insertion loss will also go up.
  • The frequency will go up the more the passband response is narrowed by reducing the coupling capacitors.
  • With the lengths given (e.g. 17" for air-core 16-1/8" for foam core) the passband will be within the 2 meter band with the amount of coupling that will yield about 0.5-0.6 dB insertion loss.  To a degree, you can "tune" the center frequency of the cavity by adjusting the coupling.  It is recommended that you first tune for the bandpass response - and then tune it to frequency: See below for additional comments.
  • It is recommended that you use a little coupling as needed to obtain the desired response.  For example, if the cavity is "over coupled", the insertion loss will be about 0.5dB, but this will go up only very slightly as the coupling is reduced and the response is narrowed.  At some point the insertion loss will start to go up as the passband is further-narrowed.
  • As the coupling capacitor is pushed in, the resonant frequency will go down.  If, even with the "tuning capacitor" (the copper strips) are minimized in coupling,  the frequency is too low, try pulling the RG-6 capacitors out slightly to move it up in frequency:  It's easy to accidentally "over couple" the cavity by pushing them in too far and causing it to tune low.   It's likely that you can pull more of the RG-6 capacitors out and reducing coupling than you might first think and still have acceptably-low insertion loss - and doing so will narrow the passband response and improve ultimate off-frequency attenuation.

As mentioned above, it's recommended that the approximate passband width be set with the capacitors and if all goes well, the pass frequency can be adjusted with just the adjustment to the coupling with only a slight change in overall bandwidth.  If, however, the desired "narrowness" results in a pass frequency above that which is desired, a simple "tab" capacitor can be constructed as shown in the photo.

Figure 10:
The "close-in" response of the band-pass cavity.
With the current settings providing a bit less than 0.5dB of
attenuation at the center, it's rejection at the edges of the
U.S. 2 meter band (144-148 MHz) is a bit over 8 dB.
Click on the image for a larger version.
This capacitor consists of two parts:  A 3/8" (10mm) wide, 3/4" (20mm) long piece of copper or brass sheet is soldered to the center conductor.  The addition of this piece, alone, may lower the center frequency and bending this tab up and down can provide a degree of fine-tuning.  If the center frequency is still too high, another 3/8" wide, 3/4" long piece can be soldered to the shield of the coax next to it and be bent such that it and the first piece form two plates of a simple capacitor, allowing even greater reducing in resonant frequency of the cavity.

With the preliminary tuning done, a bit of reinforcement of the box is suggested:  A strip of copper circuit board material 3/8"-1/2" (9-12nn) wide is soldered between the inside walls of the box with the RF connectors.  This strip minimizes the flexing of the walls with the RF connectors due to stresses on the connected cables which can change the orientation of the coupling capacitors and cause slight detuning.

With this reinforcement in place, do a final tweaking of the bandpass filter's tuning.

Final assembly:

As noted earlier, it's strongly suggested that the shorted end of the cavity be covered to prevent debris and insects from entering either the center conductor or, especially, the space between the shield and center conductor.  This may be done using electrical tape or RTV (Silicone) adhesive.

Figure 11:
A wider sweep showing the rejection at and below the FM
broadcast band and up through 225 MHz.  This
filter, by itself, provides over 40 dB rejection at 108 MHz
Click on the image for a larger version.
Similar protection should be done to the top of the box:  A piece of brass or copper sheet - or a piece of PC board material could be tack-soldered into place - or even some aluminum foil tape could be used:  The tuning should be barely affected - if at all - by the addition of this cover, but it is worth verifying this with a simple test-fit of the cover.

Additional comments:

While the performance will vary depending on the coupling and tuning, the prototype, tuned for a pass response at 146.0 MHz, performed as follows:

  • Insertion loss at resonance:  <0.5dB
  • -3dB points:  -88 kHz and +92 kHz
  • -10dB points:  -2.5 MHz and +2.75 MHz
  • -20dB points:  -7.6 MHz and +11 MHz
  • 2:1 VSWR bandwidth:  600 kHz
  • Loss <=108 MHz:  40dB or greater

More detail about the response of this cavity filter may be seen in figures 10 and 11.  In the upper-left corner of each figure may be found the measured loss and VSWR at each of the on-screen markers.

If a higher insertion loss can be tolerated, the measured bandwidths will be narrower.  Depending on the situation, an extra dB or two of path loss may be a reasonable trade-off for improved off-frequency rejection - particularly on a noisy site where the extra loss won't result in a degradation of system sensitivity due to the elevated noise floor.

As with any cavity-type filter, there is a bit of fragility in terms of frequency stability with handling.  If, after it is tuned this - or any cavity filter - is dropped or jarred strongly, the tuning should be re-checked and adjusted as necessary.

There's no reason why this cavity couldn't be used for transmitting, although using the materials described (e.g. the center conductors of RG-6) I would limit the power to 10-15 watts without additional testing.

As it is, this band-pass filter - in conjunction with a conventional 2-meter duplexer - can provide a significant reduction in off-frequency energy that could degrade receiver performance.  As can be seen in Figure 2, the pass cavity may still pass energy from odd-order (3rd, 5th) harmonics that may fall within commercial/70cm and TV broadcast frequencies - but the addition of a VHF low-pass filter - perhaps even the VHF side of a VHF/UHF mobile diplexer - would eliminate these responses.

To be a good neighbor on a busy site it's strongly recommended that a pass cavity also be installed on the transmit side, along with a ferrite isolator (e.g. circulator with dummy load) to deal with signals that may enter into the transmitter's output stage and mix, causing intermodulation distortion and interference - both to your own receiver and those of others. 

* * * * * * 

Specific use cases:

Reduction of ingress from FM broadcast transmitters:

The most obvious use case would be the filtering of co-located FM broadcast transmitters.  Despite being about 50 MHz off-frequency, a nearby FM transmitter - which often runs hundreds if not thousands of watts - can couple into a 2 meter antenna with sufficient energy to overload a receiver, causing the appearance of distorted audio from the wideband FM modulation of the broadcast transmitter to appear on the receiver.  I have been on sites where the measured power at the receiver terminals, after passing through the 2 meter duplexer, have been on the order of 10 to 20 dBm (10-100 milliwatts) and actually registered as reflected power on an SWR bridge.

As can be seen from the above graphs and measurement, the filter described is capable of reducing this signal by at least 40 dB - likely enough to prevent gross overload of the receiver in question.

Reduction of commercial high-band VHF signals:

While less common these days, there are still systems like community repeaters operating above the 2 meter band in the 150-170 MHz range.  These, too, can cause receiver degradation and the fact that these signals may be intermittent (e.g. a repeater that isn't used too often) can often frustrate the analysis of intermittent "desense" issues.  Even this humble cavity is capable of reducing such a signal by about 20 dB at and above 155 MHz - more, if one were to reduce the coupling (and response bandwidth) of the cavity:  In severe cases, the slightly higher insertion loss of the filter (say, 1.5 dB instead of less than 0.5 dB) may well be worth the trade-off in off-frequency rejection.

* * * * * *

"I have 'xxx' type of cable - will it work?"

The dimensions given in this article are approximate, but should be "close-ish" for most types of air and foam dielectric cable.  While I have not constructed a band-pass filter with much smaller cable like 1/2" or 3/4", it should work - but one should expect somewhat lower performance (e.g. not-as-narrow band-pass with higher losses) - but it may still be useful.

Because of the wide availability of tools like the NanoVNA, constructing this sort of device is made much easier and allows one to characterize both its insertion loss and response as well as experimentally determining what is required to use whatever large-ish coaxial cable that you might have on-hand.

* * * * * *

Future article: 

I have constructed several effective notch-type cavities from this type of coaxial cable - including one that is designed to attenuate 144.39 MHz APRS energy in a 147 MHz repeater's receiver - but since there are relatively few articles about pass-type cavities constructed in this way, I decided to post this one first.

Related articles:

  • Second Generation Six-Meter Heliax Duplexer by KF6YB - link  - This article describes a notch type duplexer rather than pass cavities, but the concerns and construction techniques are similar.
  • When Band-Pass/Band-Reject (Bp/Br) Duplexers really aren't bandpass - link - This is a longer, more in-depth discussion about the issues with such devices and why pass cavities should be important components in any repeater system.

 

This article was stolen from ka7oei.blogspot.com

[END]


Wednesday, December 28, 2022

Exploring the NDK 9200Q7 10 MHz OCXO (Oven-controlled Crystal Oscillator)

Figure 1:
The NDK 9200Q7 OCXO.  This unit, pulled from
used equipment, is slightly "shop-worn" but still
serviceable.  The multi-turn tuning potentiometer
is accessible via the hole at the lower-left.
Click on the image for a larger version
The NDK 9200Q7 (pictured) is an OCXO (Oven-Controlled Crystal Oscillator) that occasionally appears on EvilBay or surplus sites.  While not quite as good a performer as the Isotemp 134-10 (see the 17 October, 2017 Blog entry, "A 10 MHz OCXO" - Link) it's been used for a few projects requiring good frequency stability, including:

  • The 146.620 Simulcast repeater system.  One of these is used at each transmitter site, which are held at 4 Hz apart to eliminated "standing nulls" - and they have stayed put in frequency for over a decade. (This system is described in a series of previous blog entries starting with  "Two Repeaters, One System - Part 1" - Link).
  • 10 GHz transverter frequency reference.  One of the local amateurs used one of these units to hold his 10 GHz frequency stable and it did so fairly well, easily keeping it within a  hundred Hz or so of other stations:  This was good enough to allow him to be easily found and tuned in, even when signals were weak.

At least some of these units were pulled from scrapped VSAT (Very Small Aperture SATellite) terminals so they were designed for both stability and the ability to be electronically tuned to "dial in" the frequency precisely.

Testing and experience shows that given 10-15 minutes to thermally stabilize, these units are perfectly capable of holding the frequency to better than 1 part in 108 - or about 1 Hz at 100 MHz - and since any of these units that you are likely to find about are likely to be 25-30 years old, the intrinsic aging of the quartz crystal itself is going to be well along its asymptotic curve to zero.

Figure 2:
The bottom of the OCXO, annotated to show the various
connections.
Click on the image for a larger version.

Using this device

In its original application, this device was powered from a 12-15 volt supply, but if you were to apply power and give it 5-15 minutes to warm up, you would probably be disappointed in its accuracy as it would not have any sort of external tuning input to get it anywhere close to its intended frequency.

Because of the need for it to be electrically tuned, this device is actually a VCXO (Voltage-Controlled Crystal Oscillator) as well and as such, it has a "Tune" pin, identified in Figure 2.  Nominally, the tuning voltage was probably between 0 and 10 volts, but unless a voltage is applied, this pin will naturally drift close to zero voltage, the result being that at 10 MHz, it may be a dozen or two Hz low in frequency.

Adding a resistor

The easiest "fix" for this - to make it operate "stand-alone" - is to apply a voltage on the pin.  If your plans include locking this to an external source - such as making your own GPSDO (GPS Disciplined Oscillator) then one simply need apply this tuning voltage from a DAC (Digital-to-Analog Converter) or filtered PWM output, but if you wish to use this oscillator in a stand-alone configuration - or even as an externally-tuned oscillator, a bit of modification is in order.

Figure 3:
This shows the 10k resistor added between the internal 5 volt
source and the "TUNE" pin to allow "standalone" operation.
Click on the image for a larger version.
The OCXO may be disassembled easily by removing the small screw on each side and carefully un-sticking the circuit board from the insulation inside.  Once this is done, you'll see that there are two boards:  The one on the top is part of the control board for the heater/oven while the bottom houses some of the oscillator components.

Contained within the OCXO is a 78L05 five-volt regulator which is used to provide a voltage reference for the oven and also likely used as a stable source of power for the oscillator - and we can use this to our advantage rather than need to regulate an external source which, itself, is going to be prone to thermal changes.

Figure 3 shows the addition of a single 10k resistor on the top board, connecting the "TUNE" pin to the output of this 5 volt regulator.  By adding this resistor, the TUNE pin allows one to use this OCXO in a "standalone" configuration with no connection to the "TUNE" pin as it is is automatically biased to a temperature-stable (after warm-up) internal voltage reference and can then be used as-is as a good 10 MHz reference, using the onboard multi-turn potentiometer to precisely set the frequency of operation.

Figure 4:
More pictures from inside the OCXO
Click on the image for a larger version.
Another advantage of adding the internal 10k resistor is that it's easy to reduce the TUNE sensitivity from an external voltage:  This value isn't critical, with anything from 1k to 100k likely being usable.  Testing shows that by itself, the oscillator is quite table and varying the TUNE voltage will adjust it by well over 10 Hz above and below 10 MHz.

The inclusion of the 10k internal resistor may also be of benefit.  In many cases, having a much narrower electronic tuning range than this will suffice so a resistor of 100k (or greater) can be used in series with the TUNE pin, between it and an external tuning voltage, acting as a voltage divider.  Doing this will reduce the tuning range and it can also improve overall stability since much of the tuning voltage will be based on the oscillator's already-stable 5 volt internal source.  The stability of the OCXO itself is such that even with a 10-ish:1 reduced tuning range due to a series 100k resistor, there is still far more external adjustment range than really necessary to tune the OCXO and handle a wide range of external temperatures.

The actual value of the added internal resistor is unimportant and could be selected for the desired tuning/voltage ratio based on the external series tuning resistor and the impedance of the tuning voltage.

When reassembling the OCXO, take care that the insulation inside the can is as it was at the time of disassembly to maximize thermal stability and, of course, be sure that the hole in the can lines up with the multi-turn potentiometer!

Operating conditions

Figure 5:
Even more pictures from inside the OCXO.
Click on the image for a larger version.
The "official" specifications of this OCXO are unknown, but long-term use has shown that it will operate nicely from 12-15 volts - and it will even operate from a 10 volt supply, although the reduced heater power at 10 volts causes warm-up to take longer and there may not be sufficient thermal input for the oven to maintain temperature at extremely low (<15F, <-9C) temperatures unless extra insulation is added (e.g. foam around the metal case.)

It is recommended that if one uses it stand-alone, the voltage source for this device be regulated:  While the on-board 5 volt regulator provides a stable reference without regard to the supply voltage, the amount of thermal input from the oven will change with voltage:  More power and faster heating at higher voltage.  While you might think that this wouldn't affect a closed-loop system, it actually does owing to internal thermal resistance and the fact that due to loss to the environment, there will always be a thermal gradient between the heater, the temperature-sensitive circuitry, and the outside world - and changing the operating voltage and thus the amount of heater power will subtly affect the frequency.

Finally, this oscillator - like any quartz crystal oscillator that you are likely to find - is slightly affected by gravity:  Changing orientation (e.g. turning sideways, upside-down, etc.) of this oscillator affects its absolute frequency by a few parts in 10E-8, so if you are interested in the absolute accuracy and stability, it's best to do the fine-tuning adjustment with it oriented in the same way that it will be used and keep it in that orientation.

* * * * * * * * *

This page stolen from ka7oei.blogspot.com

[End]


Friday, December 2, 2022

An LCD Retrofit and color display for the Schlumberger SI 4031 Communications Test Set

Figure 1: 
The front panel and original green monochrome screen
of the 4031.  A close look shows the "blistering" on the
screen protectors due to delamination, making the
display more difficult to read.
Click on the image for a larger version.
The Schlumberger SI 4031 is a early-mid 1990s vintage communications test set (a.k.a. "Service Monitor") - a device that is designed to test both receivers and transmitters used in the telecommunications industry.  The 4031's frequency range is 400 kHz to 999.9999 MHz making it useful as a general-purpose piece of test equipment, particularly for the testing of amateur radio gear.
Some of its built-in functions include wattmeter, signal generator with modulator for AM, FM and phase-modulated radios, spectrum analyzer, tracking generator and oscilloscope to mention but a few.

As you would expect from a device from the 1990s, the original display used a CRT (Cathode Ray Tube) based monitor operating at something "close" to PAL horizontal and vertical scan rates.  While the CRT monitor in this unit is still in reasonable shape - aside from requiring a "re-cap" (e.g. replacement of electrolytic capacitors) I decided to take on the challenge of putting a more "modern" LCD-type display in it - perhaps taking advantage of a minor savings in both weight and power consumption.

This requires no electrical modification of the 4031 itself and only minor mechanical changes to mount the LCD panel and its related hardware.  (This may also work for the 4032, a version of this unit that covers up to 2 GHz - see below for comments.)

Is it "PAL"

While the pedants would say that a monochrome-only signal cannot be PAL, the reference is, instead, to the horizontal and vertical scan rates of 15.625 kHz and 50 Hz, respectively which are close to those found in the PAL system used in Europe.  As is typical for pieces of non-consumer gear and test equipment, the horizontal and vertical synchronization signals and the video are brought out independently of each other, each being represented as a TTL signal.

Figure 2:
The horizontal sync pulse train showing 25%
D.C. pulses at 15.625 kHz, TTL level.
Click on the image for a larger version.
The video display generator of the 4031 is interesting in that it uses a UPD7220A graphics controller to facilitate interaction with the CPU (e.g. access memory, produce characters, etc.) but two separate display RAMs (8k x 16 bits) with one being used for access by the UPD7220A and the other, copied from the first during the vertical interval, for pixel read-out - the latter function being done with a combination of "glue logic" and programmable logic devices.

The forgiving nature of the CRT monitor

One nice feature of a CRT monitor is that it can be quite forgiving of deviations from standard video applied to it.  Many - but not all - all-in-one sync decoder chips used in CRT monitors are happy with taking horizontal and vertical signals that are "close" to some standard - but not exact - and lock onto it satisfactorily.  Such is the case with the 4031:  While there are separate horizontal and vertical synchronization signals, neither is quite standard, but it's "close" enough for the old monitor.

Figure 3: 
The vertical sync, showing a 10% duty cycle
pulse at about 50 Hz.
Click on the image for a larger version.

For example, the horizontal synchronization signal is simply an uninterrupted 25% duty cycle pulse train occurring at the horizontal sweep rate of about 15.625 kHz (e.g. 16uSec long) while the vertical synchronization is a 50.08 Hz 10% duty cycle (e.g. 2 msec long) pulse train.  Unlike sync signals found in other applications, the horizontal signal does not contain any sort of blanking (suppression of pulses) during the vertical interval.

Within the 4031's original CRT monitor, the horizontal and vertical synchronization signals are handled completely separately (by a TDA2593 and TDA1170, respectively) so the fact that they are non-standard is irrelevant.

Unfortunately, any modern LCD display device that is expecting a PAL-like signal (in terms of timing) isn't likely to be happy with separate, non-standard synchronization inputs.

Initial attempts:

Initially, I was hoping that an off-the-shelf LCD monitor display like the 7", 4:3 aspect CLAA070MA0ACW with a driver board could be made to work with these signals with no other hardware, but my work was thwarted by the fact that its VGA input - which might handle separate horizontal and vertical sync signals - would not function at PAL video rates - only VGA rates, which have roughly twice the horizontal and vertical frequencies.  While it may have been possible to modify the firmware on this board and re-flash it with one of the "customized" versions found in various corners of the Internet, I chose not to do this.

I then attempted to make a simple analog sync combiner circuit and apply the signal to the composite video input, but found this to be unstable - plus there was the fact that the video display board itself did not have the capability of setting the horizontal and vertical size to fully-fill the screen to the edges, something desirable to make the active screen area fully-fit the window on the front and also align with the buttons along the bottom of the screen.

After a bit more research, I decided to get a GBS-8200 video converter board (Version 4.0), a relatively inexpensive digitizing board designed to convert the myriad of video formats from CRT-based arcade video games and computer inputs to VGA which would then be inputted to a standard monitor and the CLAA070MA0ACW display driver board.  As such, I presumed that it would be far more forgiving to variations from standard video signaling - and I was, fortunately, correct

Sync (re)processor:

While I was originally hopeful that I could simply apply the horizontal and vertical sync inputs to the GBS-8200, the non-standard sync timing (pulse width, lack of a gap of horizontal sync pulses during the vertical interval) did not produce stable results, so a simple circuit had to be devised to modify the sync signal:  This basic circuit is shown below.

Figure 4:
Diagram of the sync processor itself.
This circuit will produce a sync to which the GBS-8200 board can lock.  The single video output
is connected to the RGB input of the GBS-8200 to produce a monochrome (single color)
display as seen in Figure 6.
Click on the image for a larger version.

This circuit works as follows:
 
The horizontal and vertical sync pulses are input to and buffered by sections of a 74HC14, Schmidt-trigger inverters which server to "clean up" the input signals as necessary.  An inverted version of the vertical sync pulse holds U3, a 4017 counter in reset until a vertical interval occurs.

Figure 5:
The circuit in Figure 4 built
on a prototyping board, the
results seen in Figure 6.
Click for a larger image.

During the vertical pulse U3, the counter, is clocked by the horizontal sync pulses and on the 5th count, the timer is stopped, setting the input of U2b, a 4011 NAND gate wired as a simple inverter, high.  U2d is used to "gate" the output of the counter - being only active only when the timer has stopped at the 5th count and during the vertical interval meaning that its output goes high only when the timer is actually counting - not while it's stopped at its terminal count or held in reset. The output of this gate is combined with a "re-inverted" copy of the vertical sync to produce a new version of the vertical sync that is about 225 microseconds long rather than the original 2 milliseconds as depicted in Figure 7 (below).

FWIW, I used the 4011 NAND gate because I found a rail of them in my parts bin - but I couldn't find any 74HC00s at the time which would have worked fine, albeit with a different pin-out.  Similarly, either CMOS CD4017 or 74HC4017 counter would have been fine as well considering the low frequencies present.  I would, however, recommend using only the 74HC14 (or 74HCT14) as it's plenty fast for the video data and it has fairly "strong" outputs (e.g. source/sink currents) as compared to the older and slower CD4069 or 74C14 hex Schmidt inverter.

Note that while it would theoretically be possible to use a one-shot analog timer to generate a new, shorter pulse, doing so would result in visible jitter of the video signal (I tried - it did!) as that timing would neither be consistent or its length precisely synchronous with the horizontal timing:  The use of the horizontal sync to "re-time" the duration of this new vertical pulse assures that the timing of the new pulse is synchronous with both sets of pulses and completely jitter-free.

This new, re-timed vertical sync pulse is then applied to U2a which gates it with the horizontal sync:  The output is then inverted by U1c to produce a composite sync signal (see Figure 7, below) that, while not exactly up to PAL standards, is "close enough" for the GBA-8200 video converter - configured for "RGBS" mode - to be happy.

Elsewhere in the diagram may be seen inverter sections U1d-U1f:  These are configured as buffers to condition the TTL video input and provide a drive signal to the video input of the GBA-8200.

Suitable for a monochrome image!

The circuit in Figure 4 is sufficient, by itself, to drive the GBS-8200 and produce a stable VGA version of the 4031's video signal.

Figure 6:
The monochrome output from the GBS-8200 board using the
sync processor seen in figures 4 and 5 via an external monitor.
Click on the image for a larger version.
The "VID_OUT" signal may be connected to the Red, Green and Blue video inputs of the GBS-8200 and the input potentiometers adjusted for a single color:  White will result if the individual channels' gains are set equally, but green, yellow or any other color is possible by adjustment of these controls.

Figure 6 shows the result of that:  The VGA output from the GBS-8200 was connected to an old 4:3 computer monitor that I had kicking around, producing a beautiful, stable, monochrome signal.

Full-color output from the 4031

The SI 4031's video output is a single TTL signal, meaning that there is not even any brightness information, making it capable of monochrome only.  Fortunately, it is possible to simulate context-sensitive color screens with the addition of a bit of extra circuitry and firmware as described below.

The portion of this circuit used for processing the sync pulses is based on that shown in Figure 4:  A few reassignments of pins were done in the sync re-timer, but the circuit/function is the same.  What is different is the addition of U5, a 74HC4066 quad analog switch and U6, a PIC16F88 microcontroller, and a few other components.

How it works:

The video signal is buffered by U1d-U1f and applied to R1, a 200 ohm potentiometer, the wiper of which is applied to Q1, a unity-gain follower to buffer the somewhat high-impedance video from R1 to something with a source impedance of a few ohms and, more important, constant output with varying load.  The "bottom" end of R1 is connected to U5c, on section of the 74HC4066 which, if enabled, will shunt some of the video signal to ground, reducing its intensity, adjustable via R1.  Via diode D1, this line is also connected to a pin of the microcontroller - the "MARK" pin - more on this later.

Figure 7:
Top (red) trace: The composite sync from the
circuit of Figures 4 & 8.  Bottom (yellow) trace:
The original vertical sync pulse  for comparison.
Click on the image for a larger version

The output of Q1 is then applied to U5a, U5b and U5d via 100 ohm resistors.  These analog switches will selectively pass the video to the Red, Green or Blue channels of the monitor, depending on microcontroller control.  At the outputs of each of these switches may be found a resistor and diode in series (e.g. D2/R6) and these are connected to output pins of the microcontroller:  If these pins are driven low by the microcontroller, the diode drop and series resistance of the 33 ohm resistor (e.g. R6) and the 100 ohm resistor (e.g. R3) and the output transistor of the microcontroller will shunt some of the voltage and reduce the amplitude on that channel to provide a means of brightness control, increasing the color palette.

I'd originally intended to place emitter-follower video drivers (e.g. the circuit of Q1 in Figure 8) on each of the R, G, and B outputs, but the very short lead length to the input of the GBS-8200 (e.g. no visible signal reflections) - and the ability to adjust the RGB input gain via its three potentiometers - eliminated this requirement as additional losses through the analog switches and other components could be easily compensated.

Figure 8:
Added to the sync processor of Figure 4, above, is a PIC16F88 used to analyze the video from the 4031
and "colorize" the resulting image. 
See the text for information as to how this works.
Click on the image for a larger version.

With the combination of the three 4066 gates, the "!BRITE" pin, and the three "dim" pins (e.g. "!R_DIM", "!G_DIM" and "!B_DIM") over two dozen distinctly different colors and brightness levels may be generated under processor control.

The magic of the microcontroller

U6, a PIC16F88 microcontroller, is clocked at 20 MHz, its fastest rated speed.  Because its job is to operate the four switches comprising U5 - and the three "dim" pins on the video lines - it must "know" a bit about the video signal from the 4031:

  • The "!V_SYNC" pin gets a conditioned sample of vertical sync from the output of U1a:  It is via this signal that the U6 "knows" when the scan restarts at line one.
  • The "!H_SYNC" signal from the output of U1b is applied to pin RB0, which is configured to trigger an interrupt on the falling edge (the beginning) of the horizontal sync.
  • The "!VID" signal is applied to pin RA4, which is the input of Timer 0 within the microcontroller:  This is used to analyze the content of lines of video to determine the specific content as the timer is able to "count" the number of times that the video goes from low to high on these scan lines -  In other words, a sort of "pixel count".

In operation, the start of each horizontal sync pulse triggers an interrupt in the microcontroller.  If this coincides with the start of the vertical interval, the line count is restarted.

Video content analysis:

Figure 9:
Mounted inside the 4031, the sync processor board is on the
far left, the six pins of the ICSP (In Circuit Serial
Programming) connector being easily accessed.  The buttons
and controls for the other two boards are also accessible.
Click on the image for a larger version.

Visual inspection of each of the screens on the 4031 will reveal that they contain unique attributes.  Most obvious is the title of the screen located near the top, but other content may be present midway down the screen - or very near the bottom - which may be used to reliably identify exactly which screen is being displayed, having determined the "pixel count" for certain lines on each of these screens beforehand.

For each subsequent horizontal sync pulse and corresponding interrupt, the count contained within hardware timer 0 is read - and the timer is immediately reset.  For a number of specific scan lines, their unique counts are stored in RAM.

Attention to detail is required!

Determining the pixel count consistently requires a bit of care in the coding.  As mentioned, this count is based on an interrupt-driven routine that reads the content of hardware timer 0 - but this also means that the code must be written in a way that guarantees that the time between the start of the horizontal sync pulse (and subsequent entry into the interrupt service routine) and the read and reset of timer 0 is as consistent as possible, considering the asynchronicity of the timing of this interrupt and the CPU clock.

What this implies is that the reading this timer and its resetting must not only be done in an interrupt, but that it also be the first thing done within the interrupt function prior to any other actions, particularly any conditional instructions that could cause this timing to vary, resulting in inconsistent pixel counts - something that would preclude the use of anything other than a quickly-responding interrupt.  Another implication is that this interrupt may be the only interrupt that is enabled as preemption by another one would surely disrupt our timing.

Immediately following this action is the setting of the color and brightness attributes by ANDing a copy of the current content port/pin registers to remove the brightness/color bits and then ORing that data with the pre-calculated color/brightness bit mask data into those same registers so that any changes in these attributes occur to the left of the visible pixels in the scan line.

A limitation of this hardware/software is that it is likely not possible to satisfactorily set different colors horizontally, along a scan line - it is possible only to change the color of complete scan lines:  To do this would, at a minimum, require extremely precise timing within the interrupt service routine, adding complexity to the code - and it's not certain that satisfactory results would even be possible.   To do it "properly" would certainly require more complicated hardware - possibly including the regeneration of another clock from the horizontal pixel rate - but doing this would be complicated by the fact that the pixel read-out rate is asynchronous with the sync as noted later.

Using the pixel counts:

At the beginning of the vertical interval, outside any interrupts, the previously-determined counts of low-to-high transitions is analyzed via a series of conditional statements and a variable is set indicating the operating "mode" of the 4031.  This "mode" information is then applied to another look-up table to determine the color to be used for that screen.

One complication is that like other analog video, that coming from the 4031 is interlaced meaning that for certain scan lines - particularly those with diagonal elements - that the pixel count may vary for a given scan line.  Unlike "true" video, the sync pulses from the 4031 contain no obvious timing offset (e.g. "serrations" in the sync) to offset by half a line or identify the specific video field, but with an analog monitor, this wasn't really much of an issue as it would simply paint a line on the screen in "about" the right place, anyway.

For most screens, simply looking at pixel counts of between four and six different lines - most of them on lines from 4 to 15 - was enough to uniquely identify a screen, but others - particularly the "Zoom" screens - sometimes require even a greater number of pixel counts and other techniques to reliably and uniquely identify the screen being displayed.

In particular, differentiating between the "SINAD" and "RMS-FLT" Zoom screens was problematic as both resulted in the same pixel counts for all of the lines usable for unique identification:  The only way to detect the difference was due to the fact that for some lines, the pixel count for the "SINAD" screen would vary due to the aforementioned video field differences - or possibly due to interaction between the asynchronicity of the pixel clock, the CPU clock, and the way counts are registered on a counter input without hardware prescaling.  It was the fact that the count of the SINAD screen varied that allowed it to be reliably differentiated from the "RMS-FLT" screen, which had a very consistent pixel count.

Coloration of the screen:

Many screens on the 4031 have different sections.  For many screens, the upper section contains the configured parameters (e.g. frequency, RF signal level, etc.) while the lower portion of the screen shows the measured values or an oscilloscope display:  Simply by knowing which screen type is being displayed and the current line number, those sections can be colored differently from other portions.

Deciding what color to make what is a purely aesthetic choice, so I did what I thought looked good.  Because about two-dozen different colors are possible, I chose the brightest colors for the most commonly-used screen segments, setting these colors by the function to which they were related.

Finally, all screens have, along the bottom, a set of labels for the buttons below the bottom of the screen:  These may be colored separately as well - and I chose gray (a.k.a. "dim white").

Analyzing the video to determine "pixel counts":

When writing the firmware, a few simple tools were included, notably some variables, hard coded at compile time, that would display the pixel counts.  If, for example, one needed to determine the pixel count for line #14, the pixel count display variable would then be loaded with the pixel count for line 14.  For example, the oscilloscope screen capture shows a pixel count capture:  The left-most pulse is 4 units long followed by a single-unit pulse (meaning "10") followed by a 2 unit long pulse with three more pulses - for a pixel count of 13.

Figure 10:
An example of the "pixel" count:  The 4-unit
wide pulse followed by one pulse represents 10
and the 2-unit wide pulse followed by 3 pulses
represent a pixel count of 13 on the selected line.
Click on the image for a larger version.

Another variable may be set to visually identify which scan line is being counted.  When the scan line being counted occurred, the "MARK" pin would be set high causing an on-screen indication of which line was being inspected, offering a "sanity check" and a visual reference to know which line, exactly, was being checked.

During the vertical interval, pin "RB3" would then be strobed with a series of pulses to indicate the pixel count - a "long" pulse lasting four CPU cycles followed by pulses of 1 CPU cycle, each to indicate the "tens" digit (if any) and a shorter pulse of two CPU cycles followed by the requisite number of 1 CPU-cycle pulses to indicate the "ones" digits. 

Using an oscilloscope triggered on the signal on RB3 (pin 9) these pulses could be read visually on the oscilloscope and by switching between the different screens on the 4031, the "pixel count" of this line for the various screens could be determined:  Repeating this for several different scan lines allow unique identification of all screens.  In the event that there is false detection of a mode, this "pixel count" output could also be configured to show the number of the current modes (in a "#define" statement) when they are detected to aid in debugging.

Comments:

In producing this firmware, I have only one version of the 4031 (with Duplex option) available to me.  Different versions of the 4031 - and the 4032 - may have "other" screens not included in the analysis, or slightly different layout/labeling that will foil the analysis of the scan line.
The way the firmware doing the screen analysis is written, if the scan line analysis doesn't find a match to what it already "knows" about it will cause that screen's text to be displayed in the default color of white.

At present this "scan line analysis" can only be done by setting certain variables in the source code and recompiling - but this was made easier by the inclusion of the "ICSP" connector (noted on the diagram in Figure 8 and visible in Figure 9) to allow in-circuit programming, while the unit is operating.  In theory, it may be possible to come up with some sort of user-interactive means of setting individual screens' colors which could be used to set the colors on screens of different firmware versions or with features that I don't have in my 4031, but this would require significantly more work on the firmware.

Figure 11:
The 4031 with the retrofit LCD operational.
This isn't a perfect photo because it's very difficult to take
a picture of an operational electronic display!
Click on the image for a larger version.

Color mode selection:

With the lack of the CRT monitor, there is no need for an "intensity" control, but rather than leave a hole in the front panel a momentary switch was fitted at this position.  Connected between ground and pin RB7, using the processor's internal pull-up resistor, this switch is monitored for both "short" and "long" button presses.

A "short" press (less than 1/2 second) toggles between "bright" and "dim" using the same color scheme, but a "long" press (1.5-2 seconds) changes to the next the color mode.  At the time of this writing, the color modes are:

  • Full-color screens.  The screens are colored according to mode and context as described above.
  • Green.  All components of the screen are green.
  • Yellow.  Like above, but yellow.
  • Cyan.  Like above, but cyan.
  • Pink.  Like above, but pink
  • White.  Like above, but white

In some instances (e.g. high ambient light) selecting a specific color (green or yellow) may improve readability of the screen.  These settings selected by the switch are saved in EEPROM (10 seconds after the mode was last changed) so that they are retained following a power-cycle.

* * * * * * *

The hardware

Several bits of hardware are required to do this conversion and if you are of the ilk to build your own circuits, nothing is particularly difficult.  Personally, I spent at least as much time making brackets and pieces and mounting the hardware in 4031 as I did writing the firmware.

Sync processor:

At a minimum, the "simple" sync processor mentioned above (Figure 4) is required to provide a synchronization pulse that is recognizable by the converter board.  If one doesn't wish to have different color modes available, this is certainly an option.

Having said that, the "colorized" 4031 afforded by the circuit described in Figure 8 is quite nice - perhaps a bit of an extravagance.  If the 4031 were originally equipped with a color monitor, I can imagine it looking something like the the images in the "Gallery" section of this article, below.

"Where's the PCB?"

As can be seen in Figures 9 and 21 the circuit in Figure 8 was constructed on glass-epoxy perfboard - the type with individual rings around each hole:  I did not design or lay out a PCB as I could build 2 or 3 of these in just the time that it would take to do so - and that wouldn't include the revisions or debugging.

Constructed in this way, I could easily try out new ideas - one of which was the later addition of the "D_RED", "D_GREEN" and "D_BLUE" brightness controls which were included on a whim fairly late in testing:  This was trivial to test and add to the perfboard, but I would certainly have not bothered with this significant enhancement if I'd already "frozen" the design in the embodiment of a PC board.

Unless I feel inclined to build a bunch more of these, I'm not likely to design a PCB, but if YOU do, let me know so that it may be shared. 

GBS-8200:

Figure 12:
The GBS-8200 video converter board.  This is "V4.0" of
the GBS-8200 which includes an on-board voltage regulator
allowing it to run from 5-12 volts.
Click on the image for a larger version.

There appear to be several versions of the GBS-8200 around - possibly from different manufacturers and some of these are designed to be operated from a 5 volt supply ONLY, but many have on-board voltage converters, allowing them to be operated from 5 to 12 volts:  The version that I have is the "V4.0" board with a "5-12 volt" input which eliminates the need for yet another voltage conversion step.  If you look carefully at the photo of the GBS-8200, the inductor for the buck converter is visible near the upper right-hand corner of the board, between the power connector the white video-out connector marked "P12" - but the silkscreened "DC 5V-12V" is also a big give-away!

This board, readily available via EvilBay and Amazon for well under US$40, is specifically designed to take a wide variety of RGB video formats - typically from 70s-90s video games and computers - and convert them to VGA format.  There are several connectors for video input seen along the bottom edge of the photo:  The three phono plugs for component video, an input on a VGA connector, and next to the VGA connector, two white headers for cable:  The unit that I purchased included a cable that plugs into the header between the VGA input and the three potentiometers.

At the top of the board, the VGA connector outputs the converted video - but there is also a white header next to it with these same signals.  As mentioned elsewhere, I simply soldered the six wires (R, G, B, H, V, and Ground) to the board, at this white header as I didn't happen to have another male HD-15 cable in my collection of parts.

This device can accept YUV and RGB inputs - and the latter can have either separate or composite sync inputs.  As the sync signals from the 4031 are non-standard, it's required that the sync processor described above produce a composite sync and the GBA-8200 be switched to the "RGBS" mode (using the "mode select" button) where the composite sync is fed into the "H-Sync" input and the "V-Sync" input is grounded.

The RGB inputs to the GBS-8200 come from the 4031, either as a single video source that is connected to all three inputs in the case of the "simple" (monochrome) version of the sync processor or from the RGB lines of the color version.  On board the GBA-8200 are three potentiometers visible in the photo above (near the lower-left corner) that are used to scale the input levels of the RGB signals to provide color tint/balance as desired.  In the lower-right corner can be seen the buttons used to configure the GBS-8200.

The "Splash" screen:

I've been asked how to get rid of the "splash screen" with Chinese characters when the unit is powered up.  This is from the GBS-8200 and (apparently) cannot be removed without flashing new firmware to it - which may be possible in theory.  The easiest way to suppress this screen would be to have a power-on delay of the LCD itself (or its back-light) that would wait until this screen had been displayed.  Such a device could be as simple as a 555 timer driving a relay with a 5-ish second delay.  Because this is a such a simple circuit - and a simple circuit board that can do this may be found on EvilBay and/or Amazon - I'll leave the implementation up to the reader.

External monitor:

The use of the GBS-8200 has an interesting implication:  It would be perfectly reasonable to use an external display with a VGA input (or VGA to HDMI converter) with the 4031.  This has the obvious advantage of being larger and the possibility of being placed conveniently when making adjustments where the 4031's itself may be too distant or awkwardly placed and small monitors like this are relatively inexpensive.  Additionally, it offers the possibility of being able to display to a larger group of people (e.g. teaching) and being digitized and recorded, as was done with the images at the bottom of this article.

Simply connecting a monitor to the VGA output of the GBS-8200 in parallel with the built-in LCD monitor would work - perhaps even as a short, permanent cord mounted to the rear (somewhere?) or hanging out of the 4031 should this be frequently required.  With a short (8", 20cm) "extension" cable permanently connected, any degradation caused by having an unterminated cable (when the external monitor was not connected) could likely be ignored and the rather low resolution of this display - as could be the slight diminution in brightness - when two monitors were connected at the same time (e.g. "double terminating").  Practically speaking, a buffer amplifier could be built to isolate the R, G, B and sync signals (using the simple emitter-follower circuit of Q1 see in Figure 8) to feed the external monitor.

Because there's no obvious place on the back panel to mount such a connector - and since I don't envision the frequent need for it - I did not so-equip my '4031.

Navigating the GBS-8200's menus

The four buttons used to configure the board are seen on the corner of the board at the top of the photo above.  Initially, the GBS-8200's menu system may be in Chinese, but the 4th menu allows the selection of either English or Chinese and it is changed to English with the following button-presses:

  • Menu - > UP -> Menu -> Menu 

At this point the text is now in English.

Other screens include:

  • "Display" - Which sets the output resolution:  A setting other than 640x480 is suggested.
  • "Geometry" - Which sets the position and sizes, along with how the blanking interval is to be treated.  Suggested initial settings are:
    • H position: 94
    • V position: 26
    • H size 56
    • V size: 66
    • Clamp st:  83
    • Clamp sp: 94
  • "Picture" - Which sets other display properties.  A setting of 50 is suggested for Brightness, Contrast and Saturation and a value of 05 is suggested for Sharpness.

The CLAA070MA0ACW display:

This is a 7" diagonal VGA screen of 4:3 aspect ratio and is available with a driver circuit board on EvilBay for around US$50.  Be sure that you get the version with the display controller board and not just the bare display panel, by itself. 

This unit is rated to operate from about 6 to 12 volts, and it comes with both an infrared remote and a small daughter board and interconnect cable that replicates the functions of the remote:  The remote is not required for this project as the daughter board and its pushbuttons will suffice.

Figure 13:
The driver board supplied with the CLAA070MA0A0ACW
LCD panel.  At the top is the VGA input while the TTL
to the panel is at the bottom, the back-light power connector
being in visible in the lower-right corner of the board.
Click on the image for a larger version.
The LCD panels themselves appear to be "pulls" from some consumer product (perhaps a portable DVD player?) as they have evidence of having been previously mounted, but the price is reasonable and their size is precisely that which may be used in lieu of the 4031's CRT, being a few millimeters larger than the window on the front of the 4031 in both axes making them a perfect fit by virtue of their being 4:3 aspect ratio:  It's possible that one could find a newer 16:9 that would fit horizontally in the available space, but it would likely leave a gap above and below the screen.

This unit will accept composite analog, HDMI and VGA, but it is VGA that we require, fed from the GBA-8200 via a short cable:  I constructed a very short (3", 7.5cm) cable, soldering one end directly to the GBA-8200 board itself (I could find only one 15 pin HD connector) just long enough to reach the VGA input connector of the display.  If desired, one could install a switch/distribution amplifier and provide a VGA connector to feed an external display - or likely get away with "double terminating" it as noted elsewhere.

This LCD came with a small board taped to the back of the display that is used to convert to a the flat ribbon cable supplied with the unit, used to connect to the display controller board via the "TTL OUT" connector:  This PC board should be glued to the back of the LCD panel with RTV or other rubberized glue (but not cyanoacrylate!) to mechanically secure it or else it is likely to work its way loose and tear the cable from the LCD panel.  When connecting to the "TTL OUT" connector on the main driver board, one must carefully lift up the locking lever (the black plastic piece that runs its width) from the back on the connector, slide in the cable, and push the lever back down.  The cable itself isn't marked as to which way is "up", but putting it in upside-down won't damage anything - but you'll see nothing on the screen:  Mark this cable when you determine its proper orientation.

There is also a short cable provided for powering the LCD panel's back light:  You won't likely see anything on the panel if this is not connected!

Figure 14: 
The original delaminating screen protector with EMI shield,
held in place with 10 screws and two brass angle pieces
around its perimeter.  This holds the front bezel in place.
Click on the image for a larger version.
Mounting the LCD panel:

The display is mounted "upside-down" (the wider portion of the metal border around the LCD panel being on top) to clear mechanical obstructions around the front panel of the 4031.  Fortunately, configuring for this display orientation can be accommodated via a menu on the display driver board as follows:

  • Select the "Function" menu
  • Go to "Mode"
  • Use the up/down buttons to select "SYS2"

The ONLY modification required of the 4031 to use the LCD display is mechanical.  Unlike the original CRT module - which was mounted in a large cavity behind the front panel - the LCD itself is mounted to the front panel of the 4031 while the other circuit boards (sync processor, GBA-8200,  CLAA070MA0ACW controller board) are mounted in the cavity formerly occupied by the CRT.

Figure 15:
The original screen protector (center) and copies, sitting atop
the laser cutter.  These were cut from 0.060" thick poly-
carbonate plastic.
Click on the image for a larger version.
Front screen protector: 

On the 4031s that I have, the CRT is protected by a plastic sheet containing embedded metal mesh for RFI/EMI shielding - which didn't actually seem to be grounded, anyway.

Unfortunately, over the years, this sheet tends to de-laminate and "bubble",  making viewing the screen rather difficult, so I duplicated a replacement using 0.060" polycarbonate using a laser cutter.  The use of polycarbonate over other types of clear plastic (like acrylic) is recommended due to its resiliency:  It can be bent nearly in half without breaking and is likely to stand the occasional impact from the connector of a cable or a bolt without cracking.  Acrylic, on the other hand - unless it is quite thick - would crack with such abuse.  For convenience, the dimensions of this screen protector are shown below.

While the original screens had EMI/RFI mesh embedded within them, these replacements will not.  The "need" for such shielding may be debated, but its worth noting that many similar pieces of equipment have no such shielding.  I did a bit of searching around for plastic windows with embedded mesh, but other than a few random surplus pieces here and there, a reliable source could not be found - but if you know if such a source, or even thin-wire widely-spaced mesh, please let me know.

Figure 16:
The dimensions of the screen protector - just in case
you might want to make your own!
Click on the image for a larger version.
One possible saving grace is the nature of the CRT versus the LCD:  A CRT has the potential (pun intended) to cause EMI owing to the fact that its surface is bombarded by an rapidly-changing electron beam that varies at MHz frequencies - and this can radiate a significant E-field.

The LCD, on the other hand, is a flat panel with low voltage and backed by a grounded metal plate, so the opportunity for it to radiate extraneous RF is arguably reduced.

Removing the front panel:

The front face of the 4031 comes off as a unit by removing the "Intensity" control knob, the two screws on either side that hold it into the unit's frame (the "second" screws from the top/bottom) and carefully unplugging three ribbon cables.  Inspection reveals that the screen protector is, itself, mounted to a bezel held in by several screws.

In my 4031, the original  the (de-laminated) front screen protector is extricated by removing the ten small screws around its perimeter (Figure 14)  and noting the way the pieces of brass angle that may be included are mounted - which allows it and front bezel to come out:  It looks to me like this screen protector may have been replaced in the past and it could be of slightly different construction than what was provided from the factory - but this is only a guess.

Figure 17:
After fully-tapping the 2.3mm screws, these aluminum angle
pieces with slots were attached to the aluminum bars seen
in Figure 14.  It is into these bars that the LCD panel, with
attached brackets, mount.
Click on the image for a larger version.

Removing the front screen protector will reveal two aluminum bars on either side - each with metal "finger stock" on the "inside" of the screen area - mounted to the front panel by countersunk screws hidden by the bezel that holds the screen cover.  Inspection will reveal that there are three holes along these bars that are not tapped all of the way through.  I removed these bars and purchased a 2.3mm tap and completed the threads so that I could insert 2.3mm x 6mm screws from the "other" (back) side.  It would have been about as easy to have drilled entirely new holes and tapped them for 4-40 screws (or your favorite Metric equivalent) and, in retrospect, I should have probably done so.

Using scrap pieces of aluminum, a pair of angle brackets were fashioned, held to the aluminum bars by the newly-tapped screws in those bars as seen in Figure 17.

To accommodate the momentary switch, I had to file away a portion of the bracket and bar on the left side ("behind" that in Figure 17 and this not visible) as well as countersink the back side of the plastic lens bezel so that it would accommodate the mounting hardware of the momentary switch and sit flush.

Into the brackets, slots were cut with a saw - also visible in Figure 17 - and it is into those that the angle pieces - now attached to the LCD - slide to allow adjustment of depth and very slight adjustment of axial rotation.  The LCD was located about 3/8" (10mm) behind the polycarbonate lens for clearance to protect the LCD panel itself should something be dropped on it - like a cable, RF connector or tool.

Figure 18:
The two brackets and new screen protector mounted in the
front panel assembly of the 4031.
Click on the image for a larger version.

As seen in the pictures, there is no obvious way to mount the display itself so a section of right-angle aluminum was cut and these were glued using "Shoe Goo" (a resilient rubber adhesive) to the back of the display itself, using the mounts fabricated to hold the display itself in position (described below) as a positioning guide:  It's likely that RTV (silicone) would have worked as well but I would not use an ineflexible adhesive like epoxy or cyanoacrylate ("Super Glue").

As this is done, it's very important to make sure that these brackets are installed correctly so that the display is both centered and square with the 4031's window:  I recommend actually mounting the display in place while the adhesive sets so that it perfectly fits the mechanical environment and there is no stress on the display itself as screws are tightened when it is mounted. When I did this, I put some "painters tape" on the front of the display and lightly marked it so that I could precisely set the horizontal and vertical position of the display with reference to the front bezel before the glue set.

Electrically connecting to the 4031:

Figure 19:
Two aluminum angle pieces with holes were glued to the back
of the LCD panel, now mounted in the front panel.
Click on the image for a larger version.
The connection of the original monitor to the 4031 is via an industry-standard 14 connection IDC ribbon cable/connector connected to the monitor and an exact duplicate was ordered from Digi-Key (P/N:  H1CXH-1436G-ND).  On this cable are the ground, power, sync and video connections as follows:

  • 1, 2:  +15 volts
  • 3-6:  Not connected
  • 7:  Vertical sync (positive-going pulse, TTL level, 50 Hz)
  • 8:  Ground
  • 9:  Horizontal sync (positive-going pulse, TTL level, 15.625 kHz)
  • 10:  Ground
  • 11:  Video  (positive-going, TTL level)
  • 12:  Ground
  • 13, 14:  Not connected

It's perhaps easiest to empirically determine these pins by stripping a small amount of insulation from the end of the wires and using a combination of volt/ohmmeter and oscilloscope to positively identify them, the ground pins being identifiable plugging in the other end of the cable and using continuity to the chassis with the unit powered down and then (carefully!) verifying them with the unit powered up, being very careful to avoid connecting the +15 volt wires to anything else.  Once identified, the wires that are marked as "not connected" were trimmed back slightly, the two +15 volt and three ground wires were (separately!) connected in parallel and the wires themselves colored using markers to aid in later identification.

Mounting the boards:

Figure 20:
The "stack-up" of the boards on the mounting sled.  Hidden
by the ribbon cable is the sync processor, above that is the
the GBS-8300 with its output VGA connector and above
that is the LCD controller with 4-button daughter board.
At the bottom, on the sled, may be seen the 7812
regulator used to drop the 15 volt supply to 12 volts.
Click on the image for a larger version.
A "sled" about 6" (155mm) wide and about 4.75" (120mm) tall - designed to be mounted to the left-hand wall (as viewed from the front panel) inside the enclosure.  This was constructed from a sheet of scrap aluminum and on it, the sync processor board, the GBS-8200 and the LCD controller were mounted using an assortment of stand-offs.  The different shapes and sizes of these boards complicated matters, so I had to be creative, resorting to mounting the LCD controller - and its daughter board (with pushbuttons and infrared receiver) to a piece of glass-epoxy PCB material that was, itself, held in place with stand-offs, seen in Figure 20 as the board on the vary top.

While I happen to have a bunch of stand-offs in my parts bins, I could have just as easily mounted the boards using long screws or "allthread" along with an assortment of nuts and washers.  These days, a more elegant custom mount could also be 3D-printed to hold these boards in place, although the metal "sled" and stand-offs offer a solid electrical connection to the chassis that may aid in RFI shielding and mitigation.

The only critical things in mounting are to provide access to the ICSP connector and R1 ("gray" adjust) on the sync processor board, the buttons on the GBS-8200, and the buttons on the daughter board on the LCD controller:  All of these should be accessible with just the top cover of the 4031 removed, without needing to disassemble anything else as depicted in Figure 21.

Figure 21:
Installed and powered- up, the stack-up of boards and
connected LCD panel.  All controls - and the ICSP
connector - are accessible simply by removing the top cover
of the 4031.
Click on the image for a larger version.
Into this "sled" were pressed self-retaining "PEM" nuts and it is mounted at four points in the same slots (using 8-32 screws) on the left side of the frame that were used to mount the original CRT monitor.

Powering the boards:

As noted above, the GBS-8200 is available in a version that may operate from 5-12 volts.  Similarly, the LCD panel's board can also accommodate up to 12 volts - but the 4031 supplies 15 volts.  During development, I ran both boards on the 4031's 15 volt supply directly with no issues, but I noted that 16 volt electrolytic capacitors were used on the inputs, so 15 volts would be pushing their maximum ratings.

Despite having no issues, I decided not to take a chance, so I added a 7812 voltage regulator, bolting it to the aluminum "sled" for heat-sinking (see Figure 20) and powering both the GBS-8200 and LCD panel from it.  As seen from the diagram above, the sync processor includes its own regulator (a 7805) and it may be powered from either 12 or 15 volts.

Overall results

Figure 22:
Under the shield of the "Monitor Control" board is R16, the
"width" adjustment that may be use to optimize video quality.
Click on the image for a larger version.

The results of all of this work look quite good as can be seen in the picture gallery below, but there are slight visual artifacts owing to the fact that the VGA conversion is from a device (the '4031) that does not have its pixel clock synchronized with the sampling clock of the GBS-8200 - or even the horizontal sync pulse.  The inevitable result is - if you look closely - that you may see some slight "glitching" on the leading or falling edge of vertical lines.

This effect can be reduce somewhat by adjusting the read-out pixel clock from the 4031's Monitor Control board.  Located on this board, under the shield, is potentiometer R16.  Nominally set to 11.0 MHz (as monitored at test point "Mp10") the frequency of this clock output may be reduced by turning this potentiometer slightly clockwise, reducing the effects of this aliasing somewhat by increasing the "width" of the display by making it output the line of video "slower".

If this adjustment is done, it should be done iteratively:  If it is set too low, the beginning of the line will start before the current line has finished drawing causing you to be able to see the left edge of the screen along the far right edge.  By adjusting the "Horizontal Width" on the GBS-8200, some of this overlap can be moved off the right edge of the screen so a balance between this and a low clock frequency must be found.  The approximate frequency set by R16 after this adjustment is between 7.75 and 8.0 MHz.

As mentioned earlier, trying to set a color horizontally across a scan line is not really practical:  The fact that, as we have seen, the pixel read-out rate is a free-running oscillator that is not synchronous with any of the the video sync pulses, so there is no "easy" way to synchronize a clock signal to set color attributes along the scan line from the video information alone.  To do so would require a sample of the pixel clock itself from the Monitor Control board!

In theory, it may be possible to tie the internal pixel clock to an already-existing clock signal on the Monitor Control board (e.g. the 8 MHz clock) to allow this and to reduce the "glitching" that is sometimes visible:  This modification is open to investigation.





Photo gallery

The following are screen captures obtained by first connecting a VGA-to-HDMI converter to the VGA output of the GBS-8200 board, and then connecting the HDMI output to a USB3 HDMI capture device meaning that the image is re-sampled several times in the process, accumulating artifacts. 


Figure 23:
The main "RX FM" screen.  The top portion is colored as light magenta to indicate an RX-FM screen while the center portion is colored in yellow.  The "soft" buttons on the bottom of the screen are given the attribute of a "gray" color.
Click on the image for a larger version.


Figure 24:
The TX FM screen, the top portion color-coded as light-cyan.
Click on the image for a larger version.


Figure 25:
The "duplex" screen, the top portion color-coded as light-green.
Click on the image for a larger version.

Figure 26:
The "oscilloscope" screen.  Because it is an "RX FM" screen, the top portion is colored with light-magenta, with the portion with the scope trace is colored light yellow.
Click on the image for a larger version.

Figure 27:
The analyzer display, color coded as light cyan as it's one of the "TX FM" modes.
Click on the image for a larger version.

Figure 28:
The Modulation Monitor "Zoom" screen, color coded as light magenta as it's one of the "RX FM" modes.
Click on the image for a larger version.

 

Video captured from the 4031:

Here is a short video,captured from the output of the GBS-8200, as the various screens are selected on the 4031:

 

At the end of the video, the monochrome modes (green, yellow, etc.) are selected in sequence.

Remember:  The video on the LCD mounted in the 4031 looks quite a bit better than is represented in the video - not only because it's a smaller screen, but the capturing of the video from the VGA output added yet another stage of analog digitization/degradation - plus there are artifacts from the YouTube video compression as well.

* * * * * * * * * * * * * * * * 

Why use a PIC?

One might ask, "Why did you do this with a PIC rather than an Arduino or a Raspberry Pi?"

First, I've been using the PIC Microcontrollers since the early 1990s, making good use of the CCS "PICC" compiler - (LINK) for much of this time:  This compiler is capable of producing fairly tight and compact code and I'm very familiar with it.  The PIC16F88 was chosen because it has the necessary hardware peripherals, it's easy to use, has plenty of RAM, program space and speed for this task, and is still available in DIP (and SMD) packages - a real plus in these days of "supply chain" issues.

The code running on the PIC uses interrupts and as such, it's possible that its same function could be done on a lower-end Arduino UNO as that processor sports similar hardware capabilities - but it's unlikely that this could be done using the typical Arduino IDE sketch environment, which does not, by default, lend itself to latency-critical interrupt processing.  You would have to get much closer to the "bare metal" and implement lower-level interrupts and some careful coding (possibly in mixed "C" and assembly) in order to have the code operate fast and consistently enough to do the pixel counting.

Another possibility is to use an ESP8266 or ESP32, but again one would need to get closer to the "bare metal" and optimize timing of the code to handle this sort of task - and you would still need to have the same sort of hardware (sync reprocessor, control of the RGB) signals.

Finally, a Raspberry Pi - if you can get one - would be overkill - and it would take MUCH longer for the RPi to boot up than the service monitor, which is up and running in under 15 seconds from power-up:  You would still need to interface the same signals (sync, video), but to 3.3 volt logic, and you would still need the same hardware (analog switches, etc.) to modify the video attributes - not to mention the time-critical code on a non-realtime operating system to do the pixel counting but this task could be done with additional hardware if needed.

Where can I get the code?

You may find the source code (for the CCS "PICC" compiler - I used version 5.018) and a compiled .HEX file for the PIC16F88 at the following links:

The .HEX code above is suitable for "burning" into a PIC16F88, and I use the PicKit3 programmer's ICSP (In Circuit Serial Programming) for this:  It's possible to reprogram the device in a powered-up 4031 - but because the code is written to detect when the ICSP is connected, it won't resume normal operation until the cable is disconnected.

As mentioned before, I have only one version of the 4031, so if your device has "different" screen signatures that result in pixel counts that don't match what's in the code, that screen will be rendered with white text.  Due to the complexity of the screen detection via pixel counting, making the recognition of the screen an automated process so that one could provide user-defined configurations would require a significant addition to the code - and likely the need for much more code space.

With the information provided it should be possible to apply this technique using other hardware platforms/microcontrollers - provided that one has either the speed to reliably count pixels at MHz rates and/or is able to get close enough to the "bare metal" of the processor to use on-chip peripherals to aid in the task.  In either case, close attention to the way the code operates - possibly a bit of optimization - will likely be required to pull off this task.

Final comments:

The most obvious change in the appearance of the 4031 after the modification - other than the colorized screen - is that of readability.  Clearly, the replacement of the degraded screen protector improved things considerably!

One advantage of the CRT - assuming that it is in good condition - is that it can be very bright, meaning that the LCD is at a slight disadvantage where high ambient light might be an issue:  In this case, one of the available "monochrome" modes may help.

The most obvious disadvantage of the LCD is that unlike the CRT, which has essentially a Lambertian emission profile from its surface (e.g. it radiates light hemispherically from the plane of the surface of the CRT), the LCD, by its very nature, has a comparatively reduced viewing angle.

When faced with viewing difficulties one would, in practice, simply relocate or reposition the 4031 so that it was more favorably oriented - and in some instances switching to one of the large "Zoom" screens may help when reading from a distance and/or awkward angle:  If you wish to do so, you could take advantage of the ability to use an external LCD monitor (small 7" units are fairly inexpensive) as described above.

Installing an LCD panel - with a blemish-free screen protector - and having "colorized" screens is a nice "refresh" of the 4031, particularly if you have been dealing with an ailing CRT for which there is no modern, drop-in equivalent.

* * * * * * * * * * *

This page stolen from ka7oei.blogspot.com


[END]