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.
Control System Breadboard
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 4×20 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.
Control System Subtleties
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:
The pure control function that in essence turns on the power supply and at the appropriate time the amplifier itself.
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.