Simulating a Phone Line

Line Simulator built in an old ADSL filter box

This is the second post in a multi-part series about viewdata. A few members of the hackspace are working on a project to connect a ZX Spectrum with Prism VTX 5000 modem to an emulation of a viewdata system, providing a live demonstration experience.

Viewdata connections, much like dial-up internet access which followed later, relied on audio frequency telephone communication to transfer data between the user’s terminal and the information provider they were logged into. I’ll cover details of the signal modulation in a separate article; in this article I’ll describe how I connected a real Prism VTX5000 modem to a laptop’s sound card.

A UK telephone line, like that in most countries, is a relatively simple circuit. The line is supplied from a bank of batteries with approximately 50V DC, with earth on the positive side (to prevent line corrosion by offering cathodic protection). This would have originally been supplied via a pair of relay coils, which have three main effects:

  • The coils have a DC resistance, which in practice limits the off-hook condition of the line to about 8V at 20mA
  • The coils present a large inductance, which prevents AC (i.e. the audio signal) from being lost into the supply
  • The relay contacts are used to detect when the line is off-hook

For the purposes of our simulation, we only need the line simulator circuit to behave like a line in the off-hook state. This means it can run from a low-voltage supply of 9-12V. We’re also not interested in providing a ring signal (typically around 90V AC), as it’s also not required for this project.

On a telephone line, the AC audio signal sees a resistance of around 600 ohms. Audio signals are coupled to the phone line via capacitors, which pass the audio signal but block the DC supply.

The line simulator therefore has the following requirements:

  • To provide approximately 20mA at around 8V DC with a telephone connected off-hook
  • To provide several kilohms of dynamic resistance at DC
  • To provide around 600ohms of resistance to AC
  • A means to inject an audio signal from a laptop onto the line
  • A means to take off an audio signal to feed a laptop’s line input
  • Protection to prevent overloading of the sound card

Starting with the DC requirements, a fairly simple transistor circuit can be made to act roughly like a current source, up to near the circuit’s supply voltage. Adding a bypass resistor permits the introduction of a controlled dynamic resistance at DC, and this also affects the off-hook voltage level.

To provide the required AC resistance and injection capability, the circuit can be coupled via a capacitor and series resistor to the laptop’s headphone jack. A second resistor to ground helps to block the DC supply. A headphone output has a very low resistance of a few ohms at most. A 680 ohm resistor increases this to a more suitable level. While this is slightly on the high side, it leaves some room for other parallel resistances of a few kilohms, which the circuit will introduce.

The protection and take-off requirements can be met simply by placing two signal diodes in inverse-parallel; this limits the line signal to 0.7V peak, and also limits the extent of transients when the line switches between on- and off-hook conditions.

Line Simulator Circuit Schematic

Line Simulator Circuit Schematic

The complete line simulator circuit is shown above. The LED and series resistor are used to provide suitable biasing to the transistor. An unintended side-effect is that when the phone is on-hook, the LED supply is bypassed by the transistor, so the LED also acts as an off-hook indicator.

This circuit can easily be built on a small piece of stripboard. ADSL filters are widely available, and often going spare. These provide a suitable project box and, with the rest of the filter components removed from the board, a pair of phone jacks which can be connected to the line simulator circuit. Note that the circuit as presented is not suitable for connection to a PC microphone jack as the signal level is far too high; to use this an attenuator would need to be built in, which could be achieved with a simple resistive divider.

Once constructed, check the voltage at the phone socket is about right, then plug in an old phone to check it’s working. You’ll probably hear some quiet line noise, and the LED should light when the receiver is lifted. If you connect the circuit to a laptop or music player, you should be able to hear audio played clearly through the phone, complete with that lovely tinny quality.

12 comments

  • Darius

    Would this circuit provide an analog phone with the required current and voltage to power the DTMF pad?

    I am working on a special public-telephone system that is meant to help with basic communication even if one loses their cellular phone. My idea is to interface a vandal-resistant POTS phone (still made for prisons or construction sides) with a GSM module and an Arduino/etc. (to playback voice files, send SMS etc.) with solar power or occasionally changed batteries/powerbanks.

    • Nick

      Yes, this should provide the needed power for a basic phone to operate, but it can’t operate the ringer (that’s a much higher voltage signal). It will have a noticeable standby current of a few mA though, if I recall correctly.

  • Gabor

    Can you please add the phone connection to the schematic? Thanks

    • Nick

      Hi Gabor – the connection for the phone or modem is indicated by the Phone + and Phone – lines in the schematic. The wiring will depend on the connector on your device, but you should be able to look this information up for most common telephone connectors.

      Note that the line simulator is only intended for connecting telephones or modems to audio equipment, and mustn’t be connected to the telephone network.

  • This seems like an important part of a puzzle I’m trying to solve. I’d like you to be able to call my modem over the internet – an alternate PSTN. So if I built this circuit and connected it to the soundcard in my linux box, could we stream the audio back and forth fast enough for the modems to sync?
    I’ve given the whole concept a little more thought on my blog:
    https://kaprpi.blogspot.com/2021/08/pstn-converter.html

  • Bob Price

    I need something to connect to my BT Home monitor VP1000 to make it think it is connected to a phone line. Since the phone has been disconnected, it displays an error light and says ‘check system’. So something that makes it think it is connected to a phone line would remove this annoying state.
    I remember the line voltage used to be 50V DC but does it really need that much? Can seem to find much about this on the web.

  • ApostolisIo

    Hi Nick, i want to connect a modem to to alarm panel for direct connection, so i need a pots line simulation. I have two questions thought…you mention that this schematic is for modem to audio equipment. 1st. Can i use it to connect two devices together(modem-alarm panel in my example) that communicate at the off-hook state using DTMF? 2nd if i can, where do i connect them both, or how do i modify the schematic (leave the audio section out maybe?)
    Thank you for your time

    • Nick

      I think you can connect two things to this and it should behave reasonably well like an off-hook phone line – just connect your devices in parallel on the phone side. The current is set by R2 (the voltage across R2 is the LED forward voltage minus about 0.6 V), so if the DC voltage on the devices is too low, reduce it a bit to bring the current up a little. Everything from C1 to the right can be omitted if you don’t need the line in/out connections.

  • Hello Nick,
    Thank you for a straigtforward circuit that I can understand. My plan it to use it to give an active phone line to a home cordless phone set in the USA in order to use the phones as an intercom. The phone set I have allows only one pair to talk as an intercom. But, the cordless phone set allows all handsets to listen in to a phone call – so with a phone line active I hope to get handsets communicating. Your line input can be useful as well, to send music to all handsets to test.

  • am I reading correctly the value of components ?
    in the phone line simulator half of the circuit – –
    R1 = 68 68 ohms
    R2 = 600 ohms
    R3 = 680 k ohms
    Characteristics of the transistor identified as BC 327 – 40 Q2
    D 2 = does it equal the other diodes used, identified as 1N4148
    =====
    the line input half of the circuit..
    C 1 – Capacitor one 10 micro farads
    R 5 = 680 ohms
    diodes 3 and 4 identified as 1N4148
    R-6 – 10 k ohms

    • Nick

      Hi Timothy,

      The component values are:
      D2: Regular green LED (the colour matters because it’s used as a voltage reference)

      R1: 600 ohm (this sets the current through D2)
      R2: 68 ohm (this sets the loop current in the phone line)
      R3: 3.3k ohm (this sets the DC line impedance)

      Q2: BC327 (any common PNP signal transistor should be OK)

      C1: 10 microfarad (this is used to block DC)
      D3, D4: 1N4148 (any silicon signal diode should do – this just provides signal limiting)

      R5: 680 ohm (this adds resistance in case a low-impedance headphone output is attached)
      R6: 10k ohm (this is part of the DC blocking arrangement)

      Regards

Leave a Reply to Bob Price Cancel reply

Your email address will not be published. Required fields are marked *