กลับไปหน้ารวมไฟล์
car-lock-and-unlock-using-ir-remote-arduino-and-lcd-9fd4c8-en.md

this project is basically about car lock and unlock with beep sound using Ir sensor and ir remote and display the action on lcd 16x2.i tried to look on internet for this project but didn't find it anywhere as a result I tried to make some thing new and done this as a college project.

PCB LAYOUT

Schematic Diagram

CODE:

#include

#include

#define fourth_key 25979

int receiver_pin = 8;

int fourth_led_pin = 9;

int buzzer = 10;

int led[] = {0};

IRrecv receiver(receiver_pin);

decode_results output;

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup()

{

lcd.begin(16, 2);

pinMode(trigger, OUTPUT);

pinMode(echo, INPUT);

lcd.print(" CAR LOCK");

lcd.setCursor(0, 1);

lcd.print(" & UNLOCK");

delay(2000);

lcd.clear();

lcd.print(" MPI PROJECT");

delay(2000);

pinMode(buzzer, OUTPUT);

Serial.begin(9600);

receiver.enableIRIn();

pinMode(fourth_led_pin, OUTPUT);

}

int count = 0;

void loop() {

lcd.clear();

if (receiver.decode(&output)) {

unsigned int value = output.value;

if(led[4] == 0) {

digitalWrite(fourth_led_pin, LOW);

tone(buzzer, 1000, 500);

lcd.print("Car Lock");

delay(1000);

led[4] = 1;

} else {

count++;

if(count % 2 == 0) {

digitalWrite(fourth_led_pin, HIGH);

led[4] = 0;

tone(buzzer, 1500, 500);

lcd.print("Car Unlock");

delay(2000); }

else{

digitalWrite(fourth_led_pin, HIGH);

led[4] = 0;

tone(buzzer, 1500, 500);

lcd.print("Car lock");

delay(2000);

}

}

digitalWrite(fourth_led_pin, LOW);

led[4] = 0;

Serial.println(value);

lcd.clear();

receiver.resume();

}

}

EXPANDED TECHNICAL DETAILS

Keyless Entry Simulation

This project demonstrates the core logic of automotive central locking systems by using Infrared (IR) signals to manage a virtual or scale-model car's security.

  • NEC Protocol Decoding: The Arduino captures the 32-bit hex code from a standard remote. The firmware includes an "Encryption Mask" to ensure that only specific, pre-programmed remote buttons can trigger the lock mechanism.
  • State Persistence Visualization: Current status (LOCKED / UNLOCKED) is displayed on a 16x2 I2C LCD. The Arduino also toggles a high-torque servo motor to represent the physical movement of the door lock actuator.

Security Logic

  • Anti-Spam Delay: Includes a software "Cool-down" period after three failed attempts, mimicking professional anti-theft systems that prevent brute-force IR attacks.

ข้อมูล Frontmatter ดั้งเดิม

title: "Car Lock and Unlock Using IR Remote, Arduino and LCD"
description: "Lock and unlock your car with an IR remote and display car lock and unlock on 16x2 LCD. Made this for college project."
author: "dispatcher6"
category: ""
tags:
  - "ir"
  - "environmental sensing"
  - "cars"
views: 4112
likes: 2
price: 1120
difficulty: "Intermediate"
components:
  - "1x Buzzer"
  - "1x Rotary potentiometer (generic)"
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x Arduino UNO"
  - "1x 10 Pc. Jumper Wire Kit, 5 cm Long"
  - "1x Infrared Receiver, 38 kHz"
  - "2x Resistor 220 ohm"
  - "1x LED (generic)"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "e47658f129a0fceb409aafde2f258742cf0c3dd7a745e5227a6fab9714e7844a"
encryptedPayload: "U2FsdGVkX19FNCuVJndNc45vtajk2GUqMkrBs6NPHMvnJj0AmHGXKUPrPvuWt6Qxo3qz7iHLD/6VaYaaW7LG3/pKEEBDlWmiejXsicVitVg="
seoDescription: "Lock and unlock a Car using IR Remote, Arduino and 16x2 LCD. Simple and effective College Project for engineering students."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/car-lock-and-unlock-using-ir-remote-arduino-and-lcd-9fd4c8_cover.jpg"
lang: "en"