Image Map Image Map
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Radio Shack/Safe House remote keyswitches/keypads

  1. #11
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    25,021
    Blog Entries
    20

    Default

    The keypads may be labeled as "Davidson", but they're really Moose MPI-275s. The keypad is encoded (4 bit) with a special "panic" combinations (# and * pressed at the same time).

    I'm a bit surprised that no one's adapted this to a simple vintage SBC application.

    Still, there are some decent 1-off deals on eBay:

    http://donkeyshopper.ca/AAaBBb115944...curity_Keypads
    Last edited by Chuck(G); September 8th, 2017 at 10:46 AM.

  2. #12
    Join Date
    Oct 2008
    Location
    Kamloops, BC, Canada
    Posts
    4,757
    Blog Entries
    38

    Default

    The Moose units may be totally useable if I can emulate the Radio Shack keypad's microcontroller. Its theory of operation and schematic is described in the owners manual, because Radio Shack was awesome like that. http://schematicsforfree.com/archive...y%20Switch.pdf
    It's really simple. There's litearally a third of that schematic you can just substitute with one Arduino Pro Mini and save yourself the headache.
    = Excellent space heater

  3. #13
    Join Date
    Oct 2008
    Location
    Kamloops, BC, Canada
    Posts
    4,757
    Blog Entries
    38

    Default

    The keypads arrived today. You were correct in that there is NO additional smarts in this thing. You get the keypad, two LED"s and a piezo for a pre-alarm notification.
    I discussed the idea of an intermediate Arduino with a friend online (Chryseus) and he started plugging away at a rough emulation of the functionality of the Radio Shack keypad. I give him credit for working on it while not having one of the keypads, or really needing to code this up anyways.

    Code:
    /*
     * Alarm control system for use with 4 bit keypad.
     * Created by Chryseus.
     */
    
    // Configuration
    const bool SERIAL_ENABLE = true;
    const unsigned int BAUD_RATE = 9600;
    const bool DEBUG_MODE = true;
    const unsigned char PIN_LEN = 4; // Number of digits in pin
    const unsigned char PIN[PIN_LEN] = { 2, 2, 2, 2 };
    const unsigned long ENTRY_TIME = 5*1000; // Time before keypad resets, First number = seconds
    const unsigned char MAX_ERROR = 5; // Maximum incorrect entries before alarm is triggered
    
    // Pin assignment
    const unsigned char LATCH_MODE_SW = 6;
    const unsigned char RELAY_TAMPER_PANIC = 8;
    const unsigned char RELAY_REMOTE = 7;
    const unsigned char KEY_INPUT_0 = 2;
    const unsigned char KEY_INPUT_1 = 3;
    const unsigned char KEY_INPUT_2 = 4;
    const unsigned char KEY_INPUT_3 = 5;
    
    // Keypad layout
    const unsigned char KEYPAD[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '#', '*', 0, 0, 0, 0 };
    
    //##########################################################################################
    //##########################################################################################
    
    bool INPUT_0;
    bool INPUT_1;
    bool INPUT_2;
    bool INPUT_3;
    bool latch_mode; // true = latching, false = momentary
    bool ALARM_ARMED = false;
    unsigned char CODE[PIN_LEN];
    unsigned char current_code = 0;
    unsigned long end_time = 0;
    unsigned long start_delay = 0;
    unsigned char STATE = 0;
    unsigned char current_error = 0;
    
    unsigned char decode_keypad() // Decode the 4 bit keypad input and lookup
    {
     unsigned char value = 0;
     if (INPUT_0) { value += 1; }
     if (INPUT_1) { value += 2; }
     if (INPUT_2) { value += 4; }
     if (INPUT_3) { value += 8; }
     if (DEBUG_MODE)
     {
      Serial.print("Raw Binary Decode: ");
      Serial.println(value);
     }
     if (value == 0) { return 0; }
     if (DEBUG_MODE)
     {
      Serial.print("Lookup Value: ");
      Serial.println(KEYPAD[value-1]);
     }
     return KEYPAD[value-1];
    }
    
    void verify_code()
    {
      for (short i=0; i < PIN_LEN; i++)
      {
        if (CODE[i] != PIN[i])
        {
          //Incorrect digit
          STATE = 3;
          current_error++;
          if (current_error > MAX_ERROR)
          {
            digitalWrite(RELAY_TAMPER_PANIC, HIGH);
            delay(2000);
            digitalWrite(RELAY_TAMPER_PANIC, LOW);
            // enforce a 1 minute delay
            // delay(1*60*1000);
          }
             break;
          }
        }
      if (STATE == 0)
      {
        current_error = 0; // reset error count
        //Pin is correct
        ALARM_ARMED = !ALARM_ARMED; // toggle state
        latch_mode = digitalRead(LATCH_MODE_SW);
        if (latch_mode == HIGH)
        {
          if (ALARM_ARMED == false) { digitalWrite(RELAY_REMOTE,LOW); }
          if (ALARM_ARMED == true) { digitalWrite(RELAY_REMOTE,HIGH); }
        }
        else
        {
           digitalWrite(RELAY_REMOTE,HIGH);
           delay(200); // may need adjustment
           digitalWrite(RELAY_REMOTE,LOW);
        }
      }
    }
    
    void setup() {
      if (SERIAL_ENABLE) { Serial.begin(BAUD_RATE); Serial.println("Ready.."); }
      pinMode(LATCH_MODE_SW, INPUT);
      pinMode(RELAY_TAMPER_PANIC, OUTPUT);
      pinMode(RELAY_REMOTE, OUTPUT);
      pinMode(KEY_INPUT_0, INPUT);
      pinMode(KEY_INPUT_1, INPUT);
      pinMode(KEY_INPUT_2, INPUT);
      pinMode(KEY_INPUT_3, INPUT);
    }
    
    void loop() 
    {
      STATE = 0;
      for (short i = 0; i < PIN_LEN; i++) { CODE[i] = 0; } // Reset code buffer
      current_code = 0; // Reset code position
      
      INPUT_0 = digitalRead(KEY_INPUT_0);
      INPUT_1 = digitalRead(KEY_INPUT_1);
      INPUT_2 = digitalRead(KEY_INPUT_2);
      INPUT_3 = digitalRead(KEY_INPUT_3);
      
      if (INPUT_0 || INPUT_1 || INPUT_2 || INPUT_3)
      {
        CODE[current_code] = decode_keypad();
        current_code++;
        delay(500);
        start_delay = millis();
        end_time = start_delay + ENTRY_TIME;
        
        while (millis() < end_time)
        {
          INPUT_0 = digitalRead(KEY_INPUT_0);
          INPUT_1 = digitalRead(KEY_INPUT_1);
          INPUT_2 = digitalRead(KEY_INPUT_2);
          INPUT_3 = digitalRead(KEY_INPUT_3);
          if(current_code == PIN_LEN) // User has entered the full pin
          {
            verify_code();
            break;
          }
          if (INPUT_0 || INPUT_1 || INPUT_2 || INPUT_3)
          {
            CODE[current_code] = decode_keypad();
            current_code++;
            delay(500);
          }
        }
        if (millis() >= end_time && DEBUG_MODE) { Serial.println("Timeout"); }
       }  
    }
    = Excellent space heater

  4. #14

    Default

    I had one of those radio shack digital keypads back in the day -- used it to operate a magnetic door strike. Good reliable keypad.

    These days I have an Elk M1 Gold. Nice keypads that connect via RS-485. Automation support. Wireless support. Internet support. Dialer support. Voice notification and voice prompting. The drawback is of course the cost. However, as much as I like vintage, I want my alarm system to be reasonably modern.

    As far as prices for old radio shack stuff. It is nuts. I miss my 277-1008 "Mini Amplifier Speaker" but not so much that I'd be willing to pay thirty bucks for one.

  5. #15
    Join Date
    Oct 2008
    Location
    Kamloops, BC, Canada
    Posts
    4,757
    Blog Entries
    38

    Default

    The drawback is of course the cost. However, as much as I like vintage, I want my alarm system to be reasonably modern.
    I've never really understood this. For the most part all modern security systems rely on NO/NC switches and PIR sensors. Something that for the latter has not really changed much in 30 years. The only thing that has really changed is the smarts of the control unit and remote keypad stations, optionally how it has become heavily OEM'd and disables itself if you are not subscribed to a live monitoring service. I can find "inactive" Chubb and ADT units for a dime a dozen at salvage. While an older system does present a higher reliance on anti-tamper loops, at the end of the day the circuit closes and a bell rings.
    If all you need to do is monitor magnetic reed switches on a dozen doors and windows, I don't really see why you need to upgrade as at the end of the day a security system is a deterrent, not a full-stop burglary prevention device.
    But I digress...
    = Excellent space heater

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •