Wednesday, January 25, 2017

An A/B Battery replacement for the Zenith TransOceanic H-500 radio, with filament regulation

A friend recently gave me an old Zenith TransOceanic (ZTO) H-500 and after re-aligning it to get it into proper working condition I decided that I wanted a battery pack for it - both for "completeness" as part of making it look as original as possible and to allow the radio to be used outdoors, away from interference sources.  While it might be said that the GoogleWeb is lousy with options to replace the obsolete "A/B" battery used to power the Zenith TransOceanic, that wasn't a deterrent for me to design and build yet another one.

While it is easy to use a lot of 1.5 volt cells to get the 9 and 90 volts required to operate the radio, I decided to make do something different.

Figure 1:
The faux A400 "AB" battery, installed and working in the Zenith Trans
Oceanic H-500.  Contained therein are eight "D" type cells and circuitry
to produce the 90 volt "B" voltage and a regulated 9 volts for the
filament supply.
Click on the image for a larger version.
I threw a computer at it.

While it might seem odd to wield a microcontroller to solve a relatively simple problem on an antique, tube-type radio, it does make sense in a few ways as I'll outline below.

Design goals:

There are several things that I decided that this voltage converter should do:
  • Automatically power up when the radio is turned on and shut down when it is turned off. 
  • Cause no interference to radio reception.
  • Consume minimal current when the radio is turned off.
  • Produce a regulated B+ voltage so that radio performance is consistent.
  • Regulate the filament voltage so that the radio functions properly even when the battery is mostly discharged so that maximum use can be made of its total capacity.
While I was at it I decided that it should be able to do a few other things as well:
  • If the radio is on for a long time (e.g. more than about 2 hours) do a "power save" shut down to (hopefully) prevent the batteries from being completely flattened.
  • "Lock out" the operation of the radio if the batteries are already extremely low.  Avoidance of completely killing the battery may reduce the possibility of their leaking.

Generating the "B+" voltage:

The "B Battery" (high voltage) needs of the ZTO are rather modest:  pproximately 90 volts at 5-20 milliamps.  Aside from using a battery of sixty 1.5 volt cells or ten 9 volt batteries in series there are two common ways to generate this sort of voltage electronically:
  • Use a step-up transformer to take the low battery voltage to the appropriate B+ potential, typically using a low-voltage mains transformer in "reverse" (e.g. applying drive to the secondary, rectifying high voltage from the primary.)
  • The use of a simple boost-type converter using a single inductor.
The first method has the advantage that it is possible to design it such that the switching of the driving transistors is "slow" enough (at a modest efficiency loss) that it does not produce harmonics that may be picked up by the receiver - even at the lowest receive frequencies, and without shielding.  If you are interested in a good discussion of this method visit Ronald Dekker's excellent page on the subject (link).
Figure 2:
Test circuit to determine the suitability of various inductors and transistors
and to determine reasonable drive frequencies.  Diode "D" is a high-speed,
high-voltage diode, "R" can be two 10k 1 watt resistors in parallel and
"Q" is a power FET with suitably high voltage ratings (>=200 Volts)
and a gate turn-on threshold in the 2-3 volt range so that it is suitable
to be driven by 5 volt logic.  V+ is from a DC power supply that is
variable from at least 5 volts to 10 volts.  The square wave drive, from a
function generator, was set to output a 0-5 volt waveform to
make certain that the chosen FET could be properly driven by a 5 volt
logic-level signal from the PIC as evidenced by it not getting perceptibly
warm during operation.
The second method - and the one that I chose - uses a boost-type converter as depicted in Figure 2.  The switching frequency must be much higher than one would use with an ordinary mains transformer, typically in the 5-30 kHz range if one wishes to keep the inductance and physical size of that inductor reasonably small.  With these higher frequencies and the typically "square" drive signals (which are rich in harmonic content) needed to obtain good efficiency there is a much greater likelihood that it will interfere with reception - particularly in the AM broadcast band.  While a bit of a nuisance, the interference potential may be easily mitigated by putting the entire circuit in a metal box and appropriately bypassing and filtering the leads in and out.

Raiding my inductor drawer I picked a few "power" devices (those capable of handling at least half an amp) in the range of 100μH and 1 mH and threw together the circuit in Figure 2, consisting of a high-voltage FET (Q), the inductor under test (L), a high voltage, high speed diode (D), a 22μF, 160 volt capacitor (C) and a 5.6k, 2 watt load resistor (R).  Connecting the FET's gate to the square wave (50% duty cycle) TTL-level output of a signal generator I measured each one in terms of output voltage, total output power and overall power conversion efficiency with respect to frequency.

As would be dictated by the plethora of design articles on the subject, not to mention data sheets of switching regulator chips, I noted that neither the value of the inductance or switching frequency was particularly critical to achieve the desired results.  In general, higher inductances produce a bit more output at the lower frequencies (a few kHz) while the lower inductances worked a bit better in the 10-30 kHz range, but all of the inductors did work over the entire range to a greater or lesser degree.  Settling on a decent-sized 330μH inductor - a value that is not particularly critical - I proceeded with the circuit design.
Figure 3:
Schematic diagram of the voltage converter.  See text for details.
Click on the image for a larger version.
The circuit:

Rather than go through a lot of theory I'll just describe the circuit that I designed and built - See Figure 3, above.

When the radio's power switch is turned on its filament circuit is connected and a voltage appears across the "Batt-" and "A-" leads and R7, a 10k resistor connected across switched-off FET Q4 which are in series with the filaments.  When this happens transistor Q3 is turned on, pulling the base of Q1, a PNP transistor in the high side of the BATT+ line, toward ground and turning it on and applying power to U3, a 78L05 voltage regulator, and microcontroller U1, a PIC12F683.  After a short initialization delay the microcontroller activates the "PWR_SW" line, turning on Q2 which assures that Q1 is always turned on even if the filament switch is turned off abruptly and Q3 turns off or, as we shall see, when the battery voltage is at or below the filament regulator's set point.

At this point the microcontroller enables interrupt-driven code to produce the high voltage (B+) output by monitoring it via resistor divider R18/R19/R20:  If the voltage is below the threshold, the duty cycle of the PWM signal output on the "SW_DRIVE" line is increased to force more energy storage in the inductor (L1) - up to a maximum limit of around 80%, set in software.  If the voltage is above the threshold, the duty cycle is decreased - down to zero and even into "discontinuous" mode (e.g. the PWM signal intermittently turned off and on) if necessary as would be the case if there were no load on the output.  In this way the output voltage is appropriately regulated, typically to 90 volts as set by R19.  In this circuit when the PWM signal turns off Q5, the high voltage FET, the magnetic field in L1 collapses and induces a high voltage across it.  The current resulting from this field collapse is rectified by high-speed, high-voltage diode D2 and stored and filtered by C8 and additionally filtered and smoothed by R21 and C9.
Figure 3:
The (mostly complete) converter board.  The high-voltage FET (Q5) is
in the lower left corner while the filament regulator FET is in the lower-
right corner.  In the upper right corner is U2, the rail-to-rail dual op-amp
that is part of the filament regulator.  Because of the very small amount of
heat being dissipated by any component, no heat sinks were required.
The high voltage filtering components and the optoisolator are in the
upper left corner.
No circuit board is available - but if you design one, I'd be happy
to post information about it and give you credit! 
Click on the image for a larger version.

Because the battery voltage could be as high as 16 volts if ten fresh "1.5" volt cells were used it is necessary to regulate the filament voltage down to something around 8.5-9 volts.  Op amp section U2b is configured as a "difference amplifier" (a.k.a. subractor) that measures the voltage difference between the "A-" and the "A+" lines (the filament supply to the radio) and this calculated voltage difference is output from U2b and applied to the inverting input of U2a via scaling potentiometer R14.  The voltage at the inverting input of U2a as set by this potentiometer is compared to the "reference" voltage applied to its non-inverting input and if the voltage is low, its output voltage is increased so that FET Q4, which is placed between the A- and BATT- connections, conducts more to increase the filament voltage.  Conversely, if the voltage is too high, the output voltage of U2a to Q14's gate is reduced, decreasing its conductivity.

The use of the circuitry of U2b is necessary because neither the A- or A+ (filament) leads are referenced to the circuit ground (e.g. they are sort of "floating") which makes it necessary to measure the difference between those two leads to ascertain the actual filament voltage.  If the battery voltage does get low enough that Q4 is completely "on", the voltage across R7 will disappear and Q3 will turn off:  It is because this can happen that we must have activated Q2 to keep the microcontroller's power turned on and this is also why we cannot use the voltage drop that we used to tell if the radio was turned on to also detect if the filament current has ceased to flow when the radio is turned off.

Note:  It would have been possible to have used a microcontroller to regulate the filament voltage in a manner similar to that in which the high voltage is produced, but a programming bug or crash could cause the fragile, expensive tubes to be exposed to the full battery voltage whereas a malfunction of the high voltage generator is unlikely to cause damage to the radio.

A short time after the high voltage converter is enabled the "FIL_SW" line is set high.  Because the microcontroller has low-impedance FET output drivers, this pin's voltage is essentially that of the 5 volt regulator and it is used as the filament voltage reference.  Similarly, if the microcontroller sets the "FIL_SW" line low (zero volts) this will shut off the filament supply.

With the use of a MOSFET (e.g. Q4) as the filament control device, the series regulation of the filament has a very low drop-out voltage - that of the voltage drop across the FET, limited by its own "on" resistance, and the wiring used to carry the filament current - and this drop can be as low a few 10s of millivolts.  What this means is that if the filament voltage is set to 9.0 volts by R14, as long as the "A" battery voltage exceeds that by a few 10s of millivolts, the filament will always be maintained exactly 9.0 volts but if the "A" supply (battery voltage) drops below 9.0 volts, Q4 will be turned fully on and the filament voltage will be within 10-20 millivolts of that battery voltage.  Compared with the operation of a typical "low dropout" regulator IC that has around 0.15-0.3 volts drop, the circuit used here offers a lower voltage drop and better radio performance in those situations, particularly when even a few tenths of a volt can make a lot of difference!
Figure 4:
Inside the completed voltage converter.  All leads going in and out are
bypassed with low-ESR electrolytic capacitors and further filtered with
series chokes as shown in Figure 3.  The use of a completely shielded
enclosure (top not shown) is necessary as direct E-field radiation from the
circuit will otherwise be heard on the radio.  This box is made from
cut pieces of circuit board material, soldered at the seams inside and out,
with cut-in-half nickel-plated brass standoffs soldered to the board being
used to support the circuit and at the corners to attach the lid.
Click on the image for a larger version.

A second or so after the application of the filament voltage - enough time for the tubes to warm up - the microcontroller starts to "look" at the current drawn on the B+ lead as detected by U4, an opto-isolator that is in series with this supply.  Once the tubes warm up and begin drawing current, U4's internal LED turns on, activating its internal phototransistor which then pulls the "HV_IMON" (high voltage current monitor) line low, indicating to the microcontroller that the radio is now operating.  At this point the microcontroller is in a mode where it will repeatedly check to see that current is drawn by the radio on the high voltage line.

When the radio is turned off the current on the B+ line will disappear due the loss of the tubes' emission caused by the filaments being turned off and, possibly, the B+ line being disconnected.  When this happens the LED in optoisolator U4 will turn off, its phototransistor will stop conducting, and the "HV_IMON" line will be pulled high indicating to the microcontroller that the radio has been turned off.  After a short "debounce" period to verify that this loss of current wasn't due erroneously detected, the microcontroller will shut off the high voltage generator, set the "FIL_SW" line low, powering down the filament regulator, and then set the "PWR_SW" line low which then disconnects the microcontroller's power source from the BATT+ line, removing load from the battery.

Why use eight 1.5 volt cells rather than just six to get the filament voltage?

Why not just use six 1.5 volt cells to get "9 volts" for the filament string?  As it turns out only a set of six fresh 1.5 volt cells will actually produce 9 volts - and the voltage drops from there.  If one consults the manufacturers' specifications for alkaline cells it will be noted that the majority of the useful life of typical "1.5 volt" cells occurs with their voltage being in the range of 1.2-1.3 volts and it isn't until a cell gets all of the way down to 1 volt (for a total of 6 volts to the filaments for a six cell battery) that just 80% of the cell's capacity has been exhausted.

In this radio I noted that below an "A" battery potential of 8 volts (e.g. 1.33 volts/cell for 6 cells) the sensitivity started to drop and by the time it has dropped to around 7.5 volts (1.25 volts/cell for 6 cells) the radio was practically deaf with the oscillator abruptly stopping just below this.  Poking around inside the radio I noticed that at 9 volts, the series voltage drop across each of the tubes' filaments was very close to that shown on the schematic diagram in the service manual, but by the time it dropped to 7.5 volts it had become unequal, with the 1L6 converter tube being disproportionately affected and its filament voltage at or below 1 volt.  Interestingly this drop-off in sensitivity did not appear to be related to frequency:  The radio still worked at all frequencies with a filament voltage just above where it cut off, but it was just as deaf on the low bands as it was on the high.  Because the 1L6 tube is the component in this radio that is the most difficult to find, it would also make sense to construct the battery supply in such a way that it would allow the best operation from a "weak" tube, anyway.

For this reason I decided to use the battery voltage of eight 1.5 volt cells rather than the "9 volts" obtained from six cells for two important reasons:
Figure 5:
Inside the faux "AB" battery box for the Zenith TransOceanic.  Eight
"D" cells are used in four holders (one 4-cell,  one 2-cell and two 1-cell) which,
along with the converter box, are screwed down to some plywood (3 layers of
3.2 mm "luon") which itself is glued to the bottom of the box.  The cover,
made from the same circuit board material as the box containing the circuits,
has both of its surfaces electrically connected using thin, copper foil soldered
to each side to assure that an electrical connection is made to the box
itself when the cover screws are tightened.  The authentic-looking replica
battery box and radio connector were obtained from "".
Without having made the voltage converter smaller, there is room only for
eight "D" cells in the box.
Click on the image for a larger version.
  • The higher voltage of eight 1.5 volt cells (12+ volts when fresh) would allow the total filament potential ("A" voltage) to be regulated down to 8.0-9.0 volts.  (For longest filament tube life, one should run the filament string in the 8.0-8.5 volt range - the lower end being somewhat preferred if the radio's performance is still acceptable.)
  • The use of an extra two cells will allow the use of more of the battery capacity.  For example, with 8 cells discharged to 1.0 volts each, around 80% of the cell's useful life has been utilized with the ending voltage still being 8 volts.  Contrasting this to the use of just six cells, at a total "A" voltage of just 7.75 volts (approx. 1.3 volts/cell for 6 cells) 40-60% of the life of the cells will remain, but the radio will likely be getting deaf or even may not be usefully operational!
  • In theory, ten 1.5 volt cells could be used.  Because the voltage of a "fresh" 1.5 volt alkaline is around 1.6 volts, this could expose some of the devices, particularly the electrolytic capacitors and U2, to voltage at or above the official maximum rating.  Practically speaking these devices will likely survive this, particularly since the voltage will very quickly drop under the load presented by the radio into the "safe" range.  The use of one or two additional 1.5 volt cells (e.g. 9 or 10) won't add more than 10-15% of "run time" to the radio so it is not likely to be worth using more than eight 1.5 volt cells.  (Nine cells would work as well, provided there was space in the battery box and that you were OK with using an odd number of cells.)
  • The typical filament current of this radio is on the order of 50 milliamps.  At a battery voltage of 12 volts where 3 volts is dropped by the series regulator, approximately 150 milliwatts is dissipated as heat - about 25% of the total filament power, or around 8% of the radio's total power consumption.  Were a switching regulator used for the filament its efficiency would likely be in the 85-90% range and increase of efficiency over the linear regulator would likely not be worth the added complexity.  Considering that the average voltage of the battery over its life will be around 10-10.4 volts (approx. 1.25-1.3 volts/cell) with a regulator dissipation of only 70 milliwatts, the difference in loss will be even lower.
With a fresh set of eight 1.5 volt "D" cells the current consumption was measured at 140-150 milliamps at very low volume and peaking to well over 250 milliamps when the volume was set to maximum on a strong station (lots of audio distortion!) with the filaments accounting for around 50 milliamps of the total.  While it has not been empirically tested (it's not particularly cheap to buy eight "D" alkaline cells just to run them down!) the estimated run times at "room" temperatures and normal receive volume to 1 volt per cell for various sizes of alkaline cells, based on manufacturers' data sheets are:
  • For "AA" size:  15-20 hours with reduced performance for an additional 1-2 hours.
  • For "C" size:  30-40 hours with reduced performance for an additional 3-5 hours.
  • For "D" size:  70-90 hours with reduced performance for an additional 6-10 hours.
If just six cells were used the filament voltage would drop below 7.5 volts in about half the time noted above and by then, the radio's performance will have likely diminished considerably.  In contrast, using eight cells and a filament voltage regulator the performance will remain essentially unchanged until the cells are about 80% discharged (around 1 volt/cell) and the radio's performance will drop from there.

Note that this circuit can be powered directly from a 12 volt supply or battery - just heed the warnings below about NEVER allowing the "Batt-" line to come in contact with the "A-" lead - or any part of the radio's chassis.  Because this radio has no AC (mains) power transformer, its chassis could be "hot" with mains voltage and as such it is already capacitor-isolated.

Additional comments about the circuit:

It should be noted that the "BATT-" and "A-" lines are isolated from each other.  These two lines should never be connected to each other as that would prevent the closure of the filament switch from being detected when the radio is turned on and it would bypass the filament regulator, exposing the tubes' filaments to the full battery voltage, likely destroying one or more of them!  The reason for putting the filament regulation in the negative lead is allow an N-channel FET to be used and to avoid the use of a P-channel device in the "high" side and the complications required in driving this device and keeping its circuit stable (e.g. avoiding spurious turn-on events and momentary loss of voltage regulation) when the unit is powering up or down.

Even more circuit comments:
  • Resistors R8 and R17 are used to bias their respected FETs "off" by default.  This is necessary as the outputs of the microcontroller are high-Z unless/until it is operating and these FETs could randomly turn on due to leakage currents without them.
  • Similarly R15, on the "reference" voltage for U2's filament regulator circuit from the microcontroller, pulls that output down before the processor initializes its outputs from their default "Hi-Z" state, eliminating a possible "glitch" of the filament voltage during circuit start-up and shut-down.
  • U2, the filament voltage regulator, MUST be a rail-to-rail input and output op amp.  An "ordinary" op amp such as the '1458 or '358 WILL NOT WORK PROPERLY under all conditions.  Some parts suggestions for suitable op amps are included in the schematic diagram of Figure 3.  In other words, if you use a "normal" op amp it is possible that this circuit will misbehave and expose the filaments to excessive voltage.
  • Resistor R9, a 470 ohm resistor in series with the output of U2a and FET Q4, isolates Q4's gate capacitance, preventing instability of the op-amp while C6 provides frequency compensation for the regulator circuit.
  • When powered down the quiescent current of this circuit is approximately 7μA and is a result of the battery voltage (minus the drop of D1) always being applied across the B+ voltage divider string R18, R19 and R20.  This amount of current is comparable to the self-discharge rate of modern alkaline cells and can generally be ignored.  If this amount of current were to really bother you, the  voltage converter circuit could be powered from the "V+_SW" line and transistor Q1 could be replaced with a P-channel power FET as noted on the diagram.
  • LED1 and LED2 are optional.  LED1 will glow when the microcontroller activates the "PWR_SW" line and can be used for troubleshooting.  For example, if no current is being drawn from the B+ line - or the converter is not working - the software will continually cycle:  It will turn on the high voltage, wait for current to flow and when not seeing it, it will turn off the high voltage again and retry after a few seconds causing LED1 to turn on and off.  LED2 is also optional and is used to indicate when the circuit is powered up by Q1, either by the microcontroller turning on Q3 and/or Q2 being activated by the voltage drop across R7 when the filament switch is closed.  If desired, it may be mounted to the battery box so that it is visible when radio's back cover is open.
  • Transistor Q5, used in the high voltage "boost" converter, must be rated for at least 200 volts and it should have a "logic level" gate threshold appropriate for turning the FET (more or less) fully on at just 5 volts:  Some suggested device types are noted on the diagram (Figure 3).  An additional device worth considering is the ON Semiconductor NDD02N40-1G, a 400 volt, 1.1 amp FET that has a suitably low turn-on threshold - and it's pretty cheap.
  • Components TH1, a 1 amp self-resetting fuse, and diode D1 protect the circuit against shorts or accidental reverse polarity by limiting the current to a reasonable value should this occur.  TH1 may be replaced with a 0.75-1 amp fast-acting fuse if so desired.
  • The PWM (switching) frequency is approximately 15.625 kHz and is based on the microcontroller's internal 8 MHz clock.  Both 7.8125 and 31.25 kHz were tried and the conversion efficiency was slightly lower (by approx. 1-5%) with the 330 μH inductor value chosen - an indication that the actual value of L1 isn't particularly critical.
  • The value of L1 may be anything from 220μH to 470μH - and even a bit beyond this range.  Make sure that the inductor used has a current rating of at least a half an amp or else internal resistive losses will significantly impact conversion efficiency.  If available, a toroidal inductor or other shielded type is preferred as it better-contains its magnetic field than solenoid styles.
  • The measured efficiency of the boost converter of the prototype was greater than 80% despite the power lost in R21, the "filter" resistor in series with the B+ output.
  • The 15 volt maximum supply voltage limit is set by the voltage rating of op amp U2 and possibly the ratings of the electrolytic capacitors exposed to the battery voltage.
  • If one chose to use just six 1.5 volt cells instead of eight, never supplying more than 9 volts, the "FIL_SW" line would be connected directly to the gate of Q4 and the circuitry related to U2 would be omitted.  Do note that six "fresh" 1.5 volt alkaline cells could initially produce a bit over 1.6 volts/cell and expose the filament string to over 9.6 volts.
  • The diagram and pictures show the use of feedthrough capacitors (4000pF) to pass the voltages through the shielded box.  Feedthrough capacitors are somewhat difficult to get, but good results may be obtained by using good-quality monolithic ceramic (NOT disk ceramic) capacitors instead, placing them - using very short leads to a solid ground plane - where the wires pass through the hole in the shielded box.  These capacitors are typically square in shape and rather compact and available in both leaded and surface-mount form.  Remember that for the B+ output a capacitor with a rating of at least 100 volts must be used:  Any value from 0.0022μF to 0.1μF may be used.
  • If you build this sort of circuit make absolutely certain that you simulate the filament string with a 150-200 ohm 1/2-1 watt resistor and the B+ load with a 10k, 1-2 watt resistor and verify that the circuits are working properly BEFORE connecting it to a radio.  While a brief bit of over-voltage on the B+ line (to perhaps 130-150 volts) will likely not harm the radio, more than 9 volts on the filament line, even for a moment, will probably ruin one or more of the fragile and expensive tubes!
  • About that "auto power save" feature mentioned at the top of this article?  After two hours of uninterrupted operation the microcontroller will modulate the filament line with an intermittent tone and drop the B+ voltage to about 50% causing the radio to partially mute with the alarm tone sounding in the speaker.  This "beeping" will continue for about a minute before the microcontroller turns off the filament and high voltage supplies, dropping the current consumption from around 150 milliamps to about 6-12 milliamps - the quiescent current of the remaining circuitry.  Turning the radio off for 5-10 seconds and then back on will reset this timer at any time.  The down-side of this is that if the radio shuts down in this way, one may forget that the radio is even on, still drawing a few milliamps, except for the fact that the front lid of the radio will still have been in its upright position!  If the battery voltage is less than around 7.5 volts (0.9375 volts/cell) the radio will be "locked out" and will not even turn on, but at this voltage the batteries are not only quite discharged, but their internal resistance will be rapidly increasing as well and little run time would have been left.
Figure 6:
A handy "map" showing where the various RF adjustments may be found.
This doesn't really have too much to do with the article, but since I made it
when I was aligning the radio I thought that I might as well post it here!
Note that locations of some of the trimmer capacitors - particularly those
in the lower-left corner - will vary with different production runs.  Some of
the alignment points shown in this picture are also omitted in the
"official" H500 service manual and thus have no parts designations:  These
adjustments are peaked at the frequencies indicated on the drawing.
Click on the image for a larger version.
How well does it work?

As can be seen in Figure 1 the circuit board and the eight "D" cell battery is concealed in a replica battery box that is situated exactly where an original "AB" battery would be placed.  Then the power switch is turned on it takes a bit over a second for the computer to power up, do its checks and for the tubes to warm up and the radio begins playing while the power-off is detected within two seconds of the radio power switch being turned off.

With the shielding of the circuity and bypassing of its leads there is no detectable interference caused by switching voltage converter.  With the filament and B+ voltage being regulated to the same as a "fresh battery" or AC mains voltage, the sensitivity and audio output capability are maintained until the battery is more than 80% depleted.

In other words, it works just as it should!

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

If you are interested in the code for this (written in "C" using the PICC compiler) or just a .HEX file so that you can program a PIC12F683 yourself, or if you are interested in getting an already-programmed PIC12F683, let me know via a comment.

And before you ask:  Sorry, but I can't build you one at this time...


This page stolen from "".

Thursday, January 12, 2017

A low power PSK31 transmitter using a Class-E power amplifier and envelope modulation

Back in 1999, not too long after the first appearance of PSK31, I decided that I wanted to construct a beacon transmitter that would operate using this mode, but at the time the only practical means of generating PSK31 was with a computer, a sound card and an SSB transmitter.  Not wanting to tie up that much gear for this purpose I set about to use the PIC16C84 microcontroller, which was popular among the homebrew builders at the time.

By this time the AM broadcast band had (relatively) recently been expanded up to 1705 kHz but very few stations occupied the new 1605-1705 kHz segment.  In perusing the FCC rules I noted that Part 15 §219 had been modified to allow low-power experimental operation (100 milliwatts DC input with a size-limited antenna) in this new segment and I decided that with the lack of activity in this frequency range that it was a good time to put up a "MedFER" (Medium Frequency Experimental Radio) beacon.
Figure 1:
The "Balanced Modulator" (Baseband) version of the PSK31
transmitter/exciter.  Built to test a concept, it has a few flaws,
but it did work.
Click on the image for a larger version.

The balanced modulator method

Upon investigating various methods of producing a PSK31 signal I experimented with the generation of a bipolar baseband signal that could be applied directly to a balanced mixer.  While this method worked well it had the problem than it required that all following stages be linear.

A diagram of the prototype of that transmitter may be seen in Figure 1.  For this transmitter a crystal-controlled oscillator is constructed using two transistors (Q1, Q2) and the output is buffered by U3, a 74HC00 quad NAND gate.  The frequency used for this circuit was unimportant as it was a "proof of concept" and I (think that I) used a 4.9152 MHz crystal which, although not in any amateur band, still allowed an "across the room" reception with a short length of wire as an antenna.  Following the first U3 NAND buffer the remaining sections are used to provide a two phase signal with the output split 180 degrees which fed a very simple balanced modulator consisting of just two diodes, a few capacitors and some resistors.

To provide modulation a PIC16C84 was used to provide a 32-step staircase modulation using PWM techniques as this (now ancient) part had no PWM peripherals.  This PWM output, done using "bit-bang" software with a "NOP-tuned" interrupt service routine used a frequency of 1 kHz, which is exactly 32 times that of PSK31's 31.25 Hz baseband frequency.  The output was filtered with a two stage R/C low-pass filter network consisting first of a 4.7k resistor and 0.1uF capacitor followed by a second stage with a much higher impedance consisting of a 150k resistor and 0.033uF capacitor providing around 3dB of roll-off at the 31.25Hz baseband frequency and about 40dB of attenuation at the 1 kHz PWM rate while yielding an acceptable amount of Inter-Symbol Interference ("ISI").  The result of this filtering is that the vast majority of the 1kHz energy is removed, leaving a pretty clean 31.25 Hz baseband signal.

Figure 2:
Phase diagram of balanced modulator
circuit in Figure 1.  The propagation
delay of the gates result in a rather
imprecise 180 degree phase shift
causing the upside-down "Vee"
in the phase diagram.
The filtered PWM output was then buffered and split into two signals, one of them inverted, using several op-amp sections and these two signals are applied differentially via simple R/C networks across the two diodes:  If the baseband signal from the PWM output were to go "positive" (e.g. above the mid-supply voltage)  the other side would go "negative" and turn on one diode, but it if were to swing the other way the other diode - fed with the RF signal that was 180 degrees out of phase with the first - would be turned on.  The end result is a fairly nice, linear BPSK envelope and baseband waveform when viewed on a receiver connected to an oscilloscope.

While it worked to prove a concept, this signal has a few shortcomings.  First, the RF signal from the oscillator and buffer is not likely to have a precise 50% duty cycle which means that a bit more RF energy would be available in one phase than the other, resulting in a somewhat "lopsided" BPSK amplitude envelope - a trait that only minimally affects demodulation and overall signal quality if the difference is only 10-20%.  The other problem has to do with a NAND gate being used to provide the 180 degree phase shift (e.g. signal inversion) in that the addition of the inverting gate adds a few 10s of nanoseconds of propagation delay.  While this doesn't sound like much, it does amount to a significant number of degrees of phase even at low HF frequencies and the end result is that the "Phase Diagram" (see Figure 2) is slightly distorted and produces the inverted "vee" pattern.

While I could have gotten this method to work (e.g. used a bandpass/lowpass filter to get a nice, clean sine wave and a transformer to get the 180 degree phase shift) it does have a down side:  All subsequent stages would need to be linear.  While not a great technical problem it did mean that for the MedFER transmitter, which has a 100 milliwatt DC input power limit according to FCC rules, a linear final amplifier would have at best around 70% efficiency which would mean that I'd lose a bit more than 1dB of signal over an amplifier that was 100% efficient.  While this may not sound like much I figured that I could do better with a more efficient amplifier scheme.

This "baseband" PSK31 signal produced using the differential op amp scheme noted above was successfully applied experimentally to some "digital only" radios such as the Small Wonder Labs "PSK" series.  This was accomplished by "lifting" the balanced modulator above DC ground via capacitive RF coupling and applying the modulation differentially to the diode ring mixer's IF port and its ground and shifting the carrier oscillator to move this "DC" signal into the crystal filter's baseband.  The pages linked near the end of this article provide details on this modification.

The Amplitude Modulator Method

Having proven the ability to produce a reasonable quality PSK31 waveform with a lowly PIC I decided to try a different approach:  Apply high-level modulation to the output amplifier stage.  What's more, this amplifier stage need not be linear at all:  It could be a conventional Class C stage which could boost the efficiency to something around 80%, but I decided on going a step farther and use a Class-E amplifier.

Figure 3:
Diagram of the "AM" version of the transmitter using separate amplitude
and phase modulation paths, allowing a non-linear but highly efficient
Class-E output amplifier to be used.  The capacitor, diode and resistor
on the gate of Q1, the output transistor, are used to prevent the FET
from being stuck "on" and shorting out the power supply should
the RF drive disappear for any reason and the output of the NAND
gate driving it be left in a "high" state.
Click on the image for a larger version.
I first became aware of the Class-E amplifier more than a decade earlier when my friend Mark, WB7CAK, designed one for his LowFER (Low Frequency Experimental Radio) beacon that operated in the 160-190 kHz "experimenter's" band, authorized by §217 of FCC part 15.  As with MedFER operation, the input power was also limited - 1 watt in this case - also with a size-limited antenna.  After a bit of number crunching and fiddling on the workbench Mark came up with a simple circuit and a few basic, simplified equations that described how such an amplifier could be built and published an article in the Western Update - a small publication tailored mostly for LowFERs.  Because this publication may be difficult to find I have reproduced it with permission from the author and it may be found here:  (Link).

While the maths behind the derivation of the operation of a Class-E amplifier can be somewhat involved, the concept is quite simple:  When the drive signal to the transistor - typically a power MOSFET at LowFER frequencies - goes low, the transistor shuts off and it does this quickly (e.g. driven "hard") so that transistor spends as little time as possible "partially" conducting in between "on" and "off" states.  When the transistor turns off, the voltage on the drain rises, being pulled up by the choke in the circuit, but it then falls again due the "ringing" of a resonant circuit on the output tank.  Because this tank circuit is tuned appropriately, precisely at the time that the drain voltage hits zero again because of this "ringing" the output transistor is switched back on.

The result of these two events is that the FET is either completely on or off which means that little or no power is dissipated in it.  What's more, when the FET is (quickly!) turned back on, it does so just when the voltage happens to swing to zero, practically eliminating any losses that would occur at that instant due to the intrinsic resistance of the FET absorbing the current and from other losses of components of the tank circuit being "shorted out" had voltage been present.

Figure 4:
The constructed MedFER beacon transmitter, built on the bottom
of a weather resistant outdoor enclosure to be mounted at the base
of the antenna.
The result of all of this is an RF amplifier that (exclusive of the drive signal) is demonstrably capable of 95%-98% efficiency!  In the MedFER and LowFER world this means that with our power level being limited on the input, we will have, for all practical purposes, all of our input  power at our disposal rather than, say, 70-80% of it as would be the case with almost any other amplifier type - a gain of about 1dB.

The obvious problem with a Class-E amplifier is that the drive signal must be a fast rising/falling square-shaped wave that slams the transistor on and off which means that amplitude modulation of that drive signal is not easily managed if efficiency is to be maintained.

What one can do is to modulate the power supply feeding the amplifier instead.

Remembering that a PSK31 signal consists of two parts - the amplitude modulation and the phase shift - we can split these two signals in the modulator.  The first part, amplitude modulation,  may be done by modulating the supply voltage of the output amplifier stage.  The second part, phase modulation, may also be done early in the path of the drive signal simply by flipping the phase of the RF signal under computer control.  In order to keep the signal "clean" all we really need to do is to time the flipping of the phase with the amplitude being brought to zero so that we don't transmit the broadband "click" that would otherwise occur when we did this abrupt phase shift.  The schematic of this transmitter is depicted in Figure 3.

Figure 5:
The phase diagram of the signal
produced by the "Amplitude
Modulator" MedFER PSK31
beacon transmitter.  The phase
shift is precise and the intermodulation
products are well within the tolernaces
dictated by good operating practice.
In this circuit the frequency-determining crystal oscillator operates at four times the transmitter frequency, or around 6.8 MHz in the case of the MedFER transmitter.  During construction it was observed that at around 1.7 MHz it was was easier to achieve Class-E operation at this power level with a drive waveform that had a 25% duty cycle so a 74HC4017 counter was used, wired as a divide-by-four giving two 25% duty cycle outputs, 180 degrees apart.  To select which of these signals were to be used a simple MUX and driver was constructed using four NAND gates, this time being designed so that the same amount of propagation delay would occur during either phase to eliminate the upside-down "Vee" seen in Figure 2.

The PWM signal was generated using simple R/C filtering in the same way as it was for the balanced modulator circuit, but this time op amps were used to set the offset and gain (or "span") so that the baseband waveform could be precisely adjusted in both amplitude and so that when the baseband signal went to zero, the output power from the Class-E circuit would as well, compensating for the voltage offset of the series modulating transistor, emitter-follower Q4.  The output transistor, Q3, is a low-power MOSFET wired into a simple L/C "tank" circuit that is tuned to result in the coincidence of the zero crossing of the drain voltage and the transistor being turned back on by the 25% duty cycle drive signal.  Multiple taps are provided on the tank coil, making it easy to set both the output power and match it appropriately to the load presented by the resistance seen at the loading coil.
Figure 6:
Loading coil used to match the transmitter output to the
feedpoint impedance.  This coil is wound using 3/8"
copper tubing and uses a variometer inside the coil
to provide a low-loss means of adjusting the inductance.

For modulation the PIC produces a semi-sine waveform that looks very similar to one "cycle" on the double-frequency output of a full-wave diode rectifier and when this waveform amplitude is taken to "zero" another output of the PIC causes a phase switch to occur.  It is in this way that the BPSK modulation is broken into two parts - the phase change and the modulation envelope - and we are able to use a highly efficient, non-linear amplifier for the output.

After constructing this I later learned that a similar scheme was applied to amateur satellites (starting with OSCAR 7) that included linear transponders.  In order conserve precious power, the linear transponders were constructed using the "HELAPS" (High Efficiency Linear Amplifier using Parametric Synthesis) system where the amplitude and phase components of multiple signals in the satellite's linear passband were converted into their phase an amplitude components allowing both energy-saving class-C RF amplifiers and DC-DC switching converters to be used, the end result being a faithful, amplified reproduction of the input signal with a lower power budget that would have otherwise been required. This system was proposed by Dr. Karl Meinzer, DJ4ZC, and you can read about it on the AMSAT.DL web site here - link.

Where is it now?

This beacon was mounted in its enclosure on the roof of my house in 1999 and a rather large loading coil (see Figure 6) was constructed to match its output impedance to the top-hatted 3 meter vertical antenna  - and it is there to this day.  While not regularly used, it still works, provided that the tuning of the loading coil and variometer is checked before operation.  Since the beacon was constructed more broadcast stations have taken to the air in the "new" AM segment, but its operating frequency - nominally 1704.965 kHz - is just below the top edge of the band and as far away from QRM as is possible.

In the past the BPSK31 signal from this beacon has been copied during the daylight hours at a distance of 75 air miles (approx. 120km) and it had been copied in various places in the western U.S. at night.  This beacon has since been modified to be externally on-off keyed so that "QRSS" (low-speed Morse with multi-second "dit" lengths) could be sent in addition to PSK31 allowing even greater distances to be spanned under more diverse conditions.
I haven't done much with the code for this transmitter other than add a few features when it was ported to the (then) newer PIC16F84.  Needless to say, there are more modern devices available that contain hardware that would have simplified the design such as that to generate a much higher frequency and higher resolution PWM signal and perhaps, one day, I'll investigate their use.

For more information on this and related projects - including schematics, various applications, more pictures and some source code, visit the "CT Medfer Beacon" web page - link and related pages linked from there.


This page stolen from "".