Menu:



Version:

June 9, 2021:
Revised: v1.0

4, 16 and 99 channel Multi-Channel SugarCube-Plus

for Fixed Applications and Legacy Radio Restoration

A 4-channel, 16-channel and 99-channel version of my SugarCube-Plus VFO for legacy radios and those needing a channelized version for fixed frequencies from 5kHz to 290MHz. Microsoft™ Excel™ spreadsheets and a simple low cost HVSP chip eraser are also provided to make building and programming really easy.

Introduction

If you want to restore an old ex-military or ex-commercial HF transceiver, you may need to replace some crystals. If so, you’ll probably be surprised, even shocked, by the cost and relative scarcity of the crystals required. When I last checked, the price for a new crystal for one of these was anywhere up to $80, or more.

Retired commercial transceivers like the Codan 6801 and 7727 are keenly sought by some who value their rugged design. These older radios often need new crystals to operate on the desired frequencies. If you need a set of four crystals, for example, then the cost could have you chatting to your bank manager about a loan.


Figure 1 : Obtaining crystals to restore a collectable HF transceiver like this Codan 6801 can be
expensive and challenging. These latest versions of the SugarCube Plus should offer a solution.


I suppose it should not have been any surprise when I was contacted by some fellow amateur radio operators around here who use some of these Codan HF transceivers. They were keen to discover if the standard SugarCube Plus (SC+) could be modified to produce one or two fixed channel frequencies.

Likewise, there seem to be a number of elderly (Sorry, I should have said ‘collectable’ or ‘legacy’!) radios out there requiring one or more crystals. If you are restoring one of those prized radios like the Yaesu FT-101, Kenwood TS-520, Heathkit SB-101, SB-104 or HR-1680 radios, you may have discovered one (or more) of the HFO crystals are not working, or just missing. In that case, you’re probably facing the same problem.


Figure 2 : Keen collectors restore HF transceivers like the Yaesu FT-101B shown here. Missing or faulty parts often include crystals. This radio uses one crystal for each band and three crystals in the carrier oscillator.

It looked to be a challenging problem but, after some persuasion, I agreed to take a look at the design changes.

What’s Required?

As I studied the problem, I realized that if I just modified the SC+ to produce a version that could provide, say, two selectable fixed frequencies, then sure as apples grow on trees, someone else would ask within a few days about a version for three, or four (or more!) frequencies for their application. That led me to think about a  "generic" design solution to address a wide variety of different situations.

Then, as I began to write the new software and test the prototypes, I also realized that there was much more to this than just the SC+ channel-based software. First, anyone building one of these fixed frequency SC+XX oscillators has to be able to easily enter and edit the chosen frequencies. Likewise, since all the frequency data is stored in the ATtiny85 EEPROM memory in the SC+ board, there has to be a simple low cost method to generate the necessary frequency files (*.EEP) for programming the EEPROM.

Also, since the ATtiny85 in the SC+ uses all of its pins for the task, a specialized high-voltage fuse resetting tool is required each time any frequency is changed. From what my study into that problem showed, I had to design a simple low cost fuse resetting tool as well. And then write the software for it.

The development list for this “simple change” to the SC+ actually ended up looking like this:

1.    New software for a channel-based SC+
2.    Supporting/application software for frequency selection and (future) frequency editing
3.    Supporting/application software to generate the required EEPROM file for the SC+XX
4.    Hardware design for a special HV fuse resetting tool to reset the SC+XX for reprogramming, and
5.    Software for this special HV fuse resetting tool

That done, I would also then have to document everything so others could build these devices too. And do a bunch of drawings and tables and...


I realised that this was quite a list. 

Channel-based SugarCube-Plus Versions

Well, here is the result of all my efforts. Not one, but a family of three fixed frequency SugarCube Plus designs, along with all of these support tools. My new family of channel-based SC+ oscillators support 4, 16 or 99 channels respectively. They include:

•    SugarCube “Plus-Four” basic 4-channel version    (“SC+4”)
•    SugarCube “Plus-16” expanded 16-channel version    (“SC+16”)
•    SugarCube “Plus-99” full 99-channel version    (“SC+99”)

For the SC+16 version, I have prepared a number of frequency files for direct programming which include frequency configurations for specific classic transceivers including the Yaesu FT-101, Kenwood TS-520, and a number of the Heathkit classics including the SB-101, SB-104, HR-1680 and SB-303 radios. That means each builder doesn't have to download the spreadsheet and enter all of those frequencies.

A table will help illustrate the different features supported by each version:

Table 1 : Features of the new SugarCube-Plus-XX range of fixed frequency oscillators

The use of the OLED display is optional. It’s entirely up to the user. In many 4 and 16 channel applications, the display will not be required. However, even with these uses, there are some situations, for example during testing, where the OLED’s display can be helpful.

The software is designed to suit the smallest standard OLED display. Currently, that’s the 0.49” (diagonal) 64x32 pixel I2C OLED display. This is small enough to fit into a tiny space almost anywhere on a legacy transceiver’s front panel. It could even fit into a microphone! The actual display of the 64x32 OLED requires just 12 x 8mm of panel space. A little more space is actually needed behind this panel opening to mount the OLED PCB itself. It measures about 15x15mm.



Figure 3 : The 64x32 OLED is optional but it displays a really clear and easily readable channel number



Larger I2C OLED displays can also be used. These include 70x40, 128x32 and 128x64 pixel OLED displays (All of these use the same SSD-1306 controller).

The two digits on these OLED displays are formed from 24 x 32 pixel characters. (Yes, I had to design a special font specifically for this project, too) These two digits are designed to fill the 64x32 OLED and be easily readable across the room.

If one of the larger OLED displays are used, the characters do not scale up in size to fill those larger displays because the number of pixels in each digit remains unchanged. You can, however, read the channel numbers quite clearly on these other displays. That can be useful if you are degugging your installation.

Providing software support in the design for the other, larger, displays is particularly aimed at those who just want to do a quick check of which channel their SC+X is currently on. Once testing is complete, it’s likely you’ll remove it. So, with this software, you can grab any of these OLED displays, turn the SC+XX off, plug it in, turn it on again, and see which channel is selected. Then remove it when you’re happy with how it’s all working. Easy.

In each case, using the OLED display is optional. If you don’t need it, don’t install it. It’s likely, for example, in many of the 4 and 16 channel applications, existing radio displays or front panel switches will indicate the selected channel to the user.

The only proviso is this: If the OLED is NOT used, a pair of pullup resistors for the I2C bus MUST be fitted to the SC+XX PCB. If the OLED is used, suitable pullup resistors are actually fitted internally to the OLED module so a further pair of pullups in the form of R1 and R2 are not required. However, it doesn’t matter if they are also fitted on the SC+XX PCB. You do NOT have to remove them in order to use the OLED display.

Channel Selection

Channel selection on the SC+4 and SC+16 oscillators use four pins on the SugarCube’s ATtiny85 chip. These are ‘active ground’ inputs. Each input is internally or externally tied to the +3V3 supply rail via a pullup resistor. Channel selection requires one or more pins to be pulled ‘logic low’ or to ground.

For example, in the schematic for the SC+4 four channel version (Figure xxx), a simple single pole 4-way rotary switch is shown with the common pin tied to ground. This allows each channel to be directly selected as required. This matches the arrangement available in a number of legacy radio transceivers, or this type of channel selection can be readily arranged via a very simple modification.

In the more capable SC+16 version, the availability of 16 channels requires these four input pins be used in a BCD arrangement, shown in Table 2.


Table 2 : Input settings for each channel
(0=logic low or ground, 1=open circuit or logic high)

In the four channel “SC+4”, the OLED display shows the channel numbers as 01, 02, 03, 04 respectively (See Figure 1) while in the SC+16, the display shows channel numbers from 01 to 16. In the SC+99, the display displays the full channel range from 01 to 99.

The SC+4 or SC+16 start at power-up on the selected channel. So, yes, you can select channel 2, for example, use the radio on that channel, turn the radio off, select another channel, say channel 3, and turn the radio back on. It will then start on channel 3, the new selected channel. Just in case someone asks you "Does it remember the last channel it used?" Yes, it remembers all four (or 16, or 99) of them, but it will start on the one you have selected at power-up (SC+4, SC+16) or the last used channel (SC+99).

The time required for the Si5351a to change channel is typically less than 100mS.

Channel Lock

There is an additional 'Lock' feature available in the SC+99 version. This ensures the selected channel does not change if the rotary encoder knob is accidentally bumped. It’s probably most useful in portable and mobile applications.

To lock or unlock the rotary encoder channel selection, just press the integrated push-button on the encoder. A small lock icon appears on the OLED to show when this function has been selected.

Schematics for the SC+XX Versions

Here are the schematics for the three versions beginning with the SC+4.

Figure 4 : Here is the schematic for the 4-channel and 16 channel SC+ fixed frequency module. The OLED display shown is optional but note the requirements for pull-up resistors R1 and R2 if the OLED is NOT fitted.
(Right mouse-click on the schematic to see a larger version)

The four channel version uses one input per channel. The 16 channel version assumes BCD encoding of the channel selection. (More details below)

Pullups are programmed internally on all four "active ground" channel select inputs. An additional external pullup (R3) is added on pin 1 because this pin’s internal pullup resistor is somewhat weaker.

The ATtiny85 controls both the display and the PLL via it’s I2C two-wire bus. Pullups are required on these lines if the display is not used. If the display is fitted with it’s integral I2C pullups and R1 and R2 are already fitted to the PCB, R1 and R2 do not need to be removed.

An external 3V3 3-pin regulator is recommended. This  may be any of the xxx1117 family of devices available from many vendors. Alternately, a standard LM7833 (3V3 regulator in TO-220 case) can be used.

IMPORTANT: These regulators have different input voltage limits depending on the vendor. Some brands will not allow more than 12V on the regulator input pin, so be careful. Also, allow for a heatsink. If running from 12V, the regulator will dissipate up to 600mW. For that reason, you may also want to consider using a switching regulator like the TPS62203.


Figure 5 : Here is the schematic for the 99 channel SC+ fixed frequency module. 

A rotary encoder is used to select any of up to 99 channels. The pushbutton switch integrated into the rotary encoder is used to select the lock function.

EEP Frequency Files for Legacy Transceivers

To make life a little easier for those with some of the popular legacy transceivers, the software available includes EEPROM files matching the crystals used in these radios. These files also include provision for the carrier/BFO crystals.

Table 3 details the current arrangement of these EEPROM files.


Table 3 : To date, four special versions have been created of the SC+16 for use with a number of popular older amateur radio transceivers and receivers. Channels highlighted in yellow are non-standard for the equipment. They have been included to permit the addition of WARC bands, where possible.

No work has been done to interface the SC+16 with any of these radios. And, to save you emailing me to beg me to help you do this, I’m sorry, I neither have the time nor access to any of these transceivers or receivers (although if you want to send me an HR-1680, I'll say "Thank you very much").

Interfacing will probably require a small modification to marry the Band select switch to the BCD inputs on the SC+16, and a blocking capacitor and a couple of resistors to couple the RF output into the transceiver transmit and receive mixers. Some radios will be easier than others. Oh, and the regulator for the 3V3 power supply to the SC+XX. All told, it'll be a fraction of the cost of one crystal.

Construction

There are very few parts required. The small PCB, three resistors, two capacitors, a crystal, a 3V3 regulator, an 8-pin IC socket, a couple of connectors, the programmed ATtiny85, the Si5351a PLL, and the optional 64x32 pixel OLED. And a few lengths of hookup wire.

At time of writing, the SC+4 or SC+16 can be built for about $US15, and the SC+99 for less than $US20. Some with good parts bins and patience to order parts via the internet can build it for much less.





Figure 6 : The tiny double-sided PCB for the SC+XX measures about 20 x 20mm and uses a mix of SMD and through-hole parts. It's identical to that used in the earlier SC and SC+ VFOs.





It’s vital to mount the parts in the correct order when building the VFO.

Begin by fitting the Si5351a in the centre of the bare PCB on the top side of the PCB. I find using additional liquid flux makes this job easier. (The top side of the PCB is the side on which the text is written)


Figure 7 : You can see where the Si5351a is mounted in this view under the ATtiny85. This view shows the completed assembly.


Next, solder in the two SMD resistors on the top-side (R1 and R2 on the schematic), and then the through-hole 100nF bypass capacitor on the REAR/UNDERSIDE of the PCB if you are using SMD or on the top side if you are using a through-hole part.

Now solder in the 25MHz crystal. Some crystals have metal cases with minimal insulation around the crystal pins. These crystal cases can short out the PCB connections under the case especially if your board supplier has been a bit generous with the solder plating. Some crystals are supplied with a thin insulating pad under the crystal for this reason, but most do not. If you have a potential problem, which you can test first by temporarily holding the crystal in place on the board (Don't solder it yet!) and checking for shorts with an ohmmeter, then there is a simple effective solution.

Cut a small piece of transparent sticky tape to match the size of the crystal. Apply this to the location of the crystal to match the crystal outline printed on the overlay. Use a sharp pin to make holes through the tape for the crystal’s pins. Now, insert the crystal and solder the pins. If you solder the crystal leads fairly quickly, the tape will successfully insulate the crystal from the PCB. If you need a longer time to solder the leads, use kapton (heat-proof) tape.

Fit the 8-pin socket or a pair of 4-pin pin-strips for the ATtiny85. The ATtiny85 will ultimately plug in over top of the Si5351a. Some standard 8-pin sockets do not sit nicely over the Si5351a.

The additional 10k pull-up resistor (R3) can now be fitted under the PCB. 


Figure 8 : The additional pullup resistor (R3) used in the 4 channel and 16 channel versions is fitted under the PCB


Now to the RF output connection. You can either fit a two-pin 0.1” pin-strip as a connector in the location opposite pin 1 of the ATtiny85 or connect a thin coaxial cable (RG-316 etc) directly to the PCB pads.

Add the wiring to connect the OLED to the PCB if you are using the OLED display. Then, finally, install the wires for the inputs, and add the encoder wiring if necessary.

Construct the external 3V3 regulator if required, and connect the regulator output to the PCB.
As you can see from the various photos here, I used three cable zip ties to hold the wiring neatly in place. 


Figure 9 : This wiring diagram for the SC+4 oscillator
shows an example of
channel selection using a simple rotary switch

The wiring for the SC+16 is identical except the four channel select wires are expecting the BCD channel inputs shown in Table 2.


Figure 10 : Wiring arrangement for the SC+16 oscillator with this example of BCD channel selection
using a thumbwheel (e.g. Altronics S3316A) although other methods are possible
(e.g. Diode arrays, CMOS logic - 40147 and 4069, TTL logic - SN7445, etc)


The SC+99 uses a rotary encoder so the wiring is slightly different.


Figure 11 : Wiring arrangement for the SC+99 oscillator includes a rotary encoder for channel selection.

Programming Your Frequencies

The ATtiny85 contains four types of programmable memory:

The SC+XX program HEX file must be written into the chip's flash memory, and the frequency data must be written into the EEPROM. This latter data must be saved in an EEP file e.g. “billybob.eep” or “myfreqs.eep” etc. The data defining the actual frequency of the Si5351a 25MHz reference crystal is also saved in this EEP file. This can be adjusted to calibrate your SC+XX precisely. (You can also change the reference frequency value to your preferred reference frequency!)

You can use the frequency data I have provided if you are building the SC+XX for one of the legacy transceivers listed here. Alternately, you can download my Excel spreadsheets, enter your frequencies, and the spreadsheet macro routine will generate these EEP files auto-magically for you. All you need to do is enter your data into the spreadsheet.

Then, all you need to do is to program your ATtiny85 flash with the HEX program file and the ATtiny85 EEPROM with your chosen EEP frequency file.

Example:
Let's look at a simple example for the SC+4. The following four frequencies are required in the SC+4:

Channel 01 : 5.975300 MHz
Channel 02 : 1.690000 MHz
Channel 03 : 33.550500 MHz
Channel 04 : 25.675100 MHz

These frequencies are entered (in Hz! e.g. 5.9753 MHz is entered as 5,975,300 into the 4-channel Excel SC+4 spreadsheet. There’s a specific spreadsheet for each version of the SC+XX. The spreadsheet calculates the hexadecimal values which must be saved in the EEPROM. Then, at the click of the mouse on the correct cell in the spreadsheet, my spreadsheet will magically generate the required EEP file for you. It's saved in the same directory where you have saved the spreadsheet.

As mentioned above, there are two files you need to program your ATtiny85. Once that has been done, you must then program the ATtiny85's configuration fuses. The first file, SugarCubeXX.HEX, must be programmed into the ATtiny85 flash memory. The second file, for example SCplus4Freq.EEP, must be programmed into the ATtiny85's EEPROM. FYI, in the case of this example set of channels, this EEP file contains the following data saved in Intel hex format:


Figure 12 : Example data from SC+4 spreadsheet showing conversion of these example frequencies
(entered in Hz) into hexadecimal (Base16) and then into byte values for storage in the ATtinyEEPROM

Fortunately, with my spreadsheet, you don’t have to worry about this detail unless you are particularly interested in how the EEP contents are generated and saved. Just enter your frequencies into the spreadsheet and click on the 'Write EEP File" green button. Your EEP file will then be created for you. Note: You’ll need to resave that EEP file to a filename of your choice if you want to retain it.

These four example frequencies can be seen in the downloadable spreadsheet, and the generated values in that spreadsheet have been saved in the file SCplus4DEMO.eep file. A further 16-channel example can be found in the 16-channel spreadsheet, and that spreadsheet can also generates an EEP file this time titled
SCplus16Freq.EEP. Same arrangement applies for the 99 channel version.

All of these files are available for download below.

Programming

Download the HEX file for the version you are building (SC+4, SC+16 or SC+99). Download the appropriate Excel spreadsheet file, enter your frequencies into it, and generate the EEP file. Alternately, you can use one of the EEP files I’ve generated for some typical applications below.

You will require a suitable programmer (e.g. USBasp etc) to program your ATtiny85 with the HEX and EEP files, and, finally, to set the configuration fuses in the ATtiny85. These programmers are widely available and very inexpensive, around $3-4. You will also need some software for the USBasp programmer. Suitable GUI programming software is available free via the internet. Examples for use with Microsoft Windows include Khazama and Extreme.

Three steps are required to program the ATtiny85 with the USBasp programmer and chosen GUI application:

1.    Program the flash memory with the HEX program software (See the Download section below)
2.    Program the EEROM with the EEP file containing the frequency data (See spreadsheets below)
3.    Finally, program the ATtiny85's fuses.  (Note: High=&57h, Low=&E1h) These configure the Tiny85 for this application.

I use the well-known USBasp programmer and Extreme Burner ("EB") programming software. Assuming the USBasp has been set up and the two files downloaded from here, start EB.

To program the flash memory with the HEX file,  use File - Open Flash - Select the HEX file - Click on OK. (Wait while following the progress bar)

To program the EEPROM with the EEP file, use File - Open EEPROM - Select the EEP file type using the pulldown button - Select the EEP file - Click on OK. (Wait briefly for this to be completed)

To program the fuses, select the Fuse Bits/Settings tab in the main window. Set Low Byte and High Byte values. Click  the Write boxes for both fuses, then click on Write to set the fuses. (Follow progress using the dialog that appears on screen)

Table 4 shows the required fuse settings:

Table 4 : Fuse settings for ATtiny85 in SC+XX module


Reprogramming Your ATtiny85

THIS IS IMPORTANT:
The fuse settings in Step 3 allow Pin 1 to be used as a channel select input. When that fuse is programmed, it also removes that pin’s standard reset functionality. That reset functionality is required for programming. If you intend to reprogram your ATtiny85 again later, then, to change the frequencies in your S+XX, for example, or to calibrate the Si5351a reference frequency, you must restore the Reset functionality by restoring the original FACTORY fuse settings before you can program the chip again with that new frequency data.

I’ll say it again: If you have programmed your ATtiny85 previously and set the fuses as shown in Step 3, you will need to restore those fuses back to the way Atmel/Microchip set them in the factory before your low cost USBASP programmer (or whatever you're using) can be used again on that chip to update those frequencies.

This requires you to either buy a specialised HV programmer (These can be expensive) or build/buy a HV AVR fuse resetting device. I already have one of these that I built many years ago.  However, that design is far more complicated than you need for this task.
It handles every chip imaginable, and I use it a lot.

In this case, you just need a fuse reset tool that works on an ATtiny85, A design that’s cheap and simple to build. So, yes, I’ve also designed a simple chip eraser and fuse restorer (“CEFR”) to do this. You can read about how to build it here. It requires no special parts and operates directly from a USB socket or 5V USB power supply. You don’t need a special battery, a separate 12V power supply, an Arduino, an LCD, or anything beyond a few basic parts.

I’ve designed my CEFR to be a little more versatile. It also erases the flash memory in the ATtiny85 while restoring the factory-default fuses. This is just in case you accidentally set the Lock fuses. To reset the lock fuses, you must erase the flash memory first. So my CEFR does that for you, too.

Figure 13 : My simple Chip Eraser and Fuse Restorer (CEFR) resets the ATtiny85 fuses back
 to the factory-default settings to allow you to change the stored frequencies in your SC+XX


All the details about this device can be found over on the CEFR webpage on my website.

Adapter Board

I use an adapter board to program the ATtiny85 with my USBasp programmer. It saves adding the 6-pin programming socket to every PCB (There’s no space for it on the SC+XX board anyway!)

The circuit diagram for my adapter board is shown below. The resistor and LED are optional. They were added to show me when power has been applied to the adapter board.


Figure 14 : Optional ATtiny85 programming adapter

Such an adapter board is usually home-made. It consists of an 8-pin IC socket, a 6 pin 0.1” header strip to match the USBasp programmer's connector, all built using a scrap of prototyping board. However, for those that would like one, I've also designed a PCB layout for this as well.

The ATtiny85 to be programmed goes into socket J1. The USBasp programmer is plugged into the 6 pin plug J2. 5V power comes from the programmer via J2 .



Figure 15 : ATtiny85 programming adapter for USBasp and similar programmers

If all of this remains a mystery for you, there are some helpful tutorials on this topic that can be found on the Adafruit and Instructables websites.

Final Comments   

All of these channelized versions of the SC+ have taken much (!!!) more time and effort than I originally expected. It's been necessary not only to develop the required software, but also the entire 'ecosystem' required to support the various versions - The spreadsheets, the PCBs, the wiring diagrams, the programming adapter, the fuse resetting tool..... The list goes on.Then there's all the testing...

In part, the extensive effort has been necessary in order to include all of the details you need to build one of the SC+XX devices described here and over on the CEFR webpage even though much of this repeats information documented on other pages on my website. In most cases, that's detail that many of you already know.

However, now that it’s all done, these new designs form a useful addition to my SC+ family. I hope you find them equally useful.

Why don’t you build and try one, too! 


Downloads


Software:


1. The HEX files are available here for programming your ATtiny85:

arrowSC+4 software (HEX file in ZIP)
arrowSC+16 software (HEX file in ZIP)
arrowSC+99 software (Available soon - Email me)

2. Microsoft™ Excel™ spreadsheets to enter/edit frequencies and generate EEP files:

arrowSpreadsheet for the SC+4 (SC_plus_4_EEPROM_Calculation_Sheet_VerA.xlsm in ZIP)
arrowSpreadsheet for the SC+16 (SC_plus_16_EEPROM_Calculation_Sheet_VerA.xlsm in ZIP)
arrowSpreadsheet for the SC+99 (Available soon - Email me)

3. Example and Legacy Radio EEP frequency files:

arrowSC+4 DEMO frequency EEP file (SCplus4DEMO.eep in ZIP)
arrowSC+16 DEMO frequency EEP file (SCplus16DEMO.eep in ZIP)
arrowYaesu FT-101 frequency EEP file (FT101.eep in ZIP)

I'll add these ones here if there's any interest/demand. Email me if you'd like these. My email address can be found on the main page of my website.

arrowKenwood TS-520 frequency EEP file (TS520.eep)
arrowHeathkit SB-101/104/HR1680 frequency EEP file (SB101.eep)
arrowHeathkit SB-303 frequency EEP file (SB303.eep)

PCB Layout:
 

arrowSC+XX: Same PCB as used in my standard SC and SC+ VFOs. The Gerber files are available here.
arrowATtiny85 programming adapter: The Gerber files and PDF image file are available here.

Note: All of the software and PCB files etc for the Chip Erasing and Fuse Resetting tool (CEFR) can be found over on my webpage describing the CEFR.






Want to go back to the main page? Click here to return directly.