Print this Post

I before E except after Hellschreiber

This post describes a project I designed which transmits strings of data from a microcontroller to a PC’s screen using audio beeping in a special mode called Hellschreiber. Although these days it’s almost exclusively used by amateur radio operators, I thought it would make a cool microcontroller project! The result can be accomplished with a microcontroller and a speaker as a transmitter and a PC with a microphone as a receiver and decoder, or with actual radio equipment (even toy walkie talkies) by transmitting the tones over modulated radio frequencies for long distance communication! Ideas anyone?

SPECIAL THANKS: I’d like to think Mike Seese for his brainstorming help in making this project a reality. Mike and I are working on a high altitude balloon project together, and a creative inexpensive radio link is one of our goals. Thanks Mike!

As a professional dental student by day and amateur electrical/RF engineer by night, I’m having a very strange summer. I’m developing rapidly in my experience and skills in both arenas. I finally feel like I have a working knowledge of most fundamental electrical and radio frequency concepts, and I’m starting to see patients and do procedures on humans (no more mannequins) in the student dental clinic. For legal and ethical reasons I do not write specifics about what I do with my patients, but I certainly make up for it by documenting the electronic projects I work on! My goals of doing this are to (a) inspire potential electronics tinkerers to come up with new ideas and attack new projects, and (b) receive feedback and insight from those more experienced than me to help me grow in my knowledge. My eye caught a comment a few posts ago that made me smile: You have been blessed with talent and the drive to attempt things not been tried before, keep it up, great job. –David S While I can’t claim that everything I do is truly novel or never tried before, I appreciate the encouraging words. Thank you David S!

Today’s project is a fun one involving vintage wartime radio equipment, amateur radio computer software, and a healthy dose of microcontrollers! My goal is to design a single chip Hellschreiber (technically Feldhellschreiber) transmitter. “Hellschreiber” translates into English as “Light Writer” and is a pun on the name of its inventor, Rudolf Hell, who built the first device in 1920. It was intended to allow messages to be transferred over poor radio links too noisy for intelligible voice or radioteletype (RTTY) communication. Its cool factor is upped by the fact that it was sometimes used by the German military in conjunction with the Enigma encryption system during World War 2! [As an aside, RTTY is still pretty sweet and dates back to the mid 1800s! Check out hardware receivers in video 1 and video 2]

Seeing a battlefield-ready Hellschreiber receiver gives you a good idea of how it works. (The video isn’t mine, I found it on youtube.) The concept is relatively simple (shown above), and the receiver has only 2 moving parts. A spinning corkscrew presses a ticker tape into ink when it receives a radio signal. As the radio signal beeps on and off, the corkscrew contacts at different positions at different times, and letters are written on the ticker tape! anaglyph-hell-GL-11The designers of these things were extraordinarily creative! The picture on the right shows a Hellschreiber transmitter – basically a typewriter with mechanical wizardry that turns key presses into a series of radio tones corresponding to the pixelated shape of a character.

Almost a century later, people are still sending messages around the world using Hellschreiber! With an amateur radio license and an amateur radio transceiver you can tune around special Hellschreiber calling frequencies and engage in conversations with other people who enjoy using this unique mode. Computers have modernized the process, allowing you to send Hellschreiber text by typing on your keyboard and receive it by just looking at your screen. My favorite program (free) to do this is Digital Master 780, part of Ham Radio Deluxe.

This is the project I just completed. It takes strings of text stored (or dynamically generated) in an array on a microcontroller (I’m using an ATMega48, but the code is almost identical for any ATMEL AVR microcontroller, and easy adapted for other architectures) and turns it into an audio tone using PWM. This audio tone could be fed into a speaker and a microphone across the room could receive it and use the software to show the received data, or the audio could be fed into a radio transmitter and a PC hooked to the receiver could decode the audio. Either way, the text in the microcontroller is converted to Hellschreiber audio tones ready to be used however you see fit! Although I designed it as a resilient way to transmit GPS/altitude data from a high altitude balloon using a small, cheap, low-power radio transmitter, this project is just the foundation of a plethora of potential projects!

Here’s the circuit I’m using. It’s actually less complicated than shown – all those yellow wires are going to my AVR programmer! The chip just receives +5V and GND, and the audio is generated automatically and output on the OC0A pin, which happens to be pin 12 on my ATMega48. The output (audio level square waves) is fed to a crystal oscillator like this one, which generates square waves with an amplitude equal that to the input. Thus, by audio-frequency AC from the microchip, decoupled through a series capacitor, added to the power supply of the oscillator (provided by the 5V rail through a 1.8k resistor), we effectively produce an amplitude modulated (AM) radio signal!

This is the receiver I’m using. I’m lucky enough to have an all-mode, general-coverage, 100W amateur radio transceiver! It’s a Yaesu 857-D and I’m completely in love with it. It’s quite pricey though! You can find wide coverage receive-only radios called radio scanners (or police scanners), often for $20 or so on eBay which would do just as good a job of receiving all sorts of radio signals! Whatever you use, after tuning into the audio with the ham radio delux software, you’ll be able to decode Hellschreiber like this:

A few notes about the code: Each letter is sent twice vertically and I don’t think I should have done that. It’s easy enough to correct by eliminating the second FOR loop in the sendChar() function, and doubling the height of the pixels transmitted by changing on(1) and off(1) to on(2) and off(2). Then again, I could be mistaken – I don’t use this mode much. Also, horizontal width of characters (increase this and horizontally compress the received image to reduce the effects of noise) is controlled by a single variable, dynamically adjustable in software. Characters are created from a 3×5 grid (15 bits) and stored as an integer (16 bits, 2 bytes in AVR-GCC). Custom characters are certainly possible! This program takes 16.1% of program space (658 bytes) and 25.4% of data space (130 bytes) and certainly leaves room for optimization.

// designed for and tested with ATMega48
#include <avr/io.h>
#define F_CPU 8000000UL
#include <avr/delay.h>
#include <avr/interrupt.h>

character format (3x5):

variable format:
	2-byte, 16-bit int 0b0ABCDEFGHIJKLMNO
	(note that the most significant bit is not used)
#define A 	0b0111111010011111
#define B 	0b0010101010111111
#define C	0b0100011000101110
#define D	0b0011101000111111
#define E	0b0100011010111111
#define F	0b0100001010011111
#define G 	0b0100111000101110
#define H	0b0111110010011111
#define I	0b0100011111110001
#define J	0b0111110000100011
#define K	0b0110110010011111
#define L	0b0000010000111111
#define M	0b0111110110011111
#define N	0b0011111000001111
#define O	0b0011101000101110
#define P	0b0010001010011111
#define Q	0b0111011001011110
#define R	0b0010111010011111
#define S	0b0100101010101001
#define T	0b0100001111110000
#define U	0b0111110000111111
#define V	0b0111100000111110
#define W	0b0111110001111111
#define X	0b0110110010011011
#define Y	0b0110000011111000
#define Z	0b0110011010110011
#define n0	0b0111111000111111
#define n1	0b0000011111101001
#define n2	0b0111011010110111
#define n3	0b0111111010110001
#define n4	0b0111110010011100
#define n5	0b0101111010111101
#define n6	0b0101111010111111
#define n7	0b0110001011110000
#define n8	0b0111111010111111
#define n9	0b0111111010111101
#define SP	0b0000000000000000
#define BK	0b0111111111111111
#define SQ	0b0001000111000100
#define PR	0b0000110001100011
#define AR	0b0001000111011111

volatile char width=1; // width of characters, widen to slow speed

#define spd 8300 // synchronization, incr to make it slant upward

void rest(char times){while (times){times--;_delay_us(spd);}}

void on(char restfor){OCR0A=110;rest(restfor);}
void off(char restfor){OCR0A=0;rest(restfor);}

void sendChar(int tosend){
	char w;
	char bit;
	for(w=0;w<width*2;w++){ // left column
		for (bit=0;bit<5;bit++){
				if ((tosend>>bit)&1) {on(1);} 
				else {off(1);}
	for(w=0;w<width*2;w++){ // middle column
		for (bit=5;bit<10;bit++){
				if ((tosend>>bit)&1) {on(1);} 
				else {off(1);}
	for(w=0;w<width*2;w++){ // right column
		for (bit=10;bit<15;bit++){
				if ((tosend>>bit)&1) {on(1);} 
				else {off(1);}
	off(14); // letter space (1 column)

int message[]={AR,AR,AR,S,W,H,A,R,D,E,N,PR,C,O,M,SP,R,O,C,K,S,

void sendMessage(){
	char i;

int main(){ // ### PROGRAM STARTS HERE ###
	// this sets up CPWM in CTC mode, 
	// it may be slightly different for other chips
	DDRD|=255; // OC0A is now an output
	TCCR0A=0b01000010; // toggle on match, CTC mode
	TCCR0B=0B00000011; // set prescalar
		width=1; // fast mode
		width=3; // slow mode
	return 0;

About the author

Scott W Harden

Scott Harden has had a lifelong passion for computer programming and electrical engineering, and recently has become interested in its relationship with biomolecular sciences. He has run a personal website since he was 15, which has changed names from HardenTechnologies.com, to KnightHacker.com, to ScottIsHot.com, to its current SWHarden.com. Scott has been in college for 10 years, with 3 more years to go. He has an AA in Biology (Valencia College), BS in Cell Biology (Union University), MS in Molecular Biology and Microbiology (University of Central Florida), and is currently in a combined DMD (doctor of dental medicine) / PhD (neuroscience) program through the collaboration of the College of Dentistry and College of Medicine (Interdisciplinary Program in Biomedical Science, IDP) at the University of Florida in Gainesville, Florida. In his spare time Scott builds small electrical devices (with an emphasis on radio frequency) and enjoys writing cross-platform open-source software.

Permanent link to this article: http://www.SWHarden.com/blog/2011-08-05-i-before-e-except-after-hellschreiber/


  1. VE2/F4GKA, Guenael

    Very cool and interesting project !
    Great job.
    73, VE2/F4GKA

  2. Luke

    I just finished a near space balloon launch that you can check out on my webpage. I’ve been tinkering around with AM radio circuits to possibly include in my next launch. Have you done any range testing with your setup? What antenna did you use on the transmitter?

  3. Jack Welch

    Extremely cool.

    I was wondering if you could set this up to key a transmitter rapidly to produce the black/white rather than driving an audio tone, so CW out rather than AM. You could hook this to something like rock mite, run the receive audio to a computer with HRD, and have a very tiny portable station (well, plus antenna). I guess the issue would be how raidly it would switch and if rapid keying would itself create any issues — Jack, AI4SV

  4. Scott

    @Luke, I’ll be doing some long range tests (using helium-filled garbage bags as makeshift balloons, perhaps) shortly and post details on my site. Follow me on G+ for emerging projects like that which I often don’t post on my site (I only post projects when they’re complete). Also, antenna is just a 3” piece of wire – this design had no amplification and was extremely lower power (a few microwatts probably).

  5. James Coxon

    Hey Scott,
    We’ve been flying hellschreiber backup beacons on balloons in the UK recently – using simple 10mW UHF transmitters such as the radiometrix NTX2 and an arduino controlling it all. Works great once in the air where line of site is good. http://www.pegasushabproject.org.uk/wiki/doku.php/missions:ballasthalo:ballasthalo5

    Big community of balloon enthusiasts on irc (#highaltitude on irc.freenode.net) – come join in…

    James M6JCX

  6. Scott

    @James Coxon – No way!! I had no idea Hellschreiber was used with high altitude balloons! Again I did something I thought was novel, and it turns out it’s done before… which I guess proves it was a good idea in the first place ^_^

  7. Petr

    do you think you could construct receiver with use of microcontoler too or you definitely need computer?

  8. scott

    @Petr – what a great idea! I’ll bet that with a LCD screen I certainly could make a receiver. It wouldn’t be anywhere near as good as the PC, but it would probably work! Then again, a microcontroller with a character LCD would be better at decoding Morse code or some other tone based (not image based) data mode.

  9. N1BMX / Jeff

    Saw this on Hack a Day and got to say nice job! Should make a pocket decoder that can do Hell, RTTY, PSK-31, PSK-63 and CW (Similar to the MFJ’s pocket CW decoder)

    1. Scott Harden

      That is an excellent idea! Difficult to implement, but a fun challenge anyhow…

  10. Stan. SWAN

    Although not balloon related,I’ve explored assorted PICAXE driven wireless “Hell” techniques, with Sequential MultiTone (SM/T) Hellschreiber proving most satisfactory. Image decoding was via the intuitive “Spectran” -see => http://www.picaxe.orcon.net.nz/smthell.htm for links, code & a YouTube. PICAXE-08M SM/T Hell suits beacon work as is (I trialled with 433 MHz), but with the horsepower of the new PICAXE-08M2 it’s tempting to revamp the code for ASCII data – temperatures etc. Stan. ZL2APS

  11. ed kemp LZ2ILR

    hi scott, just a thought, have you considered using a HIGH pass filter to get a ham band harmonic directly from the microcontroller? you might need to use a different chip that you can tune the clock speed on. i might suggest using a small tuned transmitting loop instead of filtering if you make one with a very high q factor.
    i would be very interested to see a tiny feldhell reader with basic lcd. you might even throw in a few routines to decode the old radiofax standard and 8 second robot sstv. its too long since i did coding but i bet you could make a ultra low power single chip trx with input from those optical mouse sensors. they feature a basic low res b/w camera and many let you access the raw data stream in debug mode. i wanted to use one for model rocket guidance but it got shelved after the governments all got paranoid about terrorists, hihi. a few guys on the net have been messing with these sensors and you can get sensors 8×8 up to 32×32 pixels. way enough for hell.

  12. Andrew Spence

    The other day I was looking at Bell’s photophone, then a WW2 German communication device built on the same principle (the so-called Lichtsprechgerät – or “Light-Speech-Apparatus”). There are several groups playing around with light (either non-coherent LED light and/or coherent laser light) to transmit messages. Using LED panels and fresnel lenses, they have achieved voice transmissions over distances in the 100 kilometer range. It strikes me Hellschreiber would be a great text transmission system for these experiments and would open up possibilities for people who do not have radio licenses but want to try Hellschreiber.

  13. OH7FXK

    Hello! You software runs on ATtiny85 with very small changes!
    Only what you need to do is change:
    DDRD|=255; // OC0A is now an output
    DDRB|=255; // OC0A is now an output
    And you get data out from pin 5!

    You can feed that directly to you SSB transmitter mic input or use that little schematic wich is on this site and use normal small CW transmitter as Hellschreiber beacon.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>