System Overview

The MorseMate ultimately serves as a communication device, allowing users to connect with others using MorseMates. To set up the device, users will connect it to a wireless network and choose a username and password. These credentials will be saved for future use. Once set up, users can begin sending and receiving messages. They can input their messages using the main button and utilize other buttons for actions like sending the message, reading the latest inbound message, editing their typed message, or changing the contact for communication.

The external design of our product features several key components. It includes a series of buttons, including a prominent main button designed for discrete input of Morse code, allowing easy manipulation even from within a pocket. Additionally, a small OLED display provides information to the user when the device is not in a pocket.

Internally, the MorseMate is powered by a rechargeable battery. At the core of the system is an ESP32 module, enabling WiFi functionality and handling other system components. Furthermore, a small vibration motor discreetly notifies users of incoming messages by vibrating in Morse code patterns.

In the digital realm, our product utilizes MQTT for sending and receiving messages. Messages are posted to an MQTT topic named after the intended recipient's username. Each device is subscribed to its own username topic, ensuring messages reach the intended recipient. This flexibility allows for future expansion, such as incorporating clients on other devices like web browsers.

Block Diagram: Communication Diagram

Block Diagram: Button Layout

Algorithms and Code 

The development of our firmware was greatly facilitated by using the Arduino programming language, which provided us with a robust and user-friendly platform for prototyping and developing the MorseMate. With its simplified environment and extensive library, Arduino allowed us to seamlessly interface with the ESP32 and implement essential features, including WiFi connectivity and provisioning mode, MQTT communication, OLED screen interaction, and Morse code translation. Our code can be divided into four distinct segments, each responsible for specific functionalities within our project.

1) Configuration Management and WiFi Connection Setup:

The first segment of the code manages the device's configuration using WiFiManager and handles the loading and saving of configuration settings to a JSON file, as seen in the code excerpt below. It also includes the parsing of user-defined contacts. The goal of this segment was to provide a simplified interface for users to input their desired settings and to ensure that the configuration was stored and retrieved correctly.

2) MQTT Communication:

This portion of the code establishes an MQTT connection with a specified broker, subscribes to a specific topic, and handles incoming messages through a callback function. It also provides functions for sending MQTT messages. This enabled communication between the ESP32 device and the MQTT broker, facilitating the exchange of messages between users.

3) Morse Code Generation and Vibration Control:

This segment is responsible for generating Morse code patterns based on input characters and controlling a vibration motor to produce the corresponding Morse code signals. It provides functions for buzzing individual letters, buzzing entire words, and generating notification signals, enhancing the user experience with tactile feedback. In order to ensure consistency and avoid potential errors caused by mistyped messages, a decision was made to prioritize standardization in the Morse code generation and vibration control segment. Instead of relying on live vibrations triggered by each user input, predefined Morse code patterns are generated for each character. This approach minimizes the risk of accidental vibrations due to input errors or variations. This standardization can be seen in...

Read more »