Topics

Auto TX Smart Filter Controller #ubitx #nano #arduino #filters

Tom, wb6b
 

Hi,

I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. 

So I'm building a standalone Low Pass Filter box that will work as an add on filter for the uBITX as well as become a general purpose piece of Ham equipment I can use over and over for other needs.

It uses an Arduino to measure the frequency you're transmitting on and select any individual or combination of filters you like. The proposed design uses a set of filters and a relay switch board; such as to ones by QRP Labs. But, the Sketch code should be easy enough to modify for whatever you like.

The controller can show he selected filter with LEDs or with an optional LCD display, and show the transmit frequency as well.

I'll need to order parts and build mine to finalize the design. However, I built and tested a prototype with a signal generator. 

I'm releasing the preliminary design to everyone now because it is complete enough for people to try out on their own filter designs. It makes using outboard filters really easy, and I think people will like it. I welcome feedback on improvements people make while building their own "Auto Filters" with the controller.

The code for the controller is here: https://github.com/mountaintom/TX_Auto_Filter


----


Tom, wb6b

Jack, W8TEE
 

Tom:

I think there are a lot of readers here who will be interested in your work. To reduce a POF (point of failure) for those who use the sketch, I'd like to suggest you modify the #include directives to show the URL for those files:

#include <FreqCount.h>            // Download: https://XXXX
#include <LiquidCrystal.h>        // Download: httpe://YYYY

I make this suggestion for two reasons: 1) the first one is a non-IDE header file that most people will not have installed on their system and they need to know where to find it, and 2) there are about a bazillion header files for LiquidCrystal libraries. One is distributed with the IDE, but many sketches use LiquidCrystal libraries that are not part of the distributed IDE and will not work with it. If it is distributed with the IDE, then I use:

#include <LiquidCrystal.h>        // Standard with IDE

That way, the user knows they are okay to use what came with the IDE. Indeed, these simple additions to any Arduino sketch would likely help users have greater success in compiling code.


Jack, W8TEE


On Monday, August 13, 2018, 1:17:25 AM EDT, Tom, wb6b <wb6b@...> wrote:


Hi,

I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. 

So I'm building a standalone Low Pass Filter box that will work as an add on filter for the uBITX as well as become a general purpose piece of Ham equipment I can use over and over for other needs.

It uses an Arduino to measure the frequency you're transmitting on and select any individual or combination of filters you like. The proposed design uses a set of filters and a relay switch board; such as to ones by QRP Labs. But, the Sketch code should be easy enough to modify for whatever you like.

The controller can show he selected filter with LEDs or with an optional LCD display, and show the transmit frequency as well.

I'll need to order parts and build mine to finalize the design. However, I built and tested a prototype with a signal generator. 

I'm releasing the preliminary design to everyone now because it is complete enough for people to try out on their own filter designs. It makes using outboard filters really easy, and I think people will like it. I welcome feedback on improvements people make while building their own "Auto Filters" with the controller.

The code for the controller is here: https://github.com/mountaintom/TX_Auto_Filter


----


Tom, wb6b

Howard Fidel
 

Tom:
So, for the time it takes the hardware to figure out what frequency you are at you maybe out of compliance until the filter switches?

Howard

On 8/13/2018 1:17 AM, Tom, wb6b wrote:
Hi,

I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. 

So I'm building a standalone Low Pass Filter box that will work as an add on filter for the uBITX as well as become a general purpose piece of Ham equipment I can use over and over for other needs.

It uses an Arduino to measure the frequency you're transmitting on and select any individual or combination of filters you like. The proposed design uses a set of filters and a relay switch board; such as to ones by QRP Labs. But, the Sketch code should be easy enough to modify for whatever you like.

The controller can show he selected filter with LEDs or with an optional LCD display, and show the transmit frequency as well.

I'll need to order parts and build mine to finalize the design. However, I built and tested a prototype with a signal generator. 

I'm releasing the preliminary design to everyone now because it is complete enough for people to try out on their own filter designs. It makes using outboard filters really easy, and I think people will like it. I welcome feedback on improvements people make while building their own "Auto Filters" with the controller.

The code for the controller is here: https://github.com/mountaintom/TX_Auto_Filter


----


Tom, wb6b


Gordon Gibby
 

Those are great ideas, and I might use that kind of a thing for something completely different.   


On Aug 13, 2018, at 10:32, Jack Purdum via Groups.Io <jjpurdum@...> wrote:

Tom:

I think there are a lot of readers here who will be interested in your work. To reduce a POF (point of failure) for those who use the sketch, I'd like to suggest you modify the #include directives to show the URL for those files:

#include <FreqCount.h>            // Download: https://XXXX
#include <LiquidCrystal.h>        // Download: httpe://YYYY

I make this suggestion for two reasons: 1) the first one is a non-IDE header file that most people will not have installed on their system and they need to know where to find it, and 2) there are about a bazillion header files for LiquidCrystal libraries. One is distributed with the IDE, but many sketches use LiquidCrystal libraries that are not part of the distributed IDE and will not work with it. If it is distributed with the IDE, then I use:

#include <LiquidCrystal.h>        // Standard with IDE

That way, the user knows they are okay to use what came with the IDE. Indeed, these simple additions to any Arduino sketch would likely help users have greater success in compiling code.


Jack, W8TEE


On Monday, August 13, 2018, 1:17:25 AM EDT, Tom, wb6b <wb6b@...> wrote:


Hi,

I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. 

So I'm building a standalone Low Pass Filter box that will work as an add on filter for the uBITX as well as become a general purpose piece of Ham equipment I can use over and over for other needs.

It uses an Arduino to measure the frequency you're transmitting on and select any individual or combination of filters you like. The proposed design uses a set of filters and a relay switch board; such as to ones by QRP Labs. But, the Sketch code should be easy enough to modify for whatever you like.

The controller can show he selected filter with LEDs or with an optional LCD display, and show the transmit frequency as well.

I'll need to order parts and build mine to finalize the design. However, I built and tested a prototype with a signal generator. 

I'm releasing the preliminary design to everyone now because it is complete enough for people to try out on their own filter designs. It makes using outboard filters really easy, and I think people will like it. I welcome feedback on improvements people make while building their own "Auto Filters" with the controller.

The code for the controller is here: https://github.com/mountaintom/TX_Auto_Filter

<Auto TX Filter Unit Block Diagram x1000.jpg>
----
<Auto TX Smart Filter Controller.jpg>

Tom, wb6b

<Auto TX Smart Filter Controller.jpg>
<Auto TX Filter Unit Block Diagram x1000.jpg>

Bill Cromwell <wrcromwell@...>
 

AND...

It will be hot switching...

73,

Bill KU8H

On 08/13/2018 10:06 AM, Howard Fidel wrote:
Tom:
So, for the time it takes the hardware to figure out what frequency you
are at you maybe out of compliance until the filter switches?

Howard

On 8/13/2018 1:17 AM, Tom, wb6b wrote:
Hi,

I wan't to build a filter I can use with the uBITX. However, I don't
want to build a filter that is strictly tied to the uBITX.

So I'm building a standalone Low Pass Filter box that will work as an
add on filter for the uBITX as well as become a general purpose piece
of Ham equipment I can use over and over for other needs.

It uses an Arduino to measure the frequency you're transmitting on and
select any individual or combination of filters you like. The proposed
design uses a set of filters and a relay switch board; such as to ones
by QRP Labs. But, the Sketch code should be easy enough to modify for
whatever you like.

The controller can show he selected filter with LEDs or with an
optional LCD display, and show the transmit frequency as well.

I'll need to order parts and build mine to finalize the design.
However, I built and tested a prototype with a signal generator.

I'm releasing the preliminary design to everyone now because it is
complete enough for people to try out on their own filter designs. It
makes using outboard filters really easy, and I think people will like
it. I welcome feedback on improvements people make while building
their own "Auto Filters" with the controller.

The code for the controller is
here: https://github.com/mountaintom/TX_Auto_Filter


----


Tom, wb6b
--
bark less - wag more

ajparent1/KB1GMX
 

Tom
>>I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. <<

To me that makes a lot of sense.  A standalone project that can be used for many other
projects. 

Suggestion only.. 
A led per filter to signify what one was selected (led and resistor across the relay). 
Then a LCD is not needed.  Might be a reasonable simplification.  Also you can use 
latching relays (power savings, battery powered) that may be handy for portable.

A manual filter selection using one button in a round robin form in case you want the
filter on frequency before transmitting or for receiving.

Allison

Tom, wb6b
 

Good points. 

Bill,

Yes, it will switch when it sees a new frequency outside the band it is on.

---

Gordon,

Hope the code is able to help you get a start on your project.

---

Howard,

I have a comment in the source code, if this is the only filter that sending the output to a dummy load until the filter is selected would be a good idea. For QRP that dummy load could be small and builtin. That may be a good idea in all cases; even as a supplemental filter. Some modes like SSB might require sampling the measured frequency counts, averaging and throwing out the outliers. That would increase the time to select the filter making a dummy load more important.

---

Jack,

I'll add the URLs for the libraries. That is a good idea, especially in the case of the frequency counter library. 
For anyone trying the code before I do that, both libraries are listed in and installable from the Arduino Library Manager.

---

Thanks,

I did not want to jump into premature optimizations of the code before I can determine what the real issues will be and can measure and test them. The code is a baseline starting point. 

Tom, wb6b

Arv Evans
 

If using an external filter box and the uBITX internal filters remain in place,
it seems that the external filters would only need to be activated in transmit
mode.  That could save some power when in receive mode. 

Arv
_._


On Mon, Aug 13, 2018 at 11:44 AM ajparent1/KB1GMX <kb1gmx@...> wrote:
Tom
>>I wan't to build a filter I can use with the uBITX. However, I don't want to build a filter that is strictly tied to the uBITX. <<

To me that makes a lot of sense.  A standalone project that can be used for many other
projects. 

Suggestion only.. 
A led per filter to signify what one was selected (led and resistor across the relay). 
Then a LCD is not needed.  Might be a reasonable simplification.  Also you can use 
latching relays (power savings, battery powered) that may be handy for portable.

A manual filter selection using one button in a round robin form in case you want the
filter on frequency before transmitting or for receiving.

Allison

Tom, wb6b
 

Hi Allison,

Yes, with LEDs the LCD would not be needed. The code should handle latching relays. In my case, that may depend on what I find available with prebuilt filter switch boards. Unless I do go ahead and build more from scratch. 

Having manual selection ability is a good idea. 

Tom, wb6b

ajparent1/KB1GMX
 

Arv,

If using an external filter box and the uBITX internal filters remain in place, 
it seems that the external filters would only need to be activated in transmit 
mode.  That could save some power when in receive mode.  

As is they are wired to only be active on TX.  The only get power when
K1 supplies "TX" (K1 pin 1) voltage to the transmit hardware and that
includes KT1-3 and K3.

With that said .... one can disable all but K3 and with three etch cuts and
jumper TX RF direct to K3 pin16 around the filters completely.  It should
save about 120-150 mA.

Allison

Arv Evans
 

Allison

Sounds good.  Then for the power challenged one could put the LCD backlight
on a push-button so it would only be on when needed. 

Arv
_._


On Mon, Aug 13, 2018 at 1:25 PM ajparent1/KB1GMX <kb1gmx@...> wrote:
Arv,

If using an external filter box and the uBITX internal filters remain in place, 
it seems that the external filters would only need to be activated in transmit 
mode.  That could save some power when in receive mode.  

As is they are wired to only be active on TX.  The only get power when
K1 supplies "TX" (K1 pin 1) voltage to the transmit hardware and that
includes KT1-3 and K3.

With that said .... one can disable all but K3 and with three etch cuts and
jumper TX RF direct to K3 pin16 around the filters completely.  It should
save about 120-150 mA.

Allison

Tom, wb6b
 

On my I2C LCD I/O Backpack I drove the LCD backlight LED from a PWM output from the Arduino Nano. That allowed me to dim the backlight to any level I wanted, as well as turn the backlight on and off. That code could be added to this Smart Auto Filter code.

Tom, wb6b

Woody
 

Hi Tom, et. all,

Nice project, Bob...

I am rebuilding my homebrew amplifier (I use it with my K2) and would very much like to incorporate auto filter selection.  

I have 7 filters rather than 5, so would need to add 2 more output  lines. 
Also, an additional output would be great to enable the amplifier a few 10s of msec after filter relay output is stable -  to avoid hot switching.

Is there any more detailed information about the circuit / schematic?  ...Pinouts, etc.

It has been many decades since my last C programming and I am really rusty (so rusty the brain is seized) also I am Arduino ignorant.   But, from looking at the code, it appears these might be do-able, just not sure.

Would like to get more info...  My email is good at qrz.com...
Thanks,
Woody   KZ4AK

Woody
 

er...  Make that nice project TOM !

Tom, wb6b
 

Hi Woody,
 
Thanks for your interest in the smart filter controller. As I answered your question via email, I'll include the core of the reply here for others that may have the same question.
 
--------
I used a generic Arduino Nano to prototype the circuit. So the chip is a ATMega328p and the pinout it that of the Nano pins.
 
The pinout is in the source code, here:
 
I should add the schematic to the github repository, however here is a post showing the generic schematic. It may be better to use gates/filp-flops that have some hysteresis to make the circuit more immune to possible clocking on noise around the switching threshold.
 
 
One additional note, I was looking at the ATtiny85 data sheet last night. To my surprise this little chip has a PLL to multiply the clock by 8. It can provide a 64Mhz clock to some of the I/O logic. It might be able to count the approaching 30Mhz frequencies of the HF bands without a pre-scalier (although I'll need to look more carefully at the data sheet to be sure). Now if there is another AVR chip that has the same high speed clock and more pins that would be ideal for this project.
 
I took advantage of the sale Microchip is having at the moment on the PICkit 4 programmer/debugger (does both PIC and AVR chips), so I'm no longer limited to the chips supported by the Arduino boards and IDE, so I may look for other processors that can handle higher counter/timer clock frequencies than the ATmega328p used on the Arduino boards.
 
The Arduino Nano with the pre-scaler is still the path of least resistance, and a good way to go.
 
Tom, wb6b