Tiny 64 x 32 OLED Display for SugarCube Si5351a VFO
A
further option for builders and users of the ZL2PD SugarCube VFO - An
even smaller display. It reduces the overall volume very significantly,
ideal for those aiming at adding the SugarCube to portable
transceivers. And all the other regular features remain available
albeit in a smaller size. Interested? Read on.

Introduction
My SugarCube VFO is a tiny dual VFO controlled by a small 8-pin
ATtiny85 that can be built in a volume not much larger
than a sugar cube.
It connects to a small graphical
display, the widely available low-cost 0.91" 128x32 OLED LCD. All
that's required to control it is a standard rotary encoder for tuning,
and three pushbuttons.
The software also supports a graphical bar meter for signal strength, RF power, battery volts etc. | Figure 1: OLED displays: 64x32, 72x40 and 128x32 alongside some 5mm and 3mm LEDs and a 16-pin DIL IC for size reference |
About 6 weeks ago, I released improved software for the SugarCube VFO with user-programmable functions including:
- Reference crystal frequency e.g. 25.000000 MHz (The exact frequency of the Si5351a's crystal)
- VFO A Start Frequency e.g. 14.100 MHz
- VFO B Start Frequency e.g. 3.650 MHz
- IF Offset e.g. 12.00MHz (or 0 if you are using an SDR or direct conversion radio)
- BFO/CIO for VFO A e.g. 12.002850 MHz (to give USB for example)
- BFO/CIO for VFO B e.g. 11.997300 MHz (to give LSB for example)
- Mixing method i.e. high-side, low-side, inverted, or no offset independently programmable for:
– VFO A Rx
– VFO B Rx
– VFO A Tx, and
– VFO B Tx
My
Sugarcube VFO uses the 0.91” 128 x 32 OLED display. That's the largest
of the three OLED displays shown above. It uses an integrated SSD-1306
controller chip. While small, the resulting display is perfectly clear
and easy to read from halfway across the room. This has allowed me to
squeeze a VHF Sugarcube VFO into an old VHF FM receiver, described elsewhere on my website, and into a new compact HF SSB transceiver I am building. Many others have also made extensive use of it in their transceivers.Despite
the considerable success of the already very small Sugarcube VFO, I
received another request recently. Could I modify the software to
permit the use of an even smaller 64 x 32 OLED display? These measure
just 0.49” from corner to corner across the display’s diagonal. (It's
the one on the left-hand side of the photo at the top of this page)
I
was a little reluctant to try this display. They cost considerably
more, roughly double that for the more widely available 128 x 32 OLED
displays. I also believed the smaller 64 x 32 display would make it
very difficult to present, or read, the VFO information.
However,
after a bit of to-and-fro discussion over these points, I decided to at
least try the display with the VFO. In addition, I thought I would also
test the similar and apparently even smaller 0.41” 70 x 40 OLED
displays which I noticed were becoming available, albeit at a similarly
higher price. That's the display in the centre of the photo at the top
of this page. And, yes, it's not really smaller, is it!
Small Displays – Big Problems
While
both 64x32 and 70x40 OLED display modules were ordered at the same
time, the 70x40 displays arrived first. A brief test proved that there
were problems – The display looked as if it had zoomed in on a
tiny section of the original 128x32 display. It looked most unusual.
After
some (considerable!) effort, the problem was traced to two factors.
Firstly, as might be expected, the integrated SSD-1306 chip uses the
full 128x64 pixel display memory. Logically, only a part of that memory
is actually displayed on the smaller 64x32 or 70x40 OLED.
That
was fine, and easily understood. However, it also quickly transpired
that the stated 70x40 specification was incorrect – Not the first error
I was to encounter. These modules are labeled “70x40” on the display's
PCB. However, they actually display 72x40 pixels. This also makes
perfect sense. The display memory and operation is very much
byte-oriented. The ‘72x40’ result resolves to a display which is
effectively 9 bytes wide (i.e. 9x8=72), and 5 bytes high (i.e. 5x8=40).
Next,
the display is horizontally centred on the internal memory, displaying
data from column 28 to column 100 of the memory’s 1 – 128 columns.
Vertically, the display shows the lower 5 rows, from row 3 to 7.
The
other issue I encountered was initialization. The various datasheets
for the 72x40 and 64x32 OLED displays all provided (different!)
recommended initialization configuration sequences. None of these
worked. As a result, establishing the correct setup data sequence took
some time (!!) but it was worth it. It completely resolved the strange
‘zoom’ display effect. Usefully, the same revised config data string
worked with both smaller displays. That allowed quick progress with the
64 x 32 displays when they arrived a few days later.
Figure 2 : My assembled and operating 64x32 OLED SugarCube Plus VFO. I've put a small
16-pin IC alongside the SugarCube to illustrate the really compact size of this version.
The 72x40 OLED display board is slightly wider than the red VFO board while the
display itself is actually about 20% smaller than the 64x32 OLED visual area.
Reformatting the SugarCube Display Data
With
the displays now working, the visual clarity of the VFO information
could finally be properly evaluated. This 64x32 OLED SugarCube
version supports a display with 100 Hz resolution
for frequencies up to 100MHz with digits in a XX.XXX.X format e.g.
14.109.5 or 3.525.6 etc. (The standard SugarCube VFOs provide 5Hz
tuning and 1Hz display resolution)
All
of the previous SugarCube Plus VFO features including dual VFOs and
BFOs, EEPROM storage of the VFO configuration etc have been retained.
The “VFO A” and “VFO B” selection icon is still shown, but now it is
located on the lower line alongside a smaller 48-pixel wide signal
strength meter.
In addition, the ‘Lock’ icon is also shown when the feature is enabled.
Figure 3 : The photo above shows the prototype assembly
with SugarCube VFO PCB (red) at the back of the assembly,
with the 64x32 OLED module wired directly on top of the VFO
PCB with its ATtiny85 acting as the "filling in the sandwich".
What’s
missing in this version of the Sugarcube? Well, a couple of minor
items. First, the transmit “T” icon is no longer shown. Also,
the “MHz” characters which are normally shown after the
frequency are also no longer displayed. Neither of these
items are likely to be of much concern, I suspect.
Perhaps
of greater importance are the tuning step sizes. These now start from
100Hz steps rather than the 5Hz steps available with the standard
(128x32 display) SugarCube
software. Since this 64x32 display VFO is aimed at the most compact of
transceivers, perhaps for those venturing out into the mountains and
the bush, climbers and trampers etc, this is unlikely to be a
problem.
One thing to note: The 128 x 32 displays
operate with the long 128-bit wide axis oriented horizontally across
the panel with the four pin connections on the left hand edge (using
the software for that display available on my other webpage). Makes
perfect sense. Similarly, these smaller displays also arrange the
longer 64 or 72 pixel axis horizontally, but, by contrast, the
connection pins for the display will now lie horizontally along the
upper edge of the mounted display. If you are designing a new PCB with
integrated display, switches, and encoder, you will need to take note
of this difference.
PCB for the Switches
In
the process of building this new prototype, I decided to design a
little PCB for the switches and resistors to ease the wiring and panel
mounting work. I’m not really sure it provides a significant
improvement in the construction process with this PCB - everyone's
application tends to be different - but anyway, here it is, just in
case someone else wants to use it.

Figure 4 : PCB layout diagram for front panel pushbuttons and the resistors
Wiring
To
help ease the wiring process, here’s a diagram of the wiring required
for this version. The circuit diagram is identical to that of the
original SugarCube and the enhanced SugarCube
(with EEPROM programmable values). It is actually much less complicated
than it looks, as you can see from the photo of the prototype at the
top of this page.
Figure
5 : Wiring details for the 64x32 OLED version and the switch PCB.
Right-click on this figure with your mouse to see a full-scale diagram
on your screen.
The photo of the actual wired prototype which follows this diagram is shown in Figure 2 above.
Software
The
HEX file for programming the ATtiny85 for this version of the SugarCube
is available for download below. In that ZIP file, I have also included
a sample EEPROM file (*.EEP) for testing and for later user amendment,
as described on the SugarCube Plus page.
The
details for programming the SugarCube, the EEPROM (for your specific
requirements) and the spreadsheet for calculating the data to store in
the EEPROM, and the fuse settings for the ATtiny85, are given on THIS page of my website. The schematic and details of the PCB component layout are available on the original SugarCube page.
As noted on the other SugarCube pages, the Gerber files for the SugarCube VFO PCB is available for your personal non-commercial use
on request. Just email me. (My email address is shown on the main page
of this website) Similarly, if a club wants to build a bunch of these,
email me and we can chat about the arrangements. There's nothing
onerous. I just need to ensure I retain copyright.
Conclusions
As
you can see, lots of people are using my SugarCube design. I now agree
that this latest version does offer an enhancement to the original
design – It certainly occupies a great deal less space on the front
panel. Since I’ve managed to keep the graphics design for the font used
identical to the standard SugarCube VFO, I think it retains much of its
readability.
I do hope you find this latest addition to the SugarCube VFO family equally useful.
Downloads
Software
– The HEX file for this version of the SugarCube Plus along with a
sample EEPROM file for testing and later user amendment is available here.
Switchboard PCB – The set of Gerber files for the little switchboard PCB is available here
Questions? Send
me an email. I'll try my best to answer as soon as I can. Just remember my
(paid) work takes priority so it may take a couple of days to reply....or longer
if I'm travelling or working in some weird out of the way location.
Want to go back to the main page? Click
here to
return directly.