A door security system is a system that is used to protect a door and the area around it from unauthorized access. There are many different types of door security systems, ranging from simple locks to complex, networked systems that use sensors, cameras, and other types of technology.
Some common features of door security systems include:
The specific features and capabilities of a door security system will depend on the specific system you choose and the needs of your application.
It is possible to use an Arduino microcontroller to control a door security system. An Arduino is a small, low-cost microcontroller that is widely used for building electronic projects. It is based on the C programming language and has a large and active community of users who share ideas, code, and support for using the platform.
To use an Arduino to control a door security system, you will need to connect the Arduino to the various components of the security system, such as locks, alarms, cameras, and access control devices. You will then use the Arduino to read input from these devices and control their output, using code that you write in the Arduino development environment.
Some examples of how an Arduino could be used to control a door security system include:
The specific features and capabilities of a door security system controlled by an Arduino will depend on the specific components you use and the code you write.
In this project, we will build a password-based door lock system by interfacing the Micro:bit board with a 4×4 keypad to enter the password.
We use a sliding door opening or closing by horizontal translation thanks to a 5V DC motor.
With this project we can build a security system that works with a password.
Arduino
Arduino is an open-source platform that is used for building electronic devices. It consists of hardware (a microcontroller and a set of input/output pins) and software (a development environment). The hardware is designed to be simple and easy to use, while the software provides a wide range of features and libraries to make it easy for users to program the hardware and build complex projects.
Arduino is based on the C programming language, and it is designed to be easy to use even for those who have no programming experience. It is often used for prototyping and for building small, simple projects, such as sensors, robots, and interactive devices. It is also used in a wide range of other applications, including Internet of Things (IoT) devices, home automation systems, and artistic installations.
4×4 keypad
A 4×4 keypad is a device that consists of a grid of 4 rows and 4 columns of buttons, for a total of 16 buttons. It is commonly used as an input device for electronic projects and can be used to enter numbers, characters, or commands.
To use a 4×4 keypad, you will need to connect it to your project using wires. Each button on the keypad is connected to a row and a column on the keypad matrix. To determine which button has been pressed, you can scan the rows and columns of the matrix and look for a low voltage.
LCD I2C 160A Display
An LCD display with the model number I2C 160A is a type of liquid crystal display (LCD) that uses an I2C interface to communicate with a microcontroller or other device. I2C, or Inter-Integrated Circuit, is a two-wire serial communication protocol that is used to connect devices such as microcontrollers, sensors, and displays. It is a popular choice for communication between devices because it requires only two wires, is relatively easy to use, and is widely supported by microcontrollers and other devices.
The 160A in the model number refers to the size of the display, which is 160 pixels wide and 128 pixels tall. This is a small display, suitable for use in portable devices and other applications where space is limited. The display may also have additional features, such as an integrated touch screen or backlight, depending on the specific model.
L298N driver
The L298N is a dual H-bridge motor driver IC that is commonly used to control the speed and direction of small DC motors, as well as to drive stepper motors. It can also be used to control the speed and direction of larger motors, such as those found in electric vehicles, by using external power MOSFETs.
The L298N has a number of input and output pins that can be used to control the motors and monitor their status. It can be driven by a microcontroller, such as an Arduino, or by other digital logic devices. The L298N can be used to drive motors in both forward and reverse directions, and the speed of the motors can be controlled by adjusting the duty cycle of the control signals.
DC motor
A 5V DC motor is a type of electric motor that operates on direct current (DC) voltage. It is a small motor that typically runs on 5V of power, although the voltage may vary slightly depending on the specific motor and the load it is driving. These motors are often used in small electronic devices, such as portable fans, toys, and robotic applications. They are generally very reliable, efficient, and simple to control, making them a popular choice for many different types of projects and applications.
test plate
A test plate is a type of device used in robotics to test the functionality and performance of various components or systems. It is typically a physical platform or structure that is designed to hold and support various test items or devices, such as sensors, actuators, motors, or other types of mechanical or electrical components. Test plates can be used to simulate different environments or conditions, such as temperature, humidity, vibration, or other factors, in order to evaluate the performance of the components or systems being tested. They can also be used to perform a variety of diagnostic or diagnostic tests, such as stress testing, endurance testing, or other types of evaluations.
connecting wires
Wires are used to transmit electrical signals and power to various components such as motors, sensors, and microcontrollers. It’s important to properly route and secure the wires to prevent tangles and damage. There are several methods for doing this, including using cable ties, clamps, and wire looms. It’s also a good idea to use different colors or labeling to identify the different wires and their functions. When connecting wires in a robot, it’s important to follow proper safety procedures, such as using the correct wire stripper and connectors, and wearing protective equipment such as gloves and safety glasses.
We connect the 8 outputs of the keyboard to the 8 pins of the Arduino (from 2 to 9).
For the I2C LCD 1602 display we connect:
the SDA pin to the A4 pin of Arduino
the SCL pin to the A5 pin of Arduino
the GND pin to the GND pin of Arduino
the VCC pin to the 5V pin of Arduino
Connect pin 4 of the Arduino to the ENA pin of the L298N module.
Connect pin 3 of the Arduino to pin IN1 of the L298N module.
Connect pin 2 of the Arduino to pin IN2 of the L298N module.
Connect the GND pin of the Arduino to the GND pin of the L298N module.
Connect the GND pin of the Arduino to the (-) terminal of the 9V battery
Connect the 12V pin of the L298N module to the (+) terminal of the 9V battery
Connect the two motor terminals to the two pins OUT1 and OUT2 of the L298N module
Here is the Arduino program that allows the door to be opened or closed by the Arduino card.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
#include <LiquidCrystal_I2C.h> #include <Keypad.h> const int ROW_NUM = 4; //four rows const int COLUMN_NUM = 4; //four columns LiquidCrystal_I2C lcd(0x27, 20, 4); char keys[ROW_NUM][COLUMN_NUM] = { {'1','2','3', 'A'}, {'4','5','6', 'B'}, {'7','8','9', 'C'}, {'*','0','#', 'D'} }; String code=""; byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad byte pin_column[COLUMN_NUM] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM ); int enA = 10; int in1 = 11; int in2 = 12; void setup(){ lcd.init(); // display initialization lcd.clear(); lcd.backlight(); // activate the backlight lcd.setCursor(0, 0); // stand in the front line pinMode(enA, OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); analogWrite(enA, 65); } void loop(){ char key = keypad.getKey(); if(key) // You press a key on the matrix keyboard { lcd.print(key); // Display the entered character on the LCD display code+=key; delay(100); } if ((code.length()==4)){ if (code=="2356") { lcd.clear(); lcd.print("valid code"); delay(2000); //the motor turns to open the door digitalWrite(in1, HIGH); digitalWrite(in2, LOW); delay(700); //stop le moteur digitalWrite(in1, LOW); digitalWrite(in2, LOW); lcd.clear(); code=""; } else if (code=="1111"){ delay(2000); digitalWrite(in1, LOW); //the motor rotates in the opposite direction to close the door digitalWrite(in2, HIGH); delay(700); //stop le moteur digitalWrite(in1, LOW); digitalWrite(in2, LOW); lcd.clear(); code=""; } else { lcd.print("invalid code"); delay(2000); lcd.clear(); code=""; } } } |
hardy 17-10-2323
hello, why can my motor only spin in one direction, it only works when typing 1111.