100PPR encoder – mods to KD8CEC code to make it work better

Using a 100PPR encoder with the KD8CEC firmware may cause some issues as the firmware can’t keep up with the pulse train from the encoder.

Sascha Bonnet suggests some simple code modifications make a big difference. He replaced two commands (“millis” to “micros”) in the KD8CEC’s source code and my encoder worked.   Here’s his code for you to use as a template for editing the KD8CEC arduino sketch:

  1. int enc_read(void) {
  2.   int result = 0;
  3.   byte newState;
  4.   int enc_speed = 0;
  5.   unsigned long start_at = millis();
  6.   while (millis()  start_at < 50) { // check if the previous state was stable
  7.     newState = enc_state(); // Get current state  
  8.     if (newState != enc_prev_state)
  9.       delayMicroseconds(1);
  10.     if (enc_state() != newState || newState == enc_prev_state)
  11.       continue;
  12.     //these transitions point to the encoder being rotated anti-clockwise
  13.     if ((enc_prev_state == 0 && newState == 2) ||
  14.       (enc_prev_state == 2 && newState == 3) ||
  15.       (enc_prev_state == 3 && newState == 1) ||
  16.       (enc_prev_state == 1 && newState == 0)){
  17.         result–;
  18.       }
  19.     //these transitions point o the enccoder being rotated clockwise
  20.     if ((enc_prev_state == 0 && newState == 1) ||
  21.       (enc_prev_state == 1 && newState == 3) ||
  22.       (enc_prev_state == 3 && newState == 2) ||
  23.       (enc_prev_state == 2 && newState == 0)){
  24.         result++;
  25.       }
  26.     enc_prev_state = newState; // Record state for next pulse interpretation
  27.     enc_speed++;
  28.     delayMicroseconds(1);
  29.   }
Reference

Full assembly of a uBITx

Jonathan Kayne, KM4CFT, who is studying at Virginia Tech in the USA asks on the IO Groups BITX20 list whether it is possible to do a full assembly of the uBITX.   That is, he wants to start with a bare PCB and hand solder on the SMD components. He plans to use it in a school project.

He received several replies to his query.    Jerry KE7ER suggests:

Be aware it might not be as trivial as it looks.

The transformers are described here:
http://www.hfsignals.com/index.php/ubitx-circuit-description/

Search for “Coil Details”.

The KiCad files are not available, that was some sort of requirement
when they set up HFSignals to build this stuff. Perhaps to get a business loan they had to keep some part of the design private. The remainder of the design is open source, and building from scratch is encouraged. The uBitx is a two layer board, the bottom side is mostly ground plane. Perhaps just build “ugly style” or “Manhatten style” on copper clad circuit board, that way you have a solid ground plane under the entire design, which is highly recommended.

All quartz crystals in that IF filter should be matched by hand to within 100hz or so, that means building a crystal oscillator and having some way to accurately measure frequency. If your quartz crystals have different characteristics than what hfsignals uses, you will need some way to determine the passband of the IF filter and adjust the filter shape as described in Experimental Methods in RF Design (and/or search for Dishal on the web).

You will need some way to sniff and measure RF, an Antuino would be ideal, though you might get by with a diode RF probe and a Harbor Freight DVM. A good scope would be nice, perhaps 50mhz or more of bandwidth. The nanoVNA would be worth looking into, shows complex of 1 and 2 port networks, and thus is an education in itself.

If you are serious about studying “RF and Microwave”, all of the above is worth the investment.

And lastly, maybe you could consider getting a working uBITx from HF Signals, simply so you can  know for sure what the signals levels really should be when yours doesn’t work.  Many have built radios like the uBitx from scratch, but few find it easy.

Ashhar Farhan VU2ESE, the designer of the µBITx has indicated he can arrange for a blank PCB.   He notes, however, that there is very little education in it!   To build an actual ubitx all by yourself would be a better learning experience.

Although the µBITx is a double conversion design, it is actually quite easy to build, stage-wise.  Ashhar suggests building the IF amplifiers first.  You have to build six of these. After getting one going, the rest can be duplicated.  He suggests that each is built on a separate 2″x2″ copper board.

After the IF modules have been built, you can hook up a raduino from the Si5351 board from qrp-labs and an antuino.   Using the antuino as a signal generator, you can test and align the 45 Mhz filter and the LPF.  At that point, you are done with the RF parts and you can choose to go with any audio amplification system.

Ashhar encourages experimenters to build their µBITx one stage at a time, then test, measure and move on.    He suggests it is a great education!!

Reference

Digital interface kit for your uBITx

David N8DAH is now producing a very handy digital interface kit.  This is a Gordon Gibby KX4Z design, and it features:

  • On board 5v regulator that you can power from 12-13.8v or you can leave it off for direct 5v input.
  • Built in VOX PTT via reed relay
  • PTT LED
  • Input and Output gain control
  • Audio Isolation transformers 600:600ohm

The kits are available for:

US$15 unassembled or US$20 assembled

https://shop.kit-projects.com/index.php?route=product/product&path=59&product_id=120

Reference

Another Raduino board design

Rahul VU3WJM has designed a single sided PCB replacement for the Raduino in a form factor of 20X4 line LCD.

In fact, this board supports both a 2 line LCD display (1602) and a 4 line LCD display (2004).   Rahul has also added a few more electrolytics, separated the Analog  and Digital ground plain,  and the Nano module  is on the component side to make it easily plugable.  He has assumed mostly through-hole components but SMD pads have also been included for coupling and decoupling caps.

All fabrication files are being made Open Source for personal and club use only.   He asks that you verify the Gerbers before making the board!   Rahul would also welcome your feedback on any further improvements that could be made to the design.

Reference

An interesting i2c encoder board for managing multiple encoders

John Scherer came across an interesting, i2c addressable rotary encoder board that allows you to connect encoders in just about any configuration.

The board has pins for digital or ADC I/O, has 256 bytes of eeprom, pads for setting each encoders i2c address, and works from 3.3 – 5V DC.   For something like the µBitx, this could be an easy way to add additional physical I/O (i.e. knobs).

There is also a video that gives a pretty good overview of how they work.

John VK2ETA suggests that on a read of the manual it appears the 256 registers are at one I2C address, and are divided between control registers and EEPROM addresses (two banks of 128 bytes).

The current implementation has the current modes for the encoder:

A. Relative, where the counter keeps the number of steps since last read. Reading it resets the counter to zero. Useful for frequency tuning in our case.

B. Absolute
B1. Without limits.
B2. With user defined limits
B2.1. No wrap around, like a potentiometer, hard stops at the limits.
B2.2 With wrap around, goes back to low limit if high limit is exceeded and vice-versa.

The encoder push button events are:
– button down
– button up
– double-press with user selectable double-press interval.

Current consumption is listed at less than 2mA plus LED current if used.

The board mounted PIC controller’s program is open source so it can be customized as well.

Tom, WB6B believes they keep a counter in the PIC chip that is on each board, so each time you check the status of an encoder board it will tell you how many encoder pulses took place since the last time you polled the data. This should greatly relax any timing issues.

Reference

Kit Projects selling outboard relay mod kit

David N8DAH from Kit-projects is marketing Gordon Gibby’s outboard relay mod as a kitset or for $5 more as a built-up board. This includes the circuit board, and all parts (including relays, diodes, inductors and caps).

Cost might seem high but David assures us he will be using quality parts.

The pre-orders were snapped up pretty quickly, but new stock will be coming shortly once the pre-orders have been shipped.

https://shop.kit-projects.com/index.php?route=product/product&path=59&product_id=119

Reference

Teensy 4 arrives

PJRS, the makers of the Teensy family, have just added the Teensy 4.0 to their processor line up.  Jack W8TEE says, “It is a beast!”.  Perhaps he his contemplating an update to the JackAl board for the µBITx?
Some features of the Teensy 4 include:
– ARM Cortex-M7 at 600 MHz
– 1024K RAM (512K is tightly coupled)
– 2048K Flash (64K reserved for recovery & EEPROM emulation)
– 2 USB ports, both 480 MBit/sec
– 3 CAN Bus (1 with CAN FD)
– 2 I2S Digital Audio
– 1 S/PDIF Digital Audio
– 1 SDIO (4 bit) native SD
– 3 SPI, all with 16 word FIFO
– 3 I2C, all with 4 byte FIFO
– 7 Serial, all with 4 byte FIFO
– 32 general purpose DMA channels
– 31 PWM pins
– 40 digital pins, all interrrupt capable
– 14 analog pins, 2 ADCs on chip
–  RTC
 The footprint is actually smaller than the Teensy 3.6 and the cost is, too…$19.95.
This processor is overkill for many projects, but the depth of that resource pool opens a whole new world in many arenas!
Reference

SSM2167 board – improving compression control

Brad N8YG has been reading over posts concerning the ssm2167 compression pre-amplifier with quite a bit of interest. So he finally integrated the board into his ubitx v5.

He put a trimmer on the output of the board, and potentiometers on the compression, and noise gates. The problem that he ran into was that on the air, rotating the 100K compression potentiometer had little to no effect.  However he was getting compression that was clearly audible on the air.

He re-read the data sheet for the ssm2167 more thoroughly and found that the input voltage need to be quite low at -20 to -30 dBV.  A quick check on the electret microphone output using the oscilloscope, showed a much higher output from his microphone.

This led to him adding another pot to trim the input voltage.  He still needed the 5V to get to the electret so he wanted the trimmer after the 0.1 uF surface mount capacitor on the board.

Brad modded the board by removingthe 0.1 uf capacitor, and he made connections for the trimmer after the 0.1 uF capacitor.

The net result is a board with three additional potentiometers and one trimmer.  The trimmer adjusts the output voltage, and potentiometers control the input voltage to the board, compression and noise gate.

On the air.. with the compression potentiometer turned down the rig sounds like it has no compression… while turning up the potentiometer makes a profound difference in on the air sound.  The rig now has a LOT of punch and the power meter goes way up.   

Brad believes that what was happening was that the input level was too high forcing the chip into the limiting portion of the transfer curve.  Now that the chip is operating back in the linear portion, all is well!  

Reference

Official release of VU2ESE’s Antuino

Antuino

Ashhar Farhan VU2ESE, the designer of the BITx range of kit transceivers marketed through HF Signals has launched his next design: the Antuino.

The website states that:

“Antuino is an accurate instrument that can be used in the field to measure SWR, field strength, modulation, etc. In the lab, it can be used to sweep filters, measure gain, distortion, frequency response, etc. It works upto 150 Mhz. On the third harmonic, it is usable on 435 Mhz band as well (with reduced sensitivity).

“The Antuino, unlike simpler instruments is based a superhet architecture that measures the response of the antenna or circuit at exactly the tuned frequency. It is based on Analog Devices’ Lograthmic Amplifier, the AD8307 to provide accuracy of 1db in your measurements. It is tuned with a crystal locked PLL based on Si5351 oscillator chip.”

Ashhar has confirmed that this is not a kit, but rather is a fully tested unit in an all metal case. It has an internal battery case to hold 6 AA cells. It comes with two SMA connectors.
Steve G1KQH has opened a support group for the Antuino:   https://groups.io/g/Antuino
Reference