Updated Nextion firmware v1.095 beta

Ian KD8CEC has released an update of his µBITx firmware and accompanying firmware for the Nextion display (for 2.4″ and 2.8″ displays).

 

Others are working on resizing the firmware to work on 3.2″, 3.5″ and 7″ displays.  It would be simple to also convert the 7″ firmware to work with a 5″ display.

So what is new in this latest beta release?

  • The buttons are more reliable, and are quicker to take action.  Changing mode was a bit of a slow process with lots of flashing buttons in previous versions

  • Pressing on the step size now opens up buttons to select step value.  This makes it so much quicker to get around the band.  Select a bigger step value to get to where you want to go, and switch back to 1Hz steps to fine tune.

 

  • By selecting which file you download, you can now read/write to all EEPROM memories or just those that relate to the Nextion display, protecting your rig’s settings securely if you want (the only way you can change them is in uBITx Manager if you go with this option).

  • Adjust the frequency by pressing on different sections of the frequency shown on the Nextion display
  • The lock button locks the Nextion screen as well now which is handy for using your rig around young children.
  • The sleep function has been improved.  You can wake the screen up by moving the encoder dial, or pressing on the bottom left of the screen.

  • Install two screens – they will each mirror what happens on the other, but in some modes different functions can appear
  • A number of enhancements to the control menu, including an elementary spectrum scope, band scanning and memory selection, saving.

The pace of development is pretty staggering.  We all look forward to other functions being added to the Nextion screen in future!

To download these beta files check out Ian’s article.

KD8CEC firmware hint – CW frequency display

The KD8CEC firmware provides a lot of customisation features through uBITx Manager software.  Many user of Ian’s firmware are not aware of all the built-in features of his firmware.   This is one such instance!

JJ1EPE raised a concern that his display in CW mode was “off frequency”.  Well, it was from his perspective, but then the display was all the time showing the TX frequency not the offset frequency where the station he was listening to.

CW offsets create headaches in how you represent the frequency on a display.  In SSB the frequency you see on the display is the frequency of the suppressed carrier on receive and the same on transmit.   If you tune to the carrier frequency of a received station you won’t hear anything.  To get a sidetone we have to tune off the transmit frequency by a few hundred hertz.  Most people have worked out how to set the offset on the uBITx.

The standard that Ian KD8CEC has applied is to always show the TX frequency  by default (except where RIT or SPLIT mode is selected).

However, if you want to change the approach, do the following in uBITX Manager:

– Enable Adjust CW Frequency

– Shift Display Frequency on CWL, CWU Mode

If you select this function, the LCD will show the frequency at which the radio is being transmitted (the offset you prefer is added or subtracted to the actual RX frequency reflecting the CW-L or CW-U mode selected).   This may be just the thing you were looking for!

Reference

Michael VE3WMB figured after playing around with the KD8CEC firmware for a while that he  would prefer to have the Main VFO frequency and Mode displayed in the top line, instead of the bottom line of the display and the secondary info (VFO B etc) on the bottom line of his display.

Under ‘User Interface’ of the uBitx Memory Manager application (scroll way down), checking the ‘1/2 Line Toggle’ works to swap the first and 2nd lines on the display.  No coding is required to achieve this.

Reference

Buy your Nextion display now!

If this display looks like it is from a commercial rig, then you are wrong!  It is  the Nextion display mounted on a µBITx!

Ian KD8CEC will shortly release his newest enhancement to CEC firmware.  His latest modification to the CEC firmware supports Nextion screens. This was foreshadowed recently on the BITX20 list.


THIS WILL BE THE MOST AMAZING ENHANCEMENT YET FOR UBITX!

If you want further proof, check out Ian’s recently prepared youtube video of the Nextion screen in operation.  His release is imminent.

Get your order in for a Nextion display immediately, as they are likely to sell out when 6000 µBITx owners twig that they really do NEED a Nextion display.  [Note that ubitx.net has no relationship with ITEAD – who make the Nextion!]


Why Nextion?

There are some very good reasons why the Nextion display is the way to go:

  • Nextion screens make it quicker for developers to provide a user-friendly interface to their product:  a separate processor controls graphics on the screen, and a Windows WSYWIG emulator can be developed for free to whip up a User Interface for the Nextion display.   The processor in the Nextion has its own control language and coding that is similar to C++
  • Users can easily hack their own display’s look and feel, by plugging into a standardised protocol between the screen processor and main processor that are connected via a standard serial port.
  • Screens come in a variety of sizes from 2.4″ to 7″.  Resizing of images and buttons is all that is required to make firmware work on a different screen size. No coding is required.  Software required is simply the Nextion Windows software and a graphics programme (MS Paint is adequate).
  • The screens come in two varieties:  a BASIC model and an ENHANCED model.  The ENHANCED model has GPIO lines controlled by the display processor and a Real Time Clock (RTC).

Nextion display units cost more than other displays for a reason.  The independent processor removes most of the burden for screen manipulation from the main processor, and it is much quicker and easier to develop the user interface and to customise it for different sized screens and to add/subtract features.   Nextion displays also include a microSD card reader.  They run on +5v DC and include a serial port.   Note that the Enhanced Model contains a battery mount for the RTC, but does not include the battery (CR1220) itself.  This is not required until you want to use the RTC.

How easy will it be to use the Nextion Display?

It will be VERY EASY to add a Nextion display to your µBITx.  Watch the video!

No hardware modifications are required to your µBITx, but you will of course  need enough front panel space to install your colour touch display of choice.  You may even need a bigger case if you want to install the 7″ Nextion display!

You will also need to download two new files:

  1. an updated version of KD8CEC’s firmware, that incorporates the interfacing protocol to the Nextion for installation in your Raduino.
  2. an image file (firmware) for insertion in the Nextion display unit.

The downloaded firmware for the Nextion needs to match with your screen size.  There are two variants for each screen size:  a BASIC or ENHANCED version of the Nextion display unit (see the discussion on which version to buy below).

This firmware needs to be saved to a microSD card (a 2GB or larger card is required).  Insert the card in the Nextion display and in powering up the Nextion display will automatically load the firmware from the microSD card into the Nextion flash storage.   Remove the microSD card when the upload is complete.

Four wires connect the Nextion display to the Raduino.  Two lines are for power, and the other two are serial RX and TX that connect to standard IO ports on the µBITx that were used for the 16×2 standard display.

Reboot your µBITx and your Nextion display should be working!

What to look out for when buying a Nextion Display

There are two versions of the Nextion Display – one developed for the Chinese market and an English language version that supports the Nextion Windows development environment.  Make sure you don’t get the cheaper, but incompatible Chinese version.  Look out for “English Version” in the marketing blurb.  This won’t be an issue if you buy from the developer (ITEAD).

 I understand a downloadable hex file will be available that works the same as the English version, for those of us who purchased the wrong model in error!  Thanks to Ian, who did it blind (also not being able to read Chinese)!

Any size will work with the CEC firmware on the Raduino end.  However, Nextion firmware is specific to  either the BASIC or ENHANCED version of the screen and to the resolution of the screen.   That said, any version can be modified to work with any other screen size with just a little bit of work on the part of the user.   You can also fully customise your screen to meet your own requirements.  Change the colours, or change the entire look and feel.  No coding is required to do this, just cut and paste the code from the supplied CEC version for each tool.

Purchase the ENHANCED model of the Nextion (for a few more dollars) if you think you will use the GPIO or RTC features in future.  The RTC could be useful for digital modes that require precise timing, or for satellite work, etc.  Additional GPIO lines could solve one of the problems with the Raduino:  a lack of spare digital ports to support customised add-ons.  For example, if you want to add 160m and switch in an additional LPF, or  if you are worried about potential spurs, you will be able to pull in bandpass filters for the high bands. In these instances you may want to spend a little more to get the ENHANCED version.

If you don’t want to wait until firmware is available for your screen size, then purchase a 2.4″ or 2.8″ BASIC or ENHANCED Nextion Display now.   These two screens have the exact same resolution, and the default version of the Nextion Firmware from Ian KD8CEC will work on both screen sizes without modification.

If you already have a different sized screen, or want to buy a bigger screen, right from the outset, don’t panic.  You may need to make some adjustments to the firmware yourself.  This is not difficult – but involves resizing graphics and moving around objects to suit the larger screen area/resolution.  Some of us are working on modifications to the Nextion firmware to accommodate 3.2″ and 3.5″ screens. Firmware for these screens is likely to be available quickly.

Screen sizes and resolutions for the BASIC models available on ITEAD’s website are as follows:

The ENHANCED versions available from ITEAD are as follows:

Most of us will choose to buy our Nextion displays from Aliexpress or eBay.

They are available in all sizes and in either BASIC or ENHANCED versions.  It is unclear which are OEM versions and which are clones.  It probably doesn’t matter.

Look for highly rated suppliers and those with higher shipping volumes.  The biggest risks are that your screen arrives cracked, or simply never arrives.  You will need some form of redress when goods arrive in a damaged state or simply never arrive, and this is where the intermediaries in eBAY, Aliexpress or Paypal can assist.

 

Nextion Display and KD8CEC firmware

Ian KD8CEC is working on a protocol to allow Nextion LCD touch displays to communicate with the µBITx.

He is implementing this a little differently to most support for Nextion LCDs.

The firmware will handle communication between the uBITX arduino and Nextion LCD using template files.

There are quite a few variables in the Nextion LCD. If the status of any parameters in the uBITX changes, the variables sent to the Nextion LCD will also be changed at the same time (and vice-versa).  This should allow any Nextion display and any configuration of the display’s User Interface to interact with the µBITx.  This means constructors can customise their µBITx display using the Windows GUI used with the Nextion to configure the “look and feel”.

For example, when uBITX’s frequency changes, it is transferred to a specific variable on Nextion LCD.

Example code

 

Below is an example of simple frequency and mode display changes

 

//Frequency

if(vc.val!=-1)

{

nFreq.val=vc.val

vc.val=-1

}

//Mode

if(cc.val!=-1)

{

if(cc.val==2)

{

tMainMode.txt=”LSB”

}

else

{

    tMainMode.txt=”USB”

}

cc.val=-1

}

Reference

New Release of KD8CEC Firmware v1.08

Ian KD8CEC has formally released version  1.08  of his firmware. This the first major release since 1.061, although there have been a number of Beta versions in between that many constructors will have donwloaded.
Some  key features in this version include:
1.Receive performance is improved compared to the original firmware or version 1.061
2.ATT function has been added to reduce RF gain (This shifts the 45Mhz IF passband down the slope of the filter giving an attenuator effect).
3.Added the ability to connect an inboard or outboard SDR unit after the 45MHz roofing filter (A low cost RTL-SDR is available that can be controlled by computer software providing a full SDR receiver)
4.Added ADC Monitoring in CAT communications
5. Supports several LCD variants including:
  • 16×02 Parallel LCD – i.e. LCD equipped with µBITX
  • the 16×02 LCD display configured to use I2C
  • 20×04 Parallel LCD with existing wiring in the µBITx
  • 20×04 LCD display configured to use I2C
  • Two 16×02 LCD displays configured to use I2C (Dual LCD mode)
6.Added extended switch support (up to 6 switches can be incorporated on your front panel to control various rig functions).
7. S Meter support – Any S-meter should be compatible.  The S-Meter will work on 2 or 4 line displays.
8.Added S-Meter Setting Assistant to uBITX Manager
9.Add recovery mode (that incorporates Factory Reset)
The pictures below show two different displays in operation on the rig:

There have been many other improvements and fixes. More information is available on Ian’s Hamskey blog.
Please see the link below for details of the release version of the software:
You can download HEX file and uBITX Manager from the link above. You can also download the source code at https://github.com/phdlee/ubitx and see all the changes I’ve made so far.   If there is a non-critical bug in the public version, Ian will link to the new firmware from his blog.
A new version of the CEC firmware manual is anticipated shortly.
Reference

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 too 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.

KD8CEC v1.072

Ian KD8CEC has released version 1.072 firmware.  This includes support for both 20×4 and the standard 16×2 LCD screens (using i2c).  It enables constructors to include or remove bits of code, and it allows the integration of an US$8 RTL-SDR to work on all HF bands to give full DSP, waterfall display, etc.

For more details see his website at www.hamskey.com

Download the manual (ug1072_087) for the KD8CEC v1.072, which has been updated by Rod KM6SN and his peer reviewers.

RTL-SDR is mated to uBITx

Ian KD8CEC is working on a new release of his CEC firmware for the uBITx that will be more modular in approach (picking up on John VK2ETA’s mods to Ian’s firmware), interface with a range of displays (I2C versions of the 1602 and 2004 displays as well as the display that comes with the Raduino).  More importantly, however, this new version will enable the µBITx front-end of the receiver to be connected to an RTL-SDR USB device.  The RTL-SDR device will draw on the  HF receive sensitivity of the µBITx  along with the front end bandpass filter and first IF roofing filter and associated IF stage amplifier (normally at 12MHz) to produce a quality SDR receiver (for just a few $s invested in the RTL-SDR tuner).

This version is available to download (1.071 Beta) from Ian’s website now.