Using two nanos to switch firmware

Martin, AJ6CL assembled his uBITx v5 and it seems to work OK.  It is completely stock, with the stock screen and the stock firmware.

He asked two questions:

Exactly what changes in the CEC Firmware v. 1.2 are required before uploading it in order for it to run properly on a stock Ver.5 uBITX?

Evan AC9TU replies, saying it depends on what you want for a display…  “I have the 3.2″ that Dr Lee had already created a full screen TFT file with the link from the web page.  That is what I would use.  This is a personal choice.  If you want bigger, then you will need to find the correct TFT file to match your display.  2.4 and 3.2 I believe are the two that Dr. Lee has programmed.”

“You do not need to compile the code if you use the correct hex file.  Use the uBITXV5 directory and read the FileNameInfo.txt file to help select the correct hex file to load into the Nano.  You will need the Hexloader program to go that route.  I believe that this is where I got the version that worked for me:
https://sourceforge.net/projects/hex-file-loader/

“In case you did not get it, here is the link to the Git Hub repository zip file:

https://github.com/phdlee/ubitx/releases/download/v1.20/uBITX_CEC_V1.200.zip

“For the calibration process, I would do a search on this site to learn the how to do it.  NOTE that the CEC software does not use the same method as the stock (it does not turn on the transmitter to zerobeat wit another receiver.  For the CEC firmware I would download the Memory Manager that Dr. Lee has created to make the adjustments and save the values after a change to be able to backtrack if something goes wrong.”

For the BFO calibration I prefer to use a PC based free audio spectrum analyzer that can be downloaded from here:
http://www.techmind.org/audio/specanaly.html

I connected a mic to the input of my PC, tuned the uBITX to an open frequency with just static, and adjusted the BFO to center the noise spectra between 500 and 2500 Hz.  I then went back and re-calibrated the maser clock, then back to the BFO for a final time.

Can you upload the CEC v. 1.2  firmware to a spare arduino nano processor and  swap out the arduinos with different firmware and still expect the radio to perform normally?

Evan says “Yes, you can use a second Nano to program and keep the first as originally received. There are issues that need to be taken into consideration.

1 – The calibration data is stored on the EEPROM of the Nano, which is not saved in the CEC software. You will need to calibrate before it will work correctly, especially the BFO setting.

2 – The CEC software is different for each display, and the original software only works with the original display. That would mean that you need to change the Nano AND the display if you do not use the original display version of the CEC software.

Reference

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