News:

"The phone is a remarkably complex, simple device,
and very rarely ever needs repairs, once you fix them." - Dan/Panther

Main Menu

Open Source Pulse to DTMF converter project/problem, a detailed technical discussion

Started by royalbox, August 18, 2017, 11:38:20 AM

Previous topic - Next topic

Alex G. Bell

Quote from: royalbox on August 18, 2017, 05:58:47 PM
Interesting replies so far, thanks everyone. I won't pretend I understand all the theory and I also can't picture things in my head easily which is often frustrating. Appreciate the help though.

Regarding the polarity protection, I've fitted a bridge rectifier to the incoming lines as recommended in the rotatone installation guide, like the second diagram here: http://www.rotatone.co.uk/fitting-a-rotatone-to-a-gpo-706-746-8746/.

I'll look into series pass emitter follower voltage regulators but not confident I'll be able to do anything with it myself.

Barry.
Another alternative, probably simpler than a series pass emitter follower voltage regulator would be a small +5V 3-terminal regulator such as an LM78L05, which would replace R1 and D1.  That will probably also present a very high impedance towards the power source.  Follow data sheet application instructions for bypassing the input and/or output terminals.

The emitter follower regulator idea uses much simpler more generic components and I usually think that way first.  But an LM78L05 is probably more "prescriptive".  The component count is about the same.

If you are unable to figure out how to do the 78L05 implementation try adding a small inductor in series with R1 as suggested earlier.  Almost any small telephone coil will be sufficient.

Even with a polarity guard on the line it's prudent to put a reverse polarized "fast" diode intended for switching power supplies across the power input leads.  Rectifier bridges intended to operate at AC power line frequencies can be slow in the presence of high voltage spikes on a telephone line, allowing the load to be exposed to brief reverse voltage spikes.  Microcontroller chips are very vulnerable to damage from such spikes. 

Even the speech network itself can produce reverse voltage spikes.  It's an inductive circuit with DC current through it.  Like any other inductor, when current is interrupted a reverse EMF appears across the terminals of the speech network.  This eventually can cause components which are sensitive to reverse voltage to fail even if they work initially.

royalbox

Thanks a lot. Can I just clarify some things if you get a moment:

Is the 78L05 just a low current version of the 7805 or is there some other difference?

When you say bypass the input and/or output terminals, you mean the caps between input and ground and output and ground of the regulator or something else?

The "fast" diode, would that be a schottky diode? If so, do I put that in reverse across the input to the bridge rectifier that I've put on the telephone PCB and what voltage should I use? The bridge rectifer I used was what the rotatone guide recommended which was, I don't know, 600V or something, probably overkill but I went with their suggestion.

I'll probably build one on a breadboard to try this out first.

Thanks again,
Barry.

ThePillenwerfer

A 78L05 is indeed a low-current version of the 7805.  The data sheets don't say anything about input impedence so that could also be different, and that is what matters here.  Hopefully somebody who knows about such things will be along later.

Bypassing does mean a capacitor between the input terminal of the regulator and ground and another between its output terminal and ground.

The protection diode would want to be after the bridge.  Before it you can't be sure which incoming wire will be negative and which positive; if you could you wouldn't need the bridge.

I don't know anything about Schottky diodes so would be thinking along the lines of a UF1007.  This is rated for 1,000V but the rating doesn't seem to have much effect on price or physical size so best over-kill away.  As they tend to come in packs it also means the remaining ones are more likely to find uses.

I'm wondering if the same anti-reverse voltage spike protection would be provided by building the entire bridge from fast diodes.  UF1007s are about the same price and size as 1N4007s and the fewer total components the smaller the finished converter.

ThePillenwerfer

After having time to think about last night's postings I'd like to clarify things.

First and foremost I'll happily admit that I know very little.  If I appear argumentative it's because I wish to understand something, not to prove that I am right and the other party wrong.  Besides anything else such conduct would be futile as a lot of things aren't as simple as "Right" or "Wrong."

My suggestion of increasing the value of R1 was because that worked for me, though I now realise that it would be better to say that it subjectively APPEARS to work and that objective measurements would reveal problems.

I pointed out the difference in UK and US line impedances to save anybody devising a solution to Royalbox's problem that may not apply here.

I now understand that I was wrong about ringing voltage getting to the converter and thank Alex G Bell for his explanation.

I only took it upon myself to make my most resent post in this thread due to the time difference between Britain and America; members there aren't likely to be on-line yet.

Alex G. Bell

Quote from: ThePillenwerfer on August 19, 2017, 07:41:08 AM
After having time to think about last night's postings I'd like to clarify things.

First and foremost I'll happily admit that I know very little.  If I appear argumentative it's because I wish to understand something, not to prove that I am right and the other party wrong.  Besides anything else such conduct would be futile as a lot of things aren't as simple as "Right" or "Wrong."

My suggestion of increasing the value of R1 was because that worked for me, though I now realise that it would be better to say that it subjectively APPEARS to work and that objective measurements would reveal problems.

I pointed out the difference in UK and US line impedances to save anybody devising a solution to Royalbox's problem that may not apply here.

I now understand that I was wrong about ringing voltage getting to the converter and thank Alex G Bell for his explanation.

I only took it upon myself to make my most resent post in this thread due to the time difference between Britain and America; members there aren't likely to be on-line yet.
No problem.  I assumed as much.

Alex G. Bell

I suggested using a 78L05 rather than a 7805 because the L version is much more compact, in a TO-92 transistor package rather than TO-220 power transistor package.  The L version is rated 100mA which certainly must be adequate while the non-L part is rate 1.5A.

The actual current drawn by the circuit must necessarily be <100mA since that's all that's available from the loop and the telephone circuit uses most of it but the actual current use by the microcontroller is not known to me. 

In addition to their current ratings these parts have thermal limitations.  The voltage drop through them (loop voltage in the talking condition minus the 5V output voltage) X the current flow = the power dissipated by the voltage regulator. 

The non-L part can dissipate 1W in free air (w/o a heat sink).  The L part can dissipate much less (refer to the data sheet for specifications) but probably enough.  Someone will have to evaluate this to be sure the L part can operate without some form of heat sinking, which could be a metal fin or just attaching the body to the board.  If the part is unable to dissipate the required power it will go into thermal shutdown and not be damaged.

The reverse protection diode should be at the power input to the P/T converter circuit.  An even better choice would be an overvoltage protection diode such as a TransSorb or MOSorb which would protect against excessive forward voltage spikes as well as reverse spikes of any voltage.  Such a part would need to be rated approx. 12-15V, greater than the off-hook voltage across the speech network on a short line with low resistance.   Essentially they are specially made and characterized zener diode devices with fast response and high surge current ratings.

Input impedance of a 3-terminal regulator is not directly specified.  It's inherently high because of the function they perform.  Since the output voltage is constant the voltage from input to output must vary dynamically with fluctuations of the input voltage.  The main factor which would reduce the input impedance is the bypass capacitor connected between input to ground terminals.  The value required for this capacitor as stated in the data sheets is a very small so it has no effect at voice frequencies and does not reduce the input impedance of the over-all circuit materially.

TelePlay

Quote from: Alex G. Bell on August 18, 2017, 05:20:16 PM
I agree but it's inherent that seemingly simple questions about complex electronics do not have simple answers.  "You should simplify as much as possible, but not more..."

And BTW, I was reluctant to get involved in this for this very reason.

Well, if you have provided enough information for another member to both understand your instructions and create, to breadboard, your design, and if it works, and if the other member provides a schematic of your alternate design, it was worth your time to explain in detail what you think would be a better or improved circuit. Without that help from another interested member who can transform your verbal "theory" into a hard circuit for testing, your time would have been wasted. In the past, when members redesigned a circuit, they usually provided their schematic showing the better design. So, without another member willing to do that for you, this topic would not have been of much use to most members.

What happened here was not "fixing" THE problem asked in the topic question but a complete analysis of someone's designed circuit at a level way above the knowledge of most forum members and the creation of an alternate verbal design, a "second" circuit, that would hopefully be better than the first one, the one with the low volume problem. If the new design works, hopefully a schematic of that working circuit will be provided.

As such, this could turn out to be a good topic, especially if the new design works well, eliminates the problem with the first circuit.

royalbox

Thanks everyone.
I think I'm going to leave that there and just change the resistor value for now as ThePillenwerfer did on his and see how it goes. I'll still follow the topic though in case any circuit improvement examples come along.

royalbox

Just an update,
I changed R2 from 220 to 1K. There is still a volume drop, I can't tell whether it's less that before as I can't switch between one and the other obviously. I'll leave it like that for now.

I also changed R3 from 330 to 1K as the tones were very loud. This produced tones that sounded about right compared with a normal touch tone phone but was too quite for the system to detect. I changed it to 470 and though it still sounds loud in the ear, it is detected so I'll leave it at that.

It would be nice to have a better design that doesn't drop the volume but I haven't the knowledge to decipher the above theory and put it into practice.
Barry.

ThePillenwerfer

I'm surprised that increasing R1 didn't make a noticeable difference to the volume diminution.  On mine a side-by-side test with an unmodified telephone is needed to hear a difference.

Following TelePlay's request for a schematic the one below shows the suggested modifications as I understand them.

royalbox

That schematic's very interesting, I hope other's will comment on it.

Quote from: ThePillenwerfer on August 20, 2017, 02:28:55 PM
I'm surprised that increasing R1 didn't make a noticeable difference to the volume diminution.  On mine a side-by-side test with an unmodified telephone is needed to hear a difference.
By connecting/disconnecting the negative wire to the circuit while listening to the dial tone, I could hear the volume drop a bit.

Regarding the volume of the tones, since increasing R3, I had an opportunity to test the DTMF with a real call where I had to enter star key (which worked), a 6 digit number (which also worked) then an eight digit number which didn't. I just got a long silence then a "we didn't recognise the number" message. I did it again, same thing. I did the same on the modern phone and it worked, so I'll probably put the 330 Ohm resister back.

I also noticed on the modern phone that when pressing a digit, the background noise drops significantly, so I think the ear piece volume is attenuated when you press a button. This obviously doesn't happen with the circuit we're making so it might explain why the DTMF tones sound so loud compared to the modern phone (on my phone, anyway).

Barry.

TelePlay

Quote from: ThePillenwerfer on August 20, 2017, 02:28:55 PM
Following TelePlay's request for a schematic the one below shows the suggested modifications as I understand them.

Thanks, and after rep-reading one of AGB's earlier posts, I failed to catch the "impedance" in series must be the same as capacitance in series, in line as I asked would indeed be in parallel of that is the case with inductors and circuit impedance. That's why "seeing" it will always make more sense to me than trying to picture it in my old and, in many times the cases when things get detailed technically, ignorant mind. On the bright side, after all these years and with no formal training or experience, I can still learn by seeing and doing and eager to do so.

So, thanks again for the "theoretical" schematic.

markosjal

Why not take it out of circuit by using the ear mute/attenuate in the phone and build it into each phone.

What I mean is that it could be left in circuit when dialing and maybe up to 1/2 second later (long enough to produce the DTMF) then it would remove itself based on the second pair of contacts on the dial.   

Might take some finagling but doable.

I installed an Stromberg Carlson 35A1 into an Indetel that had a Pulse pad (push button pulse) . I was very surprised to find the SC35A1 had a set of contacts to remove itself from the circuit when no button is pressed.

Phat Phantom's phreaking phone phettish

TelePlay

Quote from: markosjal on August 24, 2017, 02:05:28 AM
Why not take it out of circuit by using the ear mute/attenuate in the phone and build it into each phone.

What I mean is that it could be left in circuit when dialing and maybe up to 1/2 second later (long enough to produce the DTMF) then it would remove itself based on the second pair of contacts on the dial.   

Might take some finagling but doable.

I installed an Stromberg Carlson 35A1 into an Indetel that had a Pulse pad (push button pulse) . I was very surprised to find the SC35A1 had a set of contacts to remove itself from the circuit when no button is pressed.

What does this reply refer to in this long and divergent topic? I'll take a guess and say this one sentence

QuoteAs a side issue, the DTMF volume is a bit too loud.

from the very first topic post?

     http://www.classicrotaryphones.com/forum/index.php?topic=18701.msg192506#msg192506

Or something else?

It really helps to quote what a reply refers to when the topic is this long or longer and filled with multiple tangents.

Alex G. Bell

Quote from: ThePillenwerfer on August 20, 2017, 02:28:55 PM
Following TelePlay's request for a schematic the one below shows the suggested modifications as I understand them.
In relation to the schematic:

In the circuit as laid out the DTMF signal flows from left to right but the control signals and power flow from right to left.

Accordingly, the regulator's unregulated input voltage terminal (1) would be on the right, receiving voltage from the rectifier bridge.  The regulated output voltage terminal (3) would be on the left, supplying Vcc to IC1.

Placing a 200uF capacitor (C1) across the input would produce much worse attenuation than the original 220 ohm resistor and override the benefit of using a series regulator instead of the original shunt regulator.  Indeed if IC1 required such a large bypass capacitor perhaps the 78L05 could not supply the required current. 

Earlier I asked how much IC1 draws to confirm my assumption that the 78L05 is adequate.  Since I do not have a prototype of this circuit and do not have the time and reason to build one up I have no way to determine how much it consumes.  Someone who has a personal application for this circuit and consequently an example of it needs to post that information. 

The current must be measured while tone is being sent, not in a quiescent condition.  This would probably best be done by placing a small resistor in series with IC1 pin 8 (only) and observing the voltage drop across it with a scope.  It cannot be measured across 220 ohm R1 in the original circuit due to the fact that with shunt zener regulation current in R1 will be constant.

In any case, C1, whatever its value, would appear on the regulated Vcc rail, not on the unregulated input.  The National Semiconductor version of the data sheet shows the use of 0.33uF from the regulator input to ground.  Even this is a bit higher than I would want to put onto a voice circuit, suggesting that the original idea of using an emitter follower series regulator while less "prescriptive" might be the best solution from a signal loss perspective.

The NSC data sheet calls for 0.01uF (10nF) for C4 but 100nF would not be detrimental.

TVS1 does not need to be a bilateral device.  Bilateral devices are required in AC circuits but the voltage applied to T1's collector and the input of the regulator is inherently always positive so a unilateral device is better in that it protects against brief reverse voltage transients which might pass through the bridge. A bilateral device does not.

To prevent obnoxiously loud tones from being applied to the caller's receiver, a muting output function is needed together with a few additional components to control attenuation of the receiver.  I have not read the history of this topic and don't know who wrote the firmware nor where it might be found.  Even assuming it's out there, I don't have the time to review it. 

If the existing firmware pulls PB0 low when tone is not being output, cutting off T1, PB0 probably can be used without firmware changes to implement a receiver muting function.  I would provide a suggested circuit for this once someone familiar with the existing firmware or who has an example of the circuit built up and can observe PB0 with a scope reports on how PB0 currently behaves. 

If PB0 is not cut off when tone is not being sent modifications of the firmware would be required to cut T1 off when not sending tone.  This should be done anyway since if T1 is conducting heavily (saturated) or even significantly when not sending tone T1 and R2 will also introduce voice signal loss.  I've been assuming up to this point that T1 is cut off in an idle condition but this is a good time to verify that assumption.