Skip to main content
Version: ACS CC

Morse Coder

Converts typed text into Morse code signals (LEDs, buzzer, LCD).

info

Author: Andronache Madalina-Georgiana
GitHub Project Link: Project Repository

Description

This project enables the user to input text using a 4x4 matrix keypad, which is then converted into Morse code and transmitted through:

  • Sound signals using a buzzer.
  • Light signals using LEDs.
  • Visual display on an LCD screen, where dots and dashes represent Morse code.

Ultimately, the aim is to integrate all components inside a compact system.

Motivation

This project was chosen because it combines both hardware and software aspects in a manageable way. Developing a text-to-Morse converter offers an opportunity to better understand:

  • GPIO management
  • Embedded Rust programming
  • Hardware-software interactions

It allows practicing embedded programming without requiring complex electronics knowledge.

Architecture

The following diagram shows the system architecture:

System Architecture Diagram

The Raspberry Pi Pico 2W acts as the brain of the system, coordinating all interactions between input and output components.

  • The 4x4 matrix keypad provides the user input.
  • The Pico processes the text and converts it into Morse code.
  • The LEDs and buzzer output the corresponding Morse signals.
  • The LCD screen displays the Morse code in real time using dots (.) and dashes (_).

Log

Week 28 - 4 May

Initially, I encountered problems connecting the Raspberry Pi Pico 2W to the debugger.

Problem: Using jumper wires for the SWD connection resulted in an unstable link between the Pico and the debugger, causing random disconnections and flashing failures due to loose connections.

Solution: I soldered stable male pins onto the Pico board and also reinforced the jumper cable connections by using more secure, stable headers, preventing movement and improving overall connection stability during debugging.

After stabilizing the programming connection, I focused on testing each hardware component individually to understand their behavior and determine the necessary Rust crates for the project.
This phase involved experimenting with:

  • Raspberry Pi Pico 2W setup,
  • 4x4 matrix keypad integration,
  • LEDs and buzzer control,
  • LCD 1602 screen functionality.

While working with the LCD 1602, I initially encountered display issues.

Problem: The display showed no visible characters, and I suspected a software communication error (wrong crate usage or I2C misconfiguration).

Solution: After careful troubleshooting, I discovered that the issue was actually hardware-related: the contrast potentiometer on the back of the LCD module needed adjustment.

Once the potentiometer was properly tuned, the LCD correctly displayed characters.

During LED testing, another issue occurred.

Problem: I accidentally burned two LEDs. The initially purchased red LEDs were rated for 2.1V–2.4V forward voltage, but I mistakenly powered them directly without using an appropriate resistor, which led to their failure.

Solution: This helped me realize the importance of properly calculating and setting up voltage/current protection for LEDs.

In parallel with the hardware experiments, I also started writing the initial documentation for the project. I structured the project description, architecture, hardware and software components sections, and started outlining the weekly activity logs.

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

ComponentPurposeFunction
Raspberry Pi Pico 2WMain controller of the systemReads input text, processes it, and controls outputs to buzzer, LEDs, and LCD
4x4 Matrix KeypadProvides text inputActs as the input device for entering characters
Active BuzzerOutputs Morse code through soundEmits short and long beeps representing dots and dashes
LEDsVisual representation of Morse code signals- When a dot (.) is detected, only one LED lights up (the middle one).
- When a dash (_) is detected, all three LEDs light up simultaneously.
LCD DisplayDisplays the Morse code translationShows real-time dot and dash output
Breadboard + Jumper WiresTemporary prototyping connectionsConnects components to the Raspberry Pi Pico during development

Schematics

Place your KiCAD schematics here.

Bill of Materials

DeviceUsagePrice (RON)Quantity
[Breadboard HQ (830 points)]Prototyping, connecting components9,981
Breadboard Jumper Wires SetWiring between breadboard and Pico7,991
5mm Red LED with Diffused LensVisual Morse code signaling0,395
400p HQ BreadboardAdditional prototyping area4,561
4x4 Matrix KeypadInput device for typing text6,991
1602 LCD with I2C Interface and Blue BacklightDisplay Morse translation16,341
PCB Mounted Active Buzzer ModuleAlternate sound module for Morse4,981
Raspberry Pi Pico 2WMain microcontroller39,662

Software

LibraryDescriptionUsage in your code
embassy-rpHAL for Raspberry Pi Pico WUsed for I2C interface, peripheral initialization
embassy-executorAsynchronous task runtimeUsed for #[embassy_executor::main] and async tasks
embassy-timeAsynchronous timers and delaysUsed for Timer::after() non-blocking delays
lcd1602_driverDriver for controlling LCD1602 over I2CUsed for initializing and writing text to the LCD
defmtLightweight embedded loggingUsed for debug prints (defmt::info!)
defmt-rttRTT transport for defmtSends logs to the host
panic-probePanic handler for embedded targetsHandles panics and sends diagnostic info
embedded-halTraits for I2C, GPIO and delaysUsed indirectly via embassy-rp and lcd1602_driver
  1. 4x4 Matrix Keypad Integration with Raspberry Pi Pico
  2. 1602 LCD with I2C Interface with Raspberry Pi Pico
  3. Rust Programming Guide for Raspberry Pi Pico

...