• Please review our updated Terms and Rules here

Bringing the Model 33 to the 21st Century - Part 8

NeXT

Veteran Member
Joined
Oct 22, 2008
Messages
8,096
Location
Kamloops, BC, Canada
****CLICK HERE FOR PART 7****

Now is the point where bugs began to come out of the woodwork.
Once the Pro Mini was programmed I began playing with sending commands to the modem using the buttons exclusively. The first issue was that single presses would repeatedly fire off commands, resulting in erratic behaviour and unreliable operation. The assumption was that the switches were inducing a level of keybounce and the micro read each instance as me pressing the button. Initially I tried to fix this using a few resistors.

IMG_9315.jpg


This did not work. Eventually a software debounce solution was made which essentially made the micro only accept one response from the input once every 100ms. Now when I pressed the buttons the modem would respond properly and all the indicators would operate as I expected.

Code:
 //interrupt 0 = D2
//interrupt 1 = D3

long lastDebounceTime = 0;
long debounceDelay = 200; // 200ms

void setup(){
  //Setup inputs
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  
  //300 baud serial
  Serial.begin(300);
  
  attachInterrupt(0, dialControlInterrupt, RISING);
  attachInterrupt(1, AAControlInterrupt, RISING);
}

void loop(){
}

void dialControlInterrupt(){
  if((millis() - lastDebounceTime) > debounceDelay){
    Serial.println("ATD");
    lastDebounceTime = millis();
  }
}

void AAControlInterrupt(){
  if((millis() - lastDebounceTime) > debounceDelay){
    if(digitalRead(4) == LOW){
      Serial.println("ATS0=1");
    } else {
      Serial.println("ATS0=0");  
    }
    lastDebounceTime = millis();
  }
}

IMG_9505.jpg


Another issue was turning out to be a lot more serious. My habit of using telco cable and unshielded ribbon cable had caught up on me. I was finding that half the time when the circuits came up the MAX232 would go into CMOS latchup on the TxD line. If not noticed soon enough it would burn the chip out. (thank god I socketed that!) While I knew the voltage rails were stable when the adapter powered up I was suspecting that the modem and the adapter coming up at the same time was causing an instability. To remedy the situation the relay that turned the modem on was replaced with a time delay relay which gave the adapter half a second to come up and initialize the RS-232 line before the modem also did the same. The delay came with its own obstacle however in that it was rated for 12v while my existing wiring was 5v. The solution was to replace the relay with a 5V rated one and remove an LED that was being used as part of the control circuit. As an added measure the unused pins for the second level converter in the MAX232 were tied to ground.

CGS_1088.jpg

CGS_1089.jpg

CGS_1090.jpg


So now everything worked…..except the dialer. That bugger was causing me grief for over eight months and I was getting nowhere.

IMG_9619.jpg


I finally caved and began asking around. My break came from the guys at the Classic Rotary Phones Forum. The first issue they noticed with my design is that you can’t pulse dial with more than one telephone device off hook. It simply would not work. I was not feeling like replacing the rotary dial at this point with a DTMF pad for two reasons: One, I was not looking forward to finding a suitable grey plastic number pad which you would of found on some of the internal modem CCU’s and two, the pad required you to use a different cover plate which I did not own, I did not expect to find and apparently only came with more button holes than I needed. The easier solution was to use a pulse dialing to DTMF adapter. A few exist but Aliexpress can get you the Dialor 1.2 for about $25.

CGS_1091.jpg


It came with absolutely no documentation. A fair amount of experimenting had to take place before things seemingly started to work. L1 and L2 turned out to be the phone line connections, G was signal return for the two contacts on the dial, P was the pulsing contacts on the dial and the D was the dialing sense contact. Knowing this I quickly setup a breadboard phone circuit using the adapter, the dial, two relays as the hook switch and an extension cable so I could continue to control everything form the buttons on the CCU.

IMG_1084.jpg

IMG_1185.jpg


Problems continued to persist. While the circuit was fine, the telephone line was STILL not impressed by two devices off hook. Didn’t matter if it was a modem or another telephone. The presence of another device meant that the line voltage was too low for the logic on the adapter and nothing would work.

diagram123.gif


I was starting to wonder if this could be externally powered somehow.

****CLICK HERE FOR PART 9****
 
Back
Top