If It Ain’t Broke…

Or is it don’t reinvent the wheel?

Well, actually it is ‘broke’…

I have been troubleshooting a low output power problem on my QCX transceiver this week.  I was fairly confident that I had the problem identified as a bad BS170 MOSFET, one of three that QRP-Labs uses in its Class E power amplifier to get 5 watts out. Anyway, it turns out I was wrong so I will look deeper into that problem later.  For now, I can live with a watt and a half for 40M CW.

I’ve always been a fan of these MOSFET amplifiers, especially given I enjoy CW so much, as they make for very efficient use of battery power.  The downside to Class E amplifiers, unfortunately, is they are both easier and at the same time, more difficult to design.  They are, essentially, just high speed switches.  Indeed, it might be better to call them switches that are being operated at very high speeds.  What they are actually are is neither RF devices nor linear, but they do at times mimic such operations, within limits.

I build a lot of QRP stuff for fun, so I wanted to delve into a MOSFET PA project.  My goal is to use a DDS (si5351) as the exciter and link it to a MOSFET amplifier for the power.  For many of MOSFET amplifiers, getting them to operate at an output impedance of 50 ohms is an exercise in mathematics.  In truth, it isn’t really that difficult, but it’s not for the uninspired.

Whilst digging into the schematic for the QCX, I got to wondering how QRP-Labs designed the finals amplifiers in some of their other offerings.  Specifically the U3S WSPR transmitter.  It actually does more than WSPR, but that seems to be its primary application.

Unlike the QCX, which uses a TTL logic device to buffer the DDS output into something that will directly drive the gate of the BS170(s) without biasing said gate, the U3S PA does bias the the BS170 gate.  I found this both interesting and appealing.

However, whereas the QCX is basically a CW rig, the U3S supports multiple protocols.  Given that, I could see why they might need to bias the gate, providing the ability to set the MOSFET in a semi-on state, permitting a linear like operation, further permitting a lower-level/not quite a square-wave input signal.  Basically, mimicking (and I use that term loosely) something akin to Class A/AB operation in an analog device.

Reading through the manual it became clear to me that this particular amplifier could easily suit my desire for a very simple QRP transmitter, with possibilities beyond CW.

Linear1

Figure 1. My ultra ugly, one hour, slapped together MOSFET ‘test amplifier’.

QRP-LABS_U3S_PA
Figure 2. Snippet from the QRP-Labs U3S schematic. Remove two of the BS170 devices and that is what you see in Figure1.

I constructed the amplifier with a single BS170, as described in the manual, and powered it off a 5V supply along with the gate bias, the latter via an adjustable level potentiometer.  Indeed, I followed the U3S amplifier description to the letter in order to set a benchmark.

The amp was connected to a si5351/Arduino test setup I use frequently, and each clock output set to a discrete frequency from one of the amateur HF bands and, the amplifier terminated with a 50 ohm load (2x 100 ohm in parallel).  In my si5351 breadboard, I can quickly switch clock outputs to see the amplifier’s performance on different frequencies,

As with many MOSFET amplifiers, I started with the bias turned off, because doing it the other way around usually results in a loud pop.  Flipping on the 5V supply, I monitored the output on an oscilloscope.  With the bias off, there was no visible output.  The si5351 alone provides around 3V peak to peak (~22.5 milliwatts), which typically isn’t enough to really turn on even a lowly BS170.  Here again is a likely contributor to why the QCX buffers the si5351 clock with a TTL driver, and why this design (and many others) partially turns on a MOSFET with some bias on the gate.  As I SLOWLY increase the bias, a perfect replica of the DDS output starts to appear and increase in level.  I continued to increase the bias until the amplitude of the signal peaks, at which point I then backed off the setting by just a hair.

A quick count of the scope divisions and the final number was 302 milliwatts.  I have to say that I was impressed.  Indeed, the U3S manual states the expectation should be ~250 milliwatts, so not bad for a junk box version of that amplifier.

BTW, the math here is peak to peak voltage times 0.3535, then square that number and divide by the load resistor (i.e. 50 ohms).

I measured 11 volts peak to peak, so…

11 times 0.3535 = 3.8885

The square of 3.8885 = 15.12043225

15.12043225  divided by 50 (ohm) = 0.302408645 Watts

AB4OJ has a very good article on measuring RF power which can be found here.

Back to the amplifier circuit… keep in mind, this measurement was made with only 5Vdc feeding the drain of a single BS170.  The U3S PCB, like the QCX, has provisions to stack/parallel a total of three BS170 devices (you can do that with MOSFETS), to increase the output power by spreading the load.  If you want to know the deep details on how that works, read the numerous Class E amplifier design guides.

The QCX is rated at 5W output using three BS170 devices fed with 12Vdc on the drains and the gates driven hard with a 5V Peak to Peak TTL device (74ACT00) fed by/buffering a clock output from the si5351.

Given the differences in the two amplifier designs, I don’t expect to see 5W out of this one. However, my feeling is that adding/stacking two more BS170 devices and, increasing the drain voltage to 12 Vdc will hopefully provide an easy three watts output.  That of course, will be tempered by the, absolutely required, 7-element Chebyshev output filter.

One of the biggest obstacles of  using a DDS and a Class E amplifier, IMHO, is harmonic content!  However, most of the time it can be brought into compliance with a decent low pass filter.  At least that’s the thinking.

Only further real world testing will determine that, but I am optimistic.

Advertisements

Back to Basics

It’s no secret, to those who know me, that my first love of the hobby is building stuff.  OK, so I do really really like CW too, but…

One of my many projects is a dual conversion receiver.  Among the many options I’ve included in that effort is a 3-4 section crystal filter for the IF.  In order to do that correctly, ideally resulting in a decent performance receiver, I need to first match up some crystals.

Lacking a high tech solution, I’m resorting to the semi-high tech method of frequency counter with oscilloscope.  However, before I get to that point, I need to make something to permit the oscillation of said crystals, that I might actually be able to analyze them.

Enter the crystal test oscillator…

Xtal_Test_Schema

The circuit isn’t anything new and it’s linage is reported to hail from Wes Hayward’s book, Experimental Methods in RF Design. The original printing is quite expensive, if you can find it, but the reprint is more reasonably priced.  Eventually I might even get a copy for my library.  At the moment, however, I can buy a lot of project components for the current price of that book.

In any event, it is a ‘known good design’, as in it has actually been proven to work by many others, so this is what I went with.  The result of which is as follows…

Osc_n_Rocks

As can be seen, I am a fan of MeSquares construction, although I’ve considered switching to using the ‘island cutter’ method.  A bit more difficult to see, I used half of a higher quality (machined) DIP socket for quick plug and play of different crystals.

You might also notice that I lay out the majority of the parts  flat.  My personal opinion is that, albeit takes a bit more space, I have neither exposed component leads nor the worry of them being broken off in a drawer, save for perhaps the transistors.  I also find it much easier to solder and, place probes onto pads for taking measurements.  Again, just my opinion.

After completing the construction, I tested several crystals with the output connected to both  the oscilloscope and a frequency counter.  In addition to actually seeing the circuit operate, I also discovered that I had mislabeled a couple of crystals, as they did not oscillate as marked.  Basically, I screwed up when I pulled them out of an old 23 channel CB radio ( A wealth of crystals can be found in old CB radios).

One thing I did note, as can be seen in the  following oscilloscope traces, the oscillator as configure seems to get better output, as in more sinusoidal, when the crystal frequency is above about 9 MHz.  Perhaps I may have some bad 40M crystals, but certainly not all of them or,  perhaps I need to consider that C1 and C2 maybe need to be changed from 470pf to something in the area of 120pf.

That said, as ‘they say’, close enough for horseshoes and hand grenades!
7040k7040 KHz crystal output on the oscilloscope (about 2.0V peak to peak).

 

10240K10240 KHz crystal output on the oscilloscope (about 3.5V peak to peak)

Overall this circuit does what I need it to do.  It seems to cover a wide range of crystal frequencies and has more than enough output to easily drive, but not overload, my oscilloscope or frequency counter.

I have a box of 12000 KHz crystals purchased for the specific purpose of being used in several filters.  That is, after they get sorted out (matched).

The most important thing here, is that I am having fun!

Where The *** Am I? (Part 1)

Well here I am in a new location!

One of the first things I want to know in general (no pun intended), and as an amateur radio operator, is ‘where am I?’  Obviously I know where I am in the same manner as most people do… Address, City, State, etc…   But for radio work, it’s a bit more involved.

Among many other aspects of the Amateur Radio hobby, one of my favorites is VHF CW/SSB work.  That’s Morse code and Single Side Band on Very High Frequencies (VHF) to the uninitiated.  By VHF CW/SSB, I am referring to such operations in the lower segments of the 6 Meter (50-54 MHz) and the 2 Meter (144-148 MHz) bands.

Note: If the above description doesn’t help clarify things, perhaps I’ll  write a blog on ‘radio modes and frequencies’ at some later date. Or, you can simply Google those terms! LOL!  (Seriously, Google will provide answers and I despise being redundant).

Moving On…

In VHF CW/SSB operations, one of the primary location identifiers exchanged during contacts with other amateurs is a ‘Grid Square’, technically referred to as the ‘Maidenhead Locator System’.   To be sure, these days one can actually just go to a variety of websites where you simply click on your location and you are magically be provided with your latitude and longitude as well as your ‘grid square’.

As a programmer, hobbyist, indeed as an engineer by profession, I like to know the math behind the magic when clicking on a map or simply plugging numbers into a calculator.  I am not apposed to using ‘tools’, but I’ve always been of the mindset that one should be able to perform a process manually before becoming dependent on ‘automation’, e.g. the aforementioned tools.

So I went looking for said math and found several articles written by other who clearly assumed that the reader was completely following their thought process without them providing the ‘fine details’.  The frustration in the lack of those ‘fine details’ will become quite evident in part2.

It was initially quite frustrating. However, after reading multiple articles multiple times and selectively picking through the coherent sections, I finally derived the missing pieces… in a nutshell, I ‘figured it out’.

Oddly enough, once one figures out the missing details in the respective articles, it actually is easy.  Indeed, this may very well be why other authors glossed over these ‘fine details’.

I hope not to do that here.

This is Part 1 of my own attempt at explaining the math of coordinate conversion…

The first thing required to get started is a latitude and longitude in decimal format.  I will once again point out that the results from any of the following processes can be had with a mouse click using a variety of online mapping sites.  However…

While I still can use a 7.5 minute quadrangle and a ‘jiffy stick’ (a ruler like stencil calibrated in minutes and seconds to derive latitude and longitude from USGS topographical maps), these days I usually derive my decimal latitude and longitude directly from a GPS receiver. However, it isn’t a problem if your coordinate data is in DMS (Degrees Minutes and Seconds) off a map or other reference, as conversion is easy and so I’ll start there.

Degrees Minutes and Seconds (DMS) to Decimal

Example Location:
Latitude: 41 Degrees 52 Minutes and 55.4016 seconds
Longitude: 87 Degrees 37 Minutes and 40.1376 seconds

Latitude:

Leave degrees as is, 41
Divide minutes by 60,  (52/60 = 0.866666667)
Divide seconds by 3600, (55.4016/3600 = 0.015389333)
Then add 41 + 0.8866666667 + 0.015389333 =  41.882056 (Decimal Latitude)

Longitude:

Leave degrees as is 87
Divide your minutes by 60, (37/60 = 0.61666667)
Divide your seconds by 3600, (40.1376/3600 = 0.011149333)
Then add 87 + 0.616666667 + 0.011149333 =  87.627816 (Decimal Longitude)

To check your math, plug those values into Google Maps, be sure to put a minus (-) sign in front of the longitude if you are in the western hemisphere.  If you did it correct, these example coordinates should display as the intersection of State and Madison in the heart of the Chicago Loop.

Another way to check your math is to simply run the process in reverse by respectively multiplying the resultant values derived in each step of the previous conversion process, i.e. multiply the decimal seconds by 3600 and the decimal minutes by 60.

0.015389333 * 3600 = 55.4016 (DMS Latitude Seconds)
0.866666667 * 60 = 52 (DMS Latitude Minutes)
41 (DMS Latitude Degrees)

End Result: 41 Degrees 52 Minutes 55.4016 Seconds, right where we started!
Simply repeat the process to convert the Longitude back to decimal.

All of this was ‘the easy stuff’!

BTW, I highly recommend doing all of this in a spreadsheet (paper or electronic).  No, it’s not a necessity, but it does help maintain and keep track of the calculated values in each step of the process, because they will be called upon from time to time, making it easier to observe and understand what is going on and, to be able to repeat the process.

Try it with your own coordinates and see how this works!

Decimal to DMS (Degrees Minutes Seconds)

Despite most of the math behind the end process of calculating a Grid Square being performed using decimal coordinates, lets explore the relatively easy task of converting Decimal coordinates to Degrees Minutes and Second (DMS).

For this example and, to make things easier to check progress, I’ll use the same coordinates as the previous example.

Decimal Latitude:    41.882067
Decimal Longitude: 87.627816

As with the previous conversion, there is no need to do anything with the degree, other than separating it from the remaining values by stating it to be an integer, which we will henceforth refer to as ‘DD’

In this example:
DD = the integer of 41.882067
Therefore: Integer (41.882067) = 41 = ‘D’

i.e. int(41.882067) = 41

Now that we have DD and D, we can derive our minutes ‘M’

M equals the integer of (DD minus D) times 60.
Therefore: Integer ((41.882967 minus 41) times 60) = 52 = ‘M’

i.e. int((41.882967-41)*60) = 52

Finally, with M calculated, we can derive the last value, our seconds ‘S’

S equals (DD minus D minus M divided by 60) times 3600
Therefore: (41.882067 minus 41 minus 52 divided by 60) times 3600 = 55.4412 = ‘S’

i.e. (41.882067-41-52/60)*3600 = 55.4412

Our end result for latitude is 41 Degrees, 52 Minutes and 55.4412 Seconds.
Note: this result is slightly different in the seconds calculation (post decimal point). That said, once you get past a tenth of a second, it’s almost irrelevant.  Unless of course your intention is to put a missile through a keyhole. Indeed, if you use just the first decimal point (i.e. 55.4) on the seconds, you still end up in the same spot as the decimal degree.

OK. so much for Decimal to DMS and DMS to Decimal. As with the first conversion, play with it, check your results and then have fun with it!

In Part 2 I will get into the heart of the matter, deriving a 6 digit Grid Square from coordinates.