New base firmware for uBITx under testing

Ashhar Farhan VU2ESE have created a next version of the base software after thinking hard about it. You can download it  here:

https://github.com/afarhan/ubitx4.

Ashhar invites you all to test it. if you are not familiar with C code or Arduino programming, it is suggested you wait for a few days until we get all the bugs sorted out. This is only for Arduino regulars.

Send any bug reports directly to Ashhar’s email box at farhanbox@gmail.com. In the subject line use the word “#ubitx40”. I will try to answer all emails but I can’t promise responses to all.

Ashhar has measured the mood of the BITX20 list and has made the call to substantially borrow from Ian KD8CEC’s code and back port it to the original ubitx code.  The new code has about 10% more lines but it is substantially more robust and useful.

The main features that Ashhar has cherry picked from Ian’s code are:

1. Keyer. You have to choose which keyer type to use, but the keying is much better and robust now. This code is a total copy/paste of Ian’s keyer. The auto-keyer (that sends out preset phrases in CW) is left out. The Iamabic A, Iambic B and the handkey sending works very well.

2. CAT control. Given the popularity of FT8, Ashhar has rewritten the CAT control by following Ian’s code but follows the ubitx coding conventions. It represents a miminal set of controls.

3. Split operation has been included.

4. Rationalised menus: the menu system is now more consistent.

5. Tuning mechanism: The accelerated tuning works, and it doesn’t jump randomly like before, nor does it work at the same speed. For very long band changes, it is recommended to use the menu option to change band.

Among the things left out was support for different types of displays, WSPR, and many other goodies. The EEPROM memory map has been kept consistent with KD8CEC’s plan. You can switch between both code bases easily.

Ashhar has kept usage of English words at a minimum.

Reference

Finding a compiled Hex file for the arduino

Jack W8TEE has provided directions on how find a compiled hex file:

1. Go to your Preferences settings (File –> Preferences) and check “Set verbose output during” and check “compilation”
2. Compile the program. Do not upload as that erases all temporary files, including the hex file. In other words, just click on the
check mark icon that appears below the File menu option.
3. Scroll down the long list of output your compile generated until you see: “Linking everything together…” followed by a series of
lines with path and file names. The hex file for you program will be one of them. Just use that path name to find the hex file.

While you’re there, use a text editor to open the *.lst file. It shows a blending of C and assembler generated by the compiler. It’s an interesting way to find if one way of writing a piece of code is “better” (i.e., faster execution, or perhaps using less memory) than an alternative way.

Reference

KD8CEC as the factory firmware?

Ashhar Farhan VU2ESE asks:

“Given that Dr.Lee’s software is now pretty stable from 1.06 onwards, what do you all say about using this as the ‘shipped’ firmware?”

The responses have been  varied.

The case for using KD8CEC firmware

uBITx.net has supported the suggestion of supplying the KD8CEC version as the default firmware. There is no question that the KD8CEC sketch represents more mature firmware. It runs on an unmodified uBITx, but provides for minor hardware enhancements that add additional functionality.    All other firmware options require hardware changes prior to installation, so there is no obvious contender from other firmware developers at this juncture.  This is not to downgrade the importance and innovation brought by other firmware developers.    Each firmware hack has its merits and brings features that are important to groups of µBITx constructors.   No other firmware, other than the stock firmware, has such a large group of supporters.

The KD8CEC software brings a significant increase in the range of features and reliability of the product.   Manuals are available for both the stable version and the beta version of the firmware.  The factory product does not come with a manual, has not been improved in six months or even had basic bugs removed, and has caused frustration for some constructors.   This is not to say, that the stock firmware is of low quality – it is basically sound, but needs work. Ashhar has not had time to address these issues because of the huge demand for the µBITx and need to resolve other issues as they have arisen.

The case for not using KD8CEC firmware

There are of course arguments against using the KD8CEC version as the factory install.   The feature packed nature of the firmware leaves little room for constructors to hack the firmware to customise it for their own purposes.  This has been largely overcome now through the modularity of the latest firmware design.  Features can be enabled or disabled in the configuration section of the code.   This modularity will become increasingly important as hardware enhancements are combined with code to support the hardware changes.   The addition of uBITx Manager software for the PC expands the potential to customise the firmware in future to reflect different hardware configurations.

Suggestions that the firmware is not a good fit, because the factory alignment procedure is not included by default, is a complete red herring.   Different features can be configured by setting a  few configuration flags in the sketch.  This is a configuration issue, not a practical issue.  The code remains in the sketch and the sketch can be simplified by removing many of the extensions through a simple five minute configuration exercise to produce a stock version.

Some prefer Ashhar Farhan’s unique approach to tuning.  This is a matter of personal preference. Again, this feature could be reincorporated easily, and enabled or disabled through a single configuration setting that chooses the tuning style that suits the user.

The biggest improvements to functionality for just about any modern appliance come as a result of firmware enhancements.   µBITx firmware enhancements come free, but hardware enhancements cost constructors.

Note: This article reflects the personal views of the author (Mike ZL1AXG) and not those of the manufacturer.

Reference

W8TEE JackAL Board at FDIM

Jack W8TEE provides a bit more insight into the JackAL board that uses the Teensy 3.6 to give lots of processing grunt.

Jack suggests that he and Al were going to put an SWR meter on the JackAl board, but have backed away from it for this iteration. The main reason was because of the board size. The nano-acres it would take on the board would raise the PCB cost above the 100x100mm size to do it right for the possible power levels that might be involved. That doesn’t mean you can’t add one…

The good news: Right now, there are about a dozen “empty” pins available on the board for experimenting.  They are currently using less that 15% of the 1MB of flash memory and less than 10% of the 256K of SRAM.   That includes code space for some features that we’ve coded for (e.g., a RTC) but have not implemented yet (e.g, adding a button battery to power the Teeny’s RTC in sleep mode).

The Teensy is a 3.3V device, so we have an onboard regulators for 5V and 3.3V. Al and Jack think this will up the “fun level” for hackers considerably…at least that’s our intention.

The bad news: They got caught in some kind of Chinese holiday and other “delays” to get the PCB. Al ordered the board since he did all the work on the EE design. It seems our Beta PCB order got pushed to the back of the line.

When Jack wrote to them and pointed out that he was disappointed with their service, especially after ordering more than 1000 boards from them last year, the order suddenly went from “In line” to “shipped” in under 24 hours. They received the board this week and discovered errors on the board (2 from the design team, 1 from the manufacturer of the board).  The Beta board will have some “hairs” on it.

Jack and Al will be demoing JackAl at FDIM, but not all of the features will be implemented. The order for the new board will be sent this week.  We’ll immediately send it to our Beta testers and then make it available via an announcement on the BITX20 list.

Al and Jack look forward to seeing uBITx constructors at FDIM!

Reference

VU2SPF/VE1BWV new firmware release v2.9u

SP VU2SPF and Joe VE1BWV have just released the latest version of the TFT Colour Touch Control software.

Highlights

This software/hardware combination is low cost, uses standard easy to get parts and provides a colour, touch control and physical buttons if you want them.

You will require a TFT (Touch) Display module, an At Mega 2650 arduino board, Si5351 DDS module, a µBITx and a few wires

The result is an all-band rig with a computer controlled Radio Touch Control Colour Display.

Some new features

Automatic Scanning – up to band edges in both the directions is now added in V2.9bU of software. Scanning finds signals of interest across the band. Two small buttons labeled ‘U’ and ‘D’ scan in up and down from the currently set frequency.  Scanning can be stopped by touching the display panel.

CAT Control  – the software now has new code to emulate FT817 CAT commands. This provides radio and computer control for digital modes.

User Manual   A new comprehensive user manual has also been added. Constructors have been looking for this for quite a while.

The new version is available on Github at : https://github.com/sprakashb/TFT_TouchScreen_for_uBitx

Information is also available at:
http://vu2spf.blogspot.ca

and

https://www.youtube.com/watch?v=zkg-IrjV2h4&t=375s

(UBITX ver2.9bu Installation Results)

Reference

See your uBITx sketch in Assembly or Hex

Jack W8TEE notes how easy it is to find where Hex files and Assembly files for a compile of an Arduino sketch are placed on your computer, along with some other compile-time information.

First, go to your Preferences dialog (File –> Preferences) and check the compilation check box for the “Show verbose output during:”

Second, compile your program. Do not click the compile/upload icon, only the check mark for compile only. You will see a lot of stuff scroll by just below the IDE’s Source Code Window.

Third, look towards the end of that list of output for YourProgramName.hex. For example, Jack’s test program was:
C:\Users\econjack\AppData\Local\Temp\arduino_build_160543/TestProgram.ino.hex

Fourth, go to the directory and look at the output files. You will see file types:

elf — executable-linkable file, used for a debugger
hex — the flash output file
eep — th eEEPROM outout file
sym — symbol table information
lst — assembler output

The first file is very interesting to look at, as it shows the C code mixed in with its associated assembler output. (You can load the file into any text editor.) For example, which is more efficient: a cascading series of if statements or a switch/case? Write a short test program using both constructs and then look at the assembler output. You find that the switch/case produces a jump table, which is very efficient in terms of speed, but may be less efficient in terms of memory. Even if you don’t know assembler, you’ll get a feel for the answer. Use whichever fits the situation.

If you want to directly load a hex file into an Arduino, you could use an AVR programmer, or XLoader (http://www.hobbytronics.co.uk/arduino-xloader).

KD8CEC firmware now supports 6 switches

Ian KD8CEC’s test firmware supported extended extended buttons in Version 1.072 and this feature continues in the latest BETA release version 1.073.

Ian received from the beta testers to make the extended key (push button functions) a bit more flexible.   He changed the feature to allow up to six pushbuttons (previously the maximum was four buttons) and functions that are allocated to buttons can now be selected by the user.

Description of changes

In uBITX Manager V1.04, up to 6 expansion keys (pushbutton keys) can be set as follows.

You need to set the role for the ‘Function’ item.

Function settings currently able to be controlled by buttons include:
0:None
1:Mode Select
2:Band Up
3:Band Down
4:Tune Step
5:VFO A/B Toggle
6:Split On/Off
7:TX On/Off
8:SDR Mode On/Off
9:RIT On/Off

In the above example, Button 1 is Mode Select, Button 2 is Band Up, Button 3 is Band Down, and Button 4 is Tune Step.

If you are a frequent CW practitioner, you can use the TX On / Off button as shown below:

Users may also want to turn off the transmit function by pressing button 4  during CW practice.   At the end of the CW practice exercise, pressing button 4 would again activate the transmit function.

If you are a frequent user of SDR, you can probably set it up like this:

Since  the Mode select function is not very important in SDR, a VFOA / VFO B toggle switch and SDR On / Off switch may be mapped instead.

As mentioned in the previous article, resistors can be any value (but keep them apart).   Ian recommends you use resistor values over 100K (with values less than this reserved for later use cases).

Mike ZL1AXG found that resistor values greater than 500K were to close to the residual value sensed by the arduino analogue pin and caused the software to be unstable. Choose values between 100k and 500k.

 

Add front panel switches to your uBITX

KD8CEC Firmware Version 1.073 will be released within a day or two when testing is complete.  You can download it right now and use it, but it may be further modified before final release.


Ian KD8CEC, in uBITX Firmware CEC Version 1.073 Beta, is supporting the use of up to 4 additional front-panel switches to control a range of functions normally only accessible via the menu system.

Preparations for adding additional function switches

Step 1:  You will need four push switches and four resistors.

The value of the resistors is not particularly important, but a spread of resistance values is helpful.    Ian recommends that the value of each resistance exceeds 100k ohms.   This will allow the addition of more switches at a later date.

Ian uses 470k, 330k, 200k, and 150k in his example.

Step 2: Identify the wires on your function switch

Your rotary encoder will probably have a red wire and a yellow wire currently  connected to the switch (not the three way connector on the encoder, but the two way connector).   These wires connect to Pin 4 and Pin 5 of the raduino connector respectively.

When you press the function switch on the rotary encoder the red wire (which connects to an analogue input on the arduino nano) becomes grounded to the yellow wire.

3. Install your switches and connect up resistors in series with the switches

Install up to four switches with connections paralleled with the encoder switch.   One side of each switch should be connected to the red wire on the encoder switch.   The other side of each switch should be connected to a resistor that is in turn connected to the yellow wire on the encoder as illustrated in the photo below.

All resistors should be of a different value.   A good starting point would be the values that Ian used, but if you don’t have these in the junk box, choose values you do have – as separated in value as possible.

4.Setting the switch values in the KD8CEC firmware.

You now need to save the switch information in Ian’s uBITX firmware.  To do this you need to have installed and run the KD8CEC uBITX Manager software.  This runs on virtually any version of Windows, and on Linux.  See Ian’s website for further details. and to download the current version of uBITx manager.


Extended switch settings are supported in uBITX Manager Version 1.03 or later.  Go through the following steps:

A) Connect -> Read

B) ‘Decode =>’ -> Scroll down
You will see a screen that manages the ‘Extended Key’ as shown below.

C) Press the Read ADC button.

It will probably have a value of around 254.   This is the Analogue to Digital conversion value being read by the Arduino Nano on Analogue Pin A6 to which the function key is connected and then divided by 4.

The reason for dividing by 4 is to reduce the number of bytes required for storage of the value in EEPROM.  Accuracy  of the analogue read means that greater precision is unnecessary.

Setting the mode button value

You should now measure the value when you press a button.  Click ‘Read ADC’ while holding the switch you have chosen to be used as ‘Select Mode’.

Try one or two more times and average your results.

Enter the measured value into the ‘Mode’ value on the left.

Ian connected a 470k resistor to the ‘Select Mode’ switch, so the ADC result was 235.   He set the range to -1 to +1 to prevent the switch from malfunctioning.

The values vary depending on the resistance you have used, the state of the switch, and the length of the cable.

Enter values for Band Up, Band down and Tune Step functions

In this way, enter values for the ‘Band Up’, ‘Band Down’ and ‘Tune Step’ switches

At the end of this process you should have something like this in the table in uBITx Manager:

If the switch is not installed (i.e. it is free floating while you try out this concept) it may be difficult to click on the ‘Read ADC’ at the same time as holding down the switch.   In this case, select ‘5 Sec Delay’ and click the ‘Read ADC’ button to see the count down:

When you have finished setting up the ADC ranges for each switch, you should select “encode” and then write the data to the µBITx.    Reboot your µBITx and you should now have four new switches on your front panel to avoid having to delve into the menu system to control everything on your rig.

Below is the link to a video that Ian has provided to help illustrate how to wire up the switches and set the ADC values in uBITx Manager.

VK2ETA variation updated (based on KD8CEC firmware)

John VK2ETA has uploaded two updates of his Raduino firmware and ATU firmware in the folder: Variations on KD8CEC Software (by VK2ETA) + ATU sketch .

This firmware is targeted at portable and /PM operations. John doesn’t plan to add much in the way of further features unless they are of value to portable operations.

If you want to use sections of code in your projects, follow the #ifdef/#endif segments that mostly enclose the sections of code of interest. John is happy to help with extraction of code if requested.

The software is organised in options that can be enabled/disabled (mostly) independently.

The key features added in this version are:
1. Reduction in libraries size by 1K byte (this allows for more features to be added in the limited memory of the Arduino).
2. Added a “Stock Standard” option for unmodified rigs wired as per HF Signals instructions.
3. Added a two adjustable levels supply voltage monitor with visual and audio indication. Level two will disable TX to protect the battery.
4. Added the WSPR beacon option from KD8CEC software version 1.061.
5. Changed logic for CW modes: frequency displayed is carrier frequency, with Rx frequency shifted up or down (CWL / CWU).
6. In split modes, the VFO A/B label and frequency change when going from Rx to Tx.
7. RIT display:  frequency is kept fixed, RIT is now shown as +/- frequency difference.
8. Added ALC levels for MAX level too. Used to be no attenuation.

The second update is part of his approach to continuously look for program size reduction to have as many features as possible concurrently in the Nano’s memory.   Inspired by Ian Lee’s KD8CEC version 1.701, he has included a modified version of his TinyLCD library.  Compared to the complete default LiquidCrystal library this cut down version saves 452 bytes of program flash memory.  He has made this code into an object oriented class so it can be easily retrofitted into other projects as there were only two lines of code to change.

Reference