Electronics Complicated custom keypad system, need your input.

Discussion in 'Modding' started by ZapWizard, 13 Mar 2004.

  1. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    Well this can go in either Motors, or Electronics:

    I will be putting a key-pad into my car that will allow me to disable my custom car alarm, and to unlock the doors if I happen to lock the keys inside.

    I am using a touch sensative chip
    This chip allows me to put the sensors behind the glass.
    I plan on mounting it to the edge of the windshield.

    At first I will use the keypad in a split mode.
    The first 4 keys will work at a key-code input.
    When the right code is entered the driver's door unlocks.
    Once unlocked the other two keys are enabled, these will provide a button to unlock all the doors, and another button to re-lock all the doors, and enables the code again.
    (Anytime drivers door is unlocked, the keypad is also unlocked)

    ----------------------------------------------------------

    But later I want to integrate this keypad with a microcontroller to give it TONs of functionality.

    Here are my ideas so far
    The keypad has six keys 1,2,3,4,5,6
    The keypad will also have a Red Green Blue LED behind each key.

    Once un-locked, pressing a keypad number will put the keypad into a certain mode.
    The entire keypad will change colors depending on the mode, and button presses.

    When a button is pressed that button lights green. (Except for code entry)

    Modes:>>

    >>

    Locked: Red>>

    Anytime the driver’s door is locked the keypad is in a locked-state.
    When the key-code is correctly entered the drivers door unlocks
    Once unlocked the keypad turns green, this is the mode selection button.
    -If any button is pressed, the keypad lights up in full red mode.

    -Once the correct code is entered the alarm makes a single chirp, and the keypad lights green.

    -If the wrong code is entered once the parking lights flash, and the alarm makes two chirps.

    -If the wrong code is entered twice the parking and headlights flash, and the horn honks twice.

    -If the wrong code is entered three times the alarm sounds, and the keypad goes dark.

    Three presses on the keypad will re-enable pad and allow another chance to enter the code.

    >>

    1) Lock control: White>>

    Press 1, keypad turns Orange
    Press 1 all doors unlock
    Press 2 all doors lock, and alarm is not enabled
    Press 3 all doors lock, and alarm is set for mild mode
    Press 4 all doors lock, and the alarm is set for normal mode
    Press 5 all doors lock, and the alarm is set for panic mode
    Press 6 Exits the current mode
    >>

    -Alarm disabled: Short trip, secure parking area

    External motion causes the keypad to light brighter for code entry.

    >>

    -Mild mode: Parked in semi-secure area such as at work

    Glass breakage sensor, and inside motion detector active. Keypad glows dim red. External motion caused keypad to light brighter for code entry.

    Alarm in this mode is car alarm speaker only, and parking lights.

    >>

    -Normal mode: Parked in non-secure area such as overnight at an apartment complex.

    Glass breakage sensor, and inside motion detector active. External motion detector gives off a single chirp and parking light flash when motion detected. And the keypad lights up bright for code entry. Keypad lights in a knightrider fashion.

    Alarm in this mode causes horn to honk, alarm speaker to sound, and headlights to flash

    >>

    -Panic mode: Parked in a dangerous area such as a concert or sporting event.

    Glass breakage sensor, and inside motion detector active.

    External motion sensor give off three chirps when motion is detected.

    Keypad lights are disabled, and first button entry is ignored, but causes keypad to light up for code entry.

    Alarm in this mode causes horn to honk non-stop

    >>

    >>

    2) Window/Trunk control: Yellow

    Press 2, the keypad turns yellow
    Press 1 The drivers window roles down
    Press 2 The trunk pops open
    Press 3 Heat venting mode on/off
    Press 4 Chiller mode on/off
    Press 5 Heating mode on/off
    Press 6 Exits the current mode
    >>

    -Heat venting mode: All windows crack down a bit, the moonroof opens, the fresh air mode is selected, and the blowers turn on for three minutes, or until the car is started.

    -Chiller mode: Heat venting mode runs for about 1 minute, then car is started, A/C is turned on for five minutes, or until the key is in the ignition.

    -Heating mode: Car starts, Rear defroster turns on, heat turns on, defrost modes turn on (A/C, fresh air, defrost vents). Runs for 7 minutes or until the key is in the ignition

    -Pressing any mode key again will disable the mode.

    >>

    >>

    3) Audio mode: Blue

    Press 3, the keypad turns Blue
    Press 1 Volume up
    Press 2 Volume down
    Press 3 Tune Radio/CD up
    Press 4 Tune Radio/CD down
    Press 5 Audio System on/off
    Press 6 Exits the current mode>>
    >>

    -Audio system on/off: This allows the car radio to turn on without keys in the car. Perfect for while cleaning the car.

    >>
    4) Light mode: Orange

    Press 4, the keypad turns White

    Press 1 Hazard lights turn on/off
    Press 2 Headlights turn on/off
    Press 3 Parking lights turn on/off
    Press 4 Courtesy lights turn on
    Press 5 Effect lights turn on/off
    Press 6 Exits the current mode

    5) mode:

    Press 5, the keypad turns

    Press 1
    Press 2
    Press 3
    Press 4
    Press 5
    Press 6 Exits the current mode
    6) Valet mode: Aqua (dim)

    Requires pressing 6, then 1,2,and 3. The keypad then turns aqua.

    Pressing 4, 5, 6 will allow for the keypad to be restored to normal with a code entry.

    Press 1 Enable step 1
    Press 2 Enable step 2
    Press 3 Enable step 3
    Press 4 Disable step 1
    Press 5 Disable step 2
    Press 6 Disable step 3
    -The alarm modes are disabled

    (Besides trunk and hood sensors)

    --------------------------

    Ok, I know that looks increadibly complicated, but it can all be done by a microcontroller and programming.

    But what kind of functions would you choose for button 5?
    (Seriously please)

    Once I make the basic system I may be able to make extras for forum members.
    (The full system requires extensive modification of the rest of the car)
     
    Last edited: 15 Mar 2004
  2. Xiachunyi

    Xiachunyi What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Could function 5 be a code recover function button so there will be a way to recover your pass code?

    Nice project; looking forward to it.
     
  3. computer

    computer What's a Dremel?

    Joined:
    10 Jan 2004
    Posts:
    205
    Likes Received:
    0
    that would be totally wicked project there Zap... could win you an award or something... be careful though.. if someone gains access to the wires or PCB or chip, they could replace it without you knowing but say programmed to allow a second code as well :eek: ...

    still nice though. how you going to connect all that up to your car though?

    PS: I would use 5 for recover / disable functions too. say, go into 5, 6, press your code and the chip will lock itself out until you press a button on the PCB or something and you can use it to make a new code or something (ie, press 5, type code on 1-4, lights flash and beep, type code again (confirm), 3 beeps and lights flash then return to locked state or something)...
     
  4. mattg2k4

    mattg2k4 What's a Dremel?

    Joined:
    4 Jun 2003
    Posts:
    61
    Likes Received:
    0
    A microcontroller could easily be used for this. I would recomend something like the 16F877A from microchip, mostly because its got lots of input and output lines. If you need any more output lines you could use a shift register to expand it.

    You should probably write the code in C since it looks like there's going to be a lot of it.

    The only really hard part is going to be figuring out how to hook it all up to your car's systems.
     
  5. Ardentfrost

    Ardentfrost What's a Dremel?

    Joined:
    22 Jan 2004
    Posts:
    292
    Likes Received:
    1
    why would he want to recover his pass code? If he forgot his code and could use 5 to recover it, I'd say some random person could recover it as well.

    I'd say make 5 an admin panel. One could set a new code (as with all passwords, you'll probably want to change it every so often, possibly set another code for your wife so she can have her own code (and you could even turn off certain functions for her so she doesn't have to worry about them or so she can't accidentally turn the radio on when she's locking up and kill your battery), another could possibly change the light up colors of the other functions... or you could make it so that you press 5 for the backlight to come on (in case you're a dark area) of course, that might be counter intuitive since you'd have to see the number to press it ;)

    I'm sure you could think of stuff to put on an admin panel... certain settings you'd like to change with the actual interface of the keypad or whatever.
     
  6. Xiachunyi

    Xiachunyi What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    That is what I meant about the recover button, he has all those other inputs open once he selects '5' so it is logically to have some kind of deterrent built in. His other deterrent might be another password or something of that nature, or it might be a key combination.
     
  7. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    A) They would have to hack the software, I plan on using a Motorola 68HC11, which has built in protection so you can't steal code out of it.
    B) It will be a lot of wire taps into the existing car system, and a few custom circuits

    I know how to program a motorola 68HC11 pretty well, or I may use a AtomPro, which programs like a basic stamp, but is much better.

    I like the admin panel idea, that is perfect.
    As far as backlighting the pad will glow dim, and if pressed glow bright.
    The pad will ignore the first keypress, before code entry starts.
    There would be a time-out function in case you mess-up halfway through.

    I like the idea of making it an "easy mode" that my wife could use.
    But I could actualy do that simply by giving her a different code.

    I also thought that I would make it so that there is a panic mode, pressing 611 or something.

    These touch sensors activate on capacitance, I will have a rain detector circuit that would disable the keypad if it was raining.
    As rain could start randomly punching in numbers, and setting off the alarm.
     
  8. Ardentfrost

    Ardentfrost What's a Dremel?

    Joined:
    22 Jan 2004
    Posts:
    292
    Likes Received:
    1
    Ok, took a minute to check out the datasheet

    http://www.qprox.com/downloads/datasheets/qt160_106.pdf

    It seems to me you'll be able to adjust sensitivity (page 4) to prevent walk by (I'd probably decrease it so much so that you literally have to touch the glass before it senses your finger), but it also shows how a person becomes part of the circuit when using the panel.

    [​IMG]

    I'm not 100% sure, but it seems that rain wouldn't set off the panel since I don't see how it could complete the circuit. I could be wrong, but it'd be something to test out
     
  9. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    Well that is how the circuit works, but simply walking by will not activate the circuit. (As there is air between you and the circuit)
    It is only when you touch the glass, that you create a capacative gap between the ground plane (behind the sensor plate) and yourself.
    The sensor plate reads this change in capacitance, and outputs accordingly.

    I am not too worried about rain, I can test the circuit for that.
    The chip I am using has "next key suppression" meaning that it takes the input of the greater capacitance, even if the keys near it are also active.

    --------------

    I just finished up the schematic for the basic keypad.
    I will post it in a second.
     
  10. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    I am using a cheap old 8 channel I/O basic stamp I have lying around.
    It has just enough inputs for a first-draft prototype, and I don't have to order any extra parts.

    The keypad will have 5 numbered keys.
    The 6th key that will lock the doors on the car at anytime, as it bypasses the basic stamp.

    The driver side door has a lock-status switch that I will monitor.
    If the car door is locked, then the keypad is lit red, and the code must be entered to unlock the car.

    If the driver side door is unlocked, the keypad is green, and pressing any key will lock the car.
    (Imagine getting out of the car, touching the windsheild and the doors lock)

    The basic stamp only handles code unlocking and any-key locking.
    The door lock sense wire controls the backlight color.
    And the 6th button will always lock all doors, regardless of the driver's door lock position.
     
    Last edited: 15 Mar 2004
  11. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    so what happend if the code has a bug? all ledas turn blue and the alarm goes off? (AKA Blue screen) :p :hehe:

    seriously though: This sounds really cool... a bit advanced, but that's the way we like it, right? :)

    edit: be sure that you use all the buttons for the code... that ways fingerprints on the glass won't narrow down the code options... alltough i doubt that any burglar will understand what all those lights do.. :)
     
  12. Ardentfrost

    Ardentfrost What's a Dremel?

    Joined:
    22 Jan 2004
    Posts:
    292
    Likes Received:
    1
    You should install some sort of RF reciever or Bluetooth or something (something you can make secure) so you can unlock/control your stuff from like a PDA or whatever... that'd be cool and not too hard to add in to what you already have planned :) You could even make your own keyless remote that wouldn't be as functional as your window pad, but could do simple commands.

    Also, does your car already have power locks and windows and stuff? Or are you going to install motors and actuaters? If you have to install the electro-mechanical devices (or did install them in the past), it would make hooking up your MCU circuits to those devices a lot easier.

    I mean, I don't know what kind of car you drive, but if it came with power locks and windows, all that might be controlled by your car's computer which could get tricky. If the car is a little older, and came with it, it's probably all just buttons connected to actuators and motors. If that's the case, all you really need to learn everything you need to know about your car is one of those car books from an auto store.

    I'm not saying I know a lot about cars (I know a little, but mostly about installing those systems into cars that don't have them), but I do know that a car's computer can be a F'd up thing, and usually car companies don't give out a lot of information about it. I guess you could rig it up so the buttons and motors have no connections to the computer and become completely controlled by your device, I'm just wondering what your plans are in that respect
     
  13. Captain_Zap

    Captain_Zap What's a Dremel?

    Joined:
    18 Jul 2003
    Posts:
    70
    Likes Received:
    0
    I wouldent post anything regarding your security here zap we might feal the urge to lift your car and use it as a bargning chip to make you resume work on the media pc;)
     
  14. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    LOL, if the code bugs out I am screwed, naw, because anytime the drivers side door is unlocked, the keypad is also unlocked.

    The code doesn't have to be 6 characters long.
    It's all in the programming, so with 6 keys the code could be:
    14531644153454315341 - if you really wanted it that long!

    I also thought about using symbols, kind of like a puzzle code, or something.

    The car already has keyless entry, since the keypad unlocks either by code, the door, or keyless entry, then you could be walking to the car press the button to unlock the doors, and walk by the glass-press a button, and pop the trunk with opening the car.
    (Granted this could be done by remote with an aftermarket alarm, it is not as fun)

    Later I will have a carpurter that could probably do all kinds of things, but that is later.

    The car already has power locks, windows, and keyless entry.

    Well I did get my hands on the maintenence manual, it doesn't show much, but it does show how to take things apart, and test switches and stuff.
    But basicly my idea is to tap the existing controls, in which case the car's onboard computer can't tell the difference between me pressing a button, or a circuit controlling the button.

    For example the schematic posted above can unlock and lock the doors.
    It also monitors the door lock status switch.

    I pulled the door lock push-button out of the car and tested it with a mutlimeter.
    It reads 0 Ohms when pushed to unlock, and 1000ohms when pushed to Lock.
    And is disconnected when no pressed.
    So all I need to do to duplicate the function of the switch is have a transistor or relay to ground, and a transistor or relay through a 1000ohm resistor to ground.

    I tested this just by taking a wire, and 1K resistor out to the car.
    Shorting the door switch connetor with a 1K does lock the car, and shorting it with a wire, unlocks the car.
    Easy (well it takes time though)

    Well in all reality even with the schematic or board layout, you would have to actualy get past the alarm, and into the car first.

    But one of the first things I am adding (that I won't be taking images of) is a stealthed immobilizer that cuts the ignition.
    The immobilizer would require you putting a magnet onto a certain spot to allow the car to start.

    -------------------------------------------------

    I have made a PCB layout now for the schematic.
    I was able to fit 100% of the circuit onto a single sided PCB.
    This makes it very easy to build either by hand, or etching.

    I now need to design the actual touchpad with it's lights.
    (I am thinking of switching the first prototype from Red/Green on every button to Red/Blue backlighting using just two LEDs: One on each end of the sensor pad.
     
  15. Xiachunyi

    Xiachunyi What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Hmmm, I wonder what would happen if a large surge of voltage were to jump to your car...
     
  16. Ardentfrost

    Ardentfrost What's a Dremel?

    Joined:
    22 Jan 2004
    Posts:
    292
    Likes Received:
    1
    If it got by fuses, probably fry the chip
     
  17. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    The cool part about the chip is that it works through materials (Glass, plastic, wood) So there really wouldn't be enought metal there to pass a spark through the glass, it would just go to the car body instead.
     
  18. Xiachunyi

    Xiachunyi What's a Dremel?

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    That's nice to know. Go go Zap! :D

    Oh yea on your +5v regulator, will you need a feed back diode so as not to damage or shorten the life of the regulator when power is suspended since your filter capacitor is larger than .1uf?
     
  19. ZapWizard

    ZapWizard Enter the Mod Matrix

    Joined:
    19 Sep 2002
    Posts:
    4,705
    Likes Received:
    5
    Everything is very low current, the only thing needing a feedback diode is the relay. (Which it has)

    ---------------------------------------------

    Ok I have designed my keypad:
    It looks a little old school, knightrider kind of stuff, but I like it.
    I will use two Red/Blue superbright LEDs to backlight it.

    [​IMG]

    Car Locked:
    [​IMG]

    Car Unlocked:
    [​IMG]

    I also need to add a relay so that the keypad and lights turns off anytime the car is on.
    That is simple enough though.
     
  20. fuzzygoblin

    fuzzygoblin What's a Dremel?

    Joined:
    19 Oct 2003
    Posts:
    275
    Likes Received:
    1
    sounds awsome i wish i had teh skills to do somethign similar, i wish i knew who to do and i wish i knew what you were basicly talking about.

    good luck

    ZAPS THE L33t ELECTRONICS AND CASE MOD MAN
     

Share This Page