VK4PLN audio filter board

Nik VK4PLN has now received his 700Hz CW audio filter boards and built up the board as shown below:

He put these on the spectrum analyser.  The spectrum before the filter is included in circuit:

And after:

Seems to work!   To Nik’s ears an LM324 gives a better result than the TLC274 op amp.  You mileage may vary.

Reference

SSM2167 Mic Compressor: Avoiding feedback

John VK2ETA notes that Simon, VK3ELH, pointed out  an issue that when inserting an SSM2167 mic compressor circuit between the microphone and the uBitx mic-preamp, it can create feedback when the microphone was placed near the speaker while in RX.  This is because the SSM2167 module is always on.

The solution John has applied is to connect the shutdown pin of the SSM2167 (pin 3) to the Raduino T/R digital output (D7) through a 2.7K ohm resistor. This disables the chip while in RX and removed the mic feedback issue.

Pictured above is an indication of where he picked up pin 3 on the SSM2167 on his module. The purple wire is connected to what is the right hand side of resistor R4. The 4.7K resistor on the RHS is for the mic-bias and the 51K resistor on the top-left is for bringing the compression ratio towards 4.

John feeds the Vcc pin on the board from the regulated 5V of his Raduino. Measured consumption at 2mA is a very small extra load on the Raduino regulator.

There is a DC blocking cap on the input and output circuits of the board already, so no external blocking capacitors are needed.  However, a bias resistor does need to be added for the microphone.

The 2.7K resistor is not mounted on the module, so is not shown in the picture.

Also not shown on the picture are an axial choke of 100uH between the “in” connection and the Mic, plus a 1nF capacitor between the “in” connection and ground to block RF feedback when Txing on higher frequencies. For John, RF feedback was noticeable from 15m through 10m. Others may not have this issue.

John also has a 10K adjustable potentiometer between the “out” connection on the module and the original Mic input to the uBitx.  His is turned to about 80% through its range.

John mounted his board on header pins so he can remove it as required.  He extended the header pin on the “out” side (bottom LHS on picture) past the board to provide an extra connection for the shutdown wire.

John finds the compression and noise gate work quite well on the module. When he is silent the background noise does not trigger any movement of the power needle, but it goes up as soon as he speaks into the Mic. Also despite showing quite an increase in average power, he hasn’t had any negative comments on his  audio. I was told that it was noticeable, but not unpleasant, “good for DX”.   And this was with a change in the standard resistor value for compression to give around 4: 1 compression.

Reference

 

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!

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

Gian, I7SWX, has shared a mod for replacing the TDA2822 audio amplifier. He intends to apply this circuit after other mods he is experimenting with on his uBITX.


The audio PA is the TDA2003, an amplifier where the bandwidth can be modified.  His circuit is designed for 3kHz.

This circuit, with reduced bandwidth, has been tried on an FT920.  It is possible that some components values may need to be changed.
It is important to note that Gian has not tried this mod as yet, but others might like to beat him to it!

Reference

 

Labelling the front panel (updated)

Making nice labels for the front panel of the µBITx may not be all that intuitive.  Many of us use a label writer (e.g. Brother or Dymo device).  The best options (depending on your front panel colour) may be to use “black on transparent” or “white on transparent” tapes.

Vic WA4THR was looking for a way to easily label the front panel of his  BitX40 and was pointed to the use of an Avery product. It is a transparent plastic with an adhesive backing and you can print using either an inkjet or a laser printer. You then just cut the strips where you designed the label, peel the backing, and place on the panel. Really easy, and the results are pretty good. One sheet can produce a ton of labels, too. The product is Avery 4397.

John WA2FZW uses the same product, but makes one big decal for the entire panel. That way you don’t see the edges of the individual labels. There is a full description of the process used in the documentation for his Magnetic Loop antenna controller.

Dave G4UF has another method that he uses. You don’t have to be as careful with the LCD cutting 🙂

http://projectcasedesignandbuild.blogspot.co.uk/2017/07/printed-facia.html?m=1

And then Dan, W2DLC told us that he printed his out on with an inkjet printer on regular photo paper and then put some clear tape over it to preserve it with a pretty amazing result:

AA9GG adheres his printout to the case using a sheet of 3M adhesive. Basically, it’s a large sheet of double sided tape.

Daniel W2DLC uses “Loktite” spray adhesive.

Reference

An S-Meter and AGC circuit

Don ND6T has recently installed a 20 dB RF AGC modification in the BITX40.

He has not installed it in the uBITX yet but intends to do so soon.   It’s a simple circuit and replaces the S meter circuitry, too.

Most BITX automatic gain control schemes use the audio output to apply control of the input of the audio power amplifier. This depends upon the volume control setting and introduces considerable distortion on high level signals. By using a signal source before the control then we can use the constant fixed gain of the receiver as a good indicator of signal strength and still adjust the speaker or headphone levels for the best comfort.

This simple project uses a single stage amplifier to tap into the audio at the input of the volume control, rectify it to a DC level, filter it, and use it to control a MOSFET as a shunt across the receive RF path. This project assumes that you have already installed the RF gain control described here (for the BITX40 or here (for the uBITX) and bridges across it at the control potentiometer.

R3 and C3 are used to not only filter out the audio component, but to form a “fast attack, slow release” control signal. That means that, when a strong signal appears, RF gain will be quickly reduced but will take a second or so to restore to full gain after the signal stops. This avoids “pumping” during a single sideband transmission but is fast to react to very loud signals.

Nearly any general purpose NPN bipolar junction transistor will work as Q1 as long as it has a beta of more than 100. 2N2222, 2N3904, etc. will work quite well. Q2 can be a 2N7000 or a BS170. None of the component values are critical. The 5 volt supply makes it easy to use any part with more than a working limit of just 6 volts and the current drain is low enough to be negligible.

I have found that most 2N7002 transistors will yield at least 20 dB of RF attenuation across the HF spectrum at 50 ohm impedance. Attenuation begins around 1.4 volt bias on the gate referenced to the source and provides maximum action at around the 3.7 volt level. Very effective for a single, simple, and inexpensive device. A great first step.

A more fulsome article with construction details (using surface mount components) is posted on nd6t.com.

This simple circuit led to a discussion on the BITX20 IO Group list, started by Jerry KE7ER, about the BAP64Q pin diode attenuator.   This gives 60dB of dynamic range:  https://groups.io/g/BITX20/message/32066

Attenuating back in RF gets around the limited dynamic range that Henning points out in the first post of that thread.    Note that the control voltage is inverted with respect to the 2n7002 FET, higher voltages give less attenuation.   You could get a slightly lower noise figure for the receiver if the attenuator was inserted at a later stage of the RF chain.

Jerry observes, “The BAP64Q is relatively expensive at $0.50 single piece,
the frugal among us will note it’s down at $0.20 if you buy a few thousand.
Mouser and Digikey both stock it, Mouser points you to the wrong BAP64* datasheet.   There are other similar small signal pin diode attenuators out there from other manufacturers.”

Reference