Thursday, 2 April 2020

RF 5W amp

I have started to breadboard this amp, let's see how it performs...

For a long time I have fussed and worried about the design of HF RF amplifiers. You see so many varieties on the web, but they seem to break down into two sorts: broadband, and tuned. The tuned ones are for dedicated operations like fixed HF transmitters and have tuned matching networks, where as the broadband ones are liked by radio amateurs to use across the HF bands. And one notable thing about these amateur designs is the use of the common IRF510 MOSFET clamping down the input with a very low value resistor (20-100R) intended to remove any resonance between the IRF510 input capacitance (180pF) and the inductance of the driver transformer secondary and try to flatten out the response.

Here's my methodology, right or wrong, for a simple amplifier design with a target of 5W output @ 7MHz using an IRF510 output stage and a 2 x 2N3904 drivers.

Note: the decoupling capacitors of 100nF have an impedance of 0.2R @ 7MHz, so two are used in parallel on the supply. A parallel 10-100uF may be needed for  low frequencies and is normally recommended if you are using the amplifier for SSB.

A MOSFET is a voltage-in/current-out device, unlike a BJT. For the IRF510 the input capacitance Cin = 180pF, and the output capacitance Cout = 80pF. The enhancement mode bias needs to be about Vth = +4 to 4.5V to set the operating point. The transfer characteristic shows that a 0-1A output needed is achieved by a Vth ~ 1V signal.
On the data sheet the transconductance = 1.3amp/volt @ 4A, higher at lower IC values.

The load resistance for 5W output is
RL = Vcc^2/2*Pout or 144/10 = 14R

To match a 50R output impedance this means a transformer of
N = sqrt(50/14) = 1.9, or a turns ration of 9t:5t. 5 turns to the MOSFET drain side of course.

The transformer will be on two FT50-43 toroids, so
Lp = 11uH (5turns) or XL = 480R @ 7MHz, meeting the need for it to be x5 to x10 the matched impedance.
The secondary (9 turns), to match a 50R output load of the amplifier, is 36uH with an impedance of 1k5 @ 7MHz
The resonant frequency of the Cout = 80pF and the transformer L = 11uH is 3.5MHz with Q =  0.08.

The input impedance of the IRF510 with Cin = 180pF in parallel with a 68R resistor < 40R @ 7MHz.
Transconductance shows that an input voltage swing of  0-1V is needed to drive the MOSFET to 0-1A drain current. The quiescent current will be set to 100-200mA, empirically

The driver load resistance for a nominal 150mW output is
RL = (Vcc-Vee)^2/2*Pout = 121/0.3 = 400

So the interstage transformer is an FT50-43 and has a ratio of
N = sqrt(400/40) = 3, or a turns ratio of 12:4

The input to the driver will initially be capacitor coupled, later I will see if a transformer is required.

This is the circuit, I have implemented with parallel 2N3904s and a IRF510

The driver DC operating conditions were arrived at experimentally. At the start the emitter resistors were 10R, but when biased to 10- 20mA each the current drifted up a lot as the transistors got warm. So I have settled on 56R which is much more thermally stable. with Ic ~ 22mA each.

Here are the results using this setup,

Input from Si5351 SIgnal Generator via a 40m LPF,
In ~ 16dB, or 44mW
Output into the final stage impedance ~22dB (8db gain...)

For info on the SIGGEN go here. And for the RF METER go here. For the 30dB TAP go here. The LPF is a small kit from QRP Labs.

Just as an experiment I connected the DRIVER output to a small QRP PA from QRPver that I have here. This is rated at 10W out for 1W in. It uses a single stage MOSFET type RD16HHF and runs at 12-14V, its an excellent piece of kit.

With the driver stage input this produced an output of 3.3W in to a 50R load (10dB gain). Here's the schematic for interest. Notice the input design, the 50R input is transformed by the 4:1 transformer down to around 12R to drive the MOSFET... the output has a 1:3 transformer to match a 50R load.

As you can see it has RF triggered VOX and this worked fine with the 300mW input.

My power stage is a single IRF510, biased to around 150-200mA standing current (I used a normal pot for this, but it is very sensitive so a multi-turn pot will be better). The input of the IRF510 is very capacitive and the stage is prone to oscillations, so it's input is swamped by a 68R resistor, this makes the overall input impedance < 40R at 7MHz.

The overall gain of the two stages is 6dB (driver) and 7.5dB (output). The driver gain is very low, probably because the output stage input impedance is a lot less than 40R. This needs looking into. But first I need to add a pre-driver to get some more overall gain. At the moment the output is only 1.3W into 50R

Saturday, 21 March 2020

Some WSJT Notes

There are a few basic settings for WSJT. These are ones I have on my MacBook for my ELAD FDM-DUO SDR transceiver. Connection, simple. Just two USB cables from USB-C MacBook to a USB hub for serial CAT (TX/RX), PTT (RTS signal) & digital audio I/O on radio.



ELAD-FDM-DUO (do not use TS480)
 - Serial Port [...]
 - Speed 38400 (same as radio setup)
 - Data 8/1/none
 - RTS
 - Serial Port [...same as above...]
 - USB
 - None

Test both CAT (Green button) and PTT (Red button)

Input [FDM-DUO Audio v1.04]
Output [FDM-DUO Audio v1.04]

[x] My call in message. RED
[x] CQ in message. GREEN
[x] Transmitted message. YELLOW

Bins/Pixel 4
Start [200Hz]
[N Avg 2]

All other settings as default, set audio levels - input comes from Aux Audio output of FDM-DUO, set using menu 6 to 30-40% indicated level. Adjust WSJT power slider to control your TX output.

Saturday, 14 March 2020

30dB Tap for RF METER

A while ago now I designed and built an RF power meter, as part of Banbury Amateur Radio Society "BARSicle" or LEARN-CODE-BUILD project, here and here.

This meter used an AD8307 module to measure RF powers from -70 to +20dBm (micro-watts up to 100mW), and displays these on an OLED display, as a top bar (limited to -20 to +20dBm, 0.01 to 100mW), the RMS voltage, the actual dBm value and the power (watts) into 50R. Details of this are down this blog (see September 2018). Arduino Nano software is here. There is a direct input RF _METER also another version RF_METER_30 of the software which shows the actual dBm and Power when using the -30dB TAP.

Note, the AD8307 needs a 12V supply, and has a native input impedance of 50R, check out the data sheet.


For higher power measurements (e.g. +10dBm to +50dBm or 10mW to 100W)  a "TAP" or resistive divider can be used. I have now made myself up a very small box containing an RF dummy load and a -30dB TAP (x1000). The dummy load is switched so that I can use the box as an RF voltmeter (785R input impedance) or with a switched-in TX dummy load of 50R.

This works very well for powers up to 100W. The RF METER effectively displays +10 to +50dBm (10mW to 100W) on its bar scale and related values for voltage, dBm and power. 

This is a dBm/power table that maybe useful:


Sticking this on the Nano VNA I get these numbers

Marker at 30MHz

This shows the 50R load is not usable across the V/UHF range, but usable on HF up to 30MHz with a reasonable SWR.

Friday, 7 February 2020

A power supply 13.8V/2A

I have been struggling to provide a suitable power supply for my ELAD FDM-DUO SDR Transceiver. The spec says it needs 2.2A @13.8V +/- 10% (or 12.4 - 15.2V). This sounds easy enough. I had been using a 10A/12V switch-mode supply giving 12.8V (the 12V supply cranked up to its max), but I read that SMPS emit stray RF noise so I determined I needed a linear PSU. And anyway this SMPS is too big to go in the fancy blackbox that I have available.

I had a toroid transformer lying about rated at 0-12V 0-12V @ 3.6A which may be enough. When bridge rectified and fed to a capacitor bank of 4 x 2200uF (diagram below is wrong) this yields an off-load of 20.8V, but an on-load as low as 14.7V, due to 2 x diode drops.

I looked around and found a low drop voltage regulator the LT1185 which is rated at 3A and has a voltage drop of < 0.75V. Great. So I built this circuit

And at first test this looked just fine. I set it to an output voltage to 13.8V and powered-up my FDM-DUO. The result on RX (load 0.56A) seemed excellent.

I work a lot of FT8 @ 5W on 40 & 20m and I have a very poor antenna (60cm loop on the windowsill!), so I set out to have a few QSOs. Now when the WSJT software hits TX in a digital mode the PA suddenly takes a startup current peak, but continues to ask a steady voltage. The PSU did not like this and occasionally the output jumped down to 10.8V and occasionally up to 15V. Why? Well I had omitted an output 22uF Tantalum capacitor to prevent oscillations, OK let's solder this in. But yet again the same thing happened. Now why? So far I have come up only with the idea that the sudden over current surge is tripping the LT1185's current limit. when it is hot.. maybe.

So I need another solution. I like simple circuits, so how can I build a simple 13.8V supply? One that can deliver 3-4A or so and handle the peaks? What I found out is that to get low voltage drop the NPN pass transistor is placed in the negative rail, not the positive. If it is an emitter follower in the positive rail it will drop at least the Vbe of 1-1.5V @3A. If it is in the negative rail it can go down to C-E Vsat of 0.5-0.8V.

Various circuits on the web use op-amps for the feedback, comparing a zener voltage to the output volyage and feeding the drive to the pass transistor. But a simpler circuit can be built using just a single PNP transistor as the comparator/amplifier. So I came up with this circuit


It is an old trick of mine to use an NPN transistor reverse biased, forcing emitter base reverse breakdown of about 5V to use as a zener, so I will try this. Later: I tried it and it DOES NOT WORK! The 2N3904 gives a reverse VBE of 10.6V!!! Well I never. So I have ordered some 5.1V zeners...

I ordered on Rapid (who I like a lot) a bunch of transistors (TIP41 & 42, 2N3904 & 6 and the 5.1V zener) and I await their arrival.

The parts arrived...  so I built a breadboard, like this

using this circuit.


And it appears to work. So I will build a final version, using a high power BD249 NPN and see if it can deliver 3-4A. On we go. (The 2N3906's emitter resistor on the breadboard, by the way, was 330R, It may need to be lower to drive the BD249 which has a lower gain... we will see. Worst comes to the worst the series transistor(s) will have to change to a darlington...

As you can see this circuit has no overload protection. To implement it you have to monitor the current, to do this you have to drop 0.7V or so and turn on a transistor which removes the drive. But adding 0.7V drop defeats the object of having a low drop regulator! Worst comes to the worst I will simply put an AC fuse in the 240v input... and hope.

It didn't work, the output fell to 9V on load. Due to the low gain of the BD249 series pass transistor and not enough base drive from the 2N3906's?

I had another look around the web and discovered the LM338, a 5A regulator for 2-20V (or so) output. And I built circuit number FOUR


And this works, at least it does when the output voltage is restricted to 12.6V. I does not work at 13.8V which is what I wanted, as the transformer output after rectification is too low, and not enough for the voltage drop across the regulator. Same old problem.

You live and you learn. Anyway I will stick with this now. It is enough to drive my ELAD FMD-DUO to 5W output on FT8. But it doesn't seem much better than the SMPS I started with, except that it is in a pretty box.

And then I had another brain wave. Why use a bridge rectifier when I have effectively a 12 - 0 - 12V transformer, each winding rated at 3.6A. If I use a simple rectifier on each leg then I can save one diode voltage drop. So I revised the circuit to this, number FIVE


And I cranked the output up to 13.8V, but this was too high and it sagged again to 13.2V on load. So I finaly settled for a Power Supply of 13.2V...

And, hopefully, that's where the saga ends.

After a few minutes of operation the display flapped about 11.2-13.8V!!! I turned the output down to 12.3V, but the same problem. Why?

I had a check and the input to the regulator was 15.8V, the data sheet says it has a drop of 0.75V, but it also says it could drop out if the Vin - Vout is less than 3V, so that means I should expect an output of no more than 12.8V, and even then it could dropout. It did.

So I move on. The next trial will be with an LM741 opamp driving a series PMOS transistor, in theory the PMOS will have a voltage drop of Iout x Rds(on), and Rds(on) can be very low, say 0.1R at 5A, so the drop should be < 0.5V.

I await the PMOS IRF9Z30 devices to try it out. This is the circuit, simple huh?


One background concern is the stability of the "reference" 5.1V zener, as the current through it will vary depending on the input voltage, which could flap about from 20 to 15V on load.

The IRF9Z30's have arrived! Build time

I wired it up wrong, connecting the input onto the output and vice versa, twiddled the pot and got either 20.8 or 18.9V out. Then I spotted my mistake, fortunately no damage done. The voltage adjustment is a bit sensitive, but I set it for a measured 13.8V output - the LED display says 13.6V (it is wrong). I also added a 22uF Tantalum cap on the output, not shown here.

On RX load 0.56A the output is 13.6V indicated, and on TX load 1.8A it falls to 13.4V. Not a wonderful load regulation, but I suspect this is due to 1) the rectifier output falling to just 15.5V on load, 2) the zener voltage varying as it is supplied from the input voltage which ranges from 20.8-15.5V and 3) the supply to the op amp coming from the input side with a range of 20-15V.

Later, voltage display again started flapping around 11.2-14.5 on TX. Back to square one.

ONWARD AND UPWARD - 15V transformer?

I must get to grips with power supply design, eventually. What I will do next is to buy a 15-0-15V transformer and a couple of higher voltage electrolytics 4700uF/63V and try again... with circuit SIX.

The transformer arrived, fortunately it is the same size as the 12V one so fits, and I have updated the 4 x 2200uF caps to 2 x 4700uF / 63V ones.

And now, IT WORKS. Only that the input voltage to the IRF9Z30 is up at 22-24V and so the MOSFET power dissipation is a lot higher (9-11V x 2A = 18-22W), hope the heat sink is big enough...

I now have more power than I need for the FDM-DUO, now and increasing the audio drive from WSJT I can easily reach 8W RF output. Wonder what the FDM-DUO limit is???

I mentioned above that the display flaps around 11.5-14.8 or so. Now it is happening again with my latest circuit SIX! I have discovered it is due to a faulty voltage display module! - so all those early circuits may have been OK - Grrr.

While changing the display I accidentally short circuited the supply and phut! it failed, output at 24.5V and uncontrolled (fortunately my FDM-DUO was not connected). I have changed the MOSFET and the Op-amp and the Zener, but it still outputs 24.5V. I have no idea why. Bother.

Being the simplest, and because I had a few LM338 available, I decided to knock up CIRCUIT FIVE again, with the 15-0 0-15V transformer.

OK, check the output voltage with my meter, and set it to 13.8V. The display now shows 13.7V. But wait it is flapping around again! But my meter is not - Oh ho, fault in the display? I change it for another, this time wiring it differently - power input from the rectified 24.5V, sense from the output 13.8V. But again it flaps around. (naughty words). Later it seems to stabilise.

Decided to live with it, knowing my meter is not showing any voltage variation on RX or TX. Now the only concern is the increased power dissipation of the LM338, with 24.5V in and 13.8V out, or about 10V @ 2A = 20W. The heat sink is not that big... so...but it gets fairly warm on TX.

Badly exposure photo, can't see the FDM-DUO display, but I assure you it is there, tuned to 7074kHz for FT8 ops. And actually, although the display says 13.8V, the metered output is 14.0V. 

So much for cheap and cheerful displays.

Sunday, 5 January 2020

Learn Arduino - my Book

You can find my Arduino lessons at my site M0IFA.

Go get your chapters. Start learning now. All PDF downloads.

Friday, 3 January 2020

Learning about the Nano VNA

Quite amazing is this Nano VNA, Vector Network Analyser. There are two basic capabilities, to measure a single impedance, like an antenna. Or to measure an input/output device, like a filter.

Here are the slides I made for presentation at our local club.

The Nano VNA is very low cost - around £30! and comes with three important SMA connectors, one a short circuit, one an open circuit and one of 50R load. These are used to calibrate the system.
Also available is a PCB with 18 demo circuits that can be used to learn about using the device. These include LCR circuits, capacitors and inductors, a Low or High Pass Filter and a couple of ceramic notch and peak filters.

It's important to know there is also a PC (Windows) interface which allows the device to be setup and used from the computer - which is a lots easier than using the on-screen menus.
The design is ingenious. Effectively it is three direct conversion SA612 receivers. Each fed with an RF input, from the CH0 & CH1 inputs and mixed from two outputs of the Si5351 directly. The clever bit is that the outputs CLK0 & 1 of the Si5351 are always separated by a fixed low (audio) frequency. Thus they output audio signals proportional to the RF inputs. The three SA612s feed a triple A/D TLV320AIC3204 convertor which output an I2S digital audio bus to the main computer the STM32F072C8T6. This computer chip is made by STMicroelectronics is based on the ARM architecture. It also programs the Si5351 and drives the colour TFT display.

There is a 50R resistor bridge for CH0 (S11) single port measurements outputting to the first two receivers the reference and reflected RF levels. CH0(S11) also outputs RF to a device under test. The CH1 (S21) input to the third receiver measures the output of a network (such as an LPF or BPF).

The core of the schematic shows the SI5351 using outputs CLK0 & CLK1, the bridge at CH0(S11) connection and to the mixer inputs (REFERENCE, REFLECTED and CH1), giving three audio outputs.


So let's have a look at three examples, first a Low Pass Filter, using a 40m kit from QRP-labs.
And this is the PC Python software display (nanovna-saver-0.2.2.exe) showing the LPF response (bottom right graph). A marker can be placed on the curve (inverted red triangle) and the data read in the middle area.

Next an antenna, this is a Wonder Loop which I use all the time for FT8 comms.
And the result at 40m is,
The top right graph shows the Reflection Coefficient, and the middle data shows the antenna VSWR and impedance. Interesting to note how narrow is the bandwidth of the antenna, meaning it must be re-tuned for any small change in frequency. When tuned accurately I get an SWR of 1.8 at the TX.

Lastly a notch filter on the experimenters board.
Here you can see the connection to the experiment board, the response. 

I have yet to understand and experiment with the Smith Charts and Polar Diagrams.

Sunday, 29 December 2019

RF Sniffer / level indicator

In the last post I talked about a low power 1W amplifier that I was building for WSPR TX. This amplifier has a variable gain - a simple potentiometer at the input, nothing fancy. This will set the output level.

The Amp output will go through a 40m LPF, on to my VSWR/Power meter, then my auto ATU and small loop antenna.

Wouldn't be nice to have some indication of the level of RF output? 

So I have looked into this and have come up with a row of LEDs, four green, one yellow and one red. The idea being that if the red one is alight the amp is close to overload.

To implement this I found on eBay an Audio Sound Level Indicator . I wired this to a simple peak detector and bingo it lights up when it detects RF.

The diodes are germanium low drop.

Here's a mock up, driven from a +12V supply, RF is detected on the short yellow wire at the bottom, when my ELAD FDM-DUO is transmitting at 7W power into my loop on the window sill!!!