BITx40 Software

For those wanting to upgrade the stock BITx40 the favoured option is to use the software developed by Allard PE1NW.  This is a well worked over piece of software and is used by 100’s if not 1000’s of BITx40 owners.


Allard’s firmware options can be found here:
https://github.com/amunters/

 

You need to choose between his Bitx40 and Bitx40-raduino-v2 branches. Both take some minor hardware mods which Allard has documented extremely well.   His version 2 drives the BFO from the si5351 on the Raduino
instead of using the stock analog crystal oscillator for the BFO.

Reference

AGC for uBITx controlled by I2C via Software

Nick VK4PLN admits he has tried just two AGC approaches on BITx rigs: the VK3YE AGC (which is shall we say very illuminating) and the ADAFRUIT TPA2016 I2C module.

Nick found the VK3YE solution messed with the audio quality, made it all scratchy, and still didnt handle local 100w stations well …

Now after playing with the TPA for a few days he is very happy with the results.  Audio has good depth and AGC is responsive, and the unit also gives a nice increase in gain.

One trick for others who want to implement this,  is that you will need to add some code to the Adafruit library to implement the enableNoiseGate(false); function.    We need to turn the NoiseGate off or else the AGC will not ramp up with only background noise and you will not hear anything until a loud signal comes on.  [EDITOR notes that this could be used as a kind of SQUELCH function].

Also the speaker output is NOT grounded, you need to isolate your SPEAKER jack so that the – ve line from the TPA2016 is direct to the speaker with no chassis grounding…   Output from the amplifier can’t be fed into another amplifier.

The Best part in Nick’s opinion is that all of the AGC related settings are customisable if you want.  If not, just use the voice settings from the datasheet.   Nick says the defaults work great!

Stereo 2.8W Class D Audio Amplifier – I2C Control AGC – TPA2016

Nick says he will post the code to the list along with a few pics… This extra info should appear here shortly.

REFERENCE

And the board installed in Nick’s uBITx can be seen below.  It looks a real tidy build!

Software

Nik has now shared his software:

/*************************************************************************
VK4PLN’s AGC Code. Adafruit TPA2016
Add call to setupTPA2016(); to main code setup() in ubitx_20 after initOscillators();
**********/

#include <Wire.h>
#include “Adafruit_TPA2016.h”

Adafruit_TPA2016 audioamp = Adafruit_TPA2016();

void setupTPA2016() {

audioamp.begin();
// See Datasheet page 22 for value -> dBV conversion table
// Serial.println(“Right off, Left On,”);
audioamp.enableChannel(false, true);

// Noise Gate Threshold: Below this value, the AGC holds the gain to prevent breathing effects.
//Select the threshold of the noise gate (1,4,10,20mV) (0-3)
// Serial.println(“Noise Gate Threshold,”);
//Disable NoiseGate, we want to hear everything, even weak signals….
audioamp.enableNoiseGate(false);
audioamp.setNoiseGateThreshold(0);

// Fixed Gain: The normal gain of the device when the AGC is inactive.
// The fixed gain is also the initial gain when the device comes out of shutdown mode or when the AGC is disabled.
// value 6 seems to work ok… based on datasheet. Where gain is from -28 (dB) to 30 (dB)
// Serial.println(“Setting Fixed Gain”);
audioamp.setGain(-12); //-27 is ok? -12 is too high local stations arnt clipped…

// Compression Ratio: The relation between input and output voltage.
// AGC can be TPA2016_AGC_OFF (no AGC) or
// TPA2016_AGC_2 (1:2 compression)
// TPA2016_AGC_4 (1:4 compression) * Datasheet – Voice
// TPA2016_AGC_8 (1:8 compression)
// Serial.println(“Setting AGC Compression”);
audioamp.setAGCCompression(TPA2016_AGC_8);

// Limiter Level: The value that sets the maximum allowed output amplitude.
// Serial.println(“Setting Limit Level”);
audioamp.setLimitLevelOn();
// or turn off with
//audioamp.setLimitLevelOff();
audioamp.setLimitLevel(30); // range from 0 (-6.5dBv) to 31 (9dBV) (8.5dBv(30) as per datasheet)

//Maximum Gain: The gain at the lower end of the compression region
// Serial.println(“Setting AGC Max Gain (18-30db – (0-12)”);
audioamp.setAGCMaxGain(12);

/*
* For voice systems the attack time should be in the 2-ms region, with a hang time of about 0.3 sec,
* followed by a gradual recovery time of up to 1 sec.
* http://www.qsl.net/va3iul/Files/Automatic_Gain_Control.pdf
*
*/

// See Datasheet page 23 for value -> ms conversion table
// Serial.println(“Setting AGC Attack (0.1-6.7ms – (0-63))”);
audioamp.setAttackControl(3);

// See Datasheet page 24 for value -> ms conversion table
// Serial.println(“Setting AGC Hold (0.0137-0.8631ms – (1-63))”);
audioamp.setHoldControl(0);

// See Datasheet page 24 for value -> ms conversion table
// Serial.println(“Setting AGC Release (0.0137-0.8631ms – (0-63))”);
audioamp.setReleaseControl(4);

}

Also, need to add this new function to Adafuit library after the existing enableChannel function:

// Turn on/off Noise Gate
void Adafruit_TPA2016::enableNoiseGate(boolean ng) {

uint8_t setup = read8(TPA2016_SETUP);
if (ng)
setup |= TPA2016_SETUP_NOISEGATE;
else
setup &= ~TPA2016_SETUP_NOISEGATE;

write8(TPA2016_SETUP, setup);
}

And the line for the header file:

void enableNoiseGate(boolean ng);

in .h file:
void setNoiseGateThreshold(uint8_t thresh);

in .cpp file

void Adafruit_TPA2016::setNoiseGateThreshold(uint8_t thresh){ //Added by VK4PLN
if (thresh > 3) return; // max threshold is 3 (20mV)
uint8_t agc = read8(TPA2016_AGCLIMIT);
  agc &= ~(0x20);  // mask off bottom 5 bits
  agc |= thresh;        // set the limit level.
  write8(TPA2016_AGCLIMIT, agc);
}
Reference

Warning: Some uBitx kits shipping with incorrect female connectors

KF2510 headers in uBITx

There are two 8 pin wiring male headers in the kit – one on the main uBITx board and the other on the Raduino.  Today, Arvo KD9HLC started assembling the wiring on his kit.  He found that the female plugs didn’t match the headers on the board.  After a bit of head scratching and further investigation he found that the female header plugs with flying leads only had 7 pins!

It is likely that other kit purchasers may have the same issue.

These headers are of KF2510 type, widely used in China and are very affordable.  Sets of 50 male/female pairs of 2, 3, 4 and 5 pins are available for about US$3 ex China if you can wait.  And 8 pin females can be found on the various Chinese merchant sites as well.   However, these headers are a bit harder to source in the US.   In NZ and Australia they can be sourced from Jaycar.

THe uBITx kits come with  2 x 8 pin, 1 x 3 pin, 1 x 2 pin wiring harnesses with KF2510 female plugs.   The Raduino unit connects to the main board with a 16 point pre-soldered header.

HINT:   You can substitute ordinary Dupont header strips or single female pins.  They won’t be polarised, so you will need to be careful making connections.

Reference

Pelican and Ammo box style enclosures

Wishbone_aaa spotted in his  workshop a Harbor Freight plastic ammo box that looks like it will do the job. With the lid open, the box is 6 inches deep,9 3/4 wide and 4 1/2inches high. Price $6.99

<https://www.harborfreight.com/catalogsearch/result/index/?dir=asc&order=EAScore%2Cf%2CEAFeatured+Weight%2Cf%2CSale+Rank%2Cf&q=ammo+box>

Meanwhile, Ken, N2VIP suggests that Harbor Freight’s ‘pelican-style’ case is also nice:

BITx40 – Essential Mods

Fantastic BITx40 build from Glenn VK3YY

Jerry KE7ER notes that the schematics on the hfsignals.com website for the Bitx40 are final but not necessarily correct.  He then goes on to talk about some of the variances and essential hacks.

This website is dedicated to the uBITx.   However, so that everybody who also has a BITx40 doesn’t miss out entirely on the occasional “gold nugget”,  some interesting articles about the BITx40 may appear from time to time on this website.   Jerry’s comments on the variation between the published circuit diagram and the actual board currently in production meets the “gold nugget” standard.

Differences between the BITx40 Board as manufactured  and the manufacturer’s Circuit Diagram

  • The two modulator diodes D15,D16 plus balancing pot R106 got replaced by a BAT54s dual schottky:  https://groups.io/g/BITX20/message/33385
  • All those BC849’s?  Have always been MMBT3904’s.
  • L5 and C103 of the BFO are missing, the BFO is at just about the right frequency if the crystals are matched without any adjustment.  Usually.
  • L4 in the VFO is not stuffed on the board, meaning the analog VFO doesn’t oscillate.  The VFO comes instead from the si5351 PLL chip on the Raduino through the Bitx40 connector labeled “DDS1” in the schematic.
  • T6-4 is tied to C142 and R144, U3-3 is tied only to the 12v rail labeled “TX”, schematic does not show that clearly.
  • RV1-2 is not connected to U3, the schematic drawing is just a little tight there.Otherwise, Jerry thinks that the schematics on HF Signals are correct, reflecting what is currently being shipped.   Nothing has changed in Bitx40v3 boards shipped since Dec of 2016.

Changes that should ideally be made to the BITx40 Board

He then goes on to note that he thinks there are a few things that perhaps should change:

  • D7 and C130 should be across the coil of relay K1,  D8 and C164 are correctly across the coil of K2
  • R141 is currently a 1/4 Watt 10 ohm resistor, should be 1/2 Watt as have been reports of it burning out.
  • The surface mount MMBT3904 at Q13 could be replaced with a through-hole version of the same part, the 2n3904, as it must dissipate a fair bit of power during transmit.  Even with the radio off but hooked up to an antenna, a nearby QRO transmitter or electrical storm can blow Q13.

Essential mods

And finally Jerry suggests the following as essential mods for all purchasers:

Note that he suggested adding an incandescent lamp, which can be quite effective:
https://groups.io/g/BITX20/message/21901

uBITX Mic Audio

Dave WI6R thinks that the rig only needs slightly more gain than the existing Mic PreAmp and that adjusting values to add gain is really all that is needed.  He doesn’t think it needs 40 dB of extra gain.

He has resurrected a Mic Pre-amp design used 50 years ago in the SBE SB-33 SF-1 solid state rig that first used bilateral amplifiers.   Bilateral amplifiers are used, of course, in the BITx transceivers.
This design had plenty of gain and worked with a Dynamic Mic with significantly lower output than any of the typical Electret-Condenser Microphones used today.   Also note that the Mic PreAmp was powered only when the rig was in TX and a simple diode was used to shut off the Mic PreAmp in RX with the same TX voltage.
Dave used this rig in the ’60s and doesn’t recall any “pop” when going from RX to TX or vice-versa. The “Signal Splitter” was used to isolate the TX and RX Audio.

Raj, VU2ZAP responded suggesting that simply decreasing the value of R63 would give you more gain!

Speaker Grill templates

Peter Cousins G4NJJ suggests that to get a tidy speaker grill on your EF01 or other enclosure you should have a rummage in the kitchen utensil drawer.

You may find the perfect template.  Peter used a plastic sifter lid as the holes were the size he wanted.

He drew a center line where he wanted it positioned, lined up the template, drilled one hole on the outer circle and inserted a nut and bolt, drilled a hole at the opposite end of the template, inserted a nut and bolt, and then drilled out the rest of holes in perfect place.  Hot glue allowed the speaker to be placed on the underside of the lid of the enclosure.  Done!

Oh and in case you wanted another idea for the template …  And just make sure the XYL is not aware of your minor “alterations” to essential kitchen equipment!

And if you want a variant on this theme of making a speaker grill look real classy, check out Glenn VK3YY’s website for  a ham shack alternative that won’t get you in so much trouble with the XYL:   https://vk3yy.wordpress.com/2017/01/22/bitx40-v3-and-raduino/

 

KD8CEC Software – Now up to v0.33 Beta

uBITx.net site developer, Mike ZL1AXG has been playing around with Ian Lee KD8CEC software releases and giving Ian feedback.

Mike gave the following review on the BITX20 group of v0.30:

This worked faultlessly for me, and I loved being able to adjust the step rate (I have it set on 10Hz now).

The band stacking registers and band switching is fantastic. I had intended modding the software myself to get band stacking and easy ham band switching, but I no longer need to bother! I may still add front panel buttons for band up/band down functions, but the menu band changing function is fairly handy already. It would be good to have a SPLIT function (in addition to A/B) and perhaps a limited number of programmable memories (10?).

I like the way that you can select either ham bands or general coverage RX. You go into the band change menu, and then hold the switch down for longer to toggle between modes.

I have some minor suggestions for improvement. The main thought would be to change the display of the RIT function to show the frequency offset rather than the absolute frequency (i.e. show -0.415 KHz or +0.001 kHz etc). This reflects how most people think of incremental tuning. Once you are done setting the RIT and exit the menu it would show the absolute frequency as normal on the display while the RIT still turned on. The display should, however, continue to display “RIT”/ There is a whole other line above the frequency display to show function settings on RX. Similarly you could show the keyer mode on the first line (e.g. STRAIGHT, IAMBICA, IAMBICB).

I love the way in which you have corrected the frequency display below 1MHz and opened up the RX to 1kHz to 100MHz. A shorter press allows you to set the step function. A long press on the dial switch gives you dial lock. This works well. I like the way the step speed increases when you turn the dial faster, but the dial no longer goes crazy, throwing you half a Megahertz away on outside the ham band. Well done!

The function to monitor ADC levels could be very useful for those having issues with CW keying. My uBITx has always worked fine with both manual and paddle keys. This suggests that the resistor tolerances are probably a bit narrow. My resistor values may be closer tolerance than what others have received. A check on the monitor function shows this to be the case.

I didn’t find documentation on exactly how the ADC monitoring function works. I believe it shows a continuous stream of readings on the port (0 to 1023) with 6 readings at a time. However, I don’t think you can exit from this function without turning off the rig? This allows you to press dit, dah or the manual key to get a reading for the ADC value being received by the arduino. This then allows the setting ranges to be adjusted.

If you are still fence sitting about a software upgrade you shouldn’t be! Upgrading the stock software is reasonably straight forward. Let me tell you that if you have a stock uBITx, you should definitely be downloading this sketch and increasing functionality and ease of use. It is a fine effort.

Mike notes that v0.33 released today adds several new features including some of his suggestions above.

The final release (v1.0) will be a MUST for everybody as it comes with essential bug fixes and many new features, while working with the stock unmodified uBITx.

Sunil VU3SUA kits and enclosures

Those who have constructed BITx40 or BITx20 kits will probably be aware of Sunil Lakhani’s website https://amateurradiokits.in    Sunil is known for his metal cases, but he sells other products as well.   His new uBITx case will be released shortly, and can be pre-ordered now by emailing the store with a colour preference.

The website http://inkits.in has been made to take orders from customers in India only.  This website is still not fully populated with products and some sections have still to be added.

Sunil VU3SUA says his main website for world wide customers will continue to be:  https://amateurradiokits.in

Ubitx.com

Sunil is also constructing a new website for the uBITx.  This is under construction, but keep an eye out for it on:  http://ubitx.com

ubitx.com aims to provide complete info and updates about the uBITx, sharing information with all ubitx builders.

Sunil says that “it will be similar to other group websites like ubitx.net  promoting ubitx info”.   No doubt it will have a different slant and fill a distinct niche in the uBITx ecosystem.