Car Anti-Theft System
- November 17th, 2011
- Posted in Electronics . Hacks & Mods . Products . Projects
- By BadWolf
- Write comment
I know it’s been a long time since I posted stuff up here,been busy working.
So here’s the first of my recent projects to pop up soon enough.
It’s a Car Anti-Theft System based around an Arduino Nano,a Sparkfun common 12 buttons Keypad and some more circuitry.
DO AT YOUR OWN RISK,WE ARE NOT RESPONSIBLE FOR “BRICKED CARS” =P
Here’s how it work:
-Car won’t start unless you provide it with the correct password/keycode.
-Audible signals will alert you if password/keycode entered is Accepted or not ( in this case,some random for wrong and Super Mario Song for success) via a standard piezo speaker.
-A relay(or 2 since 1.1) will be activated for a definite period of time and thus enable you to start your car.
-Bypass hidden security switch provide a solution if you forget your password.
-Power is provided by a China-made USB Hub powered directly from 12V Accessory line of your car via a LM7805 circuit.
-A relay circuit is enclosed alone to allow placement anywhere you want it
-2 LEDs display states (keypressed,password good/wrong)
-A thief will find it really confusing to hijack your car with that amount of wires under the dashboard…
-Quick software update to the Arduino via the USB Hub which is easily accessible.
-Bonus: Start Engine switch to look cool =3
Before going on,here’s 2 important points:
1-I think that an Arduino Nano ain’t that overkill here as a car is a very sound application where stability is required.
2-The under-dashboard USB hub is perfect for future dev or embeded device like GPS or Bluetooth headset as this one has 7 ports on which power and data can be streamed. (A usb plug next to the OBDII,sweet)
Let’s start with the diagram of how I pulled that one out:
As you can see,it’s pretty straight forward, Arduino reads the keypad,every press trigger some sound via piezo, 2LEDs for feedback and a relay driven with a 2N2222 transistor and protected by a diode (THIS IS IMPORTANT,see why here)
The Arduino program is commented all the way so it’s user-friendly to modify and adapt.
DOWNLOADS: (Libraries are REQUIRED for it to work,install them according to arduino.cc directives.
Arduino Keypad Library (393) RequiredArduino Password Library (325) Required
Arduino Anti-Theft Program V1.1 (649)
To power up the arduino I’ve decided to go a different way than normal people tend to go by using a China powered USB Hub like this:
So Arduino is plugged in via USB cable and get nice 5V juice out of it. Also,it enable the software update by plugging the HUB to any laptop and the addition of 6 other USB powered devices .
As you can see,this unit is powered by a wall-wart,which is not something you find under the dashboard of a 2008 Yaris.
The solution was to cut the wall-wart and replace it with a LM7805 on perfboard which is itself plugged into the accessory line o the car,this way the arduino is up after you turn the key on,thus less battery usage.
for more info on LM7805 check here.
WIRING/INSTALLATION
Tools needed:
-Soldering Iron and stuff
-Cutters
-Wires
-Multimeter (without this,it will be very,very difficult)
As explained above,all what is needed to prevent the car from starting up is to cut the Ignition Signal Line “ISL” from the Car Key Connector. When this cable is not connected and you turn the key to start,the signal won’t reach the computer so no vroom. This is where a relay comes in handy as it will reconnect this wire and thus provide ignition.
This is what a Ignition harness looks like:
1-Using the multimeter,locate the ground wire on the harness.
2-Connect the neg lead of the LM7805 to the ground
3-Locate the Accessory wire (on the pic it’s the big beefey orange one) by probing on ground and on all the other wires and by turning the key to ACC. to have power only when it’s on this position and connect LM7805 V+ here
4-Locate the ISL again by grounding one lead of your Multi and by probing each wire then turning the key to start your car. When you find the correct wire,cut it and try to start,if it fails,you succeed.
5-Connect 2 wires that goes to your relay switch to the ISL
6-Plugin,make it look shiny and punch in a keycode,if the relay tick,you got that time to start your car. Don’t worry about the current as it’s a Signal line (well,it is on a Yaris) and some low voltage goes through).
DO AT YOUR OWN RISK,WE ARE NOT RESPONSIBLE FOR “BRICKED CARS”
So here’s a video of mine in action:
Some pics:
- Wiring Diagram
- USB Hub
- Ignition Harness
- Overview ot he system
Notes
-I have installed a bypass security key somehow hidden down below in case the arduino freak out.
-I’ve also installed a start engine button for the look =P
Sorry,no pics of the actual wiring because when I made it 2 days ago,I didn’t thought about posting it online but people seems to like it so…
Any suggestion or request to the software : Post in the comments,I’ll be happy to modify it to suit your needs.
Thanks.













Just been reading your website on car-anti-theift-system. Wow… I just started training as a mechanic and im very into my cars at the moment. I want to do this in my car (Ford Escort) but i have no electrical experience, but i’l still give it a try. How much would a system like that roughly cost?
Does the electrical diagram show how to install a ignition button? and the bypass ignition? I no this may be asking a lot but could you give me instructions to make the installation for me idiot-proof.
I’d be happy to help you through the entire process mate.
I’ve sent you an email.
where did you get that start switch. really professional looking build by the way.
It came off Ebay mate, something like this :http://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l2736&_nkw=round+key+switch
Thanks for everything else.
hey can you send me a link to somewhere i could buy one of those keypads? im trying to build a similar system for my home/dorm as im leaving for college next year. but im getting hung up on JUST FINDING a keypad!
also i would love to have a look at the Arduino sketch used for this.
for reference if nothing else.
thank you and great project. nice and clean install.
keypad came from Sparkfun.com
the arduino sketch is in the article under the big download marker =P
http://badwolf.hackhut.com/wp-content/plugins/download-monitor/download.php?id=8
If you are doing this to an older VW Golf or Jetta with the seatbelt attached to the Door, there are two wires you could remove from the seat belt receiver on the door so you don’t have to cut into the ignition wiring harness
What about the keypad ? Where did you get that ?
Sparkfun!
The links page is filled with juicy info also ;p
hey this is a really cool build could you send me your instructions on how to do this i would like to do it to my car
All the instructions are up here mate,software included.
Just upload software,wire keypad,relay,leds and piezo and there ya go.
The hard part is finding what wire to cut and connect to the relay to prevent ignition, you can find that with a voltmeter by probing the ignition harness (key connector) while turning it on.
Was just wondering if you could send me the code of this project, and any instructions you can
I’m having a bit of trouble modifying it to use RFID as well
The software is available for download on this very page mate, and for using with RFID, may I suggest this post:
http://hackaday.com/2010/10/07/arduino-rfid-and-you/
Regards.
I was wondering where you got the resources about the ignition line information, etc.?
As a mechanical engineering student it’s kinda my domain so I had some knowledge before attempting the build. The only tool I really needed was a multimeter and some logic.
I wanted the keypad to work only after the key was on ready state—-Accessory is only at this moment—-tap the accessory line.
following some simple leads like that make things work for me.
The most technical info I needed was how to remove the plastic covers from my car,this I found out calling my toyota dealer’s parts and service.
Hope it helped.
hey what is the actual specific model that your using for the aruino? i found a whole bunch i want to get the exact one your using cause i dont know much about this stuff and dont want to mess anything up.. thanks!
cool post by the way exactly what i was looking for
I’m using a Nano V3.0 bought on sparkfun. Onboard usb and power regulation make it work real good. I’ve built another one lately and I’ve used a Pro mini from gravitech,no usb connector so ftdi cable is used and it work exactly as intended. Any arduino (almost) should work for that,but still,the Nano at40$ is a no-brainer.
Please help i am new in this and want to make this awesome device. When i try to compile program some error pops out.
I put keypad and password to libraries folder/
Here is screenshot:
http://i41.tinypic.com/2nknw61.png
it seems you don’t have the library installed on your computer.
You should take a look here and learn how they work:
http://arduino.cc/it/Reference/Libraries
and here’s how to install them:
http://arduino.cc/en/Guide/Environment
It should work just fine after.
Thank you for reply.
I solved that problem.
Can you change program so we can change password without PC (only use arduino to change pass).
Example:
we type some secret password and it enter into password changing mode, enter new password and confirm it and then use it.
@ Sobiguy and DM
The new revision of the software is currently being developped to do exactly this !
It’s not quite ready as we’re facing problems in variables manipulation but we’ll get it done soon enough.
Expect a couple of week.
Thanks,
Hey Badwolf,
Found your article here from some other forums you posted on. Have you by chance made any head-way on storing/changing the password on the eeprom?
Please hit me up.
see the above/below answer.
Thanks
Nice work on the outside case/plastic to give it a finished look. Did you mill out the plastic around the keypad? Or did you use some kind of Dremel rotary tool?
Hi! I’ve milled the metal plate and then used a dremel to shape the plastic part. Also used some x-knife to carve it up.
This locking system works this way:
1-Plug your keypad according to instructions below
2-Plug Output LED Relay and Relay_Aux (Pin 4,12,13)
3-Plug Keypress LED on 2 and a Piezo speaker on 3
4-Modify the password below to the one you desire
ONCE RUNNING
-Compose password and press * to unlock
-At anytime,press # to reset the password buffer
-If music and led/Relay comes up,it’s good
-If short music comes up and no Relay,start again
NOTES
For debug purposes,the serial lines will output key pressed and messages to help you troubleshoot any problems
specific to your setup like debounce and timings.
Enjoy
Th3BadWolf
-Based on your instructions above, for the relay : pin 12 on output arduino should be connect to which relay pin?
since in the schematic diagram there’s no connection between relay and pin 12 on arduino. Thanks.
I’m using relays from seeed studio depot which only needs 3 connections :
1-VCC
2-GND
3-Signal
So the signal pin of your relay should be plugged there.
I know relays got + and – but you should never use an arduino to directly control them. Instead use a transistor and a diode to avoid overcharge and spikes damaging your controller
which leaves you with + – and signal.
here a schematic:
http://makezineblog.files.wordpress.com/2009/02/arduinorelay.jpg?w=400&h=361
Thanks for the reply.
oh i see… so the pin base from transistor is connected directly to arduino digital pin 13 and nothing is connect to digital pin 12 right?
Well yes,the pin 12 is in case you’d like to activate a second transistor or need more place on the arduino to plug it in,it’s useless in most cases.
You should use a resistor between the pin and the transistor to protect the arduino.
Thanks for sharing this! I’m also new at this but I’m going to do this modification to my car.
Where did you get the surrounding with the the LEDs?
And could you give me instructions to make the installation for me idiot-proof?
Thanks in advance!!!
The new software is out,I can build it for you if you want.
Hi there, first of thanks for sharing this!
I´m also gonna be joining the club attempting to install this great device into my Toyota. I´ve already have an Arduino I´ve been using in other projects but when I´m trying to download your program to my mac, it keeps saying that the download has failed. I would really like to check your code and try to make some mods of my own :) since this is gonna be for a project in order to graduate.
so you’re in need of the code? I guess the problem is on your mac cause my stats show multiple successful downloads so far. Let’s try to fix that real easy by giving me your email address right here and I’ll email it to you. Thanks for visiting.
I managed to download it successfully from a windows pc. Thanks!
great! let me know if you need something else
Gotta question here, in order to get the power, you do cut the AC/ DC adapter cable of the USB HUB and solder it to the LM7805 Voltage regulator output right? Do you use any capacitors, or is just OK with the voltage regulator itself.
Also, when attemping to find the ground cable on the ignition harness, I´ve checked for continuity between the chassis and the harness cables, and I´ve at least three cables that are ground, is that right or am I doing it wrong? My car is a 1991 Toyota MR2 so, it shouldn´t be too far away from yours since the ignition harness is almost the same as in your Yaris.
To get power to the uController I got a ground and a accessory power (12V) plugged to a perfboard housing a lm7805 with a pretty decent cap on it to smooth the output.
This is then plugged in the usb hub’s power connector via a barrel jack (hub requires 5V). I wouldn’t recommend this setup anymore as I found out it overheat when I plug anything else on it.
I’d build a dedicated power supply to get good and clean 5V with a good quality USB hub next time.
As for the harness ground,yes there is more than one. You gotta use a multimeter on voltage mode with the black on one of those ground (get the beefier one) and probe witch cable get some 12V when the key get to ignition. This is the wire you cut and plug into the relay.
If you got any other questions,feel free to ask.
Also,I’m currently developing a consumer version of this and it should be for sale in a couple weeks/months,stay tuned!
Got it! Despite your recommendation of not using that configuration anymore, I think I´m gonna go for it since my HUB is really small, and it will just be there for feeding the arduino.
I just have another question. if you say you cut the ignition cable, why is it that in the video you can´t hear the starter engine working when you turn the key to start it before introducing the code?
Also, I have a workshop for my car and I found this on the ignition harness:
http://i50.tinypic.com/34g0w0p.jpg
What are those other IG2, ST2, AM2 for?
I´m guessing the main ignition cable I gotta cut is the one that will give you the 12 V and the others won´t right?
Thank you for help.
according to your plan,I’d go for pin 6,but check before to make sure.
The reason why the starter don’t work until the code is entered is pretty simple in fact ; The wire you cut send the signal to the starter when they is at start position,therefore,if you cut it, the signal never goes to it and
the car never start. When you punch in the password and “unlock it”, the relay latches on and “reconnect” the cable you cut down so your starter can get it’s signal again. Simple as that.
But really be certain that the cable you cut is the starter signal ONLY or you might cause havoc with other things your car might need.
hey ive been looking at tutorials all over wanting to do this to my 03 dodge ram, but i cant seem to find the relay you are using anywhere. where did you buy the frs1b-s relay? will other relays work? if so which ones and where can i find them?
It came from seeed studio depot. And yeah….pretty much any relay will do the job. Do a quick search on the web as to know how to connect a bare relay without frying your arduino. Cheers
Seeedstudio no longer has that relay. Any suggestions on another one? A part number would be really helpful. thanks in advance
Any 5v relay will do. The cheapest you can find on ebay or local electronic shop
Ok cool. i just wasnt sure about it because when i look for 5v relays i see all different kinds. does it matter the output voltage as long as its bigger than 12 v? I see some that say 120v and 240v
you got it buddy.
hey i finally got everything hooked up and it works like a charm! thanks for all your help!