Car Keypad

i make this sugestion to every1 doing a car project. Get another car battery for your project. that way, you dont have to replace your car's so often

That doesn't make any sense.

what do u mean?

What he means is that it doesn't make sense to add another car battery just for a project.

When you say wouldn't have to replace it as often, I assume you mean one of two things:

A: The car's battery would be drained by the electronics.
B: The battery will be worn out more quickly by the extra load.

The battery in a car gets recharged constantly as the car is being ran. So it wouldn't be drained by the project. Car batteries aren't replaced because they run low like some AA's in a gameboy. They are replaced because, like any rechargeable, they stop holding a charge after a length of time, or charge cycles. Really, the only time a battery is being discharged in when your car is off, or being cranked. After that, the alternator supplies enough power for everything. You can crank a car, then remove the battery entirely, and it will continue to run! (assuming your alternator is healthy)

As for B, the amount of current that these projects pull is relatively low. Simply turning on your radio easily pulls more than my whole project. Turning on your headlights, even more so.

So adding another battery to power these projects wouldn't make sense. The car's battery keeps itself charged, is already there, and isn't adversely affected by it. (would barely even notice)

Also, from your post here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239996764/13#13
You shouldn't really control voltage with just a resistor. The reason is that your voltage with fluctuate depending on how much current your load draws at the moment. Take a look at Ohm's Law, it will explain it fairly well. This is why voltage regulators (such as the 7805) are used. They hold output voltage steady independent of load.

My redesigned board should be in next week, but since it's a direct swap for the other board, I see no reason to wait for it.

So I finally cut that scary, scary 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.

Back of keypad up inside the door.

Keypad on door. (not as crooked as this picture makes it look)

And a nice wide shot of the door.

Hopefully my next update will be when I have the wiring finished!

WOW, thats nice :slight_smile:

reminds me of that song "the first cut is the deepest" :wink:

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 (expensive) THAT DAY (I had those headers already).


Imgur

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.

My code is too long to post on this forum. You can find it here:

If you forget your key how will you start the car?

The keypad doesn't let you start the car. It just lets you in the car. It's great if you just need to get something out of the car and you don't have your keys on you. It would also be handy if you happen to lock your keys in the car.

If a typical car battery is about 45 amp hours, and I'm pulling 20mA or so, does that mean it would have to run for 1125 hours (almost 47 days) to half-discharge the battery?

Yup. Unless something shorts out, you won't drain the car battery with the Arduino.

I guess the math is correct but I'm surprised. 20ma seems like no load at all but 47 days is not an outlandish period for a car to sit idle and having half my battery drained by my door lock key pad seems a bit alarming. Maybe it's a Canadian winter thing but I'd be worried!

I wish that I had ever gotten around to actually testing what the rest of the car pulls when it's off. Has anyone else done this? My car has never sat idle for more than three days it's whole life, so a month and a half wouldn't be a problem for me. The winters are rather mild here in Florida. :slight_smile:

Nice work on the finished product.

How did you interface the keypad with your existing electronic locks. I read you used a relay, but where did you splice into the system?

The reason I ask is because I want to add keyless entry into my car, and i found the existing switch in the car door to just be two simple contact switches, one for lock, and one for unlock. Did you just add the relay in parallel with something like that?

My door lock buttons are also just simple contact switches. They way that they signal the car to lock or unlock all the doors is by connecting two wires in the door together with either a 100 or 330 ohm resistor. One is for lock, the other for unlock. One of the wires was pulled high to 5v and the other was a ground, so any ground should work.

Instead of trying to send wires from my box to my door control's box and soldering on that board, I just used my own 100 and 330 ohm resistors and used the solid state relay to close the same two wires together with them.

Since this forum is more about the electronics and less about the car, I didn't bother with which wires in the door I used, etc. It would be different with each car.
This is the relevant post from my thread over at CaliberForumz:

For the switching I used this solid state relay:
AQW212A

It was handy because I can drive it directly from my arduino's pins (I put a resistor on it to be safe).


I just realized that I haven't posted a parts list yet. Still waiting on that last board, I suppose. When I get it installed I'll release the board info (at BatchPCB) and the parts list along with it.

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.

Congrats - can't wait to see the video!

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 needed to find something that would hold my wire loom to the door skin

What you found is pretty nice.

Another option is known as a "cable tie mount". It's a plastic tab with slots to accept a cable tie on one side and adhesive on the other, so you tie the cables to the mount.

-j

I was looking for a cable tie mount, even checked NAPA, but had no luck. Where does one find these? I know I'll want them again in the future.

Also, I've published the board at BatchPCB, so anyone can have one made whenever they want.
http://www.batchpcb.com/product_info.php?products_id=20456&check=c14c074daa0b1640579156fd6d36dd84

I was looking for a cable tie mount, even checked NAPA, but had no luck. Where does one find these?

I got them through an electrical distributor for work.

For personal use, I'm pretty sure I have picked them up at the local borg (home depot, lowe's, etc) in the electrical department.

-j

I posted a simple video by request of bill2009. It shows locking, unlocking, and the anti-scan. Don't worry, that combo was just a user-code that I added and have since erased. :slight_smile: