Dodge Caliber Forum banner

Adding Door Keypad

42K views 60 replies 20 participants last post by  neonpolaris 
#1 ·
As a pet project I was thinking about adding a door keypad. I had one on one of my previous cars and I really enjoyed the convenience.

I'm thinking about repurposing a Ford keypad (as a weather-proof set of buttons) and interfacing with a microcontroller, like an Arduino. I almost have the source code finished. Interfacing with the locks shouldn't be any harder than an aftermarket keyless entry install, which I have done before. Cutting a hole in my door is extremely scary, but would look the best when finished. I'd just get a keypad with a bezel around it so that it will look clean when I'm done.

So a few questions. Has anyone done something like this before? Any lessons learned?

I noticed Ford actually had a keypad that just stuck on the outside of the door. It programmed just like a second keyless entry remote, so there was no wiring needed. Is there anything like this for Dodge, maybe aftermarket?
 
#32 · (Edited)
So here I am, closer to the inevitable car door cutting.

Populating the board:

I got a little better as I worked from left to right. I didn't realize how little solder that SMD parts required.

All assembled:


Testing the board:

Everything works perfectly!

Fitting into the box:

The screw holes line up perfectly. The connectors on each end were a bit taller than I had expected, though. The lid still closes, but it pinches the wires a bit. I'll trim a little useless plastic off the top of the connectors and it should be fine.
 
#60 ·
This is Awesome!



Sorry to resurrect an old post....

I've been dreaming of ways to put a keypad lock on my truck since I bought it... this is by far the best implementation of circuitry I've seen. A PCB mounted microcontroller isn't something I would've imagined being so feasible, but you've proven it's not as complicated as I'd imagined.

The small 4 pin "chip" at the bottom of your last pic, is that another solid state relay for the backlight? I'll read over the code and pin assignments and check but that's what it looks like. And the 3 resisters in the center are part of the debounce circuitry?

I've gotten eagle to begin working on a PCB. It looks like the link you posted for the place you posted your design to is dead. You wouldn't have that eagle project still saved would you? I'll likely have to do something different anyways to incorporate serial communications to my CAN-Bus interface but something to look at in there might help me work on getting familiar with it...
 
#33 ·
polaris...props to you man. you really sound like you know what you are doing. most of that was like speaking chinese to me...definitely didnt understand most of it. i'm excited to see the finished product and hear how it works!!
 
#34 ·
Slowly...

I've redesigned my board to include some better power filtering and reordered it. It should be in next week.

Meanwhile, I finally cut that hole.

I was somewhat torn between putting the keypad underneath the door handle, and next to it. Most people I asked seemed to like it underneath, while I kind of preferred next to. Well, inside the door there is this "stuff". It kind of looks like metal painted on the inside of the door skin. For strength? Sound dampening? Something else? I don't know, but it made the door skin much thicker there (underneath the handle), so my decision was pretty much made for me.



Close up of metal "stuff".


Here are my practice holes. This allowed me to not only get used to cutting with my Dremel, but also work out the exact shape and size I needed to cut. I used the thin metal cutting disc for the Dremel. It worked well.


Here's the door with my template on it and taped up a bit.


Hole cut.


Looks a bit rough. (those marks below the hole are just dust)


The hole retaped, rough edges filed, and paint cracks sanded away.


Retaped and primer paint applied (to inhibit rust)


Dried and untaped.


Last shot of keypad and clip.
 
#36 ·
Looks very nice!!! Your braver than me LOL!!! Looks like a factory job. Reps for having the nerves and knowledge to do something like this.
 
#38 ·
Looks sick, If I were to ever tackle a job like this, I probally would have put the keypad underneither the handle instead.
But props and repped for the sweetness
 
#39 ·
Looks sick, If I were to ever tackle a job like this, I probally would have put the keypad underneither the handle instead.
Like I said, that metal "stuff" put me off. I wasn't really sure of it's purpose, so I left it alone. Also, I would have had to not only cut the hole, but trimmed that stuff away from the hole on the backside so that the clip would be able to hold the keypad on.

Looks like a couple more days before I'll have time to wire it in. :(
 
#40 ·
true enough, cutting on a new car would scare me.
 
#41 · (Edited)
CODE FINISHED!

Ok, after many hours yesterday, the keypad is wired in. It works fully, and I finished ALL the software for it.

But it wasn't easy.

You see, I realized that on my board that I have for the car, I can't connect the arduino to the keypad AND the arduino to the PC. The plug connections interfere with each other. This would not be the case with my latest board (that HAS shipped now, but isn't here yet) I really wanted to see what was going on, to make writing and testing new features better, so I made ANOTHER test keypad. This was made strickly with what I could get from Radioshack THAT DAY(expensive) with the exception of those headers already.


http://www.flickr.com/photos/43268066@N00/3625033355/

I really didn't want to pull the real keypad back out of the door anyway.

With the help of my new keypad, I have finalized my code. I've tried my best to emulate the Ford Keypads as much as possible.

Instructions:
To unlock the car, type in the 5-digit 'factory' code.
To lock the car, press the last two buttons together.

After too many unsuccessful attempts to type in a code, the keypad will flash and ignore input for one minute.

Program up to three additional 'user' codes (stored in EEPROM):
Type the 'factory' code, then 1, then a new 5-digit code, and finish by pressing one of the first three buttons.
Your new user code is now saved to that position. The car will confirm by locking and unlocking the doors.
You can overwrite the code by saving another to the same position.

Erase all user codes:
Type the 'factory' code, then 1, then press 1 again and hold for two seconds. The car will confirm by locking and unlocking the doors.

Time out (reset input keys) after programmable time (default 5 seconds). All key presses must be pressed within this time from each other to be considered together. The backlight will turn off after timeout.

The finalized code is in the door, fully working. When I get my new board in and fix a problem with my wire mounts in the door I'll post pics of the wiring side.
 
#42 ·
For those interested, here is the sourcecode:

Code:
// Car Keypad
// Version 1.0
//
// Michael Casson Rogers ([EMAIL="michael.casson@yahoo.com"]michael.casson@yahoo.com[/EMAIL])
// June 14th, 2009
//
// I designed this program to emulate a Ford keypad as much as possible.  I missed the one on my Lincoln.
//
// To unlock the car, type in the 5-digit 'factory' code.
// To lock the car, press the last two buttons together.
//
// Program up to three additional 'user' codes:
// Type the 'factory' code, then 1, then a new 5-digit code, and finish by pressing one of the first three buttons.
// Your new user code is now saved to that position.  The car will confirm by locking and unlocking the doors.
// You can overwrite the code by saving another to the same position.
//
// Erase all user codes:
// Type the 'factory' code, then 1, then press 1 again and hold for two seconds.  The car will confirm by locking
// and unlocking the doors.
//
// Input keys are assigned values 1, 3, 5, 7, and 9.
// 
// Time out (reset input keys) after programmable time (default 5 seconds).  All key presses must be pressed within
// this time from each other to be considered together.  The backlight will turn off after timeout.
// 
// Big thanks to Gian Pablo Villamil.  I used  his Simple Simon 2.0 to get me started.
// [URL]http://itp.nyu.edu/~gpv206/2006/09/simple_simon_v2.html[/URL]
//
// and thanks to the many helpful people at Arduino Forum!
// [URL]http://www.arduino.cc[/URL]
// For reading and storing user generated codes.
#include <EEPROM.h>
// Define the pin assignments for the input switches
#define KeyPin1 10
#define KeyPin3 9
#define KeyPin7 8
// Define backlight pin.
#define BackLight 19
// Define the pins the lock and unlock relays are connected to.
#define LockPin 15
#define UnlockPin 16

#define DebounceTime 20 // debounce time in milliseconds
#define PulseTime 150 // debounce time in milliseconds
#define TimeOutTime 5000 // timeout in milliseconds
int CodeArray[5] = {1, 3, 5, 7, 9}; // Enter desired combination code here, must be 5 digits. Use only 1, 3, 5, 7, and 9.
int InputArray[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // Starts InputArray with all 0's
int UserCodeArray1[5] = {EEPROM.read(0), EEPROM.read(1), EEPROM.read(2), EEPROM.read(3), EEPROM.read(4)};
int UserCodeArray2[5] = {EEPROM.read(5), EEPROM.read(6), EEPROM.read(7), EEPROM.read(8), EEPROM.read(9)};
int UserCodeArray3[5] = {EEPROM.read(10), EEPROM.read(11), EEPROM.read(12), EEPROM.read(13), EEPROM.read(14)};
int buttonPressed = 0;
int buttonPresses = 0;
 
// Remember when last press was for timeout function.
// Also, set lastPress as having just timed out so that the backlight doesn't light for the first few
// seconds on initialization because lastPress and millis are both zero.
unsigned long lastPress = millis() - (TimeOutTime + 1);
// counter for debouncing routine
unsigned long SwitchDownTime ;
// Define inputScore (used to compare InputArray to CodeArray)
int inputScore = 0 ;

void setup () {
//Serial.begin(9600);           // set up Serial library at 9600 bps, used for debugging.
pinMode(BackLight, OUTPUT);
pinMode(LockPin, OUTPUT);
pinMode(UnlockPin, OUTPUT);
pinMode(KeyPin1, INPUT);
pinMode(KeyPin3, INPUT);
pinMode(KeyPin7, INPUT);
}
// Main loop - should be easy to follow
void loop () {
//    Serial.println("loop");
getInput ();
timeOut ();
antiScan();
}
// Get the user's button presses and store it in InputArray
void getInput () {
//  Serial.println("getInput");
//Button 1
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == HIGH) {
        // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(1);
        }
        if (millis() - SwitchDownTime > 2000 &&
            InputArray[5] == CodeArray[0] &&
            InputArray[6] == CodeArray[1] &&
            InputArray[7] == CodeArray[2] &&
            InputArray[8] == CodeArray[3] &&
            InputArray[9] == CodeArray[4] &&
            InputArray[10] == 0 &&
            InputArray[11] == 1 &&
            InputArray[12] == 2 &&
            InputArray[13] == 1) {
              eraseUserCodes();
        }
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 3
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(3);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 5
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(5);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 7
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(7);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 9
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(9);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 7&9 (Lock)
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == LOW) {
      digitalWrite(LockPin, HIGH); // Wait while a button is pressed
      }
    digitalWrite(LockPin, LOW);
    lastPress = millis() - (TimeOutTime + 1);
    timeOut ();
    delay(200);  //For when people let go of lock, it doesn't turn the light back on when one button is pressed longer (milliseconds!) than the other.
    } // end if
} // end GetAnswer
// Compare CodeArray with InputArray
void checkAnswer () {
//  Serial.println("checkAnswer");
//// Print current InputArray for debugging
//  for (int i = 0; i <= 13; i++) {
//    Serial.print(InputArray[i]);
//  }
//  Serial.print(" ");
//  Serial.print(buttonPresses);
//  Serial.println();
//// End print current InputArray
    
  if (InputArray[7] == CodeArray[0] &&
      InputArray[8] == CodeArray[1] &&
      InputArray[9] == CodeArray[2] &&
      InputArray[10] == CodeArray[3] &&
      InputArray[11] == CodeArray[4] &&
      InputArray[12] == 0 &&
      InputArray[13] == 1) {
        buttonPress(2);
        buttonPresses = 0;
  }
  
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 1) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(0, InputArray[8]);
    EEPROM.write(1, InputArray[9]);
    EEPROM.write(2, InputArray[10]);
    EEPROM.write(3, InputArray[11]);
    EEPROM.write(4, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray1[0] = EEPROM.read(0);
    UserCodeArray1[1] = EEPROM.read(1);
    UserCodeArray1[2] = EEPROM.read(2);
    UserCodeArray1[3] = EEPROM.read(3);
    UserCodeArray1[4] = EEPROM.read(4);
    doorConfirm();
  }
  
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 3) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(5, InputArray[8]);
    EEPROM.write(6, InputArray[9]);
    EEPROM.write(7, InputArray[10]);
    EEPROM.write(8, InputArray[11]);
    EEPROM.write(9, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray2[0] = EEPROM.read(5);
    UserCodeArray2[1] = EEPROM.read(6);
    UserCodeArray2[2] = EEPROM.read(7);
    UserCodeArray2[3] = EEPROM.read(8);
    UserCodeArray2[4] = EEPROM.read(9);
    doorConfirm();
  }
  
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 5) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(10, InputArray[8]);
    EEPROM.write(11, InputArray[9]);
    EEPROM.write(12, InputArray[10]);
    EEPROM.write(13, InputArray[11]);
    EEPROM.write(14, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray3[0] = EEPROM.read(10);
    UserCodeArray3[1] = EEPROM.read(11);
    UserCodeArray3[2] = EEPROM.read(12);
    UserCodeArray3[3] = EEPROM.read(13);
    UserCodeArray3[4] = EEPROM.read(14);
    doorConfirm();
  }
  
  //Entered Programming Mode, but tried to store in 7, not an option.
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 7) {
        clearArray();
      }
  
  //Entered Programming Mode, but tried to store in 9, not an option.
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 9) {
        clearArray();
      }
  
  if (InputArray[8] != 2 &&
      InputArray[9] == CodeArray[0] &&
      InputArray[10] == CodeArray[1] &&
      InputArray[11] == CodeArray[2] &&
      InputArray[12] == CodeArray[3] &&
      InputArray[13] == CodeArray[4]) {
    success();
  }
  
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray1[0] &&
      InputArray[10] == UserCodeArray1[1] &&
      InputArray[11] == UserCodeArray1[2] &&
      InputArray[12] == UserCodeArray1[3] &&
      InputArray[13] == UserCodeArray1[4]) {
    success();
  }
  
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray2[0] &&
      InputArray[10] == UserCodeArray2[1] &&
      InputArray[11] == UserCodeArray2[2] &&
      InputArray[12] == UserCodeArray2[3] &&
      InputArray[13] == UserCodeArray2[4]) {
    success();
  }
  
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray3[0] &&
      InputArray[10] == UserCodeArray3[1] &&
      InputArray[11] == UserCodeArray3[2] &&
      InputArray[12] == UserCodeArray3[3] &&
      InputArray[13] == UserCodeArray3[4]) {
    success();
  }
  
}
void success () {
//  Serial.println("success");
  digitalWrite(UnlockPin, HIGH);
  delay(PulseTime);
  digitalWrite(UnlockPin, LOW);
  buttonPress(0);
  buttonPresses = 0;
}
void timeOut () {
//  Serial.println("timeout");
if (millis() - lastPress > TimeOutTime) {
  clearArray();
  digitalWrite(BackLight, LOW);
  lastPress = millis() - (TimeOutTime + 1); //lastPress follows millis() just outside of timeout, to prevent problems with millis rollover lighting backlight after 50 days
  buttonPresses = 0;
}  else {
  digitalWrite(BackLight, HIGH);
}
}
void clearArray () {
//  Serial.println("clearArray");
  for (int i = 0; i <= 13; i++) {
    InputArray[i] = 0;
  }
}
void buttonPress (int j) {
//  Serial.println("buttonPress");
  if (millis() - SwitchDownTime > DebounceTime) { // If button was down longer than debounce
    InputArray[0] = InputArray[1];
    InputArray[1] = InputArray[2];
    InputArray[2] = InputArray[3];
    InputArray[3] = InputArray[4];
    InputArray[4] = InputArray[5];
    InputArray[5] = InputArray[6];
    InputArray[6] = InputArray[7];
    InputArray[7] = InputArray[8];
    InputArray[8] = InputArray[9];
    InputArray[9] = InputArray[10];
    InputArray[10] = InputArray[11];
    InputArray[11] = InputArray[12];
    InputArray[12] = InputArray[13];
    InputArray[13] = j;
    lastPress = millis();
    buttonPresses++;
    buttonPressed = 1;
    checkAnswer ();
  } // end if
}
void antiScan () {
//  Serial.println("antiScan");
  if (buttonPresses >= 35) {
    for (int i = 0; i < 60; i++) {
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      delay(500);
      digitalWrite(BackLight, LOW); // Light backlight while pressed
      delay(500);
    }
  buttonPresses = 0;
  }
}
void doorConfirm () {
//  Serial.println("doorConfirm");
  digitalWrite(LockPin, HIGH);
  delay(PulseTime);
  digitalWrite(LockPin, LOW);
  delay(400);
  digitalWrite(UnlockPin, HIGH);
  delay(PulseTime);
  digitalWrite(UnlockPin, LOW);
  clearArray();
  buttonPresses = 0;
//  Serial.println("Confirmed");
}
void eraseUserCodes () {
//  Serial.println("eraseUserCodes");
//  Serial.println("Erase Mode Started");
  EEPROM.write(0, 8);
  EEPROM.write(1, 8);
  EEPROM.write(2, 8);
  EEPROM.write(3, 8);
  EEPROM.write(4, 8);
  EEPROM.write(5, 8);
  EEPROM.write(6, 8);
  EEPROM.write(7, 8);
  EEPROM.write(8, 8);
  EEPROM.write(9, 8);
  EEPROM.write(10, 8);
  EEPROM.write(11, 8);
  EEPROM.write(12, 8);
  EEPROM.write(13, 8);
  EEPROM.write(14, 8);
//  Serial.println("Erase Mode Finished");
  UserCodeArray1[0] = 8;
  UserCodeArray1[1] = 8;
  UserCodeArray1[2] = 8;
  UserCodeArray1[3] = 8;
  UserCodeArray1[4] = 8;
  UserCodeArray2[0] = 8;
  UserCodeArray2[1] = 8;
  UserCodeArray2[2] = 8;
  UserCodeArray2[3] = 8;
  UserCodeArray2[4] = 8;
  UserCodeArray3[0] = 8;
  UserCodeArray3[1] = 8;
  UserCodeArray3[2] = 8;
  UserCodeArray3[3] = 8;
  UserCodeArray3[4] = 8;
  doorConfirm();
}
 
#43 · (Edited)
Permanently Mounted

I needed to find something that would hold my wire loom to the door skin, not flopping around and out of the way so the window doesn't rub it when it goes down. I went to Lowes and this was the only thing I found that didn't involve screws:



Unfortunately, they detached from the door when it got hot (summer in Florida). So I replaced the crappy foam tape with some decal tape that I've used alot and has never failed me.



It may be hard to see, but here's my wireloom coming from the keypad, down to the bottom of the door and up the other side. That's the connector on the bottom right.



Here's my box with the hole cut and some tape covering some pins to protect my wires. I used my first board since my new one didn't work out, but I was too impatient to try and troubleshoot it. I'll worry about it if I have any problems with this one (I haven't yet).



The back of the box, ready for mounting:



Here is an example of my splices into the door. Soldered together and double walled heat shrink with adhesive. This is the door lock sense wire, I believe.



Here's the box mounted. I can assure you that it's quite secure. I used just a tiny piece of the decal tape to hold it up temporarily while I was waiting for the other board, and it was harder than I expected to come off. Fully taped will definately hold it.



So it's been in my car for a while now, and I've had no problems from it at all. I'm very pleased with it. I don't used it all the time, most of the time my keys are more convenient, but there has been more than once that I was already outside and wanted something from my car and didn't have my keys on me. So it has already fulfilled its purpose. I'll sure be happy I did it if I ever lock my keys in my car.

I should note that I did not run a new power wire from the battery for this. I did in fact use the power wire for the side-view mirrors. It powers the backlight and everything perfectly, and again, I haven't had a single problem with it yet.


Edit: I've published the board on BatchPCB, so anyone can have their own made whenever they want:
http://www.batchpcb.com/product_info.php?products_id=20456&check=c14c074daa0b1640579156fd6d36dd84
 
#49 ·
now i can brother you and enter some random combinations
:Na_Na_Na_Na:
 
#50 ·
oh... i forgot .....
:rep:
 
#51 ·
neonpolaris, Your a Genius!!! reps for a great job. It looks factory which is a good thing.
 
#53 ·
I found a massive security bug in your anti-scan and timeout code.

Say I was trying every possible combo on your door, I see that your Idea was that 7 incorrect codes in a row should result in the antiscan tripping, but the way you handle button presses results in me being able to actually try 29 codes All at once, as a string.

Say I enter 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 1, 7, 1, 1, 1, 1, 9, 1, 1, 1, 3, 3, 1, 1, 1, 5, 5, 1, 1, 1 (34 button presses so far.)

Now, this results in 11111, 11113, 11131, 11311, 13111, 31111, 11115, 11151, 11511, 15111, 51111, 11117, 11171, 11711, 17111, 71111, 11119, 11191, 11911, 19111, 91113, 11133, 11331, 13311, 33111, 31115, 11155, 11551, 15511, 55111.

Now, instead of pressing button number 35, I wait the time out period of 5 seconds, then resume scanning again. Since the number of button presses got cleared in the timeout, I am free to try out another 30 codes, if I optimize for another sequence again.

What you should have done, code wise, is only clear the array in the 5 second time out, and have a second time out, equal to the one minute delay, that actually clears the number of buttons pressed.

Finally, in your antiscan, if it is tripped, make each and every button press during the one minute duration reset the delay before you can actually enter a new code, back to 60 seconds.
 
#54 ·
I found a massive security bug in your anti-scan and timeout code.
Thanks for looking over the code. I designed it to try and emulate the Ford keypad as much as possible. Being able to try out 29 codes in the 35 presses is simply the nature of the beast. I don't want to have to remember how many presses I've made so that my code starts on a multiple of five, or wait for a 5 sec timeout if I mis-press.

As far as the timeout, I do agree. I was aware of is, but the simple lockout was the last thing that I implemented and I was getting lazy at that point. (Adding usercodes sort of exploded my code and made it harder for me to work with) Using delay(), I can't monitor for presses, so I'd have to rewrite how it works. Also, I had intended to play with a Ford keypad to see exactly how they handle it, but I didn't get a chance yet. The manual only says 35 presses. Within five secs of each other? A minute all together? Five minutes? Doesn't say.

I'm honestly surprised that this was mentioned here and not on the Arduino forums. Perhaps you were sent here via Hackaday. :)

I think I know how I'll make those changes. Perhaps I'll do that in the next few days. I'm extra glad that I made that 'testing' keypad now.
 
#56 ·
definately!!!!












.
 
#57 ·
DUDE THATS NICE!!!!! Looks just like my factory Lincoln's Keypay!
Reps for that!!!


With him Keeping to the Ford Specs of having two numbers for every button "1-2" "3-4" "5-6" "7-8" "9-0" I found this repesentation of every possible combination to potentially open the lock. If he didnt have the 60 sec anti-scan in the pad you could press this series of numbers and open the door... U still can but it will take a hell of alot longer... thought this was a lil interesting!
 
#58 ·
If you don't mind scanning right to the antiscan trigger, you have a 0.9900 repeating chance of getting the factory code in one scan pass. You need 101 scan passes to try ALL 3125 combinations.

Now, if you are dealing with the 5 second timeout clearing the antiscan delay, that is only pressing 34 buttons, then waiting 5 seconds before doing the next pass, then you would have a 0.952380 repeating percent chance of getting the factory code in one scan pass, and need 105 of them to scan ALL 3125 codes.

There is exactly 3129 key strokes in that above image, to completely scan all of the codes.
 
#59 · (Edited)
The only person I know that would go through all that trouble to break a door code, would be me.

I have *finally* taken the few minutes to add the seperate timeout for the keypresses. So now, the buttons pressed timer resets after one minute, not 5 seconds.

I haven't added the feature for making additional keypresses to lengthen the lockout. I doubt that I will. I may try and add some fading effects to the light turning on on the first press and fading out after timeout. The lockout should still be a hard flash, though.

Code:
// Car Keypad
// Version 1.1
//
// Michael Casson Rogers ([EMAIL="michael.casson@yahoo.com"]michael.casson@yahoo.com[/EMAIL])
// August 17th, 2009
//
// I designed this program to emulate a Ford keypad as much as possible.  I missed the one on my Lincoln.
//
// To unlock the car, type in the 5-digit 'factory' code.
// To lock the car, press the last two buttons together.
//
// Program up to three additional 'user' codes:
// Type the 'factory' code, then 1, then a new 5-digit code, and finish by pressing one of the first three buttons.
// Your new user code is now saved to that position.  The car will confirm by locking and unlocking the doors.
// You can overwrite the code by saving another to the same position.
//
// Erase all user codes:
// Type the 'factory' code, then 1, then press 1 again and hold for two seconds.  The car will confirm by locking
// and unlocking the doors.
//
// Input keys are assigned values 1, 3, 5, 7, and 9.
// 
// Time out (reset input keys) after programmable time (default 5 seconds).  All key presses must be pressed within
// this time from each other to be considered together.  The backlight will turn off after timeout.
// 
// Big thanks to Gian Pablo Villamil.  I used his Simple Simon 2.0 to get me started.
// [URL]http://itp.nyu.edu/~gpv206/2006/09/simple_simon_v2.html[/URL]
//
// and thanks to the many helpful people at Arduino Forum!
// [URL]http://www.arduino.cc[/URL]
// For reading and storing user generated codes.
#include <EEPROM.h>
// Define the pin assignments for the input switches
#define KeyPin1 10
#define KeyPin3 9
#define KeyPin7 8
// Define backlight pin.
#define BackLight 19
// Define the pins the lock and unlock relays are connected to.
#define LockPin 15
#define UnlockPin 16
 
#define DebounceTime 20 // debounce time in milliseconds
#define PulseTime 150 // debounce time in milliseconds
#define TimeOutTime 5000 // timeout in milliseconds
#define AntiScanTime 60000 // timeout in milliseconds
int CodeArray[5] = {9, 9, 7, 7, 5}; // Enter desired combination code here, must be 5 digits. Use only 1, 3, 5, 7, and 9.
int InputArray[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // Starts InputArray with all 0's
int UserCodeArray1[5] = {EEPROM.read(0), EEPROM.read(1), EEPROM.read(2), EEPROM.read(3), EEPROM.read(4)};
int UserCodeArray2[5] = {EEPROM.read(5), EEPROM.read(6), EEPROM.read(7), EEPROM.read(8), EEPROM.read(9)};
int UserCodeArray3[5] = {EEPROM.read(10), EEPROM.read(11), EEPROM.read(12), EEPROM.read(13), EEPROM.read(14)};
int buttonPressed = 0;
int buttonPresses = 0;
 
// Remember when last press was for timeout function.
// Also, set lastPress as having just timed out so that the backlight doesn't light for the first few
// seconds on initialization because lastPress and millis are both zero.
unsigned long lastPress = millis() - (TimeOutTime + 1);
// counter for debouncing routine
unsigned long SwitchDownTime ;
// Define inputScore (used to compare InputArray to CodeArray)
int inputScore = 0 ;
 
void setup () {
//Serial.begin(9600);           // set up Serial library at 9600 bps, used for debugging.
pinMode(BackLight, OUTPUT);
pinMode(LockPin, OUTPUT);
pinMode(UnlockPin, OUTPUT);
pinMode(KeyPin1, INPUT);
pinMode(KeyPin3, INPUT);
pinMode(KeyPin7, INPUT);
}
// Main loop - should be easy to follow
void loop () {
//    Serial.println("loop");
getInput ();
timeOut ();
antiScan();
}
// Get the user's button presses and store it in InputArray
void getInput () {
//  Serial.println("getInput");
//Button 1
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == HIGH) {
        // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(1);
        }
        if (millis() - SwitchDownTime > 2000 &&
            InputArray[5] == CodeArray[0] &&
            InputArray[6] == CodeArray[1] &&
            InputArray[7] == CodeArray[2] &&
            InputArray[8] == CodeArray[3] &&
            InputArray[9] == CodeArray[4] &&
            InputArray[10] == 0 &&
            InputArray[11] == 1 &&
            InputArray[12] == 2 &&
            InputArray[13] == 1) {
              eraseUserCodes();
        }
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 3
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(3);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 5
    if (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == LOW && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(5);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 7
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == HIGH) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(7);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 9
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == HIGH && digitalRead(KeyPin7) == LOW) {
       // Wait while a button is pressed
        if (millis() - SwitchDownTime > DebounceTime && buttonPressed == 0) { // If button has been down longer than debounce
          buttonPress(9);
        } 
      }
      buttonPressed = 0;
      lastPress = millis() ; //Needed here also, in case button is held down for more than timeout value
    } // end if
//Button 7&9 (Lock)
    if (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == LOW) {  
      SwitchDownTime = millis(); // Record time it went down (for debounce)
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      while (digitalRead(KeyPin1) == HIGH && digitalRead(KeyPin3) == LOW && digitalRead(KeyPin7) == LOW) {
      digitalWrite(LockPin, HIGH); // Wait while a button is pressed
      }
    digitalWrite(LockPin, LOW);
    lastPress = millis() - (TimeOutTime + 1);
    timeOut ();
    delay(200);  //For when people let go of lock, it doesn't turn the light back on when one button is pressed longer (milliseconds!) than the other.
    } // end if
} // end GetAnswer
// Compare CodeArray with InputArray
void checkAnswer () {
//  Serial.println("checkAnswer");
//// Print current InputArray for debugging
//  for (int i = 0; i <= 13; i++) {
//    Serial.print(InputArray[i]);
//  }
//  Serial.print(" ");
//  Serial.print(buttonPresses);
//  Serial.println();
//// End print current InputArray
 
  if (InputArray[7] == CodeArray[0] &&
      InputArray[8] == CodeArray[1] &&
      InputArray[9] == CodeArray[2] &&
      InputArray[10] == CodeArray[3] &&
      InputArray[11] == CodeArray[4] &&
      InputArray[12] == 0 &&
      InputArray[13] == 1) {
        buttonPress(2);
        buttonPresses = 0;
  }
 
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 1) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(0, InputArray[8]);
    EEPROM.write(1, InputArray[9]);
    EEPROM.write(2, InputArray[10]);
    EEPROM.write(3, InputArray[11]);
    EEPROM.write(4, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray1[0] = EEPROM.read(0);
    UserCodeArray1[1] = EEPROM.read(1);
    UserCodeArray1[2] = EEPROM.read(2);
    UserCodeArray1[3] = EEPROM.read(3);
    UserCodeArray1[4] = EEPROM.read(4);
    doorConfirm();
  }
 
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 3) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(5, InputArray[8]);
    EEPROM.write(6, InputArray[9]);
    EEPROM.write(7, InputArray[10]);
    EEPROM.write(8, InputArray[11]);
    EEPROM.write(9, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray2[0] = EEPROM.read(5);
    UserCodeArray2[1] = EEPROM.read(6);
    UserCodeArray2[2] = EEPROM.read(7);
    UserCodeArray2[3] = EEPROM.read(8);
    UserCodeArray2[4] = EEPROM.read(9);
    doorConfirm();
  }
 
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 5) {
//    Serial.print("Adding New Code: ");
//    Serial.print(InputArray[7]);
//    Serial.print(InputArray[8]);
//    Serial.print(InputArray[9]);
//    Serial.print(InputArray[10]);
//    Serial.println(InputArray[11]);
    EEPROM.write(10, InputArray[8]);
    EEPROM.write(11, InputArray[9]);
    EEPROM.write(12, InputArray[10]);
    EEPROM.write(13, InputArray[11]);
    EEPROM.write(14, InputArray[12]);
//    Serial.println("New Code Added");
    UserCodeArray3[0] = EEPROM.read(10);
    UserCodeArray3[1] = EEPROM.read(11);
    UserCodeArray3[2] = EEPROM.read(12);
    UserCodeArray3[3] = EEPROM.read(13);
    UserCodeArray3[4] = EEPROM.read(14);
    doorConfirm();
  }
 
  //Entered Programming Mode, but tried to store in 7, not an option.
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 7) {
        clearArray();
      }
 
  //Entered Programming Mode, but tried to store in 9, not an option.
  if (InputArray[0] == CodeArray[0] &&
      InputArray[1] == CodeArray[1] &&
      InputArray[2] == CodeArray[2] &&
      InputArray[3] == CodeArray[3] &&
      InputArray[4] == CodeArray[4] &&
      InputArray[5] == 0 &&
      InputArray[6] == 1 &&
      InputArray[7] == 2 &&
      InputArray[13] == 9) {
        clearArray();
      }
 
  if (InputArray[8] != 2 &&
      InputArray[9] == CodeArray[0] &&
      InputArray[10] == CodeArray[1] &&
      InputArray[11] == CodeArray[2] &&
      InputArray[12] == CodeArray[3] &&
      InputArray[13] == CodeArray[4]) {
    success();
  }
 
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray1[0] &&
      InputArray[10] == UserCodeArray1[1] &&
      InputArray[11] == UserCodeArray1[2] &&
      InputArray[12] == UserCodeArray1[3] &&
      InputArray[13] == UserCodeArray1[4]) {
    success();
  }
 
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray2[0] &&
      InputArray[10] == UserCodeArray2[1] &&
      InputArray[11] == UserCodeArray2[2] &&
      InputArray[12] == UserCodeArray2[3] &&
      InputArray[13] == UserCodeArray2[4]) {
    success();
  }
 
  if (InputArray[8] != 2 &&
      InputArray[9] == UserCodeArray3[0] &&
      InputArray[10] == UserCodeArray3[1] &&
      InputArray[11] == UserCodeArray3[2] &&
      InputArray[12] == UserCodeArray3[3] &&
      InputArray[13] == UserCodeArray3[4]) {
    success();
  }
 
}
void success () {
//  Serial.println("success");
  digitalWrite(UnlockPin, HIGH);
  delay(PulseTime);
  digitalWrite(UnlockPin, LOW);
  buttonPress(0);
  buttonPresses = 0;
}
void timeOut () {
//  Serial.println("timeout");
if (millis() - lastPress > TimeOutTime) {
  clearArray();
  digitalWrite(BackLight, LOW);
}  else {
  digitalWrite(BackLight, HIGH);
}
if (millis() - lastPress > AntiScanTime) {
//Serial.print("millis:");
//Serial.print(millis());
//Serial.print(" lastPress:");
//Serial.print(lastPress);
//Serial.print(" AntiScanTime:");
//Serial.println(AntiScanTime);
buttonPresses = 0;
}
if (millis() - lastPress > (TimeOutTime + AntiScanTime)) {
  lastPress = millis() - (TimeOutTime + AntiScanTime + 1); //lastPress follows millis() just outside of timeout, to prevent problems with millis rollover lighting backlight after 50 days
}
}
void clearArray () {
//  Serial.println("clearArray");
  for (int i = 0; i <= 13; i++) {
    InputArray[i] = 0;
  }
}
void buttonPress (int j) {
//  Serial.println("buttonPress");
  if (millis() - SwitchDownTime > DebounceTime) { // If button was down longer than debounce
    InputArray[0] = InputArray[1];
    InputArray[1] = InputArray[2];
    InputArray[2] = InputArray[3];
    InputArray[3] = InputArray[4];
    InputArray[4] = InputArray[5];
    InputArray[5] = InputArray[6];
    InputArray[6] = InputArray[7];
    InputArray[7] = InputArray[8];
    InputArray[8] = InputArray[9];
    InputArray[9] = InputArray[10];
    InputArray[10] = InputArray[11];
    InputArray[11] = InputArray[12];
    InputArray[12] = InputArray[13];
    InputArray[13] = j;
    lastPress = millis();
    buttonPresses++;
    buttonPressed = 1;
    checkAnswer ();
  } // end if
}
void antiScan () {
//  Serial.println("antiScan");
  if (buttonPresses >= 35) {
    for (int i = 0; i < 60; i++) {
      digitalWrite(BackLight, HIGH); // Light backlight while pressed
      delay(500);
      digitalWrite(BackLight, LOW); // Light backlight while pressed
      delay(500);
    }
  buttonPresses = 0;
  }
}
void doorConfirm () {
//  Serial.println("doorConfirm");
  digitalWrite(LockPin, HIGH);
  delay(PulseTime);
  digitalWrite(LockPin, LOW);
  delay(400);
  digitalWrite(UnlockPin, HIGH);
  delay(PulseTime);
  digitalWrite(UnlockPin, LOW);
  clearArray();
  buttonPresses = 0;
//  Serial.println("Confirmed");
}
void eraseUserCodes () {
//  Serial.println("eraseUserCodes");
//  Serial.println("Erase Mode Started");
  EEPROM.write(0, 8);
  EEPROM.write(1, 8);
  EEPROM.write(2, 8);
  EEPROM.write(3, 8);
  EEPROM.write(4, 8);
  EEPROM.write(5, 8);
  EEPROM.write(6, 8);
  EEPROM.write(7, 8);
  EEPROM.write(8, 8);
  EEPROM.write(9, 8);
  EEPROM.write(10, 8);
  EEPROM.write(11, 8);
  EEPROM.write(12, 8);
  EEPROM.write(13, 8);
  EEPROM.write(14, 8);
//  Serial.println("Erase Mode Finished");
  UserCodeArray1[0] = 8;
  UserCodeArray1[1] = 8;
  UserCodeArray1[2] = 8;
  UserCodeArray1[3] = 8;
  UserCodeArray1[4] = 8;
  UserCodeArray2[0] = 8;
  UserCodeArray2[1] = 8;
  UserCodeArray2[2] = 8;
  UserCodeArray2[3] = 8;
  UserCodeArray2[4] = 8;
  UserCodeArray3[0] = 8;
  UserCodeArray3[1] = 8;
  UserCodeArray3[2] = 8;
  UserCodeArray3[3] = 8;
  UserCodeArray3[4] = 8;
  doorConfirm();
}
For the paranoid, it would be really easy to edit the code to make this more strict. You could make it lock you out for an hour after only 5 presses if you wanted to. Try scanning that. :) But again, I'm going for emulation, not paranoid tin-hat scenarios. If you're that paranoid that someone will really scan your code, don't get a keypad. I mean, who would spend an hour scanning a code when you could just break a window?
 
#61 ·
Hey there, yes this is quite a resurrection!

I actually rebuilt that board integrating it all in one, more details here: http://themikerogers.com/category/car-keypad/

I probably do have the eagle files... somewhere.

Yes, that's another SSR on the bottom, although 2.0 just uses a transistor for the backlight.

Debouncing is done in software, those resistors are pullups (or pulldowns, don't remember).

v2 is a bit more complicated to assemble because I put a crazy power supply on there, but it's more customizable to different vehicles without having to alter the board (area for jumpers and/or through hole resistors). I'm actually thinking about remaking a v3 soon, to make further improvements. If you don't mind me asking, what type of vehicle is it?
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top