Repository navigation
5. Design Reflections
A retrospective on the MorseDeck Terminal build covering what I set out to do, how it went, the challenges I ran into, and what I would change in a future revision.
- Project Goals and Outcomes
- Challenges and Solutions
- Hardware Limitations
- What I Would Do Differently
- Overall Reflection
The goal was to design and build a functional Morse code keyer and trainer using an ESP32-S3 running MicroPython. The core objective was a device that could key Morse code through paddle inputs, decode it in real time, and display output on an OLED screen. That goal was fully met.
Beyond the core requirement, the project grew significantly in scope. A rotary encoder-driven settings menu was implemented with live-adjustable parameters including WPM, volume, keying mode, LED feedback, and decoding toggle. Four distinct keying modes were developed: Iambic A, Iambic B, Ultimatic, and Straight Key. A 4x4 matrix keypad was integrated to support Keyboard Replay Mode, allowing alphabetic text entry via multi-tap T9 input that is encoded to Morse and played back through the buzzer. Additional features included automatic Morse decoding on the OLED, a sleep mode with a bouncing logo screensaver, and a typewriter-style boot screen. The final device was housed in a custom 3D-printed enclosure and mounted on a custom manufactured PCB.
Gap detection for automatic letter and word spacing was the most technically challenging part of the project. Morse timing is inherently relative since the gap between elements depends on the operator's speed, so a fixed millisecond threshold would fail at different WPM settings. The solution was to derive all timing thresholds dynamically from the dit duration, which is calculated from the live WPM setting. Letter breaks, word breaks, and inter-element gaps all scale correctly as the user adjusts speed.
Iambic B keying mode required careful state management. Iambic B sends one additional element after both paddles are released, remembering which element was sent last. This was solved by tracking a "both held" flag across loop iterations and firing one extra element on the cycle after release.
The settings menu required significant architectural work to implement cleanly. Making the menu index-agnostic so that adding or reordering items would not break the logic involved abstracting menu items into a list of tuples and driving all selection, scrolling, and editing behavior from that single data structure.
Timing-sensitive screen updates were the most frustrating debugging challenge. Because so much of the program depends on millisecond-accurate loop execution, any blocking call such as a slow OLED redraw would throw off keying feel and gap detection. Tracking down these interactions required careful instrumentation and rethinking how and when screen updates were triggered.
OLED refresh rate was the primary hardware constraint. At the I2C speeds available with a software I2C implementation on the ESP32-S3, full screen redraws produced visible flicker during active keying. This was mitigated by minimizing the number of pixels redrawn per update, only clearing and redrawing regions of the screen that changed rather than calling a full screen clear each cycle.
Heap memory was also a consideration. MicroPython's overhead on the ESP32-S3 leaves limited heap for application data, which influenced decisions around string handling and buffer management. The Morse content string grows unbounded during a session, though in practice the display only ever shows the last 16 characters, so this was an acceptable tradeoff for the project scope.
Complete the Training Mode. The groundwork exists in the codebase but the scoring logic was not implemented within the project timeline. A proper Training Mode would prompt the user with a letter or word and score their keyed response, which is the most meaningful feature missing from the current build.
Implement adaptive timing for decoding. The current Morse decoding relies entirely on gap timing, which means imprecise keying or slight timing drift can produce incorrect letter breaks. Basing thresholds on the user's average dit length rather than the WPM setting would significantly improve decoding accuracy at varying skill levels.
Add persistent settings storage. All settings reset to defaults on every power cycle. Writing settings to a JSON file on the board's internal flash using uos would fix this and make the device much more practical to use day-to-day.
Break main.py into modules. The single-file approach made uploading easy in Thonny, but the file grew long. Splitting it into keyer.py, decoder.py, display.py, and menu.py would make it easier to navigate and modify individual subsystems. Several features added late in development also influenced earlier architectural decisions in ways that would have been avoided with a midpoint design review.
The most satisfying part of the project was watching isolated components come together into a cohesive and genuinely usable device. Implementing Iambic B, which competitive Morse operators rely on, and having it work correctly on custom hardware was a meaningful milestone.
Overall the project was a strong balance of hardware and software work, and the open-ended scope allowed the device to grow well beyond a minimum viable product.