$10 ATA Part 5 – Ringing a Phone with a DC-DC Converter

In Part 4 I managed to get a micro-controller based DC-DC converter running. To ring a telephone we need a 20-50Hz sine wave of about 100Vpp superimposed on -48VDC. In other words a ring signal that moves between 0 and -100V.

The DC-DC converter set point can be programmed in software, for example -48V for nominal telephone operation. The DC-DC converter set point is a variable in the uC software, say -48 for -48V. So my idea was to modulate the set point to make a ring signals. So if I use a 20Hz sine or square wave between -100 and 0, the DC-DC converter output should generate that instead of a fixed DC voltage.

When I tried this approach in the Octave simulation it looked promising:

DC-DC simulation simulated ring signal

So I modified the AVR C code to produce a 0 to -100V square wave. However it didn’t work. The phone sat there. Silent. Looking at the waveform on the scope the average voltage was a very low -100V with a small AC component of about 10Vpp. So it was back to the drawing board for some more thinking.

Here is the DC-DC converter circuit I am using.

When I measured the impulse response of the on-hook telephone it started to make sense. The time constant was very large, about 2 seconds. This suggests a large on-hook DC resistance of several M-ohm, in parallel with C20, the 10uF capacitor at the output of the DC-DC converter.

The load resistance forms part of the DC-DC converter, and with C20 sets the frequency response. My simulations gave good results as I assumed an on hook load resistance of about 3300 ohms, which resulted in a much smaller time constant. However the resistive part of the on hook phone impedance is very high, so the DC-DC bandwidth is very low, with a time constant of a few seconds. This makes it hard to modulate large amplitude 20Hz sine waves – they are being low pass filtered.

The DC-DC converter output can however charge C20 quickly (i.e. develop a negative voltage quickly). It just can’t discharge C20 to 0V quickly, as this depends on the load resistance.

The DC-DC time constant can be tweaked a bit by changing C20. I tried removing C20 completely and managed to blow up Q5 twice. After some thought and a good nights sleep I tried another approach. I reduced C20 from 10uF to 3u3, and added Q6 to force-ably discharge C20 quickly via R35. Here is the new DC-DC converter circuit.

That’s Q6 hanging in the air:

Discharge circuit

Q6 is turned on by a GPIO on the 0V half the ring cycle. After some tweaking I developed a solid 100Vpp 20Hz square wave. This waveform can ring all 3 phones tested and the current draw is not bad (40-50mA), despite the energy wasted in R35.

Here is the ring waveform (bottom), and the DISCHARGE signal driving Q6 (top):

Ring Waveform

Another approach would have been an extra switch to disconnect the -100V rail:

Two switch ringer concept

The switches would be driven in anti-phase to connect the phone to -100V for half the ring cycle, then 0V for the other half. This would avoid the need for power dissipation in R35 but would require an extra transistor and some hardware to level shift and drive the extra transistor.

Future Work

The heart of the circuit is the DC-DC converter made from Q5, L1, D5 and C20 plus the Q6 discharge circuit to make it ring properly.

I would like to simply this circuit, e.g. choose easier to get transistors for Q5/Q6, maybe simplify the drive. I would also like to make it a little more bullet proof, I popped Q5 several times while developing. For example make the circuit survive a short circuit while ringing by limiting the current thru Q5. I don’t want to rely on software control for survival. Natural current limiting due to the power supply output impedance is a better approach.

Over the past few weeks I’ve made some good progress on the $10 ATA concept. Next step is to start integrating the Hybrid and DC-DC converter together, add some hook detection, and connect to a host router to prototype the whole $10 ATA system. However right now I need to work on some other projects like Codec 2. I’ll get back to the $10 ATA a little later this year.

LInks

  1. $10 ATA Part 1
  2. $10 ATA Part 2
  3. $10 ATA Part 3 – Hybrid
  4. $10 ATA Part 4 – Building a DC-DC converter with a microcontroller

6 thoughts on “$10 ATA Part 5 – Ringing a Phone with a DC-DC Converter”

  1. Just a raw idea: The phone needs no more than 48 V when working. What about a diac or perhaps a neon lamp (instead of software and Q6) that drains C20 through a resistor as soon as it reaches, say 95 V? You should still be able to get near the 100 V, but as soon as the PWM stops pumping energy into L1, the voltage should drop rapidly. As a nice side-effect, this would also prevent dangerous voltage on the phone terminals, because the diac / neon lamp would automatically discharge C20 to safe voltage levels, even when the micro controller is bricked.

    bxlinux

    1. Not a bad idea, I like the idea of it automatically discharging. However to ring the phone we need to sustain -100V (ish) for 25ms (half a cycle). Also Q6 is probably cheaper, i.e. a garden variety 100V Vceo PNP.

  2. hye,

    I was just wondering: when the 10 $ ATA when be up and running, would you consider making a low-cost CHANNELBANK for SMBs?
    If so, I’d be greatly interested.

  3. I found your work a few days ago, it’s amazing and really inspiring.

    I wanted to do something like this myself, so I looked into really cheap ISDN->analog converters. They usually come with an AC adapter providing 48V and 12V AC and many of them just put the unregulated 48V AC on the phone wire to ring a phone. It still works with most modern phones, big exception are the ones with a mechanical bell.

    Anyway, I am currently doing my experiments with a 48V DC power supply and an H-Bridge IC to generate 20Hz AC with nearly 100V Vpp. And it works! Maybe that’s the better way to go for a large channel bank.

    Do you have any plans for on/off hook detection? It should be easy when the phone is not ringing, there would be a voltage drop when the phone is off-hook. But I am not sure how to detect this while the phone is ringing.

    1. Hi Chris,

      For hook detection I was planning to sense loop current, e.g. via the voltage drop across a sense resistor. Yes 48VDC or AC is a useful way to generate ring if it is available, but in many cases 12VDC is the only rail.

      Cheers,

      David

  4. I am looking for a simple circuit to plug into a phone jack to make it think it is off hook. Any body have any ideas ?
    Many thanks Leon

Comments are closed.