TUCoPS :: Phreaking General Information :: crystal.txt

Telephone Frequency and Crystal Tutorial

From av1d@aol.com.wipo.cc Fri Dec 14 21:29:05 2001
Newsgroups: alt.phreaking
Subject: [Text] Telephone frequency and crystal tutorial
From: av1d@aol.com.wipo.cc (av1d)
Date: 15 Dec 2001 05:29:05 GMT

Telephone frequency and crystal tutorial.
Or, how to make new frequencies with your phone.
Started: 4:30 AM 10/9/01 Finished: 5:12 PM 10/9/01
Last updated: 11:00 PM 12/14/01
By: av1d [at] aol [dot] com

Did you ever wonder how to find the right crystal
for your phone, because you needed a certain frequency?
This is how it is done.

Starting off, we assume that your standard phone
(the one you want to modify), has a 3.58 MHz crystal.
Yes, phones have crystals too, not just tone dialers.
The crystal will either be a silver can, or tan or blue like a ceramic
capacitor, and likely have '3.58' printed on it's side.
If you're using a cordless, the 3.58 MHz crystal is 
probably in the base.
Some cordless phones do not use 3.58 at all,
and all cordless usualy have more than 1 crystal, so beware.

When we see plans on how to modify a tone dialer,
they call for a new crystal to be installed. 
The frequency can vary from 6.46 to 6.55, 
above and below also. With the Radio Shack tone dialer
modification, the * key has a frequency result of
column 1 and row four. (2200 & 1700 after the crystal is 
installed). Here is the layout of a standard phone
keypad with a phone using a plain old 3.58 MHz crystal.

                   1209 1336 1477
                      
               697  [1]  [2]  [3]
FIG. A
DTMF grid      770  [4]  [5]  [6]

               852  [7]  [8]  [9]

               941  [*]  [0]  [#]

The columns go from top to bottom, and the rows
left to right. The numbers outside of the keys
are the frequencies [Listed in Hz]. To dial a digit, 
two frequencies are combined. (Not always though, 
you can dial with one frequency, depending where you are).
We can see from the grid that the [1] key lays
in the cross path of 697Hz and 1209Hz. So,
697Hz & 1209Hz = [1].

Remember that 6.5 MHz crystal? This is how the DTMF grid
would look like if it were installed.


 
                   2176 2405 2658
            
              1255  [1]  [2]  [3]
FIG. B        
              1386  [4]  [5]  [6]

              1534  [7]  [8]  [9]

              1695  [*]  [0]  [#]

Note that 1695 is very close to 1700, but the 2176 is a little 
further away. Why is this? Because the way that 99% of DTMF ICs
divide the original frequency (in this case 6.5 MHz), probably 
won't leave you with both of the exact frequencies you need.
But if we had used a 6.49, the frequencies would be 1703 and 2188,
even closer than the 6.5.  A 6.46 MHz crystal would be even closer
to the actual frequency.  So, contrary to popular belief,
a 6.46 is probably the best you could do for a redbox crystal,
unless you want to sit there and do the math until you find something closer.

Now you may be asking, how do you figure out the frequencies?
First we start off with the crystal that was intended to be
used in your phone, 3.58 MHz.
And then the second chosen crystal.
This time we will use the 6.46.

The formula is like this:

X1 / X2 = I
N1 * I = N2

Fairly simple. Now, X1 is the crystal with the higher value,
so in this case its 6.46 MHz. X2 is the 3.58 MHz crystal.
X1 / X2 = 1.804 (6.46 / 3.58 = 1.804).
N1 can be either one column frequency, or one row frequency.
697(row1) * 1.804 = 1257 (row1 with 6.4 MHz crystal)

Full example:

3.58 / 6.46 = 1.80
697 * 1.80 = 1257
That is the new frequency row 1, 1257 Hz

Now column 1:
3.58 / 6.46 = 1.804
1209 * 1.804 = 2181
With 2181 Hz being the new frequency for column 1.

Note that you CANNOT make an 'A' tone by changing
the crystal! :( This is because 697 cannot be divded,
neither can 1209 (with just a regular crystal). 
If you can find a way to divide it, then go ahead.
Also, the closest match to getting B C D, would be 3.95
Megahertz crystal. This would produce B on the 6 key, 
C on the 9 key, and D on the # key.
I've checked Digikey and stuff like that, but couldn't find
a crystal of 3.95MHz.

I've written a QBasic program to calculate crystals for you.
If you don't have QBasic, assuming you even use Winblows or DOS,
it is on the Window 95/98 CD in the folder "oldmsdos". 
If you don't have the CD, check the QBasic Top 50 website.
Also, qbasic.com has QBasic compilers.
Just open the code in them and make an exe file.

'-------------
'Begin xtalcalc.bas
'-------------

nx: RESET
CLS
' ONLY WORKS ON THE FIRST COLUMN FREQUENCY! NOTHING ELSE!
' CHANGE C1 TO ANOTHER COLUMN OR ROW FREQ IF NEEDED
' 
' FORMULA:
' 
' X1 / X2 = M * 3.58
' [CRYSTAL 1 DIVIDED BY CRYSTAL TWO MULTIPLY WITH 3.58]
' HIGHER FREQUENCY IS ALWAYS X1!
'
' This is not completely accurate, and I can't code!
' But, it works good enough.

in:
CONST x0 = 3.58
CONST c1 = 1209
CONST r4 = 941
x1 = 2000
INPUT "Needed column 1 Frequency in Hz "; x1
n = x1
ON ERROR GOTO handler
PRINT x1 / c1 * x0, "MHz crystal"
PRINT c1 / x1 * x0, "Multiplier"
PRINT x1 / c1 * c1, "Column 1"
PRINT x1 / c1 * r4, "Row 4"
PRINT ""
PRINT n; "Hz is the * key with a"; n / c1 * x0; "MHz crystal"
x1 = 2000: GOTO in: CLS
handler: CLS : PRINT "An error has occurred."
ON ERROR GOTO handler
SLEEP 2.2
GOTO in: CLS
END



---------------------------
Installing your new crystal
---------------------------

Desolder the old crystal in the phone, and add the new one.
If you want to use both, here is a schematic to hook them up.
        _______________
       |               |
   [1] | [2]           |
   | | | | |           O O    
   | |_|_| |             |
   +   +   +             |
 __+   +   +__           |
 | |___|___|  |          |
 | |toggle |  |          |
 | |_______|  |          |
 |    |_|     |__________|
 |_______________________|


1 and 2 are the crystals.
One lead on each are tied together,
then soldered to the center pin on a 3 lead toggle switch.
The lead left over on each crystal is soldered to
the remaining leads of the toggle.
On the three leads, solder 3 wires.
The center wire gets soldered onto one of
the holes on the phone where the crystals were,
and the two outside wires get soldered into the other hole.
You can add more than 2 crystals by using a hex switch and
maybe a couple toggles.


---------------------------
This text turned out longer than planned.
I wrote this because I couldn't find out how to calculate
the frequencies properly, but finally found how. 
Hopefully this was helpfull instead of discouraging.
Next time you need a frequency on your phone,
you know how to do it. Crystals are not the only way
to change frequencies, but that is another file.

My favorite component resources:

www.digikey.com
www.mouser.com
www.newark.com
www.bgmicro.com

Thanks to:
        
     Lucky225 for his article on the Orange Box,
     which I used to find out some of the calculations.
     Also the alt.2600 Hack FAQ, which I used the DTMF information
     to figure out some of the calculations, and stole the funky DTMF grid.
 
  - av1d
  - 5:12 PM 10/9/01-------------------------------------------+++EOF


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH