Skip to the content
PCBKitNew board
2 layers83.5 × 97.5 mmTeleprinterHat, the printed circuit board in 3D

A RaspberryPi HAT that interfaces a old school teleprinter

Size
83.5 × 97.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
145
Nets
169
Pads
540
Tracks, vias
1,393, 166
Pours
3
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
1 Apr 2019
Updated
24 Apr 2022

Overview

TeleprinterHat is an open-source printed circuit board by MattisLind, from the MattisLind/teleprinterHat repository on GitHub. It is a 2-layer board of 83.5 × 97.5 mm with 145 parts on 169 nets, routed with 1,393 tracks and 166 vias.

It is built around the MAX3232ID, FT232RL and MC34063, with the MCP6004-E/P, 74LVC1G04Z and SFH690BT among its other parts. Its parts include 48 resistors, 25 capacitors, 13 ICs, 12 diodes and 11 connectors. It belongs with the STM32 boards of this library.

Main components

12

README

README.md

teleprinterHat

A RaspberryPi HAT that interfaces a old school teleprinter

Finished board

Schematic

History

Some time ago I started planning to get an old Lorenz Lo15 teleprinter working. Then arose the question about how to interface those old machines to the real world. While investigating this I gained quite some knowledge of teleprinter interfacing and Telex networks. For example the normal line voltage of a US teleprinter line is 120VDC and the current is 60 mA.

Preferbly the interfacing should be as simple and small as possible. Using some big expensive 50 Hz 120 VAC transformer, rectifier and 2kOhm 6W resistor was not on the table.

Preferbly the circuit should be able to run off a standard USB charger. I.e. 5V 500mA. Experimenting a bit with a stepup circuit gave that is perfectly possibly to step up 5V to 120V. SO one could ask how could a 5V 500 mA supply be able to supply the power for a 120V 60mA load. Of course it cannot, but the problem lies in the fact tat most of the power is absorbed in the current limiting 2kOhm resistor of the old school circuit. The actual teleprinter has an internal resistance of approximately 100 Ohm. So why 120V? The reason for 120V is to achieve a fast pull of the magnet inside the teleprinter. After the initial pull the steady state voltage drop is between 5 to 10 V at 60mA.

When I started to work with this project I also made an announcment in the i-Telex forum and got a reply from Jochen that had done something similar and the same point in time. What a coincidence! piTelex project

Jochen have compiled a lot of interesting and useful information there but the project is based on a Raspberry Pi and cannt be used stand alone. One of my requirements are that it should be able to run completely stand alone. I don't want the bloat of a Linux kernel just to push a few bytes back and forth!

Requirments

So I put together a list of requirments

  1. Shall only need 5V supply. The generation of up 120V DC is built into the device. Using a step-up converter.
  2. Low power consumption. No 6W 2kOhm resistor. Use PWM to control the current through the solenoid.
  3. Configurable for 60mA, 40mA and 20mA current loop.
  4. Automatically detect the line voltage to use based on line current and required rise time of current through coil. Measure what kinde of loop inductance there is and adapt to a possibly resistive remote. Deemed not possible with current design.
  5. Interface directly to RS-232-E levels on board. (option) using a MAX232 or equivalent and a couple of capacitors
  6. Interface directly to USB using FTDI chip on board (option)
  7. Do baudot to ASCII conversion locally.
  8. Do baudrate adaption locally. Configurable teleprinter baudrate to support at least 45,5, 50, 56, 75, 100 and 110 bps.
  9. Configurable uplink RS-232 interface 50, 75, 110, 150, 300 bps to adapt to all sorts of hosts.
  10. Dimensions that fits the Rpi Zero preferbly but if it is getting to crammed a standar Rpi HAT is the choice.
  11. The RPI should be able to control all settings of the device from GPIO ports. Possibly use SPI to make more advanced configuration possible.
  12. LEDs connected to RPi GPIOs to indicate mode or state in RPi Software.
  13. Jumpers connected to the RPI GPIOs to control the RPI software and selection om mode of operation.
  14. The RPi shall automatically boot up and select operating mode depending on jumpers. For example i-Telex or news RSS, RasPi serial console. No interaction using screen or keyboard connected to the RPi shall be necessary.
  15. Relay to support reversal of polarity of the line current (optional)
  16. Be able to drive a SSR that can be used to enable power to the teleprinter
  17. Diagnostic LED to indicate line malfunction. I.e. to detect an open loop
  18. Current loop interface to support old PDP-11 current loops using opto couplers.
  19. Use two 2.5 mm mono plugs for interfacing the teleprinter.
  20. Diagnostic LED to indicate what line voltage is selected. Maybe multicolor RGB LED?
  21. RX and TX LEDs
  22. Support for FSG device (optional)
  23. A few test sequences are built in. Continous RY and "The quick brown fox jumps over the lazy dog"
  24. Flow control using XON/XOFF, RTS/CTS or DSR/DTR. Selcteable using jumpers. Both via USB/FTDI or RS-232

Stepup converter

The first thing to verify is that the idea of the step up converter was ok. I did a small circuit board to check the circuit and during this I found that the parameters of the coil si very importantant. It has to have a high enough Isat. Then the choice of MOSFET is important. The MOSFET has to full turn on at only 5V gate voltage which is what is available in this circuit. Thus Vgs(ON) is of high interest. Then to deliver as much of the 5V into the coil means that as little loss of energy in the MOSFET is important. The rDS(ON) is the parameter to look for.

Step up hook up

It turned out that this circuit worked well and could easily deliver 120VDC.

Using PWM to control the selector magnet.

The main idea with this circuit is to generate the required 60mA with as litle loss as possible. By measuring the current in the loop using a small resistance and then hysteresis regulate the current using a PNP transistor as switch. The current is feed through a small inductor which will not saturate.

As the switch transistor is swithced on the current in the inductor will increase with time. When it reach the upper hysteresis limit the transistor will switch off. The current in the inductance will continue to flow through the diode and the resistor. As the current reaches the lower limit the transistor will switch on again.

The receiver magnet inductance will only come into play when going from sending a space bit to a mark bit. Then the large total inductance will keep the regulator switched on for several milliseconds depending on the inductance in the magenet. As soon as the line current level is reached the magnetcoil is fully saturated and will act as a pure resistance. The implementation is based on a op-amp for measuring the differential volatage of the current measuring resistor. Then a fast comparator with a 5% hysterisis band generates a square wave from the incoming sawtooth signal. This squarewave then drives the switch transistors.

The transistor switch is composed of a PNP transistor as the main switch transistor and a NPN level cvonversion transistor driving the PNP transistor through a resistance.

The reference voltage to the hysteresis comparator is supplied from a PWM signal output of the mikroprocessor. Thereby making it possible to control the current level through software. The PWM signal is low pass filtered in a simple RC network and then buffered through a buffering op-amp.

I did a quick mockup with components at hand but it turned out that the comparator needed to be pretty fast and the transistor switch as well. It simply didn't work very well. I decided to try to do simulations in LTspice before doing further breadboarding.

Searches on internet gave a decent circuit for a P-MOS FET based switch. Simulations in LTspice gave proper values for resistors and capacitors and it was time to make a peroper board.

Current source prototype

Schematic.

Current source prototype schematic

The design also included an PNP and NPN transistor to handle keying of the sening signal.

A simple NPN transistor is used to key the current in the loop ON/OFF. This has to be done without any free-wheeling diode since otherwise the release of the magnet when swithcing of the current will be very much delayed and might not even happen at all.

Initial tests showed good performance. It could regulate the desired current at varying line voltages without any problem.

Current source regulating

This picture show the voltage over the measurement resistor. The scale is 100mV per division and the resistor is 51 ohm so the interval it is regulating over is +/- 2mA as designed.

Running the circuit with the actual Lorenz Lo15 teleprinter also yielded good results.

Current source regulating

Keying the signal, 90V line voltage, 40 mA line current. The large spikes are created by the selector magnet as the switch cuts off. Had initial problems that the choosen PNP transistor was unable to cope with these. Intalled a 300 V PNP transistor and a MOV to handle the spikes. Worked well. But I am considering using a TVS instead.

Current source regulating

This picture shows when regulating the 40mA output to the selector magnet when the line is in marking state.

Prototyping the Step up converter and current source

I already did a prototype of the step-up converter. But the MOSFET used was quite big and overdimensioned. I also wanted to use a proper gate driver as well as off load the micro controller doing the chore of keeping the PWM rate continuosly measuring the output voltage. A separate, very small, switch control IC, cheap as well, was a better choice. So I designed another prototype board to test out these concept as well as testing the current loop circuit.

Current source regulating

Parts

145
QtyValueFootprintReferences
11100nCapacitor_SMD:C_0805_2012MetricC1, C6, C7, C8, C9, C13, C15, C17, C23, C24, C25
81kResistor_SMD:R_0805_2012MetricR2, R4, R14, R21, R22, R27, R38, R45
8470Resistor_SMD:R_0805_2012MetricR19, R20, R31, R40, R41, R42, R43, R44
8MountingHoleMountingHole:MountingHole_2.7mm_M2.5H1, H2, H3, H4, H5, H6, H7, H8
74.7kResistor_SMD:R_0805_2012MetricR3, R10, R16, R17, R18, R25, R29
4Conn_01x01_MaleConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ8, J9, J10, J11
31.8kResistor_SMD:R_0805_2012MetricR12, R13, R37
310kResistor_SMD:R_0805_2012MetricR26, R46, R48
3120kResistor_SMD:R_0805_2012MetricR5, R6, R8
31nCapacitor_SMD:C_0805_2012MetricC14, C16, C21
330kResistor_SMD:R_0805_2012MetricR15, R30, R39
34.7uCapacitor_SMD:C_0805_2012MetricC2, C18, C19
3BAS21Package_TO_SOT_SMD:SOT-23D3, D4, D12
3FMMT625Package_TO_SOT_SMD:SOT-23Q3, Q4, Q10
210Resistor_SMD:R_0805_2012MetricR7, R11
218pCapacitor_SMD:C_0805_2012MetricC10, C11
274LVC1G04Package_TO_SOT_SMD:SOT-23-5_HandSolderingU2, U13
2CLConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP13, JP17
2D_SmallDiode_SMD:D_SOD-123D9, D10
2LED_RGBLED_SMD:LED_Avago_PLCC6_3x2.8mmLED1, LED2
2MMBT5551LPackage_TO_SOT_SMD:SOT-23Q5, Q6
2RJ12Connector_RJ:RJ12_Amphenol_54601J1, J2
2SFH690BTPackage_SO:SO-4_4.4x3.6mm_P2.54mmU7, U8
11.2kResistor_SMD:R_0805_2012MetricR35
11.8 nFCapacitor_SMD:C_0805_2012MetricC3
11000uCapacitor_SMD:CP_Elec_10x7.7C4
1100mFuse:Fuse_0603_1608Metric_Pad1.05x0.95mm_HandSolderF1
1100uGeneral:Wurth TIF Radial 1018L1
110uCapacitor_SMD:C_0805_2012MetricC12
110uCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC5
110uHInductor_THT:L_Radial_D7.0mm_P3.00mmL2
1150Resistor_SMD:R_0805_2012MetricR23
11MResistor_SMD:R_0805_2012MetricR47
11nCapacitor_THT:C_Rect_L7.0mm_W2.0mm_P5.00mmC20
11uCapacitor_SMD:C_0805_2012MetricC22
12.4kResistor_SMD:R_0805_2012MetricR36
124LC32AT-IOTPackage_TO_SOT_SMD:SOT-23-5_HandSolderingU6
13.3VDiode_SMD:D_SOD-123D1
13.3kResistor_SMD:R_0805_2012MetricR33
133Resistor_SMD:R_0805_2012MetricR28
1330Resistor_SMD:R_0805_2012MetricR1
133kResistor_SMD:R_0805_2012MetricR32
133mInductor_THT:L_Radial_D12.0mm_P6.00mm_MuRATA_1900RL4
13kResistor_SMD:R_0805_2012MetricR9
151Resistor_SMD:R_0805_2012MetricR34
1680Resistor_SMD:R_0805_2012MetricR24
18MHzCrystal:Crystal_SMD_HC49-SDY1
1BOOTConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP19
1CONF0Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP4
1CONF1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP5
1CONF2Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP6
1DC_JACKConnector_BarrelJack:BarrelJack_Wuerth_6941xx301002J3
1EA2-5NUPackage_DIP:DIP-10_W7.62mmK1
1ES2DDiode_SMD:D_SMB_HandsolderingD2
1FMMT597Package_TO_SOT_SMD:SOT-23Q9
1FT232RLPackage_SO:SSOP-28_5.3x10.2mm_P0.65mmU3
1IR44273Package_TO_SOT_SMD:SOT-23-5_HandSolderingU9
1JTAGConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ6
1MAX3232Package_SO:SOIC-16_3.9x9.9mm_P1.27mmU4
1MC34063Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU5
1MCP6004Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU11
1MMBT3904Package_TO_SOT_SMD:SOT-23Q2
1MMBTA42LPackage_TO_SOT_SMD:SOT-23Q7
1NCP1117-3.3_TO252Package_TO_SOT_SMD:TO-252-2U1
1RESETConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP18
1RS232Connector_Dsub:DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmJ5
1RS232Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP11
1RXLED_SMD:LED_0805_2012Metric_CastellatedD7
1RasPi GPIOConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_VerticalJ7
1SQ2325ESPackage_TO_SOT_SMD:SOT-23Q8
1STD25NF20Package_TO_SOT_SMD:TO-252-3_TabPin2Q1
1STM32F103C8TxPackage_QFP:LQFP-48_7x7mm_P0.5mmU14
1SWITCH-DIP10Package_DIP:DIP-20_W7.62mmSW1
1TLV3502Package_TO_SOT_SMD:SOT-23-8_HandsolderingU10
1TVSDiode_SMD:D_SMB_HandsolderingD5
1TXLED_SMD:LED_0805_2012Metric_CastellatedD8
1USBConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP12
1USBPOWEREDConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP1
1USB_B_MicroConnector_USB:USB_Micro-B_Amphenol_10103594-0001LF_HorizontalJ4
1WPConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP14

Questions

How big is the TeleprinterHat PCB?

It measures 83.5 × 97.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the TeleprinterHat use?

145 parts, built around the MAX3232ID, FT232RL, MC34063 and MCP6004-E/P. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the TeleprinterHat KiCad files?

From the MattisLind/teleprinterHat repository on GitHub, at the commit this page was made from: the board is hardware/TeleprinterHat/TeleprinterHat.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the TeleprinterHat design in my own project?

Its repository states no licence, so its author keeps all rights: ask MattisLind before reusing the design.

Similar boards

  • 4 layers80 × 150 mmCAN Power Control, the printed circuit board in 3D

    CAN Power Control

    risingtideresearch/CAN-Power-Control

    CAN device for switching high-current DC loads and reading sensors and switch closures

    131 parts
  • 2 layers94 × 125 mmQMX Plus amp, the printed circuit board in 3D

    QMX Plus amp

    timborn/QMX-Plus-amp

    an amplifier that fits inside QMX+ radio

    101 parts2
  • 4 layers65 × 55 mmChannelSelector, the printed circuit board in 3D

    ChannelSelector

    duanestorey/hifi-amplifier

    A Custom 5.1 LM3886 Based Custom Amplifier

    79 parts3
  • 2 layers155 × 70 mmPayphone v1, the printed circuit board in 3D

    Payphone v1

    sdylewski/Analog-Redial

    A circuit board for old telephones to come back to life. Plug one or two phones in, and you can call the other phone, use bluetooth, connect to others via voip, and do a variety of other things with a plain old rotary…

    137 parts46
  • 2 layers100 × 76 mmEmc flyback, the printed circuit board in 3D

    Emc flyback

    ChengminLi/AI-PCB-layout

    AI agent skill for designing and reviewing power-electronics PCBs, with a human review gate after every step

    90 parts31CC-BY-4.0
  • 4 layers70.7 × 53.3 mmQuince, the printed circuit board in 3D

    Quince

    greatfet-hardware/quince

    a 2.4 GHz SDR neighbor using 1 bit ADC

    115 parts30BSD-3-Clause
  • 2 layers66 × 41.9 mmVideo timing board, the printed circuit board in 3D

    Video timing board

    Batperson/video_timing_board

    Development board to extract timing and subcarrier signals from a PAL or NTSC video source.

    45 parts6MIT