Extensive VK2ETA mods to KD8CEC firmware

John, VK2ETA, has implemented a range of changes in Ian KD8CEC’s software targeted at portable operations (the software can be downloaded here in the files section of the BITX20 IO Group).

VK2ETA Software modifications to KD8CEC firmware

The scope of these modifications is described below:

Options for various features – These can be turned on or off. Key objective is to be able to customise the rig based on your needs and unfortunately on the restricted memory size of the Nano. So not all features can be selected at once. Choices, choices…

ATU control – A servo-based L-Network ATU. The communication between the Raduino and the ATU Arduino is via I2C. There is a separate sketch for the ATU Arduino (Nano or Pro-mini).   ATU operating mode can be set to OFF, Manual as in on-demand, or auto-RX meaning that it pre-tunes based on historical data on a change of band and after first change of dial frequency (for a quick scan of the bands). It uses the EEPROM data of the closest stored frequency for pre-tune or tune on-demand to accelerate the tuning process.

Handsfree microphone/headphone – Using an Android style 3 rings (TTRS) handsfree earpieces/mic combination, with 1 or 3 buttons (Play/Pause, +, -), the PTT is controlled by Play/Pause as toggle, and I use long presses on + and – as respectively pre-tune and smart-tune of the ATU. Short + or – presses could be used for frequency up and down. Requires a very simple hardware mod to free-up A6 (see below).

S-meter measure and display – using analogue input A7 from an 2N7002 based AGC or a MAX9814 circuit or any other for that matter.

Software based AGC range extender – to augment (as in double or triple) the dynamic range of an audio AGC. This uses the slope of the 1st If filter at 45Mhz to attenuate the Rx signal when the audio AGC reaches its limit. Adds over 50dB of dynamic range.

Forward power and SWR measure and display – Currently assumes that the ATU is providing that info over I2C. Otherwise could be adapted with a pair of analogue inputs for measure. See the excellent NT6D design on the wiki.

Options for displaying the S-Meter, SWR and forward power –  in either easy to see “fat” bars with no number, or “skinny” bars with more text and numbers.

Enable a “Memory mode” – selectable by menu, which cycles through all the populated memories (channels). Dial lock also locks the change of channels.

Made some rarely used or once-off functions as options  – to recover program memory after initial tuning and allow for more options to be selected.

Fixed some issues with the IF-shift option – Ian has resolved these in his new V1.06 and later releases. Two issues were present: IF-shift in USB would change the receive frequency and it was applied to TX as well. Now applies to Rx only.

Hardware modifications required to use VK2ETA software mod

The only required hardware mod is to connect the CW key input to the PTT. Since in Ian’s software we select the mode by menu, there is no need to have a separate analogue input tied-up for the CW key. This frees-up analogue input 6 for use by other functions like the handsfree option above.

Still to come

John plans to apply Ian’s improvements in v1.06, especially the CW transmit frequency option and if possible the WSPR beacon mode (as a further add-in option).

How to use VK2ETA software

Download the zip files, and unzip these in your Arduino sketches folder.  Edit the ubitx_20 options sections, using #define for enabled and #undef for disabled.

Perform a CTRL-R to compile and check how much memory is used. If you go over the limit, a warning is issued.  Providing you have enough memory to run the software, upload the sketch to the Arduino.

John has uploaded both the Raduino as well as the Arduino sketch for the ATU and SWR measurement. They can be found in the folder “Variations on Ian Lee’s Software (by VK2ETA) + ATU sketch”. 

All software is released under GPL V3.
Reference

Use the 45MHz Roofing Filter for an RF AGC?

 

John, VK2ETA, came across an idea in the search for a greater range for his MAX9814 AGC circuit.

Stations, above S9+10 would produce distortion in the audio circuit with the MAX9814 AGC in circuit.   He isolated this to the MAX circuit as the distortion would disappear when it was bypassed.

John was curious as to what the first 45Mhz filter (Roofing Filter) shape was like and if there was some plateau to be used somewhere for attenuating the strong signals.

He modified Ashhar Farhan’s original software to include an “Adjust First IF” menu item, in steps of [1000Hz].

By using a local station’s carrier aligned on 1,500Hz audio as a reference and an Android audio spectrum display he plotted the response of the single crystal roofing filter. This also gave an idea of the effect on the audio of shifting the filter up and down. The “noise” in the graph below near the peak is the effect of changing from a measure every [10,000Hz] to a measure every [1000Hz], plus the inaccuracy of John’s rudimentary instrumentation.

As you can see, there are rather slow slopes on each side of the peak (which is off-center by [7,000Hz] approximately when compared to 1,500Hz – the centre frequency of an SSB signal).

So John has proceeded with changing Ian’s software (based on v1.04) to incorporate an automatic AGC step-down when the signal reaches S9+10 and and automatic step-up when it reached S0. In the middle range, the MAX audio circuit does the AGC job.

John used the up side of the filter as he got some birdies on some of the shifts on the down side.

Now the uBitx can handle S9++++ stations with ease, that is until the first amplifier stage before the filter saturates which John suspects is unlikely in “normal” conditions.

The only concern would be for another, possibly even stronger, station which would be placed at the peak of the filter (possibly several KHz away). This could produce intermod distortion. But the chances of that happening are pretty remote.

So, this approach works quite well and is surprisingly effective for AGC control at an early stage in the receiver.

It also works in reverse, with the transmit SSB signal being attenuated by the same amount, thereby leading to a possible ALC software control for the units which measure the power out (or possibly just the current).   It could also be a simple solution to set attenuation (e.g. on digital modes).  Again, check the effect of the slope on the voice tone.

John has attached snippets of his code.  He has also uploaded the modified uBitx software for testing the filter both in RX and TX in the  “Software based IF attenuation” folder in the BITX20 IO Group files.

John will soon publish the complete set of Ian’s modified software including mods to control his ATU unit.   However, in seeing discussions on an IF AGC in the group, he thought this update would be of interest to constructors.

Code Snippets

#define OPTION_SMETER
#define OPTION_SOFTWAREAGC

void doSoftwareAGC() {
#ifdef OPTION_SMETER

int newSMeter;

//VK2ETA S-Meter from MAX9814 TC pin
newSMeter = analogRead(ANALOG_SMETER);
//Serial.print(“newSMeter:”); Serial.println(newSMeter);

//Faster attack, Slower release
currentSMeter = (newSMeter > currentSMeter ? ((currentSMeter * 3 + newSMeter * 7) + 5) / 10 : ((currentSMeter * 7 + newSMeter * 3) + 5) / 10);

//Serial.print(“currentSMeter:”); Serial.println(currentSMeter);
//Scale it
scaledSMeter = 0;
for (byte s = 8; s >= 1; s–) {
if (currentSMeter > sMeterLevels[s]) {
scaledSMeter = s;
break;
}
}
//Serial.print(“scaledSMeter, un-adjusted:”); Serial.println(scaledSMeter);
#ifdef OPTION_SOFTWAREAGC
//Apply auto-shift of first IF to increase the dynamic range of the Audio AGC circuit
long previousShift = firstIfShift;
if (scaledSMeter >= 7) {
//Reduce gain by shifting the first and second If by the same value, thereby
// leaving the RX frequency the same but using the slope of the roofing
// filter to deliver progressive attenuation.
// 10kHz or 5kHz per step.
firstIfShift += (scaledSMeter > 7 ? 10000 : 5000);
} else if (firstIfShift > 0 && scaledSMeter < 1) {
//Re-increase the gain if we reduced it earlier
firstIfShift -= 5000;
firstIfShift = firstIfShift < 0 ? 0 : firstIfShift;
}
if (firstIfShift != previousShift) {
setFrequency(frequency);
//Serial.print(“firstIfShift:”); Serial.println(firstIfShift);
//Adjust meter by IF attenuation except for the first 10Khz. Approx 6dB per 5KHz.
scaledSMeter += (firstIfShift > 10000 ? (firstIfShift – 10000) / 5000 : 0);
//Serial.print(“scaledSMeter, adjusted:”); Serial.println(scaledSMeter);
}
#endif //OPTION_SOFTWAREAGC
#endif //OPTION_SMETER

}

//And the setfrequency function becomes:

void setFrequency(unsigned long f) {
f = (f / arTuneStep[tuneStepIndex – 1]) * arTuneStep[tuneStepIndex – 1];

setTXFilters(f);

if (cwMode == 0)
{
if (isUSB) {
//si5351bx_setfreq(2, SECOND_OSC_USB – usbCarrier + f + (isIFShift ? ifShiftValue : 0));
si5351bx_setfreq(2, SECOND_OSC_USB + firstIfShift – usbCarrier + f – ((isIFShift && !inTx) ? ifShiftValue : 0));
si5351bx_setfreq(1, SECOND_OSC_USB + firstIfShift);
}
else {
//si5351bx_setfreq(2, SECOND_OSC_LSB + usbCarrier + f + (isIFShift ? ifShiftValue : 0));
si5351bx_setfreq(2, SECOND_OSC_LSB + firstIfShift + usbCarrier + f + ((isIFShift && !inTx) ? ifShiftValue : 0));
si5351bx_setfreq(1, SECOND_OSC_LSB + firstIfShift);
}
//VK2ETA Bring back the BFO to default if using IF Shift and we are TXing
si5351bx_setfreq(0, usbCarrier + ((isIFShift && !inTx) ? ifShiftValue : 0));
}

else
{
if (cwMode == 1) { //CWL
//si5351bx_setfreq(2, SECOND_OSC_LSB + cwmCarrier + f + (isIFShift ? ifShiftValue : 0));
si5351bx_setfreq(2, SECOND_OSC_LSB + firstIfShift + cwmCarrier + f + ((isIFShift && !inTx) ? ifShiftValue : 0));
si5351bx_setfreq(1, SECOND_OSC_LSB + firstIfShift);
}
else { //CWU
//si5351bx_setfreq(2, SECOND_OSC_USB – cwmCarrier + f + (isIFShift ? ifShiftValue : 0));
si5351bx_setfreq(2, SECOND_OSC_USB + firstIfShift – cwmCarrier + f – ((isIFShift && !inTx) ? ifShiftValue : 0));
si5351bx_setfreq(1, SECOND_OSC_USB + firstIfShift);

}
//VK2ETA Bring back the BFO to default if using IF Shift and we are TXing
si5351bx_setfreq(0, cwmCarrier + ((isIFShift && !inTx) ? ifShiftValue : 0));

}

Reference

Research into the audio pop problem

John KK5VH has been working on understanding the audio pop problem for a while. He doesn’t have a fix yet, but he has identified that:

  1. The relays have a max actuation time of 7ms.
  2. K1 drives K3 via the TX voltage –  that means you have a 7ms (max) time from when the TX turns on and K3 disconnects the audio.
  3. Changing the power (turning RX/TX  on and off) on these one transistor amplifiers will cause a large spike to be coupled via C63 and C51 to the audio IC before K3 can cut them off.
  4. Both the amplifiers draw tiny amounts of current, Q6 about 1.3ma and Q70 about 2.2ma.  They do not have enough current draw to bring their respective power sources down quickly. Secondly, they have 47µF capacitors that hold the power up within that circuit.

John has been simulating the circuit via LTspice with some results.

He increased C64 to 517µF by paralleling a 470 µF cap across it and changed C52 from 47µF to 0.1 µF.  That made a timing difference that cured the turn on pop but left a gigantic pop on turning off the rig or moving from TX back to RX.

After all of this playing around he still don’t have a good hardware answer to the problem!

However, John suggests that if the Arduino Nano controlled K3, this could solve the problem using timing delays. A simple sequence would in moving from RX to TX, first turn on K3 (disconnecting the audio chain) then switch on K1 into TX mode.  When finished with TX mode, hold K3 on for a number of milliseconds to all the RX circuits to stabilize before switching back to RX on K1. Hopefully, this would solve the problem.  John welcomes comments!

uBITx manager Master Calibration settings

Nigel G4ZAL asked what people saw in KD8CEC’s UBITx Manager for their calibrations.

Nikos, SV1IYF,  sent Nigel his settings, and they may be useful for others who want to recalibrate roughly to get going:

  • Master Calibration 143000 => Accuracy within 3Hz @10MHz, as delivered was ~75Hz off
  • USB Calibration 11996200 => Places the audio BW @ 430-2450Hz @-6dB
    I ended up with said figure for USB as I only work FT8 and also the farther the crystal filter’s pass-band is shifted from zero the better the carrier suppression and the LSB sideband (which are nothing to boast about).
  • LSB Calibration:  Not changed.

A voyage of discovery with the µBITx

Rob, AG5OV, discovered the uBITX around Christmas and promised myself that when he got his Extra licence, he would setup his first HF shack. The uBITX removed the financial barrier and two weeks after he discovered the uBITX he passed his Extra exam (50 of 50!).

Rob’s adventure was in full-swing. He was aware of the anecdote of not to QRP for your first rig, but some frustration and failures did not dissuade him easily.   He decided against building his own antenna for the first go round, as the uBITX was already going to be somewhat of a variable.  After all, the fewer variables, the better!

He went with an EFHW from MyAntennas, which seems pretty well regarded.  He learned about configurations, gotchas of EF’s, radiation patterns and about slingshotting fishing weights over tree limbs.

While waiting for his uBITX to ship he read every single post on the BITX20 list. If there was a part number, he went and read up on it. If there was something he needed for his µBITx, he ordered it. (He now has a stash of TDA2822’s, sockets, IRF510’s, RD16HFF1’s and BN’s sitting around). He bought a new soldering iron, bought a handful of newly discovered SMD practice boards and then read some more.

His uBITX eventually arrived and proved to have the dreaded WX version of the TDA2822 chip.  He was not discouraged for he had a stash of step-downs from eBay.

He rushed putting his uBITX together with a build that aesthetically belongs in class of what not to look like. He printed a mic enclosure and a double paddle (and he has been practicing his CW regularly).  The rig was brought to life. There were VOICES on his radio!  He tried some SSB CQs, but his output looked very low… something to follow-up on.

Next he built an audio interface (using an EasyDigi design, but without the kit) and tried some FT8 because he had two young helpers who needed to see results…  The young helpers make activist investors look like puppy dogs!  They don’t want to hear their Dad endlessly calling CQ, they need action!

Rob had his first uBITX QSO on FT8 last week and with his helpers they have looked at the map everyday. They worked Mexico and down to Colombia shortly after. Last night they managed a first FT8 QSO across the pond to Slovenia and Hungary on the junkyard uBITX.

Rob wrote out his story not for himself, but because all this happened when the uBITX became available and it changed a “someday”activity  into a “Hmm, I can do this right now” activity.  It ignited a grand adventure for himself and a couple of young men.

Next up, Rob plans to use his µBITx on CW and SSB.   He has already met a local HF’er via FT8, who’s going to be his testbed for SSB and he’s been practicing for his first QRS CW QSO.

Rob extends a big “Thank you” to Ashhar Farhan VU2ESE for making the little hackable “platform of discovery” and he also extends a big “Thank you” to the community of constructors on the BITX20 List for imparting the “Yeah, I can do this” motivation.

Reference

16×2 Display Dimensions

Jim Reagan asks, “Can anyone give me the manufacturer of the LCD display?  Or the exact size?”

Jerry, KE7ER responding noting that “Adafruit says they nominally measure 24x69mm,  mine measures 24x71mm  https://www.adafruit.com/product/181″

“The 16×2 LCD (or 1602) is a generic display and there are clones of clones of clones for this display.  Who built it first has long since been lost to the mists of time, as has pretty much everything from the 1980’s.   But hobbyists have taken to it because it’s cheap, and speaks via 5v logic just like the equally ancient tech of their Arduino boards.  So they still get cranked out, by manufacturers too embarrassed to put a name on them.  The going price on eBay is down around $1.60.”

The LCD that comes with many uBitx is the  JHD 162:    https://www.sunrom.com/get/526000

The dimensions shown on page 16 are 24.1 x 72.2 mm.

Those pre-preparing a front panel while awaiting the arrival of their µBITx are advised to make a hole smaller than these dimensions, just in case the dimensions don’t match.   There is quite a bit of variation in 1602 display dimensions.

Reference

Linear amp conversion to Mitsubishi finals

Nik VK4PLN has been doing further work  on upgrading the linear amp to Mitsubishi finals in his µBITx.  He says,

“So looking good so far. I am getting these output values: (RV1 adjusted(75%) for 20W on 80/40)
80m : 20W
40m : 20W
20m : 18W
15m : 17W
10m : 14W

“No feedback, but I have yet to test a QSO on 20/15/10m…

The configuration is:

RD16HHF1 finals,

  • BN42-202, but a 2:4 ratio winding giving 1:4 transformation.
  • 320pf on all 7 emitter resistors of the pre-amp chain
  • 330pf across the primary of the final’s winding.
  • 220 ohm feedback resistor.

The finals run cool at 20+w with 330pf Mica cap.    Nik is still considering changing out the driver and pre-driver transistors. 

Reference