U.RAT OLED Display Works!

I now have both the KPOD and and the Adafruit Pi OLED working on the Raspberry Pi Zero W.

As soon as it arrived, I soldered the header on to the Pi Zero W. I then used the Make script to build the OLED_96 library, then did the Build of WiringPi, then compiled the hacked Elecraft URAT code to use both libraries.

Huge shout out to Larry Bank who made this display possible! And thanks to Mike, KJ4Z, who found Larry’s GitHub library!

The KY6R LAB text you see above is in the urat.c code, and it initializes the OLED with that little “splash screen” text. I’ll need to look into how to write both text and an integer using the OLED_96 library next.

Earlier today, I built a plywood display platform which I will use to give presentations and demos.

The center section will have a nice Raspberry Pi Zero W in a fancy case. The KPOD will be out front so people can play with it.

It’s a bit orange because I was on our very nice back deck where we have orange canvas “sails” as an awning.

With my waning interest in DXCC, this ham maker stuff sure is rekindling my love of the hobby.

So much so, I can’t believe my ham life just revolved around the very silly and arbitrary DXCC list for 16 years.

Well, doing both is even better ….

Adding the u.RAT Adafruit Pi-OLED

The urat.c program with printf statements ready to be replaced by OLED print commands . . 

My good friend Mike, KJ4Z found a C Library for the Adafruit Pi-OLED, something my Google searches just didn’t find. Thanks Mike! Here is the link, and I shared it with Adafruit and their Support Forum – since no one there had found this wonderful C Library:


So, today I will solder the header on one of the two Raspberry Pi Zero W’s and plug the cute little Adafruit Pi-OLED in:

I still cant get over this cool little Linux computer and display. All for under $30

Adafruit really rocks. They design products that really open up the Maker world, and have all plans in the form of CAD and Fritzing schematics, spec sheets, code and lessons. No wonder they have gotten the press and accolades that they have.

The OLED_96 library example program – all I need to do now is replace my printf statements with the oledWriteString commands

The project happened due to a combination of Elecraft being so supportive with their code, a guy in Hawaii who had the best wiring diagram for the steppers and my drivers, a guy in Devon in the UK with a great library to make the steppers move, and this library to display the C and L positions of the KPOD rotary encoder on the OLED.

I prefer Python for business and BI (Business Intelligence) apps at work, but I do like C for this lower level hardware work. Arduino supports C – but its a special form of C because of its development environment, and the Raspberry Pi with C compiled on Linux using gcc is more of what I am used to as far as C goes. You have a choice of languages on the Pi – on Arduino you do not. Arduino C is about the easiest form of C that I have ever tried – C# is easy, but I had found C++ to be quite difficult back in the 80’s – when I worked for Oracle.

If the KPOD itself didn’t dictate that I use C, I would have probably used Python, but we shall see – I’m surprised how much I still like C.

OK – I hope later today (or at least this weekend) I can post a video showing the roller inductor and variable capacitor mounted properly on a plywood board and the Raspberry Pi Zero W with Adafruit Pi-OLED displaying the L and C values in a way nicer than this:

The “final frontier” will be to possibly add a shaft encoder to the roller inductor shaft which turns on a LED when I get to one end or the other – so I won’t bang the roller at its stops:

There are many, and F6HQZ has on based on WiringPi:


This will be the point where I have to decide what would go in an Open Source project and what won’t. Since any tuner components would really need the OLED, I think that’s worth including, but since someone could use a switched inductor tuner – like the Johnson Viking KW Matchbox, then they would need a relay switching schema and not a shaft encoder in their project.

Even the OLED might be dictating too much, but I think the Raspberry Pi Zero W plus OLED along with the KPOD is an unbeatable combination. I have suggested to Elecraft that they consider a new and more super charged KPOD that has a little OLED display right on board – then the game steps up quite a bit as far as having a Universal Maker controller using the KPOD.

But hey – since I am sharing my work back with Elecraft, who knows – if they see a way to market to hams and makers, maybe I will have come up with my first product design “hack”.

Are we having fun yet?


Adafruit Pi Zero OLED

The Adafruit Pi OLED fits on top of the Raspberry Pi Zero W and uses I2C pins, not GPIO pins, which is really excellent

Just plug it in and go to the Adafruit web site and look up “Usage” and follow the steps to ensure it works

In a few days I will have this cute little Adafruit Pi OLED, and will be able to write to it almost as easy as printing a line using printf in C. To prepare, I have added a couple print statements for the L and C sections of the stepper motor control code. Here is what it looks like:

The code knows which stepper motor you are switched to, and I just print the encoders position. I keep the last position it was at if you switch – so it ends up being exactly like if you were tuning the knobs and recording the positions when tuning the front controls manually. This will come in handy in future releases of the u.RAT, when I add in memory support and where you could assign a KPOD button to a memory location.

Adafruit has complete specs and instructions for the Pi OLED:


In fact, they have the schematic and even the Fritzing files for this device. I can’t begin to tell you how much I am learning and how fast. Since we live in a day where electronic circuits are SMD based boards, we have gone from the days where you needed to know about each discreet device (like when I soldered Heathkit HW-7 and HW-8 or Elecraft K1 and pre-Elecraft SSD kits), to a day where all you need to know is what you want your project to do and then understand your circuit by block diagram, in most cases, each circuit board is a block in your block diagram. be

In the Raspberry Pi and Arduino world – you source boards that use resources, plan to use them properly, plug them in and then learn a few C or Python commands from a library that you can download from Github. The most complex electronics have now been democratized so anyone can invent using commodity components. Its not evolutionary, its revolutionary.

It also encourages people of all walks of life to learn about electronics and coding. Ham Radio surely is joining these wonderful ranks, in fact, I see a future where Makers become hams and vice versa. Win win.

I need to find a C library out there for this little Pi OLED – I did a quick Google search and found a few, but I need to research to find the best one that fits this project.

I at least have my code ready – with printf statements in the right place and where all I will need to do is replace the printf with whatever puts the text on the OLED. Here is the Adafruit Library:


But it seems to have so much more junk in it than I need – like drawing lines and stuff. I just need “hello world” level stuff – just character / text.

Here is one library – just text – which is what I need:


And the code to print is exactly what I had hoped for:

// include the library code:
#include <TinyWireM.h>
#include <LiquidCrystal_SSD1306.h>

// initialize the library with the numbers of the interface pins
#define OLED_RESET 4

void setup() {
 // set up the LCD's number of columns and rows:
 lcd.begin(21, 7);
 // Print a message to the LCD.
 lcd.print("hello, world!");

void loop() {
 // set the cursor to column 0, line 1
 // (note: line 1 is the second row, since counting begins with 0):
 lcd.setCursor(0, 1);
 // print the number of seconds since reset:
 lcd.print(millis() / 1000);

Upcoming Hacks

One of my favorite blogs – “Hackaday” http://hackaday.com/

I wake up each day now wondering “what can I build” – or at least “what new thing can I try and learn”. This is the essence of my “rebooting” my ham radio and electronics, and even computer “careers” / hobbies. The fact that several disciplines are combined make this so much more interesting than just one on their own. It really is like weaving a rich tapestry.


I also love the Adafruit web site and blog – https://www.adafruit.com/?gclid=EAIaIQobChMIz-6QvrOT1QIV04uzCh2wvgj5EAAYASAAEgI_oPD_BwE

Anyway, so, what’s up next – making things is a lot like working DXCC entities, as soon as you’ve worked them or made them, you feel like you have conquered that little (or big) challenge, so, its on to the next challenge. If you have to be a junkie, being a challenge junkie is surely a good addiction.

Maker “To Do” List

  1. Complete u.RAT by adding Pi OLED to Raspberry Pi Zero W. Add code to display the rotary encoder clicks using the library developed by the same guy who designed WiringPi. Mount a variable capacitor and roller inductor on a prototype board or old ATR-30 and use it for my upcoming demo’s and presentations (Ham Clubs and Pacificon)
  2. Add the u.RAT to my BT1500A
  3. Build a security camera that uses a proximity detector to “follow” something it sees. I already have a spare WebCam that is USB and have the NEMA-17 stepper motors. Possibly even articulate on an X and Y access (?)
  4. Create a set of belt driven creepy doll heads and whatnot that rotate or even look at each other and animate them in some sequence – for Halloween. Blinking LED lights for eyes. Use my Android phone to control it. Maybe synchronize to music
  5. Use the KX3 to run weak signal digital modes – using only the Mod Bob antenna – to really test its effectiveness

What the hell is he building in there?




DXCC in My Rear View Mirror

Its funny, lately I have been having so much fun in the Maker world that I keep forgetting to turn on the radio or even look at a cluster to see what is on. I find myself racing home from BART on my bike like a school kid wanting to get home to play.

Last night I went to bed with a giant smile on my face because the Raspberry Pi Zero W just blows me away. It really is like magic that you can have a Linux Server on half a credit card. Gee whiz – you could use it to act as an N1MM+ database server! My excitement is even more than when I first started chasing DXCC in July, 2001 – 16 years ago.

It couldn’t come at a better time because after VK0EK I felt like I had done it all. It was very weird that I had to wait a year to see if we would win DX-pedition of the Year (and we did of course), but while I really enjoyed going to Dayton a lot more than I had expected, VK0EK was already old news. In fact, I only booked my tickets to Dayton three weeks in advance because I just didn’t care. But when I got the call where I was told “You really should go to Dayton this year”, I decided OK – this is probably worth it (and it very much was – more than I had anticipated). I knew I would never volunteer for another DX-pedition, so this was it – this was the Big One.

I’m just like all DX-ers – we always want what’s ahead and quickly take what has happened for granted. I quickly turned off the “interest switch” after VK0EK, and of course only have Bouvet on the calendar of “big deals”.

Last summer I did dig deeply into Top Band RX antennas, and this Winter put up the “Mod Bob”, but I really did get to the end of what I can do antenna wise.

SO, I had this old Arduino starter kit and decided this time I would really try to play with it. I’m not good unless I have a real goal, and the Mod Bob and Palstar 1500A screamed for a remote tuning solution. Its been more than just fun – its been thrilling, which is just the opposite of DXCC, which has been mind numbingly boring.

So, while the Mod Bob and 160M is front and center, its funny how DXCC has taken a big back seat in my hobby time and in my psyche. It used to be front and center – in fact was in the drivers seat.

The Amazing Raspberry Pi Zero W!

The Raspberry Pi Zero W on the left, and the Raspberry Pi 3 B on the right

The “regular” Raspberry Pi – on the right – is about the size of a credit card. So its even more amazing that a full on Linux machine can be even half that size, and have WiFi built in for only $10 US. 

For the u.RAT project I certainly don’t need a monitor or keyboard, so I will configure the Raspberry Pi Zero W to boot up and automatically run the urat program. Since it boots in WiFi – I just ssh into it and can gracefully shut down the computer before turning off the console that will house it.

To create a Raspberry Pi Raspian Jesse Lite OS boot SD card, I used a well known utility (Etcher) and procedure – format the card then use Etcher to flash an image (that I downloaded from Github). 

Here’s a super important tip:

If you don’t first format the SD card and get a good boot image the Raspberry Pi Zero W will look dead. I thought mine was zapped and it was just because I did not flash the SD card right. When the boot disk is good, the tiny green led will flash.

Ssh and WiFi ….

I then used sudo raspi-config to enable ssh and finally added this text:

ssid=”Your WiFi name”
psk=”Your WiFi password”

to the /etc/wpa-suplicant/wpa_supplicant.conf file. I used my WiFi name and security key of course. Run ifconfig and see if the router is found and that you have an ip address. 

I still needed one last command:

sudo route add default gw

ZS1AFS Heard Well on 40M LP

I heard Tom, ZS1AFS on the morning 40M Long Path, which is the first time in what seems like a month or maybe even two. I don’t know if this is true every year, but my guess that this path isn’t that great around the Northern Hemisphere summer solstice – at least this year. But you would think that then it would also suffer during the Northern Hemisphere Winter solstice.

I’m starting to think its been just an anomaly this year because I think the ZS path is open most of the year. I don’t remember it closing so much last year.