• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

New Projects | Privacy Policy | About us | Contact | Disclaimer | Copyright | Videos 

You are here: Home / Car and Motorcycle / GSM Car Ignition and Central Lock Circuit Using Arduino

GSM Car Ignition and Central Lock Circuit Using Arduino

Last Updated on May 12, 2022 by Swagatam 6 Comments

In this post we are going to construct a GSM based car security system using Arduino, which can lock and unlock car’s ignition system and central lock by sending a password SMS to car from your cellphone

Car theft can be a heart break; it feels like your loved one got kidnapped. It hurts more when an old car which you spend years with it got stolen. Old cars and low tier cars may get stolen often because they offer less security features.

As the time progress new methods are invented to exploit the cars, covering those exploits in mainstream and old cars can cost huge sum of money.

The proposed project can add another layer of security to your car at cheap cost, which might save your car from getting stolen one day.

The proposed project consist of GSM modem (SIM 800/900) which is the heart of the project, an Arduino board which acts as brain of the project.

Few relays interfaced with Arduino board enables and disabled the ignition and central lock of the car.

A valid SIM card with working SMS plan is required to operate this project and try to take advantage of the SMS offers availed by your network provider to reduce the expenses due to SMS.

Now let’s look at the circuit diagram of this cellphone controlled Arduino based GSM car central locking system:

caution electricity can be dangerous

The above circuit is fairly easy to replicate one. The GSM modem is interfaced with Arduino’s Tx and Rx pin.

The Tx of Arduino is connected to Rx of GSM modem and Rx of Arduino is connected Tx of GSM modem i.e. Tx to Rx and Rx to Tx.

Ground to ground connection between Arduino and GSM modem is also established.

A 9V regulator 7809 is added in the circuit to provide to fixed voltage to GSM modem and arduino board as the battery voltage is subjected to change while ignition and charging, higher than 12 volt may damage the boards.

The Arduino’s PIN # 7 is the output to the central lock and ignition lock mechanism.

Arduino Car Ignition lock diagram:

Arduino GSM Car Ignition and Central Lock Relay Wiring

The diodes are connected to prevent high voltage spike from relay due to back EMF.

A fuse must be connected at the input as the short circuit can turn into catastrophic damage to the car.

A switch is provided which may be placed inside the bonnet. It can used to turn off the circuit if you are not planning to use the car for more than a week which will avoid battery drain.

NOTE: If the circuit is turned off (using switch) the central and ignition lock is activated and your car is safe.

Program:

//----------------Program developed by R.Girish------------//
int temp = 0;
int i = 0;
int j = 0;
char str[15];
boolean state = false;
const int LOCK = 7;
void setup()
{
Serial.begin(9600);
pinMode(LOCK, OUTPUT);
digitalWrite(LOCK, LOW);
for(j = 0; j < 60; j++)
{
delay(1000);
}
Serial.println("AT+CNMI=2,2,0,0,0");
delay(1000);
Serial.println("AT+CMGF=1");
delay(500);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Your car is ready to receive SMS commands.");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
void loop()
{
if(temp == 1)
{
check();
temp = 0;
i = 0;
delay(1000);
}
}
void serialEvent()
{
while(Serial.available())
{
if(Serial.find("/"))
{
delay(1000);
while (Serial.available())
{
char inChar = Serial.read();
str[i++] = inChar;
if(inChar == '/')
{
temp = 1;
return;
}
}
}
}
}
void check()
{
//--------------------------------------------------------------------------//
if(!(strncmp(str,"qwerty",6))) // (Password Here, Length)
//--------------------------------------------------------------------------//
{
if(!state)
{
digitalWrite(LOCK, HIGH);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Central Lock: Unlocked."); // The SMS text you want to send
Serial.println("Ignition Lock: Unlocked."); // The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
state = true;
delay(1000);
}
else if(state)
{
digitalWrite(LOCK, LOW);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Central Lock: Locked."); // The SMS text you want to send
Serial.println("Ignition Lock: Locked."); // The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
state = false;
delay(1000);
}
}
else if(!(strncmp(str,"status",6)))
{
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
if(!state)
{
Serial.println("The System is Working Fine."); // The SMS text you want to send
Serial.println("Central Lock: Locked."); // The SMS text you want to send
Serial.println("Ignition Lock: Locked."); // The SMS text you want to send
}
if(state)
{
Serial.println("The System is Working Fine."); // The SMS text you want to send
Serial.println("Central Lock: Unlocked."); // The SMS text you want to send
Serial.println("Ignition Lock: Unlocked."); // The SMS text you want to send
}
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
}
//----------------Program developed by R.Girish------------//

NOTE 1:

The user has to place the password in the code before uploading to Arduino.

//--------------------------------------------------------------------------//

if(!(strncmp(str,"qwerty",6))) // (Password Here, Length)

//--------------------------------------------------------------------------//

Replace the “qwerty” with your own password and change the number 6 to length of your password. For example:

if(!(strncmp(str,"@rduino",7))) // (Password Here, Lenght)

“@rduino” is the password and it has 7 letters (Length). You can place numbers, letters, special characters and combination of these. The password is case sensitive.

NOTE 2:

Replace all the “xxxxxxxxxxx” with car owner’s 10 digit phone number in the code at four places:

Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number

How to operate this project with cellphone SMS:

• Sending /status/ to GSM modem will send an SMS to car owner’s phone number about the current status of the lock.

• Sending the correct password will toggle the state of the central and ignition lock.

Here is the screen shot:

The above result is from the tested prototype.

• Sending /status/ to the SIM card number inserted in GSM modem will send an acknowledgement SMS regarding the current status of the lock to car owner’s phone number.

• Sending the correct password to GSM modem in the above case /qwerty/ is the password, this will unlock the central and ignition lock. It will also send an acknowledgement SMS as shown above.

• Sending the same correct password again will lock the central and ignition lock.

NOTE 3: Start your password with “/” and also end with “/”

NOTE 4: Once the circuit is turned on please wait about a minute. The circuit will send an SMS saying “Your car is ready to accept SMS command” to car owner’s cellphone number. Only then you can send those SMS commands.

If you have any specific questions regarding this GSM car ignition lock, central lock circuit using Arduino, you can send them through the below given comment box

You'll also like:

  • 1.  Learning Basic Arduino Programming – Tutorial for the Newcomers
  • 2.  Adjustable CDI Spark Advance/Retard Circuit
  • 3.  How to Make Powerful Car Headlights Using LEDs
  • 4.  Wireless Helmet Mounted Brake Light Circuit
  • 5.  Wireless Thermometer Using 433 MHz RF Link Using Arduino
  • 6.  Make this Home Security Project Using Arduino – Tested and Working

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

Have Questions? Please Comment below to Solve your Queries! Comments must be Related to the above Topic!!

Subscribe
Notify of
6 Comments
Newest
Oldest
Inline Feedbacks
View all comments

Primary Sidebar

Categories

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (52)
  • 4060 IC Circuits (26)
  • 555 IC Circuits (99)
  • 741 IC Circuits (20)
  • Arduino Engineering Projects (83)
  • Audio and Amplifier Projects (115)
  • Battery Chargers (83)
  • Car and Motorcycle (95)
  • Datasheets (74)
  • Decorative Lighting (Diwali, Christmas) (33)
  • Electronic Components (101)
  • Electronic Devices and Circuit Theory (36)
  • Electronics Tutorial (120)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Fun Projects (13)
  • GSM Projects (9)
  • Health Related (20)
  • Heater Controllers (29)
  • Home Electrical Circuits (104)
  • How to Articles (20)
  • Incubator Related (6)
  • Industrial Electronics (28)
  • Infrared (IR) (40)
  • Inverter Circuits (98)
  • Laser Projects (12)
  • LED and Light Effect (93)
  • LM317/LM338 (21)
  • LM3915 IC (25)
  • Meters and Testers (66)
  • Mini Projects (150)
  • Motor Controller (67)
  • MPPT (7)
  • Oscillator Circuits (26)
  • PIR (Passive Infrared) (8)
  • Power Electronics (34)
  • Power Supply Circuits (79)
  • Radio Circuits (10)
  • Remote Control (48)
  • Security and Alarm (62)
  • Sensors and Detectors (121)
  • SG3525 IC (5)
  • Simple Circuits (75)
  • SMPS (29)
  • Solar Controllers (61)
  • Timer and Delay Relay (53)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (41)
  • Ultrasonic Projects (16)
  • Water Level Controller (45)

Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2023 · Swagatam Innovations

wpDiscuz