On http://w8bh.net‘s site there are instructions to build your own morse tutor. There are step by step instructions using a popular STM32 microcontroller. He also has included an updated build guide using an ESP32 otherwise known as a NodeMCU. Unfortunately, he doesn’t show how to breadboard this project.
My biggest problem was that I didn’t know how to connect the rest of the wires to the display. I read that the LED pin was supposed to be the backlight so connect it to +. But there were 3 or 4 empty holes that were the key to making it all work right.
When I booted it up (with the display not completely connected), the buzzer played R and if I randomly did stuff with the encoder and cw paddle it would obviously go into one of the practice modes – I just couldn’t see on the screen what I was doing!
I recently figured it out, and here are the pin connections how I built it:
ESP32 GPIO # (see above diagram) | Connected to… |
GND | Ground (-) Rail on breadboard |
23 aka VPSMOSI | SDI(MOSI) pin on display |
22 | CS pin on display (CS=chip select?) |
21 | DC pin on display |
18 aka VSPI SCK | SCK pin on Display |
17 | RESET pin on Display |
16 | CLK pin on Encoder |
4 | DT pin on Encoder |
15 | SW pin on Encoder |
VIN3.3v | Positive (+) rail on breadboard |
32 | Dit on CW key |
33 | Dah on CW key |
13 | Positive (really either) pin on Buzzer |
Other Connections | |
Buzzer negative pin | negative rail on breadboard |
Encoder + pin | positive rail on breadboard |
Encoder – pin | negative rail on breadboard |
CW paddle common | negative rail on breadboard |
Display VCC pin | positive rail on breadboard |
Display LED pin | positive rail on breadboard (or hole right behind VCC pin) |
Display GND pin | negative rail on breadboard |
Thats it! Now you have to modify the code so that the software and pins are in sync with each other.
Again, note I didn’t setup the SD card, because I didn’t care about that functionality.
Also note that if you connect a 2nd set of wires into your CW key, you should unplug it from your radio while using the morse tutor. And when you’re using your CW paddle for real, then unplug the wires from the breadboard. This was only 1 thing – the morse tutor or your ham radio will have voltage running through/grounding as you key your paddle.
The original sketch for the ESP32 is here:
https://github.com/bhall66/morse-tutor/blob/master/MorseTutor_ESP32/MorseTutor_ESP32.ino
When you look at the code, you’ll notice that there are only 2 constants set for the display – the DC pin and the CS pin.
Well, on the circuit board traces there are other connections. Looking at the photos located in this folder, I wasn’t able to trace them myself to see where they went. This was the hardest part
So what you need to do, since you’re not using this PC board, is to now figure out (which I’ve done above) how to wire them, but also how to tell the code where those pins are attached.
Here are my changes. Basically I had to tell the software where the RST, SCK, and MOSI pins were attached to the ESP32.
I also had to modify how we initialize the display to also add where we had the displays reset pin connected.
#define TFT_DC 21 // Display "DC" pin
#define TFT_CS 22 // Display "CS" pin
#define TFT_RST 17
#define TFT_SCK 18
#define TFT_MOSI 23
#define SD_CS 5 // SD card "CS" pin
... further down ...
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
All this stuff might be obvious to you if you know how to use this type of display, but it wasn’t to me. I don’t know the significance of these connections. I’ve only used an I2C display before which is just 2 wires outside of power/ground.
73,
KV0N