กลับไปหน้ารวมไฟล์
locking-system-with-arduino-uno-e0177a-en.md

This project was created to build a locking system using an Arduino Uno. When the button is pressed a specific number of times, the locking mechanism rotates 90 degrees in one direction. Pressing the button the same number of times again rotates it 90 degrees in the opposite direction.

Digital Warden: The Basic Locking System

The Locking System is an entry-level security project that moves away from physical brass keys to digital authentication. It is the perfect starting point before building biometric (fingerprint) or RFID (keycard) scanners.

Core Authorization Loop

The project focuses on creating a secure validation loop in C++:

  1. Standby: The system is locked (Red LED ON, Relay OFF).
  2. Input: A specific trigger is sent—this could be a secret push button sequence or a command sent via the Serial Monitor on your PC.
  3. Validation: The Arduino checks the input against a hardcoded string or integer password.
  4. Action: If correct, the Arduino sets a digital pin HIGH to trigger a relay, opening the electronic lock. If incorrect, it delays (to prevent brute-forcing) and sounds an alarm.

Necessary Components

  • Arduino Uno: The security processor.
  • 12V Electronic Cabinet Lock (Solenoid Tongue): A real-world electronic latch.
  • 1-Channel Relay or Power MOSFET: To isolate and switch the 12V lock.
  • LEDs and Buttons: For user interfacing.

Exploring Security

While a hardcoded password is fine for learning, you'll quickly realize its limits. This project serves as a blank canvas; once you understand the Relay/Lock dynamic, you can easily rip out the "Button" code and replace it with an RFID reader or Bluetooth module, creating a truly modern smart-lock.

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

apps:
  - "1x Arduino IDE"
author: "asywuo0"
category: "Home & Automation"
components:
  - "1x Pack of 50 female-female jumper wires in various colors"
  - "1x Arduino Uno Rev3"
  - "1x 16x2 LCD display with I²C interface"
  - "1x Breadboard 100x160"
  - "1x 10 jumper wires 150mm male"
  - "1x Step Motor 5V DC"
description: "Your digital sentinel! A foundational project that introduces the integration of passwords, microcontrollers, and electronic deadbolts."
difficulty: "Easy"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/4b54cd45-64fa-49f4-9c5d-d9170b033f4e.ino"
encryptedPayload: "U2FsdGVkX18hdN/Qj0Yo82QtPO2373jfJ5q1tvYT1UbkVj3z/yw2HVKwYqTM7p6CDwK2JS9uB9V7H/3BS3HlXo1tLH00p6OQJZiucm5tPPdbDM/lZOCYGHpThmSlwEIdDzfeTfxTrjZOFWIQ5Ah5WisQvBRf2+cyWJo/a2OKQ3g="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/locking-system-with-arduino-uno-e0177a_cover.jpg"
lang: "en"
likes: 0
passwordHash: "f5a33293f311eb21654f1addeaad2d0d439bf1bae005c5d017648949e334cbce"
price: 870
seoDescription: "Learn how to build a basic Locking System with Arduino Uno. A simple security project for beginners."
tags:
  - "Arduino User Group"
  - "Security"
  - "Home Automation"
title: "Locking System with Arduino Uno"
tools: []
videoLinks: []
views: 1396