PDA

View Full Version : DTMF dial tone



lerameur
- 10th October 2007, 16:55
Hello,

When using DTMFout, does the command know how to wait for the initial dial tone to compose the number?
I have a project in mind that only need to dial a phone number, so probably a Pic16f88 directly connected to a phone line.
I have not tried it yet, but when I dial a number I pick up the phone , hear a dial tone and dial. does the DTMF command do the same ?
thanks

Ken

mat janssen
- 10th October 2007, 17:46
Do not connect the chip directly to the phoneline.
Use a small transformer (there are special tranfo's for this) .
Via an optocoupler you can detect if the phone line is open for dialing and then give the DTMF pulses for the number. Via the optocoupler you can detect is the phone at the other site is taken and then you can switch with a relay the line to the microphone and the speaker.
This sequence you can all programm into ths chip.
Succes.

Josuetas
- 10th October 2007, 17:54
No.

DTMFOUT will just generate a sound of DTMF mixed frequency.

You will have to:
HookOff (if needed)
Wait Dial Tone (about 0.6 sec)
Dial your number

lerameur
- 10th October 2007, 18:22
ok , so how do you electronically hook off then?

mvs_sarma
- 10th October 2007, 19:01
Nothing like detecting dial tone after liftthe telephone (off hook) , before starting DTMF starting. it is only time lag (few hundred mS)after Off Hook.

lerameur
- 10th October 2007, 19:27
ok but what is off hook.
I mean I have a dual splitter from the telephone line. One line goes to a telephone and the second line will go to the Pic chip. When I need to dial from the chip, how do I do an auto hook off on the telephone line so I can use the DMTFOUT command?

k

mvs_sarma
- 10th October 2007, 22:05
ok but what is off hook.
I mean I have a dual splitter from the telephone line. One line goes to a telephone and the second line will go to the Pic chip. When I need to dial from the chip, how do I do an auto hook off on the telephone line so I can use the DMTFOUT command?

k

As I already told in in the earlier reply, themoment you lift the hanset from the telephone , it is called OFFHOOK. Now in your contest- you may know that the exchange gives a voltage of 48V DC with a max current limit of 35mA. this current will flow thro the switch provided in the instrument. in your case you have to provise a trmnsformer primary loop thro' a relay contact controlled by you . then if the loop is extended , it is called OFFhook


this can be checked by inserting a DMM in DC mA range in series to one of the limbs by breaking the connection and inserting the Meter for current measurement.

lerameur
- 10th October 2007, 22:14
anybody have a schematic of this?

mvs_sarma
- 11th October 2007, 08:29
anybody have a schematic of this?

Download the hardware datasheet UM91215 from www.alldatasheet.com

you will find entire telephone circuit diagramover there.

see how they implemented in hardware. you can convert it functionally to PIC

Josuetas
- 11th October 2007, 23:34
Wet transformers with 600:600 impedance are built to match telephone line Z.
This kind of transformer allows DC voltage levels to go through their nucleus without being saturated.
Connect your line to one of this transformers to off-hook

b1arrk5
- 12th October 2007, 00:51
You might take a look at Cermetek's website, as what you really need is known as a DAA. The phone company outputs 48 volts dc normally to your home phone, and when the phone rings there is a 20 Hertz ac superimposed onto the line that is usually between 90 and 120 volts. If you connect a PIC directly to the line you will likely fry the PIC, and you are also liable for any damage that you cause to the telephone company's equipment. Anything that you connect to a phone line is required by law to have agency approval, here in the United States that means the FCC. The Cermetek units will signal the PIC when the phone is ringing, and allow the PIC to go 'off-hook.' They also provide all neccessary isolation so that your PIC and the phone line are both safe, as well as the hybrid circuitry to get you from two wire to four. You will need to filter the DTMF out of the PIC using the circuit in the PICBASIC manual before you feed it into the DAA. Clare also has units that might fit your project, both of these companies are well known in telecommunications circles.

You might find it easier, if all you need to do is ring a telephone, to find an old modem and connect it to the PIC using RS-232. Then you can just send AT commands to dial the telephone. The DTMF signals will be produced in your modem. Since you aren't concerned about speed, any old 2400 baud or whatever you can find will work fine. There are millions of old modems out collecting dust since now almost everyone is using ethernet to connect to the Internet. E-bay has a bunch of brand new external modems, you can buy one for ten bucks!

Jerry.

lerameur
- 12th October 2007, 13:51
using a modem is a good idea, plus I have a few of those 33.3 external modem laying around. just have to figure out how to hook it up to a pic but that should be too hard. thanks

ken

Josuetas
- 17th October 2007, 14:58
It canīt be simplier than this,

By the way those modems you have must surely have the transformer you need.

Now forget about the ugly picture!

Pay attention to this fact: the line will remain Off-hook as long as it is connected to the
transformer, you might need a relay to disconnect the line from the Transformer.

http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2092&d=1192629115

DAA is the device that implements this transformers with silicon, it also gives you more functionality like ring detection and off-hook switch. It might be more expensive than the simple schematic, wich by the way complies with all requirements of ITU.

mvs_sarma
- 18th October 2007, 16:46
Actually the pic should be switched in to the circuit only when you want to make outgoing call - or after the predesigned circut arranges for answering the call thereby stopping the ringing current (75V /20to25Hz_superimposed on the 48 Dc as already mentioned by b1arrk5.

So therafter no fear of high voltage as the current starts flowing on the telephone line.

b1arrk5
- 20th October 2007, 01:40
Ken,

Take a look at the Serout2 command in the manual, around page 144. All you need is a connector for your modem and a 1K ohm resistor! The modem will accept 'Hayes' AT commands. After you set up your oscillator and other defines per the manual just enter SEROUT2 PORTA.1,84,["ATDT 555-5555"]
and the modem will go off hook, wait for dialtone, and dial the digits. You can try it out first using Hyperterminal or another terminal program. The AT stands for 'Attention', and if you just type AT your modem should answer OK. You can find a lot of pages with all of the AT commands on the internet, but not all modems will implement all commands.
If you want to get a little fancier, use a MAX 232CPE chip with your PIC, and then you can send and receive, there are a lot of examples around. I use a LabX board from MeLabs for my development work, and it is hooked up to a modem, I use it all of the time to turn some lights on when I work late so I don't come home to a dark house.

Jerry.