Lab Activity 5 Solenoid Lock Control Using Arduino and 1 Channel Relay
Lab Activity 5 Solenoid Lock Control Using Arduino and 1 Channel Relay
CMPE 30094
Polytechnic University of the
Philippines Embedded Systems
College of Engineering
Computer Engineering Department
BSCOE _____
TOTAL 75 -
Individual Grade
Wrong Correct
Slightly correct Mostly correct
Q&A 25 No answer (0 point) answer answer
(15 points) (20 points)
(10 points) (25 points)
Laboratory Objectives
Explore and understand the fundamental concepts of actuators in embedded security systems
by utilizing a solenoid lock and Arduino microcontroller.
Gain hands on practical knowledge of how to control and integrate a solenoid lock with Arduino
Enhance students' understanding of actuators in security principles
Materials Required:
1. Connect the VCC pin of the relay module to the +5V pin on the Arduino.
2. Connect the GND pin of the relay module to the GND pin on the Arduino.
3. Connect the IN pin of the relay module to A5 on the Arduino.
4. Connect the GND terminal of the solenoid lock to the negative pin of the power supply
5. Connect the positive (red) terminal of the solenoid lock to the COM of the relay module.
6. Connect the negative terminal of the power supply to the ON of the relay module
7. Make sure all the connections are secure and double-check the wiring.
8. Connect the Arduino to your computer using the USB cable.
9. Upload the following Arduino code to control the solenoid lock:
Arduino Code
const int RELAY_PIN = A5; // the Arduino pin, which connects to the IN pin of
relay
void setup() {
pinMode(RELAY_PIN, OUTPUT);
}
void loop() {
digitalWrite(RELAY_PIN, HIGH); //
delay(2000);
digitalWrite(RELAY_PIN, LOW); // lock the door
delay(2000);
}
Extended Activity: Adding functionalities for Access Control
A. In this extended activity, you need to add components, modules, functionalities to solenoid lock
system to enhance to access control.
Schematic diagram :
Questions:
1. What are the other components or functionalities that you have added to further enhance the
access control capabilities of the solenoid lock system? How would these additions contribute to
the overall security and convenience of the system?
2. What is the purpose of the 1-channel relay module in this laboratory activity?
3. Besides the enhancements made in this activity, what other modules, components, and
functionalities can be further added to the embedded system? In addition, which sector or
industry in the Philippines would greatly benefit from these contributions?
4. What are the effects and outcomes of incorporating the added modules and functionalities in
the specified sector or industry?