Using a 100 PPR encoder with the uBITx

Allison KB1GMX gives details on how to wire up the commonly available 100prr-6 encoder.  These have a nice vernier style dial and cover 100 pulses per 360 degree rotation.  The calibration points line up with these pulses.  They come with either 4 or 6 wire terminals on the back.

The A and B terminals have transistor outputs to ground and are used in connecting to the raduino:

  • Ground is ground (0V) terminal
  • Black and brown to the A and B terminals (reverse if the rotation direction is backward)
  • 5V from raduino 5V reg to the internal LEDs used in the optical encoder  (Vcc terminal)

Allison uses the V4.3 code in her µBITx with here own mods and this encoder worked well. Some firmware for the Raduino will not be sufficiently fast to keep up with the signals being sent from the encoder if you rotate the encoder quickly.

The uBITx.net editor likes the black version better.  These are a classy unit.

Reference

Low power on 80m?

Allison KB1GMX notes that if you have a v4 board and experiencing low power output on lower bands (80m and 40m) you may want to check the emitter of Q90 to see if a .01uf or a 470pf or 220PF is there.

There was a change to lower the value from .01 to 470 pf to level the output
power so 80M wasn’t 15-20W when 20m was maybe 8 watts output.

Some have experienced  that low bands work very poorly with a 470pF or 220pF capacitor.  You may want to increase the capacitor back to 0.01µF or perhaps 1000pf.

Reference

Freeing up a pin on the arduino

Previously Don ND6T used pins D0 and D1 as a means of accessing two additional digital pins on the Raduino for other purposes. These are used in USB and serial communications and are mostly available for use (except when programming the arduino or using CAT).

Another interesting approach is to use another arduino nano as an i2c slave while at the same time functioning as a backpack to your 1602 display.

 Allison KB1GMX has come up with another way of reclaiming pins. 

Looking at the relay tree it is notable there are only 4 used states and one that is “don’t care”.  That “don’t care” state allowed me to remove C155, R151, and Q17. That is replaced with two diodes to the collector of both Q18 and Q19 (cathode to the collectors) and anodes to the formerQ17 collector.

What that does is any time Q18 or Q19 is active KT1 is activated.  If that seems odd the relays are a partial decoding tree so if we encode the controls correctly we get the needed result and one free IO pin. To make it work Relay KT1 must be activated when we leave the 20-30mhz region for 20/17M or lower. Since to go lower than 20mhz we must have a signal the TXC is used as that controls the 40/80M relay KT3 but means nothing unless KT2 is activated Using two diodes as a logical OR we can then use Q18 and Q19 to force KT1 to be active. So for 20M and down KT1 is active and the other three select what bands below that. I got the IO pin and the firmware got simpler.

The code changes from:
/**
* Select the properly tx harmonic filters
* The four harmonic filters use only three relays
* the four LPFs cover 30-21 Mhz, 18 – 14 Mhz, 7-10 MHz and 3.5 to 5 Mhz
* Briefly, it works like this,
* – When KT1 is OFF, the ‘off’ position routes the PA output through the 30 MHz LPF
* – When KT1 is ON, it routes the PA output to KT2. Which is why you will see that
* the KT1 is on for the three other cases.
* – When the KT1 is ON and KT2 is off, the off position of KT2 routes the PA output
* to 18 MHz LPF (That also works for 14 Mhz)
* – When KT1 is On, KT2 is On, it routes the PA output to KT3
* – KT3, when switched on selects the 7-10 Mhz filter
* – KT3 when switched off selects the 3.5-5 Mhz filter
* See the circuit to understand this
*/
void setTXFilters(unsigned long freq){
if (freq >= 21000000L){
digitalWrite(TX_LPF_A, 0);
digitalWrite(TX_LPF_B, 0);
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 14000000L){
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 0);
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 7000000L){
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 1);
digitalWrite(TX_LPF_C, 0);
}
else {
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 1);
digitalWrite(TX_LPF_C, 1);
}
}

To this.

/**
* this version version uses two diodes to get rid of needing TX-A
* and takes advantage of TX_LPF_C having an meaningless state
* unless KT2 is active (TX_LPF_B=1).
* tx-b tx-c band
* 0 0 10m
* 0 1 20M we enable TX-A, and get 20m, KT2 is not active.
* 1 0 40m make KT2 active and KT3 selects 40 or 80m.
* 1 1 80m
*/
void setTXFilters(unsigned long freq){

if (freq >= 20000000L){
digitalWrite(TX_LPF_B, 0); // 10m
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 14000000L){
digitalWrite(TX_LPF_B, 0); // 20M
digitalWrite(TX_LPF_C, 1);
}
else if (freq >= 7000000L){
digitalWrite(TX_LPF_B, 1); // 40m
digitalWrite(TX_LPF_C, 0);
}
else {
digitalWrite(TX_LPF_B, 1); // 80m
digitalWrite(TX_LPF_C, 1);
}
}

Reference

Evening up power out using KB1GMX and K9HZ solutions

Mike N6CMY has been doing some mods on his µBITx, including some of Allison’s mods by substituting 2n2222’s and a BFR106 for the 3904’s on the RF lineup (pre-driver and driver stages).

In terms of output power the results are impressive. But in terms of levelling  up the output… well not so good.

Mike measured 12W on 10M and over 35W  on 40M!  He was a bit taken aback at this point!

He finally bit the bullet and used K9HZ’s multi relay/pot method for levelling the response.

Mike was reluctant to use such a brute-force solution for a subtle problem but he now measures 15W on 80, 40, 20 M and 12 on 10M. VICTORY!!

Reference

A new and improved audio pop fix from KB1GMX

Allison KB1GMX has come up with an improved pop fix based on the one in the v4 board design, originally submitted to the BITX20 list by Joe VE1BWV.

Allison finally got annoyed enough by the pop to fix it.

Parts count 5:

  • 2x 1n4148/914 diodes
  • 10K resistor (any value from 10 to 100K really)
  • 2n7000 MOSFET
  • 0.1 µF capacitor

Allison has added a second diode.   Why? The TX line is relay switched  and relays take milliseconds to physically move contacts. So the second diode to the T/R line from the Raduino is the fast acting “audio kill”. The second diode and parallel resistor is the hold until the relay returns to RX position.

Allison assures us that this fully mutes the rig with no pop, no thump in either transition (from RX to TX or TX to RX).

Michael VE3WMB points out that connecting to VOL-H will kill the sidetone output.   He notes that Ashhar Farhan VU2ESE has his V4 pop circuit connected at M2(R70) with the value of R70 increased to 1K ohms in order to hear the CW sidetone.

Reference

Evening up power output – interim suggestions from Allison KB1GMX

Allison KB1GMX has provided an update on her experimentation with flattening out the power curve on the µBITx.

Gain and power line up with a few possible solutions listed:


Mixer – output at full tilt about -10 dbm. Go higher and the spur gets bigger so lower output here is better.


Q90 – no mods at 80m about 16db at 10M about 10-11db and not more than 3mW power. Replace it with a really hot transistor. BFR106 has a FT of 5ghz and can do over 100mW. This should keep the stage gain at about 16-18db from 80 through 10M and deliver the 3mw! It is the easiest stage to make flat and high gain as this get more difficult at higher power out.


Pre-driver – takes that 1mw and boost it to about 40mw, We hope. What she saw was about 45mW at 80m and barely 8mW at 10m . Note the gain at 80m is about 16db and at 10m maybe 9db.

We need the gain again to be more stable and higher as well. Transistors tried that worked better included the TO18 2n2222A, 2n3866, and 2n5109. The 5109 was best even though she used only one. Second best was tie between a single 3866 and two 2n2222. MPSH10 was disappointing.

Allison plans to try an oddball 2n6661A, [at 14$ each most will choke] a VMOS fet has potential and requires many circuit changes[Bipolar bias to MOSFET]. They worked really well in another project at VHF.


Driver – takes that 40mw and make about .4W at 80 and sinks to barely .08W at 10m. Gain for that stage is supposed to be about 16db and likely is at 80m but at 10m measured for different 3904s from around 8 to 11db.

This is where the 2n3904 really fails. Its bandwidth at high currents actually does down. The 2n2222A has the reverse, the gain and bandwidth increased with increasing current. While not an ideal part it does work better. The ideal parts here would be two devices in push pull [not 4] and with higher FT.  Allions hasn’t yet tried 5109 parts here but its a solid bet. She wishes 2n3553s, 2SC2166, 2SC799, 2sc1306 and others were still around.

She plans to try an oddball 2n6661A here too as its good for up to 6W.


Finals IRF510 at 80m approaches 15-20W with a gain of over 17db, at 10m its about 13db, but the drive is so low that yields maybe 2W.

If there is enough power at the gate it does the job we ask. RD16HHF does not offer more gain or bandwidth as MOSFETS do not have the equivalent of FT.  These parts do offer a handy tab that can be grounded.


To go from -10 dbm[.0001W] to +40 dbm[10W] we need 50 db of gain over all. That includes losses to transformers and other circuit features. So we need more gain than that available.  Maybe 6 to 10DB more gain would allow some latitude on the gain adjustment pot.

So with four stages and the last being limited to the IRF510s. We set a few rules.

  1. We never run a transistor wide open as one may exceed and another fall short.
    For 2n3904s that happens and the lowest common denominator for them is around 10db. Use better transistors and lots of feedback. More likely to work for everyone than a bet on Monte Carlo.
  2. We only have four stages! The board is laid out that way. Reality sucks.
  3.  IRF510 or RD16HHF you get about 13-16db of gain, period. More
    is wishful thinking or running wide open and risking stability. Hint IRF510s blown cost about US$2, RD16HHFs blown cost US$10. Going to IRF520 and 530 are not better [for 10W output] as the internal capacitances are significantly higher and these parts don’t make the job easier.
  4. Based on total gain needed and what the finals can be reasonably expected to do: The three prior stages must deliver 45 to 47 db of gain. Its also a lot so attention to stability is everything.
  5.  The result must be stable. Oscillation will kill the finals.

As it turns out, item four is the killer as its basically asking for 16db from all three stages. You need good parts for that. Also the interstage coupling must be up to the job while not introducing uncontrolled losses. This is a tall order. So far I have only partial answers.


Answers so far:

Dump the 3904s and use 2n22222(TO18), for those interested in 80-17M it works remarkably well and give a boost up high too. If you go to 2n5109s you may need one as pre-driver and 2 in the driver stage.  They are big and the space is small.  Use the SHORTEST leads possible.

Replace or parallel R941,R911, R96,R942 to get 11 ohms each (I paralleled 22ohms across them).  Lower emitter resistance helps  the gain and power out to finals.

Replace Q90 with BFR106.  Note R81 has to be increased to between
2K and 2.7K for this part. (for those making suggestions I tried 2n2369 in
SMT, it was better but not great). Mouser has the BFR106 for a whopping 38 cents each.

Change C81 to 470 pf, This flattens the 80 and 40M runaway power and helps the higher bands.

There are many changes to transformers possible but for the moment the above are best bang for the buck. Also changing the transformers might be a handful for some.

Warning every time I tried the 2:4 turn transformer with any ferrite the finals were heating a lot and the stage efficiency was well under 40% [terrible with IRF or RD16]. The 2:3 was better at high power but below 50% efficent. This is still in the grinder…

Reference

Conclusions on how to eliminate spurs

Alison KB1GMX has advice to constructors on the spurs on the higher bands:


For bands below 20Mhz spurs are NOT an issue as the low pass filters catch it.

Spurs are only a problem for SSB and frequencies greater than 20mhz.

NOTE: due to the way the uBTX does CW it is never an issue on any band.


The short form is when you mix two frequencies you get a third, in a perfect world.

The diode mixers used are handy but they can present conundrums.  If any of the three ports (IF, LO, and RF) are mismatched (think SWR) The signal can be reflected back in.  Since DBMs are omnivorous in that any port can be input or output and if mismatched both!  This does not include effects of distortion in the source signals.But in the real world things like this exist.

Double balanced mixers also suffer from overload, too many and too strong and you get a plethora of signals.   What that means for lots of simple and complex reasons you can get “spurs” or spurious  outputs that are undesired.

Basic math, addition and subtraction:

If you mix 45Mhz with 73mhz you get 28mhz.  We want that  and the radio needs that.   However if any of the 28 gets reflected back into the DBM where it originated it mixes with 45mhz and we get 17mhz.With those four signals you get mixtures of those like:

  • 73-17=56
  • 28-17=11

Those are “first order” as they do not involve harmonics.  They will be the strongest, but not always equal strength.

Both inputs can have harmonics like 90mhz and 146mhz and the 34 and 56 coming out can have harmonics too.  If you add and subtract all the possibles you get an increasing sea of signals some weak some stronger.  We will not cover the possibles as the first order ones are the most troublesome.

The solution traditionally applied is band pass filters or if it isn’t between 28 and 29.9999 the filter strongly attenuates it.  But you need a band pass filter for most every band… uBitx takes the path of below a certain frequency you only need low pass filters and fewer of them.  And it generally works well especially for 80 though 17M…

But at 20mhz and up the low pass filter passes everything below 30mhz and if you overdrive the rig slightly you get a spur on the tech window on 10m where the spur is 16.5 to 16.7mhz and there is no filter for that.  What makes this worse is some radios are very poor at 10M putting out maybe 2W so pushing the audio to get more invites the problem to be greatly worse.

There is no setting we can safely give that absolutely assures there will
be no problem that is consistent with maximum achievable power.

As a licensed amateur radio operators we are responsible for signal quality and also not generating signals outside our assigned bands.

There are two solutions one is bandpass the other is high pass filter.
Either way the rig must be modified to allow those and there are side effects.

One side effect is you need extra switching not provided.  The other is any filter has a loss though it and that would further reduce power out.

Short of that, keep the power right down on the higher bands and go for it…

Reference

What makes a good receiver? And what about the uBITx

Somebody on the list asked how the µBITx  receiver performs compared to other transceivers.  Allison KB1GMX provides an extensive commentary on  factors that relate to receiver performance with the µBITx as a reference point that will be of interest to constructors.

She notes that receiver performance has many dimensions:

  • Sensitivity
  • Bandwidth
  • Overload performance and dynamic range.
  • Stability, Especially important in the days of VFOs.
  • Spurious signals, birdies and unexpected signals.

The µBITx is unique in a new generation of simple radios with microcomputers to provide the basis for the user interface.

From Allison’s perspective, and work she has done,  the BITx40 had too much gain and required an attenuator most nights. However, this was an easy fix.

The  µBITx when measured on an RX only test bed from about 3-4 years ago reflects a good receiver in the 1-10 mhz range.  However, Allison prefers a bit more RF gain for 10 through 30MHz. As you go up in frequency there is more weak signal propagation and reduced manmade noises and sensitivity approaches the background galactic noise floor. At 40m a 1uV senstivity is plenty, at 28mhz .2uV is more useful.

For selectivity, Allison prefers a tight filter:  2.1 to 2.4khz is fine as SSB is about that wide on transmit  (except for the ESSB people where a 3khz filter would be better).   However, she prefers steeper skirts and that requires more crystals, with 5 crystals being the bare minimum and 7 approaching very good.

Why is this important? Strong signals down the skirts [edges of the filter] are audible if not suppressed adequately and if the same filter is used for TX it assures the unwanted sideband is suppressed.

Overload is a big area for BITx40 users and the same forBITx20 users.  There is  a lot of RF gain and HF bands are known for big signals. Attenuation or circuit changes help greatly.  The uBITX runs without an RF gain control and was optimised for a decently high overload point. So fewer people complain of overload but AGC is a common wish list item.

Stability has been mostly solved by going with Si5351 and Si570 digitally controlled local oscillators in modern HF receiver designs. This requires adding an Arduino microprocessor, LCD display and a some form of encoder to tune. The other implication is there will be signals generated by the microprocessor and in communicating with external devices like the display. It does open up a whole new arena of user interface that didn’t exist in earlier analog designs. An example of this is KB1OIQ’s version of uBitx that is blind user friendly (speech synth output and keypad controls) as its really well thought out.

Adding a Raspberry Pi or similar [STMFxx series] to do signal processing is on face a good idea, but the cost is considerable in terms of software development, and the need for a more sophisticated user interface and power. Power utilisation is an important aspect of a compact portable radio.  Many wish to use batteries and a Raspberry Pi eats  about 3-4watts continuously. Adding a touch screen adds an additional 3-5 watts to that figure. At some point its no longer a simple radio, no longer inexpensive and has become battery unfriendly. Some problems are easily solved without resorting to a computer.

Look at what is being done for the various SDR radios. If you are going digital its smarter to start with a new architecture and build in the computer rather than hang it on like a laptop on the side.

With all that said, yes the µBITx is a decent receiver in Allison’s view. Can it be improved? Yes. However, improvements depending on the use case.  Different constructors will have a different idea of what that may be.

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