Ringing old phones from amplified audio - Amplification issues

Hi there!

Although I’ve been playing around with Arduino for a while, I am completely new to sound engineering issues, which I am running into right now, so I hope some of you can shed some light on my project!

This is what I intend to do:

My goal is to have 3 old cord phones rung from an Arduino board, which I would use as a sort of a ring trigger.

As far as I understand it, those phones expect a sine wave of 20Hz of between 30VAC and 40VAC (depending on the ringing system of each phone). I generated a wave in my computer and send it to a wall wart iron-core AC power supply that I had laying around (rated 9VAC - 230VAC). I plugged it in reverse, that means: from the computer to the 9VAC input (usually output) and from the 230VAC to a single phone (with the green and red cables of the RJ11 cable). So far, it works wonderfully. The phone rings when I play the wave, and the 230VAC output reads 60VAC (although I realised that, on ringing, that drops by 30V to 40V. But that might be a difficulty for later).

I tried adding a LM386 amp (as a breakout module) with 12V supply between the computer and the wall wart, and that gives even better results (80VAC), which makes sense to me.

Now, the challenge is to achieve this with an Arduino Uno R3 instead of a computer. Here is where things get tricky.

For the sound generation, I just recorded my sine wave and have it played by a SD card breakout module, using the TMRpcm library. So far, no issues.

I don’t know, though, what the amplification chain should look like. Since I am not an engineer, I prefer sticking to breakout modules as long as possible, but I feel that I am getting something wrong. Here is my current setup:

  1. From the Arduino, I send the audio signal to a LM386 (12V supply). Here is where I think the glitch happens, because sometimes I read between 2.5 and 3.3VAC at the module’s output, but quite often I read nothing. It also confuses me that the potentiometer is not working progressively. At 0, it reads 0, then I can turn it up to that volume, but no more than that. Sometimes, I have to find the sweet spot because going over it means falling down to 0 again. And that sweet spot doesn’t stay long either. So I am clearly getting something wrong of needing some sort of preamplification cleanup of my signal, which I don’t know how to do.

  2. I tried hooking up a TDA2030 (12V supply) after the LM386 to further tune up the volume, and I got the right voltage output and the phone ringing (hooray!). But it doesn’t feel stable at all, meaning that the LM386 just drops sometimes and interrupts the chain. Succeeding in this approach would also mean having 3 circuits running in parallel (one for each phone), which I would preferably avoid.

  3. So, my dream is to have a signal strong enough to get the 3 phones to ring at the same time, and just turn them on or off with a 4-channel relay. In order to pursue that dream, I got myself a TPA3116 amplifier, also running on 12V, which I plugged after the LM386. And for a moment (it was a happy moment), I got 130VAC on my wall wart output. But then I lost it, and realise that there is something wrong about my connections. I am reading 3.3VAC at the LM386 output (which goes successfully into the TPA3116), but only 2.5VAC at the TPA3116 output, and also in frequent fluctuation. I also noticed that, when getting full power, the Arduino lost connection to the SD module (which uses the SPI interface), so I guess that I should add some protection/isolation between those two things (amplifier and Arduino).

I am stuck now at this point. Is there any kind soul willing to help me understand my shortings and move forward?

Maybe I just need a proper amp that can handle 20Hz without acting erratically. I will be happy to hear suggestions!

Thank you so so much!

Depends on what country the phones are from. In the USA, the ringer voltage is AC, like you mentioned, but 90 volts RMS.

In particular, this simple circuit should work, using a low current, 12VAC:120VAC transformer:

I am working in the EU. I just realised that sending them 220V from the mains makes them ring too - without any need of a sine wave whatsoever. I shall dig in the audio approach, but that might just do the trick.

I am not sure of the potential dangers though.

I am. Both 120VAC and 220VAC mains are absolutely deadly. Never connect the mains directly to any circuit you make.

1 Like

I absolutely second @jremington 's post!!!!

Don't mess around with mains voltage.

Phones are not designed for this kind of voltage and current.

P.S. Have a look here https://en.m.wikipedia.org/wiki/Telephone_line#:~:text=The%20voltage%20at%20a%20subscriber's,and%20ring%20at%20%E2%80%9348%20V.

And be aware that you may safely use higher voltages if the current is limited which you don't have with mains.

and a proper 40V DC power supply at a current rating depending on your phones.

Having read the article posted by @jremington, this may be overkill. An accurate sine wave is probably not required. A simple square wave of the same frequency may work just as well. The Arduino tone() function may produce a suitable signal, but on many models of Arduino the lowest frequency for that is 31Hz, so if you need 20Hz, some other code will be needed. Other models of Arduino may allow tone() to go lower than 31Hz.

A number of such circuits have appeared here, for example: Ringer circuit for vintage telephone bells.

You don't need a sine wave, a square wave is fine as a driver for your transformer. Others have posted workable circuits so I won't post mine.

Thank you all for your advice and references! I found the easiest way through it in this article: Generating rings | Details | Hackaday.io

I gave up the audio signal amplification and moved to creating a square wave with a L298N. The Arduino sends a constant DC voltage to either driver’s output, which becomes an AC square wave that I can amplify with the transformer (9VAC-220VAC). With 5V input voltage, I get 60VAC at output, which is more than enough to trigger the ring of the 3 phones.

I will explore a bit how lower can I get this voltage by reducing the voltage I send to the driver’s enable pin. But I guess that’s the right way forward. It’s still quite a high voltage, even when the current of my power supply is lower than 1A. So it should be handled with caution.

This is the code I am using to generate the square wave with the L298N, in case it’s useful to somebody else in the future:

const int ENA = 5;  // PWM capable pin
const int IN1 = 2;
const int IN2 = 3;

const unsigned long halfPeriodMs = 25;  // 25ms -> 20 Hz

void setup() {
pinMode(ENA, OUTPUT); 
pinMode(IN1, OUTPUT); 
pinMode(IN2, OUTPUT); 
digitalWrite(ENA, HIGH);  // or analogWrite(ENA, 200) to limit amplitude 
}  

void square() { 
// Forward 
digitalWrite(IN1, HIGH); 
digitalWrite(IN2, LOW); 
delay(halfPeriodMs);  

// Reverse 
digitalWrite(IN1, LOW); 
digitalWrite(IN2, HIGH); 
delay(halfPeriodMs); 
}  

void loop() { 
square(); 
}

Congratulations on a good job!

1 Like

There is something wrong with these voltages. Is the power supply current rating high enough?

1 Like

Likely measured with DVM.

There is something wrong with these voltages. Is the power supply current rating high enough?

I double-checked it. It reads 72.5VAC while no phone is ringing (powering the Arduino via USB from my computer). I am using a cheap digital multimeter to measure.

I share here my circuit’s diagram with three phones (controlled by a relay) in case it helps somebody else!