Morse key USB keyboard - Hardware

Overview

The Morse Keyboard is based around an ATMEGA168 microcontroller. The V-USB library is used to provide direct control of USB, eliminating the need for any other active components. A dual 7 segment display is also attached to the IO pins. Also, the Morse key and an additional button (to enable 'learning') is attached. There is really nothing else to it.

A regular USB socket is used to connect directly to a host.

The display is connected directly to some IO pins (via resistors).

The morse key connects via resistors to an IO pin.

A button on board is used to start 'learning' mode. When pressed, you enter the morse "-.-.-" and the firmware starts off with the speed you tapped this code with.

A mini speaker provides a side tone so you can hear what you're tapping. This can be disabled in software.

Below is a somewhat hastily drawn schematic.

Parts list

Substitute values also listed where tolerance is not critical. Generally, only the crystal and zener diodes are critical, the rest can be 10-20% out.
QtyDescriptionNotes
1 ATMEGA168 MCU At least -16 MHz rated
1 16MHz crystal 
2 22pf capacitorXTAL loading (15p-27p ok)
2 3.3v zener diodeUSB clamping
2 68 ohm resistorUSB limiting
1 1.5k ohm resistorUSB pullup
1 1uF capacitorVCC Bypass (0.1 - 1uF ok)
1 47k ohm resistorMorsekey pulldown (22k-68k ok)
1 3.3k ohm resistorMorsekey pullup (1k - 4.7k ok)
2 1k ohm resistorReset pullup
Learn pulldown.
(1k-4.7k ok)
7 270 ohm resistorLED current limiting (330k ok)
1 PCB mount speakerbeep beep beep
2 7-segment displayCode supports common anode or common cathode.
1 USB B socket 
1 Morse key, single contact 
1 2-way screw headersTo wire in morse key

PCB

Whilst I'm no stranger to etching my own boards, I decided to go the easy route here, and used prototype board, soldering links between components. It's easily reproducible and still fits in the case.

Components

I elected to go small but not tiny. Most of the components are thru-hole, but a few are SMD, especially where adjacent pads are used. Resistors are 1/8W, which are much easier to fit on a small board than the larger 1/4w ones. And they were super-cheap from ebay for a bag of 5000 mixed types. The display was found from my junk box.

Case

The case is an Eclipse mint tin. Like Altoids, these come in a peoper metal tin which lends itself well to this project. A little cutting with a mini dremel tool allows for all the various sockets, button and display.

Morse key

A real morse key. Accept no substitutes.

I can be reached at bb @ cactii . net

Copyright © 2010.