smart-gate-system
PublicLoading…
Smart Gate System with License Plate Recognition
This project automates gate control using an ultrasonic sensor, OV7670 camera, and servo motor. The system detects a car's arrival, captures its license plate, checks it against a database, and opens the gate if authorized.
Table of Contents
- Components Used
- Circuit & OV7670 Diagram
- Schematic View
- Installation
- Usage
- Communication Between Arduinos and Computer
- License
- Credits
Components Used
- 1x Arduino UNO
- 1x Arduino MEGA
- 1x OV7670 Camera Module
- 1x HC-SR04 Ultrasonic Sensor
- 1x Servo SG90 9g
- 2x Breadboard
- 15x Male-to-female jumper wires
- 15x Male-to-male jumper wires
Circuit & OV7670 Diagram
Schematic View
Installation
- Assemble the components: Connect the OV7670, ultrasonic sensor, and servo motor following the circuit and OV7670 diagrams.
- Upload the Arduino UNO code: Use the Arduino IDE to upload the provided sketch (
src/LiveOV7670-master/src/LiveOV7670/LiveOV7670.ino) to your Arduino UNO. - Upload the Arduino MEGA code: Use the Arduino IDE to upload the provided sketch (
src/Data_receiver/Data_receiver.ino) to your Arduino MEGA. - Get the tool for image processing: Download it from here and follow the instructions. If you need more guidance, refer to the tutorial I used here. It provides a detailed explanation for setting up the OV7670 module, but don't use his code, use the one provided within this repository, otherwise the communication won't happen.
- Install Python if it isn't installed and its modules:
- matplotlib
- easyocr
- imutils
- cv2
- sqlite3
- serial
- PyQt5
- Connect both Arduinos to the PC
Usage
- Place the system: Position the ultrasonic sensor and OV7670 camera so that they can detect vehicles approaching the gate and capture the license plate. You can watch
video.mp4for a reference. - Start listening for images: Open the tool and press "Listen" using a baud rate of 500000 and your COM port connected to Arduino UNO (you can check it in Arduino IDE -> Tools -> Port).
- Start the Python script: Open
main.pyfromsrc/Data_processing/main.py. - Automatic gate control: When a vehicle is detected, the system captures the license plate using the OV7670 camera, checks the number against a pre-existing database, and opens the gate if authorized.
Communication Between Arduinos and Computer
The system communicates with the computer to manage a database of authorized license plates and processes the captured image data for verification. The camera data is transmitted to the PC for further number plate recognition.
You can see the logic behind this communication here:
License
This project is licensed under the MIT License.
Credits
- Author: Felix-Marian STOENOIU
- Email: [email protected]
- GitHub: My GitHub profile
Ask about this board
No comments yet. Be the first to ask about this board.