Goal of this project is to modify a T100 fernschreiber by Siemens to work with modern day ASCII standard. An ottantotto based circuit has been designed to convert signals and to buffer the communicated data. The T100 works at 50 baud, the serial port at 9600.
Apparently the Telex was already prepared in earlier times to get the line current from an internal source. I had to make a little circuit using a couple of resistors and an optocoupler to get the data out (50 baud). I used a modified version of the SoftSerial library that comes with Arduino. Apparently it uses the delayMicrosecond() function which does not perform well in delays over a couple of milliseconds. (So the softSerial lib is not so good for datarates < 1200 bd I guess) For transmitting data two relais have been used, one to switch the internal current trough the data relais (necessary to disconnect the receiver side, otherwise you'd always echo all data) and the other to transmit the data. Especially getting the timing for the transmit pulses right was quite some work. The switch on period needed to be slightly shorter than the switch off. (shorter 1's than 0's). Also the startbit needed to be longer than the expected 20 msec.
Two relais have been used and one Optocoupler. The enable relais is coupled directly to output 4. The transmit pin to output 3 using a transistor. The optocoupler is connected to input pin 2.
The arduino code consists of two parts: a sketch and a library. The library can be found here and needs to be extracted in the arduino\hardware\libraries directory. The following sketch can be found in the examples directory:
/* TelexPrinter by E13 Based on soft-serial example Implements telex-BAUDOT code conversion to ascii Telex is connected to softserial lines 2 and 3. The used circuit needs an additional send-enable relais on line4 The telexSerial library is a modified softSerial lib with delay times specifically tuned for a Siemens T100 at 50 baud */ // include the TelexSerial library so you can use its functions: #include <TelexSerial.h> #define rxPin 2 #define txPin 3 #define sendEnable 4 #define ledPin 8 char Alpha[32] = {0x00,'e',0x0A,'a',' ','s','i','u',0x0D,'d','r','j','n','f','c','k','t','z','l','w','h','y','p','q','o','b','g',0x0F,'m','x','v',0x0E}; char Num[32] = {0x00,'3',0x0A,'-',' ',0x27,'8','7',0x0D,'$','4',0x07,0x2c,'!',':','(','5','+',')','2','#','6','0','1','9','?','&',0x0F,'.','/','=',0x0E}; // set up a new serial port TelexSerial myTelex = TelexSerial(rxPin, txPin); byte pinState = 0; int shift = 0; void setup() { // define pin modes for tx, rx, led pins: pinMode(rxPin, INPUT); pinMode(txPin, OUTPUT); pinMode(ledPin, OUTPUT); pinMode(sendEnable,OUTPUT); digitalWrite(sendEnable,HIGH); // set the data rate for the SoftwareSerial port myTelex.begin(50); Serial.begin(9600); Serial.println("Telex Retrointerface 0.2"); } void loop() { uint8_t data; // listen for new serial coming in: while (Serial.available()>0){ char readchar=Serial.read(); digitalWrite(sendEnable,LOW); delay(1); for(int n = 0; n<32; n++) { if(Alpha[n]==readchar) { data = 0b00011111; if (shift==1) { myTelex.print(data); shift = 0; } data = n; myTelex.print(data);} else if (Num[n]==readchar) { data = 0b00011011; if (shift==0) { myTelex.print(data); shift = 1;} data = n; myTelex.print(data); } } if (shift==1) { data=0b00011111; myTelex.print(data); shift = 0; } digitalWrite(sendEnable,HIGH); delay(1); } char someChar = myTelex.read(); if (someChar !=-1){ if (Alpha[someChar] == 0x0F) shift = 1; if (Alpha[someChar] == 0x0E) shift = 0; if (shift==0) Serial.print(Alpha[someChar]); else if (shift==1) Serial.print(Num[someChar]); } toggle(8); } void toggle(int pinNum) { // set the LED pin using the pinState variable: digitalWrite(pinNum, pinState); // if pinState = 0, set it to 1, and vice versa: pinState = !pinState; }
I made use of various great sources on the web for retrieving data on these machine. Johan rtty.nl has been of great help by scanning some old books on telex for RTTY. Also the sites teleprinter.net and rtty.com have an abundant amount of information.
Software for radio stream encoding and decoding to audio : mmtty