Thursday, June 23, 2016

LDMOS Amplifiers

More on the control System ~ (7/05/2016)

My initial thoughts on the switching of the low pass filters reflected on my past experience with filter switching harkening back to my KWM-4 SSB/CW transceiver built in 2013. When I built the KWM-4, this was a real challenge as my goal was to have no band switch as such; but rather to take advantage of a three digit code that could be associated with band memories that was generated in the K5BCQ kit. By using the encoder to menu change bands the three digit code associated with the bands could provide the signals to control the band pass and low pass filter banks. So why not the same here with the LDMOS amplifier?
Shown below are the BPF and LPF boards in the KWM-4. 

Below is the KWM-4 schematic that was initially used with the project which was later changed to the second circuit which was finally used in the project. The second circuit uses P Type MOSFET's and in effect used less parts. For test purposes I included the ability to manually switch band using three toggle switches. This proved beneficial  as I could bench test the LPF or BPF boards  without the need to have the frequency controller.
Interesting side note -- the concept/circuit of taking the three digit code and coming up with the band switching signal was done on my own. Finally I designed something where it worked and it was done with my own hands. I shared this with K5BCQ and he said --why didn't you use a CD4028 as you can decode and drive the relays directly. The case of the better mousetrap has once again arisen to the top. Well it was my design and it did work!!!!
So having the KWM-4 experience under my belt I started down the same path, only this time using the CD4028. Because of the availability of many more output pins on the Mega 2560, my thoughts were to have not only the LCD display what band was being used but also to have six LED indicators on the front panel that would light up depending upon which LPF was selected. Thus six Digital Pins for the LPF lights and three pins that would be decoded the via CD4028  to actually drive the relays. So that would take another three Digital Pins. When I developed the code it was with the 9 Digital Pins.
Then I got to thinking about the actual relays that would be used on the LPF which are American Zettler good for 20 Amps on the contacts. Since a pair must be put in line for each band that coil current draw would be more than what was available directly from the CD4028. This would then require additional transistor (or MOSFET) switches that could handle the current. Now we were adding a lot more parts. The relays used in KWM-4 were communication type (Omron G 5V1) and four of those (two in the BPF and two in the LPF) had a lot less current draw.
That is when the "Ben Franklin Effect" (being struck by lightning) took over. I asked why was I making this so hard? Then it became clear that I did not need the three digit encode and decode and all of the extra circuitry. The very same signal that would light the panel LED's could trigger the transistor (or MOSFET) switches. Boom there we had it! I would only need 6 Digital Pins and a lot less parts. This also dramatically reduced the code logic and freed up three Digital Pins.
One of the best parts about having only 15 or 20 minutes at a time to work on this project is that you have to think about what is the best use of that time. Breaking the project into pieces makes you "noodle" -- a lot. Below is the first prototype schematic for the LPF switching.

Pete N6QW


Control System Breadboard ~ (7/02/2016)

Taking yet another step to assure project success the control system will be built on a bread board before it will be installed into the amplifier case. Here is the initial layout of the bread board.
The size of the bread board is 12 X 18 inches which was chosen as a  size to facilitate changes and troubleshoot problems during the initial development stages.
Starting in the upper left hand corner is the 9 VDC power supply for the Arduino Mega 2560. This supply has plenty of reserve capacity as there are many more I/O pins and thus a larger current draw. Next to that supply is the 12 VDC supply that will be used for powering on the "Hockey Pucks" shown in the upper right hand corner, as well as the relays in the low pass filter board. The small metal enclosure is another supply. This is the DC to DC convertor using the 48 VDC that powers the amp and converts that to 12 VDC that is the source in powering the In/Out TR relay and the Bias supply. The small metal plate holds a 4X4 keypad and the 4x20 LCD. The final install will most likely use a 4X3 keypad. The 4X4 was in the junk box! The vector board will house various circuits that interface to Arduino Mega and the myriad of control relays/LEDs. The terminal blocks will provide a convenient means of connecting to LEDs and external devices like sensors (heat and SWR) and relays/switches.
Stay tuned.
Pete N6QW
Control System Subtleties ... (6/28/2016)
Frequently I will install a control system to later find out --it doesn't work or work properly. Have you been there? My aim with this project is to find those anomalies and "gotcha's" before the first wire is connected to anything. That is the beauty of the Arduino Mega 2560 --lots of pins and you can simply hang a LED on any pin to see if the circuit is controlling as it should. I really like that. No smokedparts!!!
When I looked at the "critical failure path" (something left over from my aerospace days) I could see that the Arduino was really supplying two critical functions:
  1. The pure control function that in essence turns on the power supply and at the appropriate time the amplifier itself.
  2. The second is the supervisory function that should some limit be exceeded that several things happen such as turning off the supply or preventing the amp from being put in line. These could include over temperature conditions or the SWR is out of whack or perhaps that the 48 VDC supply is heading to an over voltage condition. Other conditions might include the failure to put in line the low pass filters. We certainly wouldn't want the power supply to be OFF yet be able to put power into the amp -- that would be one expensive dummy load.
I would now like to focus on one of the "conditions of concern" or as I used to say -- a COC event. Briefly here is the thought around  one of the processes and how it is addressed in hardware and soft ware. Once the amp is powered "on" (meaning the 48 VDC is powered on)  and we have the appropriate Low Pass Filter selected,  the next step would be to put the amp in line. But there are certain tests and sequences that must be satisfied for this to happen. I will now outline those steps and tests.
  • The basic mechanism for putting the amp in line is a contact closure from the transceiver that is tied to the Push To Talk Switch (or VOX). That contact closure is detected by the amp and then a series of actions take place.
  • But here is the first subtle test as there are in fact several contact closures that must be detected and the first of these is called LED16. On the rear of the amp is a standard RCA connector where the external PTT(VOX) contact closure signal would enter the amp control system. At the RCA connector is wiring that is fed to the NO contacts of a small relay (called LED16). If that relay is not closed then you cannot complete the keying circuit. The closing of LED16 has many dependencies including is the power supply on, is a LPF filter connected, is the amp in bypass or emergency shutdown? Other factors would include over temperature or High SWR. Thus many other events determine whether it is safe to close LED16. (Don't you just love how and Arduino can do all of those tasks?)  So now we have the RCA Connector , the LED16 NO contacts, a protection diode and finally ending up on analog pin A0. The second subtlety  is that A0 is constantly read each time through the loop and until it sees a low condition (from the PTT/VOX through the LED16 and the diode). Nothing happens until A0 is low and then the next series of actions take place.
  • We have a complete keying circuit but now before RF is pumped into the LDMOS amp we must first connect the antenna to the amp, then turn on the bias and finally the input RF is fed into the amp when the input side of the TR relay is activated. When the PTT/VOX is un-keyed the process is done in the reverse order with the transceiver input shut off, the bias turned off and finally the amp uncoupled from the antenna. There are delays built into the code to assure the relays are in fact closed or open.  
  • LED17 and LED18 are relays that are switched from the Arduino based on a timed sequence but another subtlety here is that their source voltage comes from a DC to DC convertor connected to the 48 VDC rail. Thus if the main power is OFF you cannot switch the amp in line. The same also applies to the amp bias circuit which is also connected to the 48VDC to 12 VDC convertor. Snubbing must be applied to the LED17, and LED18 relays.
  • A circuit diagram would look like below.
Pete N6QW
It is all in the Control Systems ...
 This project encompasses proving an Arduino Control of a hi Power Linear Amplifier. It is a new departure for N6QW as it has extensive I/O requirements which required moving to the Mega 2560  a  Arduino variant that has 56 Digital I/O and 16 Analog Inputs. The on board memory is 256K
    The current configuration uses a 3x4 Keypad as the main control element.
    Key 1 = Power On
    Key 2 = Power Off
   Key 3 = Amp Bypass [In this mode the LPF's are disconnected and the amp power is off it requires RESTART and LPF Selection the TR Relay is disconnected so No RF into the amp on Bypass.LED16 Controls                        whether the amp is bypassed BUT LED 17 and LED 18 control the actual sequencing of the connection of the amp to the antenna system and the transceiver. WE are trying to avoid "hot switching". Thus the amp is connected to the antenna first and then the transceiver is connected to the amp. This is done by a small delay on the connection of the amp to the input side. Problem solved!]
The next series of keys select the correct Low Pass Filter with 2 subsets panel LEDs light up to show which band also shown on the LCD (20X4) In addition a 3 digit binary code is generated which is decoded to select which filter: Key 4 = 160M, Key 5 = 80M, Key 6 = 40 M, Key 7 = 20M, Key 8 = 15M and Key 9 = 10M.When any of the LPF buttons are pushed the TR Relay is powered on.
Key 0 = Manual Emergency Shutdown and is different from Power Off in that a 1 minute delay is introduced into the loop so that you are forced to "noodle" about why the Emergency Shutdown was necessary. There are options of automatically invoking this condition based on events such as an over temperature situation or a high SWR condition. When the Emergency Shutdown occurs the N6QW AMP Control Box disappears from the masthead and goes blank When the timing period for Off is over it reappears -- nice touch N6QW.
    Currently Key # and Key * are not used
 Fail safes are included into the code that either detect aberrant condition or auto bypassing the amp if no LPF is selected, Over Temperature and High SWR will shut down the power supply. Logic is also provided from putting RF into the amp without the supply being in operation.
  Various Analog Sensors reads the actual output Voltage, the temperature of the heat sink and the SWR condition. Several of these parameters can trigger the power supply to the off condition. SWR uses two of the analog inputs to sense the Vfwd and Vref to actually calculate the SWR that that amp output is seeing, If it exceeds some set value like 2:1 the power supply is shut down.
 A8 is a particularly important sensor as it measures the 12 Volt rail after the latching. There is a call routine called VDC12 and there is a two part screen that deals mainly with LED 16 and the ability to trip the TR relay. Two things happen one is the ability to change any of the LPF's and second is the ability to trip the TR relay
    Revised June 23, 2016 N6QW */
    #include <Keypad.h>
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>

Pete,  N6QW


  1. Glad to see you are back to posting. Even though I am far from building something like this, it is very interesting to read.

  2. This is great stuff Pete. Very educational. Gets me to thinking about other control possibilities. Keep up the good work.

    1. Hi Jim,
      Thanks for riding along on this trip. A project like this really has helped me to better understand the Arduino and a lot of the possibilities. What a blast to simulate a PTT or VOX signal by merely placing a jumper on pin A0 to ground and watch LED's 17, 18 and 19 come on in sequence and then to watch them go off in a reverse sequence. Thus I know that the putting the LDMOS in line will happen in the proper manner. I now have two Arduino Mega 2560's and the plan is to use one of them to do the development work and the second will be installed in the amp. Thus down the line if something comes up I can work the problem on the development board (another trick learned from my time in aerospace).

      Pete N6QW

  3. Hi Pete...
    Just in the middle of listening to Soldersmoke 188, and I heard you mention the LDMOS board you bought. So, I did a little bit of googling. I have been saving for a valve (tube in across-the-pond) amplifier for a while, but now I am thinking that it might be better spent on the bits to build an amp based on one of these serious bits of silicon.
    From what I can see, this is something that could be done in stages... RF deck + manually switched LPF to begin with, and follow up with the fancy auto-switching stuff later.
    An aside on that - I am trying to get an Arduino to talk CAT/CI-V to control radios remotely - but that's another story.
    So, do you think my idea is worth pursuing?
    73 de Gerry / EI8DRB

    1. Hi Gerry,

      Thank you for your email and thanks for being a SS listener. Bill and I often wonder “Is anyone actually listening?”

      First let me say I am having a ball developing this project as most of the time is spent thinking about how to implement various aspects and so is compatible with my other duties and time limitations. Here are some comments and thoughts for you:

      The Board I bought less the device was about $200 and that is just for starters. So when you add up all of the pieces the number could grow quite large. I am slightly disappointed in my purchase and the only way to describe it is “crude and lacking in quality”. I know several people who have purchased this board and have it working. My problem is cosmetics. I guess my bar level is rather high given how I like to build things. For about the same amount of money I could have purchased a better looking board albeit it is in kit form. Do a search on W6QPL and you can see his offerings.
      There is nothing wrong with taking things slow and then adding pieces. That said just to get a basic amp working you would need about 90% of the pieces for the uptown version. Much of the effort should go into the protection and sequencing circuits. The cost of an Arduino Control system adds about $50 USD and I will make the code available. So it might be better to start with the Arduino and say build one band initially and then go from there.
      Here are some of the bits and pieces that need consideration: 1) Turning on and off the amp either in a normal mode or an emergency mode, 2) Sequencing the amp in line by first connecting the antenna and then the exciter and reversing that process when you are done transmitting , 3) Satisfying conditions such as low SWR, normal temperatures, LPF’s in line, power on to the amp to avoid putting the amp in line when the power is not applied to the amp (read expensive one time dummy load) and finally are all the conditions met before you hit the PTT. Frankly Gerry doing this manually presents a very high risk of “smoking the amp”.
      The use of breadboards as the 1st build is highly recommended to do the initial development work. For several days now I have been wiring up the board. Having only 15 or 20 minutes at a time is not productive BUT is a bonus as it gives you time to think about what you are doing and to minimize reworking the project. In the next several days I hope to make a video of the initial breadboard activity and demonstrating the control system. I plan on making the whole amp control system function before hooking up the actual amp board.
      So stay tuned to the blog as I will share all of the project information. Again thanks for your posting.

      Pete N6QW

  4. Hi Pete...
    Many thanks for the detailed & informative reply. I guess solid-state devices are a little less resilient than hollow-state. Based on what you say, I believe my first amplifier should maybe not be self-built. There is an Ameritron AL811 for sale locally for pretty reasonable money, so I reckon I will go for that, and defer building until I learn some more. I come from a software background, so that end of things would be no problem, but the RF side is still very much a black art to me.
    All the best...
    Gerry / EI8DRB

  5. Hi Gerry,

    Whether Tube or Solid State --you can smoke the amplifier. In some respects the solid state devices with the Arduino enable you to have a greater degree of protection than a "toob" amp unless you spend a ton of money like in the high end amps. As a software guy you have a real leg up on those of us who have to grope their way through the code. Caveat Emptor with the Ameritron --early on there were quality issues and you also have the problem with high voltage so be very careful. Keep watching the blog as you may have other thoughts as you see the full project.

    Pete N6QW


So How To Do CW on a Homebrew SSB Rig?

3/16/2019 ~ Remote Antenna Tuning 3/14/2019 ~ Calling All Junk Boxes???? Calling all Junk Boxes, N6QW is looking for a part! ...