Introduction: Morse Code Keyboard

This project is a small keyboard where the user types in Morse code and characters are output to an attached computer.

The unit was inspired by the US Dot-dash coder (CO-3B, MX-4495).

I posted my first generation version on Arduino project hub and since then I have improved my project.

This version features 5 software debounced switches and 4* 5Volt indicator LED’s wired up to a Chinese Pro Micro clone, all mounted on a custom PCB.

Step 1: Parts:

1* Pro Micro

5* 6mm square Pushbutton switches

4* 3mm 5 volt LED’s (the ones with the resistor built in)

2* 12 way 0.1 inch socket strips

1* 2 way 0.1 inch pins

1* 0.1 inch jumper

1* Custom PCB

Step 2: Circuit Diagram:

Step 3: PCB:

I designed the PCB using Eagle CAD and had the boards made by OSH park the price was roughly $23.00 for 3* boards.

Step 4: Construction:

Construction should present no problems.

Solder in the LED’s, ensuring that they are correctly oriented (Cathode (ground) pin to the left hand side of the board).

Solder in the buttons.

I found it easiest to plug the 12 way connectors into the Pro Micro board before pushing them into the PCB and soldering the corner pins to ensure proper alignment, and then solder the rest of the pins.

Finally solder in the 2 pin connector, I found this easier with the jumper pushed on and some blue tack to hold it steady for soldering.

Step 5: Software & Programming:

I used the standard Arduino IDE to create and download the program to the Pro Micro board, I have a couple of these boards and they show up as “Arduino Leonardo” under Tools->Board:

You will also need to set the port under Tools->Port.

Step 6: Operation:

The jumper connector selects for either left or right handed operation (remove the jumper for left hand operation).

Pressing the Return key produces a carriage return.

Pressing the Backspace key deletes 1 character.

Pressing the Space/Enter key without having pressed Dot or Dash produces 1 space character.

Entering an appropriate series of dots and dashes, then pressing the enter key will produce the character for that combination of dots and dashes e.g. Dot, Dash, Enter will produce the letter ‘a’ on screen.

The Alt, Control, Function and Shift modifiers are accessed by typing in the appropriate code:

Alt – 6* dots then Enter followed by a character e.g. Alt then e gives é

Control – 5* dots 1* dash then Enter e.g. Control then C for Copy

Function – 4* dots 1* dash 1* dot then Enter followed by the number e.g. 0-9 and a, b, c for 10, 11 & 12.

Shift – 4* dots 2* dash then Enter e.g. Shift then s gives S

Step 7: Notes:

Each modifier only affects 1 subsequent character; you don’t get the equivalent of shift lock.

Alt implements Alt Gr (I did try to get standard (left) Alt to work but had no success)

All 4 modifiers are coded into unassigned elements of the Morse tree.

The keyboard library used by the program is set up to emulate a US keyboard; if you use this unit on a machine set up for another country some of the letters may be transposed.

Exceeding the depth of the Morse tree (>6 dots/dashes) wraps you back to the first tree element, this is indicated by the illumination of all 4 of the LED’s.

Step 8: References:

US Dot-dash coder (CO-3B, MX-4495):

Source - (retrieved 27/Feb/2017)

Morse code & Morse tree:

Source - (retrieved 27/Feb/-2017)

Pocket-Sized Contest

Participated in the
Pocket-Sized Contest

Microcontroller Contest

Participated in the
Microcontroller Contest