Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions Operating_Instructions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Instructions
==============

Normal dialing
==============

Just pull the dial round from the desired number to the fingerstop and release immediately.

Dialing * and #
===============

for * pull the dial from "1" and hold on the fingerstop for 2 seconds until you hear a beep, release, and a tone for * will be generated.

For # do the same but use "2".

Redial
======

Pull the dial around from "3" and hold on the fingerstop for 2 seconds. Release when you hear the beep, and the last number will be redialed.

Speed dials
===========

There are 7 speed dial locations. 0, 4, 5, 6, 7, 8, 9. Pull the dial around to the fingerstop and hold for 2 seconds, release when you hear the beep and the desired number will be dialed.

Programming a speed dial
========================

Pull the number of the desired location around to the fingerstop and hold for 4 seconds, you will hear a quick rising-tone beep. Release the dial.

You are now in programming mode. Now simply dial out the number you wish to store, releasing the dial immediately after each digit. You will hear a simple beep after digit. Once complete, hang up, the number is now saved.

Up to 32 digits may be saved in each speed dial location. If you enter too many digits a warning beep sequence will sound.

If you want to program another number without hanging up, just finish programming the last number, then select the next memory location to store by holding that digit against the finger stop. Allow the modes to cycle (single beep > rising beeps) until the rapidly rising beep tone is heard and release the dial. Program the number for this location as above.

When doing this you will likely have your telephone exchange furiously beeping at you because you haven"t dialed a number. If annoying, you should dial a number known to be busy or with a recording, while programming.

Hotline Feature
===============

The device can automatically dial a pre-programmed number when the receiver is taken off-hook.

Program the desired hotline number into memory "0" as described above.

Dial and hold the "1" digit against the finger stop for 4 seconds until a beep is heard. Release the dial. A series of slow ascending tones will sound, followed by one beep, indicating the hotdial feature is now active and set for one second delay from off-hook to dial.

Repeat the process. Two beeps will be heard, indicating a two-second delay is active. Three and four second delays may be set in a similar fashion.

After setting a four second delay, if the programming sequence is repeated, s slow descending series of tones will be heard. indicating the hotline feature is disabled.

Hotline settings are saved in nonvolatile EEPROM memory.


Adjusting tone length
=====================
The length of each DTMF tone may be set, from the default of 100 milliseconds. Supported lengths are 50ms, 100ms, 150ms, and 200ms.

Dial and hold the "2" digit against the finger stop for 4 seconds until a beep is heard. Release the dial. A sequence of beeps will play, indicating the set digit duration. One beep = 50ms, two beeps = 100ms, three beeps = 150ms, and four beeps = 200ms. The setting wraps back from 200ms to 50ms.

The tone duration setting is saved in nonvolatile EEPROM memory.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This code is a branch from Matthew Millman's excellent Pulse > DTMF converter project, which converts a rotary dial telephone to DTMF operation.

I cleaned up a few operating anomalies and added adjustable DTMF tone length (saved in EEPROM) and a "hotline" mode that auto-dials the number stored in speed dial location zero whenever the phone is taken off-hook.

The time between going off-hook and the start of dialing is adjustable and also saved in EEPROM.

I updated the hardware design schematics to include a diode bridge for polarity protection, as the voltage regulator used is subject to damage if the telephone wiring is polarity reversed from the standard arrangement.

I also added a zener diode to the circuit to assure sufficient voltage is available to the input of the voltage regulator for most telephones and loop currents.

Without the zener diode, certain ATAs with low voltage/current or telephones with low internal network resistance would not develop enough voltage drop to power the unit reliably.

Bugs fixed are the failure to return to normal dialing mode after speed dialing or playing the * or # tones. This made it impossible to use DTMF on a connected call after initial dialing.

I also made it possible to save the * and # tones in speed dial and last number memories.
27 changes: 27 additions & 0 deletions WE_500_Step_by_Step_Installation
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Here are step-by step instructions for a Western Electric 500 set or equivalent.
Reference the schematic of the phone in we_500_schematic.jpg from Github.

First, connect the two sets of dial contacts to the circuit.

- In the phone, find the two white wires coming from the telephone dial.
- Disconnect the white wire from the dial going to the terminal marked "GN" on the phone network. Leave other wires on "GN" connected.
- Connect the wire that went to "GN" to the wire leading to Pin 6 of the ATTINY85.
- Disconnect the other white wire from the dial going to the terminal marked "R" in the phone.
- Connect this white wire to the negative side of the converter circuit or "ground".
- Disconnect the blue wire from the telephone dial from terminal "F" in the phone.
- Connect the blue wire to the wire leading to Pin 7 of the ATTINY85.
- Disconnect the green wire from the terminal marked "RR" in the phone.
- Connect this green wire to the negative side of the converter circuit or "ground".

Next, connect the circuit into the line connections of the phone AFTER the hookswitch:

- Disconnect the slate-colored wired with white bands coming from the hook switch contacts from the terminal marked "F" (possibly "RR") in the phone.
- Connect this wire to the circuit wire going to one of the AC input points on the polarity guard diode bridge. This will be where an anode and cathode connection from two diodes meet.
- Disconnect the slate-colored wired with brown bands coming from the hook switch contacts from the terminal marked "C" in the phone.
- Connect this wire to the circuit wire going to the other AC input points on the polarity guard diode bridge. This will be where an anode and cathode connection from two diodes meet.
- Connect a wire from the negative or "ground" point of the circuit to the terminal marked "C" in the phone.
- Connect the wire leading to the anode of the 5.1 volt zener diode in the circuit to the terminal marked "RR" in the phone.

That's it! The circuit should be active when you pick up the phone. You should hear clicks when dialing, followed by the corresponding DTMF tone.

Verify that incoming calls ring the phone.
5 changes: 5 additions & 0 deletions attiny85_fuse_settings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Correctly set fuse bytes:

LFUSE: 0xFD
HFUSE: 0xDF
EFUSE: 0xFF
26 changes: 25 additions & 1 deletion dtmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ void dtmf_generate_tone(int8_t digit, uint16_t duration_ms)
sleep_ms(duration_ms / 3);
_g_stepwidth_a = 51; // G=784Hz
sleep_ms(duration_ms / 3);
}
else if (digit == DIGIT_TUNE_ASC2)
{
_g_stepwidth_a = 85; // 1300Hz
_g_stepwidth_b = 0;
dtmf_enable_pwm();

sleep_ms(duration_ms / 6);
_g_stepwidth_a = 98; // 1500Hz
sleep_ms(duration_ms / 6);
_g_stepwidth_a = 111; // 1700Hz
sleep_ms(duration_ms / 6);
}
else if (digit == DIGIT_TUNE_DESC)
{
Expand All @@ -196,6 +208,18 @@ void dtmf_generate_tone(int8_t digit, uint16_t duration_ms)
_g_stepwidth_a = 34; // C=523.25Hz
sleep_ms(duration_ms / 3);
}
else if (digit == DIGIT_TUNE_DESC2)
{
_g_stepwidth_a = 111; // 1700Hz
_g_stepwidth_b = 0;
dtmf_enable_pwm();

sleep_ms(duration_ms / 6);
_g_stepwidth_a = 98; // 1500Hz
sleep_ms(duration_ms / 6);
_g_stepwidth_a = 85; // 1300Hz
sleep_ms(duration_ms / 6);
}

// Stop DTMF transmitting
// Disable PWM output (compare match mode 0) and force it to 0
Expand Down Expand Up @@ -258,4 +282,4 @@ void sleep_ms(uint16_t msec)
{
sleep_mode();
}
}
}
2 changes: 2 additions & 0 deletions dtmf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#define DIGIT_BEEP_LOW -13
#define DIGIT_TUNE_ASC -11
#define DIGIT_TUNE_DESC -12
#define DIGIT_TUNE_ASC2 -14
#define DIGIT_TUNE_DESC2 -15
#define DIGIT_OFF -1
#define DIGIT_STAR 10
#define DIGIT_POUND 11
Expand Down
Binary file added generic_schematic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading