Teletype ED1000 signal generation with PC sound card (2018)
Teletype ED1000 signal generation with PC sound card

								
This post describes the generation of a teletype signal with nothing but a PC and a Python script



—







Over the Christmas holidays I restored a SEL Lo2000 teletype from 1978. The device was sitting in the attic for around 25 years and was in a pretty bad shape. The mechanics of the printer was worn out, leading to colliding and bent types, the electronics were non-functional (broken inductor in clock signal path) and the punch for the punched paper tape was not working (dried out lubricants, misaligned mechanical parts, …).







After putting everything back together I wanted to use the device. But… the network for it has been switched off in the year 2007. Luckily, there is an alternative to it called “i-telex”. The project provides hardware for interfacing the teletypes and software for creating a virtual teletype network over the internet. Very nice.



However, by the time the hardware would have arrived my Christmas holidays will be long over. So I had to find a quicker and simpler way. And this is what this post is about.



Transmission line standards



The early teletypes used a current loop to signal the data. In this TW39 standard, the line provided 40mA for a ‘1’ and 0mA for a ‘0’. The teletype could use this current to actuate an electromagnet for reception or interrupt the current in a certain pattern for transmission. So this standard was quite a good fit for the early mechanical teletypes. However, the standard was sub-optimal for the communication network. For one, it required two lines (current in & current out). In addition to that, the communication also requires DC-coupling. These two facts mean that you are always tied to a special teletype network that is completely separate from the telephone network. You cannot use this signaling over telephone lines.



To overcome the problems of the TW39 standard, Siemens introduced the ED1000 standard (which is quite similar to V.21). In this standard, a ‘1’ is represented by a 700Hz sine wave and a ‘0’ by a 500Hz sine wave (from network->teletype). This signaling removes all the disadvantages of the TW39 standard and also allows to use full-duplex (since the teletype->network signaling uses different frequencies).



ED1000 generation using Python + sound card 



So… ED1000 uses 500 and 700Hz tones? Well, that’s what sound cards are made for 🙂



I developed a Python script that generates these tones and modulates them based on the input. It supports all characters defined in the CCITT2 alphabet  with automatic switch between figures and letters. You can either pipe text files into the program or just start it standalone and directly type into it. To get it:



git clone https://befi@bitbucket.org/befi/ed1000.git



Then you can simply start it, type something and listen to the modulated output:



python3 ed1000.py



Piping a text file into the program works as well:



cat mytext.txt | python3 ed1000.py



The connection to the teletype can be made via a simple adapter cable from 3.5mm to the connector of the teletype (in my case Ado8 pins 1 and 4. Pins 5 and 6 need to be bridged as well). Remember to turn the volume all the way up to have the maximum signal swing at the output.



The refurbished teletype as well as the ED1000 script can be seen in the following video:









Outlook



So far the script can only transmit data. It would be also nice being able to receive data from the teletype over the microphone input of a sound card. With that functionality the final goal would be to connect with the script to the i-telex network to realize a fully working teletype.

			
														