A small microcontroller is programmed to output a series of tones which, when fed to a PC soundcard and processed by a spectrum analyser program, displays an image of the current time.
Step 1: Spectrum Lab Software
All the hard work of analysing and displaying the tones is performed by a piece of free software, the "Spectrum Lab" written by an Amateur Radio enthusiast, DL4YHF. It analyses the sound fed in via the sound card and displays the result as a picture.
The type of display used here is called the "waterfall" display, and it is set to scroll from right to left. It traditionally scrolls from top to bottom, and hence the term, waterfall.
This program is used by amateurs to communicate halfway around the earth with fractions of a watt, among other things. It is a very capable program, and has a multitude of settings which have to be adjusted just right to result in a good display.
The term "Hellschreiber" originated in the field of telegraphy, a long time ago, and literally means writing with light.
The display shown on the introduction is a plot of intensity of frequency against time.
The microcontroller is programmed to generate a series of tones, such that an image of the information is painted by this program.
This mode is defined as "sequential multi tone Hellschreiber" and is used for communicating over long distances using relatively simple transmitting equipment.
Step 2: Time As a Sequence of Frequencies
This screenshot shows the capture from the clock sending a sequential seconds information. Actually this is bogus, since each set of digits takes several seconds to be generated and so the displays cover a larger interval of time than the three seconds suggested.
The pattern of dots seen above the line of digits is due to the harmonics of the tones: the microcontroller generates tones by switching a port line to the supply or ground, and the resulting rectangular wave has many harmonics. Since this is directly fed to the sound card, the display will show all these harmonics along with the desired fundamental frequency.
Since arranging for a pure sine wave is difficult, the difference between the maximum and minimum frequencies used for display has thus to be arranged to be less than an octave. In other words, the maximum frequency has to be less than twice that of the minimum frequency.
Step 3: Display Every Tenth Second
The display shown in the figure is more realistic of the sort of performance obtainable from the clock: Update every ten seconds.
The digits have been programmed to be spaced apart to be nicer, visually.
All the programs which produced these displays have been included in a zip file in the last step of this instructable. The circuit diagram is included in ASCII form in the asm files.
The microcontroller was a Microchip 12F510, an eight lead microcontroller which was clocked at 32.768 KHz using a small crystal from a defunct watch. Just one output line was used, leaving two I/O lines and one input line free for other uses.
Step 4: Waveforms
The two figures show the sort of waveforms that go into the sound card to make these displays possible.
The first one shows all seven frequencies output in sequence, and the first frequency again. It is the digit "1", the run of seven frequencies causing the vertical line, and the final one the right side of the base.
The second is showing how the gaps cause the blank spaces in the display. If a particular space in the dot matrix forming a character is empty, the corresponding frequency is not sent during its time slot, thus forming a character with light spots and empty space.
Step 5: Displaying Arbitrary Bitmaps
Displaying the time, or other such alphanumeric data, is fine, but sometimes we might wish to have a pretty display of some random stuff.
It can be done, as shall be discussed and demonstrated. I shall write programs which display the line of text "Instructables" as a bitmap, and the instructables robot, as a graphic 24 pixels high.
First, the required images have to be digitised. The initial step is to draw them out on graph paper.
"Instructables" was written using a font five pixels high. Since this is being transmitted as a bitmap, I have run letters together wherever possible without ruining legibility.
The image of the instructables robot was shrunk down to 24 pixels vertically and then I marked its outline with dots, and added a few dots on the interior, too. I think people will recognize the robot, particularly if you tell them forehand that that is what it is supposed to be.
Step 6: Digitising "Instructables"
The picture shows how the bitmap of the line of text is digitised.
Taking the leftmost column, for instance, all its pixels are black. So they are all one: 11111
We group together by fours, making two nibbles: 1 1111
These two are then expressed as hexadecimal, for a compact representation: 1 F
Since the characters are five bits high, the first digit is going to be either 0 or 1, and the second digit shall be 0-1, A-F.
The bottom is taken to be the more significant end.
The second column is blank, so all zero: 00 hex.
The third column has the first three ones
followed by two zeroes: 1 1100 -> 1 C
And so on it goes, right up to the very end.
This is all crammed into an include file, called "instructlables.inc". Thus by changing the line specifying the include file in the main program, you can change the bitmap being displayed. In case you make another bimap showing your name, for example, you can put it into a file "yourname.inc" and call it in the main program.
Step 7: The Resulting Display
It works, as you can see by the resulting image on screen.
The Spectrum Lab software allows you to select the colours and shades of the display, so by judicious selection you can display very beautiful text using this program.
Step 8: Sequence of Frequencies
Let us take a closer look at how that image was formed.
The first picture below shows the sequence of frequencies emitted by the micro, with a short time resolution.
It clearly shows the stairstep nature of the tones, as the tones making up the dots are emitted in serial sequence. You can also see why the characters formed all slope to the right.
The second shows the same display, with a different filter setting. The time resolution of this filter is reduced, so that the dots seem to occupy more time. The resulting horizontal smear has the result of making the text easier to read.
A signal has to have a corresponding setting of the program before it gets displayed as a recognisable image.
Step 9: Digitising the Robot
The robot is 24 bits tall, and so does not fit inside one eight bit word. A different technique was used to digitise the robot, this time borrowing from the program used for the "musical greetings card" instructable.
Since the picture is formed by a sequence of tones, a musical program should be able to display the robot, provided the robot is fed to it as a sequence of frequencies to be converted to music.
The figure shows the robot, rows labelled with delay values to be plugged into a music program.
These values were slightly modified and are available as the listing robot.asm and it resulted in an almost recognisable robot display.
Step 10: The Robot on Computer Screen
Its a bird ... Its a plane ... Its a martian flying saucer ...
Its the instructables robot.
Step 11: The Hardware
The figures show the photo and the circuit diagram of the microcontroller producing these images.
It is an eight pin microcontroller, the 12F510, manufactured by microchip. The screened cable at left connects to the computer sound card. The connector on the right connects to the programmer, and also supplies power.
Without unplugging anything or changing any connections, the microcontroller can be erased and reprogrammed via ICSP just by running the appropriate programs on the computer.
Step 12: The Principle
The figure shows the principle behind displaying the matrix of dots making up the characters.
The sequence of rising tones make up a staircase waverform, which, repeated at definite intervals, form a sawtooth across the band of frequencies forming the character.
I had an earlier instructable, https://www.instructables.com/id/Oscilloscope-clock/ , on displaying the time on an oscilloscope. The principle is similiar, except that the earlier one used voltage levels and this one uses frequency.
The difference is that voltage levels are very difficult to display using the sound card, and almost every program which displays voltage levels does not display it in the mode which makes characters visible.
Each character is displayed as a sequence of columns seven pixels high. If the bottom most pixel has to be lit, the frequency corresponding to it is switched on for a brief duration of time. In case of the "oscilloscope clock", a particular voltage level is held for that time. If that pixel is to be dark, the tone is not made at all, or, a blanking level is sent instead.
Since these frequencies (or voltage levels) are sent sequentially, one after the other, they do not form a vertical line. They form a line that leans to the right.
It is possible to sent those bits in the reverse direction, and then the resulting characters will lean to the left. This looks unnatural, and so the present arrangement is preferred.
Another type of hellschreiber, which sends all tones at the same time, is capable of producing perfectly vertical characters. Since this requires producing all tones at the same time, without distortion, it is not possible to implement it in a simple way using a single microcontroller.
Step 13: The Software, and a Sound File
The programs which were responsible for producing the screenshots in this instructable are all in the zip file here.
A sound file is also included - this will display "instructables" on screen when analysed using Spectrum Lab - but be warned that it takes a lot of tweaking to get the settings right.
The first screenshot shows the section of program which puts out the pixel column in the 'oscilloscope clock'. This section has been expanded into a sequence of seven loops, each producing a frequency each, in the 'hellschreiber clock'. This is illustrated in the second screenshot.
The number of cycles of each frequency has been adjusted so that they take up approximately the same amount of time.
This means that, for the lowest frequency, the number of cycles will be only half that of the highest frequency.
When you need to get your computer display something from inside your microcontroller, try giving hellschreiber a try - it just needs one line on the microcontroller, plus some program memory space. The resulting signal is audio, so that it can be transmitted across a voice link, and the signal is very tolerant of noise too.
Finally, as the HAMs say, "Lets see you in Hell!".