The remarkable compact transceivers of Peter DK7IH inspired me to dream up a compact transceiver of my own. This project would be an experiment on a shirt-pocket scale — not as dense as some of Peter’s rigs, but small on my scale. Starting with the PLL VFO/controller along the familiar lines of Raduino (Arduino Nano and si5351), I sketched out a physical design, and it became clear that the display choice would dictate the size of this module. Where small displays are concerned, there’s only one option … OLED.
I bought my first OLED over a year ago, but a dodgy 5v regulator forced out my tiny Adafruit display’s internal magic smoke. I cursed them and swore never to let them into my shack again. Being an unapologetic aesthete, I had other issues with OLEDs. I didn’t like the look of them on some homebrew rigs, where they sit on the panels of big boxes looking like a postage stamp. They work, but look all wrong, like a family room with a bathroom-sized window. Another problem was the large amount of memory required by the display buffer.
Despite these issues, I decided to make up with these tiny panels, buying a 128×64 OLED with SSD1306 driver. I bread-boarded it with a Nano, ran I2C_scanner to find its address (0x3C) and downloaded an Adafruit driver script. Voila! Worked first time.
But the memory problem reappeared. The Adafruit SSD1306 library does graphics which filled my Nano’s memory all the way to the ‘Low memory’ warning. No room for anything else. My ‘SummitProwler’ VFO/Controller/Keyer script already takes up 84% of program storage space and 66% of dynamic memory. So these two were never going to work together.
A quick search found a discussion thread in the Arduino forum on the prohibitive size of the Adafruit OLED library. The wisdom of the crowd came through again, and a few clicks later, I’d installed the smallest ASCII-only SSD1306 library known to mankind, SSD1306Ascii, by Bill Greiman. Look at the difference… program space reduced by a third, and global variable space reduced from 80% to 4%!
To make the frequency digits as large as possible on the minuscule panel, I selected a large font and used the library’s x2 function. The result looked to be usable on a compact rig.
The only drawback of this library is that it includes only printable ASCII characters, so drawing the S-meter necessitated a bit of font hacking. There are GLCD font editors that generate code from a drawing of your custom character in an X by Y grid. I grabbed one and designed a font of six 10×15 pixel characters — S1, S3, S5, S7, S9, +x dB. The resultant code didn’t render properly, so I got into a hacking mindset, cycling through a tight trial-and-error loop, adjusting various hex digits in the font character array, and observing the result. After about an hour of fairly mindless trial-and-error, I’d sussed out a set of usable characters. The font is available here.
Adding OLED to SummitProwler VFO/Controller script
All the VFO/Controllers in my homebrew radios use the same script, available here. Each time I use it in a new receiver or transceiver project, I isolate the project-specific code with a #define‘d project label and #ifdef #endif pairs. This ensures only the code required for that project is included in the compiler scope. This is mostly around the UpdateDisplay() method, BFO initialisation, encoder and push-buttons. Most of the VFO, T/R, rig control, metering and keyer code is common. Some code (e.g. PCF8574 drivers for band switching) is small and is left in, even if not used.
After pasting in the SSD1306 code, and wrapping with pre-processor directives, the script settled at 93% program space and 73% global variable space. Code space on the edge of the warning, so there might be some refactoring to be done soon, as I seem to keep adding features!
The rest of the build followed my well-trodden path, reproducing the circuit of VU2ESE’s Raduino with an Arduino Nano, Adafruit si5351 breakout, and a 5v 7805 regulator, with the mechanical rotary encoder and push-buttons for VFO selection on flying leads. The two push-buttons on the left allow selection up and down from the 10 VFOs. The frequency step is changed by pushing in the main tuning knob. The other front panel controls are analogue transceiver controls. The two sockets are for an external speaker and PTT microphone. Other essential controls and sockets including DC power, antenna, paddle and 3 keyer memory push-buttons will be relegated to a rear panel.
The only departure from the standard Raduino pattern was to add a 100uH inductor in series with the 5V line to the OLED module with bypass capacitors to keep OLED digital noise off the 5V line, from where Peter DK7IH reports it getting into the receiver.
The module is worked out in a custom hand made PCB, mounted behind a front panel cut from aluminum angle.
The si5351’s middle clock (CLK#1) is set to the signal frequency (with a 700Hz offset applied) and keyed in software for sending CW. The 2MA square wave clock is buffered with a discrete MMBT2222 buffer/gain stage, to condition it for injection into a transmitter’s driver stage.
Both si5351 clocks run at the 2MA setting, delivering around 5dBm as measured. In the scope screen below (for the 7MHz band) the si5351 CLK#0 (VFO) is the yellow trace, CLK#2 (BFO) is purple. The VFO is about 1Vpp which is 4dBm. The VFO amplitude drops to 700mVpp on 14MHz, 500mVpp on 28MHz and 300mV on 50MHz. Remember that the actual VFO is running 12MHz above these bands. The BFO runs at about 5dBm.
The CW carrier oscillator buffer (CLK#1) was measured at 12dB gain, delivering 25mW, more than enough carrier to drive a future transceiver’s driver/PA board. On a 12v supply the entire VFO/Controller module draws 80mA, a bit less than one with an LCD would draw.
The VFO/Controller module is now complete, tested, and ready to drop into a compact case as the heart of a compact SSB/CW transceiver. Write-up of that project to follow as it progresses. If you like this kind of thing, I urge you to check out Peter DK7IH’s blog for an eyeful of amazing compact homebrew achievements.