It is all about a strategy and having a mind that can see a path to gaining information without making it obvious that is not what you are doing. I am not describing myself.
In yesterday's post I mentioned that while it would be nice to have 12 Channels on the band switch, using the Color TFT chewed up quite a few of the pins and so 5-positions was a certainty with a possibility of adding just a few more without going to a pin expander or using the Mega 2560. Honestly that is what my brain was telling me.
Well, emails from three separate Blog readers suggested I could have a large number of positions using just one pin (Analog to boot) on the Arduino. So how can that be?
Well, you set up that Analog Pin, so it is reading an Analog voltage which is changed with a switch. The internal Arduino logic would then test the voltage read (allowing for a small range of voltage) and then if the test is met you would load a specific value of frequency into the Si5351.
It is like the old "if" and "then" statements.
IF the read Analog Voltage is between 2.4 and 2.6 volts THEN load 10378500 into the Si5351.
[I have not done any analog voltage reading with the Arduino, but I seem to recall you actually can't directly read voltages but only values and so there possibly may be a conversion involved. I am certain I will be corrected if what I said is incorrect.]
10378500 - 3178500 (LSB BFO) = 7200000 on the display so you would be at 7.2 MHz with 10.378500 MHz loaded into the Mixer stage.
Friend K7TFC (mostlydiyrf.com) was one of those who contacted me, and he uses this exact method of One Pin Analog with one of his products. In essence it is a resistive ladder approach where say 5 VDC is applied at the top of the ladder and the Band Switch connects to the ladder rungs and reads that voltage.
But he also shared several different ways of the resistor ladder approach. One uses all of the same value of resistance so that as you cycle through the band switch each position changes the resistance by the same exact amount. Assume ten resistors each 50k at the 1st position you would have 500K and at the 10th position 50K. The same scheme using different values i.e. 10K, 27K, 33K etc. would give the same effect but a little more work to establish the voltage reading at each rung.
Another K7TFC scheme was to use momentary push buttons to replace the manual band switch.
This caused me to think that with 7 Pins to the Arduino you could also use a 3X4 Keypad yielding 12 frequencies. See https://www.n6qw.com and the remote VFO for the Ten Tec Triton II. A Keypad on the radio front panel would give it the air of sophistication not often seen in homebrew radios.
A really uptown approach (akin to a really high-class hooker) would be to have a larger touch screen display with a smaller Keypad array as part of the screen and then no band switch or push buttons needed. Possibilities and lots of them.
Them that know can make things go!
Happy Memorial Day! Never Forget! Some of those who gave their lives for our freedom were not citizens and chose to serve in exchange for citizenship. I guess today they still would get deported. Hmmm those making today's rules did they ever serve our country? We all know of at least one who didn't.
73's
Pete N6QW