Converting to an I2C display and other developments

Ian KD8CEC is busy opening up the possibilities for including different code sections in his new version 1.07 under development.  This will include the ability to readily shift to an I2C display in order to reclaim digital I/O ports needed for other features.

In the mean time, Bill K9HZ provides a succinct code listing required to get an I2C display to work

The following TWO things need to be done in Ian’s version 1.07 code (BETA):

1. Change Display models in “ubitx_20” :

From this:

#define UBITX_DISPLAY_LCD1602P      //LCD mounted on unmodified uBITX

//#define UBITX_DISPLAY_LCD1602I    //I2C type 16 x 02 LCD

//#define UBITX_DISPLAY_LCD2404P    //24 x 04 LCD

//#define UBITX_DISPLAY_LCD2404I    //I2C type 24 x 04 LCD

To this:

//#define UBITX_DISPLAY_LCD1602P    //LCD mounted on unmodified uBITX

#define UBITX_DISPLAY_LCD1602I        //I2C type 16 x 02 LCD

//#define UBITX_DISPLAY_LCD2404P    //24 x 04 LCD

//#define UBITX_DISPLAY_LCD2404I    //I2C type 24 x 04 LCD

2. Update Ian’s code to use the I2C libraries in “ubitx_lcd_1602i” :

From this:

#include <LiquidCrystal.h>

LiquidCrystal lcd(8,9,10,11,12,13);

To this:

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  //

JUST MAKE SURE THE ADDRESS IS CORRECT…

in the instance above the add-on board on the back of the display is set to address “3F”.  You can use the scanner to find the correct address.

Reference

 

Using 2nd channel of TDA2822 for S-meter

John VK2ETA suggests using a section of the original AGC circuit of the µBITx (design by Ashhar Farhan VU2ESE) for generating a signal for an S-meter so that this can be used by his modified software.

This was part of the pre-production uBitx diagram but was not implemented in the production version.

The 2N7002 is used as an automatic gain control and can be used or not for that application.   The circuit has limitations since it was not included in the production version.

You would need to insert a trim-potentiometer (10K ohms is good) between pin 6 of the TDA2822 and the VOL-H connection to adjust the sensitivity, plus (VERY IMPORTANT) a voltage divider, between the cathode of the diode and the ground, to limit the voltage to under 5VDC for the analogue input of the Raduino.

John would use 330K ohm in series with 100K ohm to the ground, and connect A7 to the junction of the two resistors.

Further adjustments are available in the software if required as we define the 9 stages of the S-meter display (first stage is zero, then 6 stages for growing bars, 1 stage showing “+” and one stage showing the custom “++” symbol). In ubitx_20.ino it shows as:

int sMeterLevels[] = {0, 5, 17, 41, 74, 140, 255, 365, 470};

The values in the array are the measured values on the analogue input (defined as A7 above) at which we step into a higher “stage” and can go from zero for zero volts to 1023 for a 5V DC value.

Reference

Using a 1N4004 or similar as a varicap or pin diode for AGC control

Allison KB1GMX finds it  odd that every one seems to be bent on levelling the audio volume in the audio circuit.

The Bitx or uBitx has enough gain and handy places that RF gain control based on audio detection works very well. The easy way is replace R13 (ubitx) with a diode such as 1n400x (x=1 to 7) and controlling the  current through the diode to make it behave as a variable resistance at RF.

The current would be about 4-6ma at max gain and decrease to zero (0) at minimum gain.  For that design the AGC range is about 26 to 32db depending on the band. If you feel that is not enough AGC range then add the same mod at R33 and with both the AGC range is near 60+ DB, generally enough.

AGC in this form is less prone to overload distortion as you are lowering gain. The control could be a pot between 8V (or RX-V) and ground and a series 1K resistor to the diode (x2 if using both diodes). That gives a manual gain control. To make it automatic use a circuit to detect the voltage at the top of the audio gain pot and feed that voltage to the gain control diodes. The circuit should be arranged to put 4-8V out at NO Audio and decrease to zero volts with increasing audio.

The 1n400x series with minor reservations makes a fine substitute for a PIN diode, the preferred but more costly device for this function. Beside being widely available and cheap  makes it useful.  It also makes a good 20pf varicap and a 1A rectifier to 1000V (1n4007).

This was tested on the first bitx20 that Allison built over a decade ago to test AGC.  It has been used on several older Tentec radios and more than few of her own design. That said its far from a new idea or design as its documented in EMRFD and an older book (Solid State Design, ARRL press, now out of print).

Jerry KE7ER climbs into the conversation saying:

“I have no idea what the capacitance of a slightly forward biased 1n400x is,
figure 6 here suggests it’s north of 30pf:    Therefore, it might be marginal at 45mhz, and can vary wildly with diode type and brand.

Consensus seems to be that a 1n4007 is preferred over other 1n400x flavors for use as a PIN.   Some experimentation may be required using diodes from different manufacturers:

If you are paying $5 postage to ship in some 1n4007’s, you might consider
also getting some BAP64-02’s at $0.43 each single unit pricing, Mouser 771-BAP64-02-T/R.  These are fully specified for use as an RF PIN diode.

Reference

 

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

Shock-proofing your uBITx

John VK2ETA asks what he should do to protect his µBITx from the rigours of daily use when taken portable.

1. Are they other components you should be concerned about?

2. What method is recommended: hot melt glue, epoxy glue, superglue or other method?

3. What about cables

4. Any other actions that should be taken?

The recommendations from IO Group members seem to be:

  • Hot glue is your best bet. Poor man’s potting to the rescue. It holds very well and removes easy enough for repairs and upgrades. (Doug Wilner)
  • Make sure your cable bundles aren’t so tight that they are putting stress on the outer cables in the connectors as they bend into the bundle. Hot glue the connectors in place and wires coming out for strain relief. (Doug Wilner)
  • To mitigate shock and vibration getting to the PCB consider something like LORD Micro-Mounts and see the distributor page.  (Arvo KD9HLC)
  • Scotch weld (Andrew W6AVC)
Reference

New manual for KD8CEC v1.061 firmware

Rod KM6SN has put together a comprehensive manual for Ian KD8CEC’s firmware.   KD8CEC firmware (version 1.061 current) runs on a standard factory µBITx.  No mods are required.   There are significant improvements to the user interface and to functionality.   An upgrade from Ashhar Farhan VU2ESE factory firmware is recommended to address firmware bugs and add new functionality (memories, CAT control, IF shift, etc.).

Download Rod’s manual here: KD8CEC manual v1.061

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

 

Digikey Kikad library

A lot of constructors are using the Kikad free tool for drawing circuits and PCBs.   The folks at Digi-Key (a major parts supplier) have a collection of components you can drop into Kikad if you want to.  Download from here.

Reference