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