Acebott Smart Home Educational Kit (Arduino Level 2) — Security & Automation Projects
01 Overview
This set of projects demonstrates how to build several smart home prototypes using the Acebott Smart Home Educational Kit (Arduino Level 2), powered by the ESP32 microcontroller. The kit allows users — especially STEM teachers and students — to explore real-world home automation and IoT concepts through hands-on learning.
Multiple projects highlight different aspects of smart home systems, grouped into two categories: an Intelligent Security System (Earthquake Alarm, Fire Alarm, Automatic Door, and Password Access Control) and a Smart Automatic System (Automatic Drying Rack, Automatic Pet Feeder, and Automatic Watering System).
Project Use Case
By combining different sensors and actuators, learners can build systems that respond to emergencies and control access intelligently. The Earthquake Alarm System and Fire Alarm System focus on early detection and alerting, showing how smart sensors help protect people during natural disasters and accidents. The Automatic Door and Password Access Control highlight secure and convenient entry solutions, reflecting the same technologies used in today's smart buildings.
By using sensors and programmed controls, common activities such as drying clothes, feeding pets, and watering plants can be managed automatically with little human effort. These smart solutions save time and energy while promoting convenience, reliability, and sustainable living within the modern home.
Intelligent Security System
Project 1 — Earthquake Alarm System: Simulates an early warning system using a vibration sensor to detect seismic activity. When unusual vibrations are detected, an alarm is triggered to alert occupants of potential danger.
Project 2 — Fire Alarm System: A flame or smoke sensor identifies signs of fire and automatically triggers a buzzer alarm, demonstrating how early detection prevents fire-related accidents.
Project 3 — Automatic Door: Uses an ultrasonic sensor paired with a servo motor to create a door that opens and closes automatically when someone approaches.
Project 4 — Password Access Control: Uses a touch keypad and microcontroller to restrict access to authorized users only. A correct password opens the lock, while incorrect entries deny access and trigger an alert.
Smart Automatic System
Project 1 — Automatic Drying Rack: Uses sensors and a servo motor to automatically move clothes for drying, adjusting position based on sunlight or humidity levels.
Project 2 — Automatic Pet Feeder: Dispenses food at scheduled times or when triggered by a sensor, ensuring pets are fed consistently even when owners are away.
Project 3 — Automatic Watering System: Uses a soil moisture sensor to monitor soil dryness and activates a water pump when plants need watering, supporting healthy plant growth while reducing water waste.
02 Hardware and Software Components
Gather everything below before you start. This is your checklist — names, models, and versions only.
Hardware Components
| Component | Description |
|---|---|
| ACEBOTT QE024 Smart Home Education Kit Level 2 | Base kit containing the ESP32 controller, expansion board, and all sensors/actuators used across the projects. |
| ESP32 | Low-power Wi-Fi/Bluetooth dual-mode microcontroller that serves as the main controller. |
| ESP32 Expansion Board | Provides labeled ports and a structured layout for easier, safer wiring. |
| Vibration Sensor | Detects shocks, tremors, or sudden movement for the Earthquake Alarm System. |
| Red LED Module | Visual warning light / status indicator used across multiple projects. |
| Flame Sensor | Detects infrared radiation from open flames for the Fire Alarm System. |
| MQ-4 Gas Sensor | Measures methane, propane, and other combustible gases in the air. |
| P-Buzzer | Piezoelectric buzzer used for alarms and audio feedback. |
| Ultrasonic Sensor | Measures distance for the Automatic Door and Automatic Pet Feeder. |
| Servo SG90 9G | Small servo motor for precise angular movement (doors, racks, feeder gate). |
| Touch Keyboard | Touch keypad for digital password entry in the Access Control project. |
| Raindrop Sensor | Detects water/rainfall for the Automatic Drying Rack. |
| Light Sensor | Photoresistor-based sensor that detects ambient brightness. |
| I2C 1602 LCD Module | 16×2 character display used for status and readout messages. |
| Water Pump | Compact DC-powered pump used in the Automatic Watering System. |
| Moisture Sensor | Measures soil water content for the Automatic Watering System. |
| 5V Relay Module | Electrically controlled switch that lets the ESP32 safely operate the water pump. |
Software Tools
| Software | Version / Details |
|---|---|
| Arduino IDE | 2.3.6 |
| ESP32 Board Package (via Board Manager) | 2.0.12 |
Project Files
Use the Google Drive locations below to obtain the project libraries and calibration program.
| File or Folder | Location and Description |
|---|---|
| ESP32_Servo and Acebott | Google Drive: drive.google.com/drive/folders/1KTGCUMlEAhP4prrrlLLRf4SWLEJuq3MU?usp=drive_link — Servo and ultrasonic sensor libraries. |
| ACB_KeyBoard_I2C and hd44780 | Google Drive: drive.google.com/drive/folders/16k7sX2VnvsYlKRAxRBdsuzCj-9udfHXd?usp=drive_link — Touch keypad and I2C LCD libraries. |
| servo_initialize | Google Drive: drive.google.com/drive/folders/1MIaCnK3zwKuNTLS_vVG5lv_esV_pIhzC?usp=drive_link — Servo calibration program for the 0-degree position. |
03 Application Discussion
Here is what each component does and why it is part of this project.
ESP32
ESP32 is a low-power, highly integrated Wi-Fi and Bluetooth dual-mode microcontroller developed by Espressif Systems. It is popular for its powerful features and abundant communication interfaces, making it suitable for IoT applications, embedded system development, and project implementation.
Pinout:
Application: The ESP32 serves as the main controller that connects and manages all components — processing sensor data, controlling actuators, and operating safety devices like buzzers and LEDs. With its Wi-Fi and Bluetooth capabilities, it enables responsive, automated, and energy-efficient smart home solutions.
ESP32 Expansion Board
The ESP32 expansion board is designed to make wiring connections easier and more reliable. It provides clearly labeled ports and a structured layout to reduce wiring errors, prevent short circuits, and simplify assembly when connecting sensors and modules.
Application: Used to expand the ESP32's connectivity, allowing quick and safe attachment of multiple modules in the kit without complex wiring.
Vibration Sensor
The vibration sensor detects shocks, tremors, or sudden movements and converts them into electrical signals that can be read by a microcontroller. It is small, lightweight, and sensitive enough to respond to even minor vibrations.
Pinout:
Application: Commonly used in earthquake alarms or intrusion detection, it helps identify abnormal activity by activating LEDs, buzzers, or other alerts when vibration is detected.
Red LED Module
The red LED module is a simple light-emitting diode that provides a clear, bright red signal when powered — one of the most basic yet essential components in electronic projects.
Application: Used as a visual warning light, status indicator, or alert system — signaling a fire alarm, password error, or door lock status with clear, immediate feedback.
Flame Sensor
The flame sensor is designed to detect infrared radiation emitted by open flames. It quickly responds to fire presence and sends signals to a controller for further action.
Application: Used in fire alarm projects for early detection of flames to prevent accidents. When paired with a buzzer or relay, it can trigger alarms or alert users of danger.
MQ-4 Gas Sensor
The MQ-4 gas sensor measures the presence of methane, propane, and other combustible gases in the air, outputting an analog signal proportional to gas concentration.
Pinout:
Application: Used to detect harmful gas leaks early. When levels exceed safety thresholds, it can activate alarms, ventilation systems, or notifications to prevent accidents.
P-Buzzer
The piezoelectric buzzer is a small audio device that produces sound when powered, generating tones, beeps, or alarms for audio feedback in electronic systems.
Pinout:
Application: Used for alarms, fire warnings, door lock feedback, and notification signals — ensuring users are alerted to important events or hazards immediately.
Ultrasonic Sensor
The ultrasonic sensor measures distance by emitting ultrasonic waves and detecting their echoes, providing accurate, non-contact distance measurement.
Pinout:
Application: Commonly applied in automatic doors and smart pet feeders. By detecting movement or proximity, it allows systems to respond intelligently — for example, opening a door when someone approaches.
Servo SG90 9G
The SG90 is a small, lightweight servo motor that provides precise angular movement between 0°–180°, controlled by PWM signals for reliable positioning.
Pinout:
Application: Used to open or close doors, control locks, move racks, or dispense food — its compact design makes it ideal for small automation mechanisms requiring precision.
Touch Keyboard
The touch keypad module allows users to input numbers or commands digitally, replacing traditional mechanical buttons with a sleek, reliable touch interface.
Pinout:
Application: Used for password entry to secure doors or devices, providing an added layer of security by allowing only authorized users to enter correct passcodes.
Raindrop Sensor
The raindrop sensor detects water presence through changes in resistance on its surface when raindrops fall, providing both analog and digital outputs.
Pinout:
Application: Controls automatic drying racks, windows, or irrigation systems by reacting to rainfall, protecting clothes and watering plants only when necessary.
Light Sensor
The light sensor uses a photoresistor to detect ambient brightness. Its resistance changes with light intensity, producing an analog signal for the controller.
Pinout:
Application: Used in automatic lighting systems, drying racks, and energy-saving devices, enabling systems to respond to day/night conditions.
I2C 1602 LCD Module
The 16×2 LCD display with I2C interface provides a simple way to show text output, reducing wiring complexity while displaying multiple lines of information.
Pinout:
Application: Used to show sensor readings, alerts, and system status — from soil moisture levels to access control messages, giving users real-time feedback in a clear format.
Water Pump
The water pump is a compact DC-powered device that can move or circulate water, lightweight and easy to integrate into small automation systems.
Pinout:
Application: Delivers water when triggered by soil sensors or relays, ideal for automatic watering systems in smart homes or gardens.
Moisture Sensor
The moisture sensor measures soil water content by detecting resistance changes, providing analog data that indicates how wet or dry the soil is.
Pinout:
Application: Helps determine when plants need water; paired with a pump and relay, it ensures plants receive the right amount of moisture.
5V Relay Module
The relay is an electrically controlled switch that lets a low-power microcontroller operate high-power devices safely, isolating the control circuit from the load circuit.
Pinout:
Application: Controls pumps, fans, and other appliances in smart home automation, allowing controllers like the ESP32 to manage heavy devices safely.
04 Hardware Setup
All projects share the same basic bracket structure (base, ESP32 controller board, battery holder, and wooden board). Once assembled, each project adds its own sensors and actuators as shown below.
Project 1: Earthquake Alarm System
Hardware Structure Diagram:
Assembly Instructions:
- Install the base. Ensure the side of the wooden board with the letter "A" faces up.
- Install the ESP32 Controller Board — fix the copper column to the base, then install the ESP32 board on the copper column, and finally install the expansion board.
- Install the battery holder using double-sided tape on the underside of the base, without covering the wire and pin holes.
- Install the wooden board with the letter "B" facing forward.
Ensure the side with letter "D1" or "D2" faces up.
- Install the vibration sensor using screws and nuts above the "D2" wooden board.
- Install the red LED module and the P-Buzzer module separately on the sensor baseplate.
- Connect one end of the quick-connect Dupont wire to the LED and buzzer modules, then secure both onto the baseplate.
- Fix the standing card onto the base.

Hardware Wiring Diagram:
Wiring Instructions:
Project 2: Fire Alarm System
Hardware Structure Diagram:
Assembly Instructions:
- Install the Flame Sensor.
- Install the red LED module and the P-Buzzer module, connecting the quick-connect Dupont wire to each first.
- Secure the Flame Sensor.
- Install the MQ-4 Gas Sensor.
- Install the standing card onto the base.
- Install the LUMI.
Hardware Wiring Diagram:
Wiring Instructions:
Project 3: Automatic Door
Hardware Structure Diagram:
Assembly Instructions:
- Install the gear.
- Install the door. The upper and lower frames of the acrylic door are the same length, unlike the clothes rack frames — do not confuse them.
- Install the Servo SG90. Before installing the gear onto the servo, adjust it to 0 degrees, keep it powered, slide the acrylic door fully right, then attach the gear.
Note: Before writing the program, install the "ESP32_Servo" library and use the "servo_initialize" program to set the 0-degree position. See Section 02, Project Files for the Google Drive locations. - Install the Ultrasonic Sensor.
- Install the standing card.

Hardware Wiring Diagram:
Wiring Instructions:
Project 4: Password Access Control
Hardware Structure Diagram:
Assembly Instructions:
- Install the gear.
- Install the door — upper/lower acrylic door frames are equal length, unlike the clothes rack frames.
- Install the Servo SG90. Adjust to 0 degrees first, keep it powered, slide the door fully right, then attach the gear.
Note: Install the "ESP32_Servo" library before writing the program, and use the "servo_initialize" program. See Section 02, Project Files for the Google Drive locations.
- Install the red LED module and the P-Buzzer module, connecting the Dupont wire to each first.
- Install the touch keyboard.
Hardware Wiring Diagram:
Wiring Instructions:
Project 5: Automatic Drying Rack
Hardware Structure Diagram:
Assembly Instructions:
- Install the gear.
- Install the slide rail.
- Install the Servo SG90 — adjust to 0 degrees, keep it powered, slide the acrylic clothes rack fully left, then attach the gear.

Note: Use the "servo_initialize" program to set the 0-degree position. See Section 02, Project Files for the Google Drive location. - Install the clothes rack.
- Install the light sensor and the raindrop sensor.
- Install the standing card.
- Install the LUMI.
Hardware Wiring Diagram:
Wiring Instructions:
Project 6: Automatic Pet Feeder
Hardware Structure Diagram:
Assembly Instructions:
- Install the I2C 1602 LCD Module.
- Install the pet food storage container.
- Install the gear.
- Install the sliding baffle. The side of the basswood board with the letter "C" should face up; do not confuse the acrylic door and clothes rack frames.
- Install the servo motor — adjust to 0 degrees, keep it powered, slide fully left, then attach the gear.
Note: Use the "servo_initialize" program to set the 0-degree position. See Section 02, Project Files for the Google Drive location. - Install the "C" wooden board and the food storage container.
- Install the Ultrasonic Sensor.
- Install the buzzer module.
- Connect one end of the quick-connect Dupont wire to the buzzer module and ultrasonic sensor before securing them.
- Install the standing card.
- Install the LUMI.
Hardware Wiring Diagram:
Wiring Instructions:
Project 7: Automatic Watering System
Hardware Structure Diagram:
Assembly Instructions:
- Install the I2C 1602 LCD Module.
- Install the Relay Module.
- Install the Water Pump — the cup for the water pump needs to be provided by yourself.
- Install the Moisture Sensor and the standing card.

- Install the LUMI.
Hardware Wiring Diagram:
Wiring Instructions:
05 Software Setup
Follow these steps in order. Do not skip any step.
Step 1 — Download and Install Arduino IDE
- Visit the official Arduino software page and select the correct version — Arduino IDE 2.x for Windows 10 or above, or Arduino IDE 1.x for versions before Windows 10.
- Click the download button and choose "Download Only" to get the .exe installer.
- Locate and double-click the downloaded installer file, click "I Agree" to accept the license, then "Next" and "Install". Wait for installation to finish, then click "Close".
- Locate the Arduino IDE shortcut on your desktop or Start menu and double-click to launch it.
Step 2 — Install ESP32 Board Resources
- Go to File → Preferences in the Arduino IDE.
- In "Additional Boards Manager URLs", paste the ESP8266/ESP32 package index URL below.
Board Manager URL
pathhttps://arduino.esp8266.com/stable/package_esp8266com_index.json - Go to Tools → Board → Board Manager, search for "ESP32", select version 2.0.12, and click Install.
- Reopen Tools → Board and verify that "ESP32 Dev Module" appears in the list.
Step 3 — Test the ESP32 Setup
- Connect the ESP32 board using a Type-C data cable. Open Device Manager and check under "Ports (COM & LPT)" for "USB-SERIAL CH340 (COMx)" — if it shows as "Unknown Device", install the CH340 driver.
- In Arduino IDE, go to Tools → Board and choose "ESP32 Dev Module".

- Go to Tools → Port and select the COM port number matching your ESP32 in Device Manager.
- Write or paste a simple test sketch (e.g.
Serial.println("Hello ESP32");), click Verify to compile, then click Upload and wait for "Done uploading". - Open Tools → Serial Monitor, set the baud rate to match your code (e.g. 115200), and confirm your test message appears.
Step 4 — Install Project Libraries
Install the following libraries before uploading the code for each project:
- ESP32_Servo — required for all projects using the SG90 servo (Automatic Door, Password Access Control, Automatic Drying Rack, Automatic Pet Feeder). See Section 02, Project Files.
- Acebott — ultrasonic sensor library, required for Automatic Door and Automatic Pet Feeder. See Section 02, Project Files.
- ACB_KeyBoard_I2C — required for the Password Access Control touch keypad. See Section 02, Project Files.
- hd44780 — required for the I2C 1602 LCD in the Automatic Pet Feeder and Automatic Watering System. See Section 02, Project Files.
06 Code
Copy each file below into the Arduino IDE as described in the Software Setup section. Read the Code Breakdown section to understand what each part does.
Earthquake Alarm System — earthquake_alarm.ino
#define LED 19 //Declare the pin for the LED
#define buzzer 18 //Declare the pin for the buzzer
#define vibration 32 //Declare the pin for the vibration sensor
void setup() {
pinMode(LED,OUTPUT); //Set the LED pin to output mode
pinMode(buzzer,OUTPUT); //Set the buzzer pin to output mode
pinMode(vibration,INPUT); //Set the vibration sensor pin to input mode
}
void loop() {
int state = digitalRead(vibration);//Read the value from the vibration sensor
if(!state){ //Check if vibration occurs
//Vibration detected
for(int i = 0; i < 5;i++)//Repeat 5 times
{
digitalWrite(LED,HIGH); //Turn on the LED
for(int i = 500;i<=1000;i++){
tone(buzzer,i);//Activate the buzzer at the specified frequency
delay(2);
}
digitalWrite(LED,LOW);//Turn off the LED
for(int i = 1000;i>=500;i--){
tone(buzzer,i);//Activate the buzzer at the specified frequency
delay(2);
}
}
noTone(buzzer);//Turn off the buzzer
}
}
Fire Alarm System — fire_alarm.ino
#define MQ4 25 // Declare the pin for the gas sensor
#define flame 27 // Declare the pin for the flame sensor
#define LED 19 // Declare the pin for the LED
#define buzzer 18 // Declare the pin for the buzzer
void setup() {
pinMode(MQ4,INPUT);// Set the gas sensor pin to input mode
pinMode(LED,OUTPUT); // Set the LED pin to output mode
pinMode(buzzer,OUTPUT);// Set the buzzer pin to output mode
pinMode(flame,INPUT);// Set the flame sensor pin to input mode
Serial.begin(115200);
}
void loop() {
int MQ4value = analogRead(MQ4);// Read the value from the gas sensor
int flamevalue = digitalRead(flame);// Read the value from the flame sensor
if(MQ4value > 3000 || flamevalue == 0)// Check if gas or flame is detected
{
for(int i = 0; i < 5; i++)// Repeat 5 times
{
digitalWrite(LED,HIGH);// Turn on the LED
for(int i = 500; i <= 1000; i++){
tone(buzzer,i);// Activate the buzzer at a certain frequency
delay(2);
}
digitalWrite(LED,LOW);// Turn off the LED
for(int i = 1000; i >= 500; i--){
tone(buzzer,i);// Activate the buzzer at a certain frequency
delay(2);
}
}
noTone(buzzer);// Turn off the buzzer
}
}
Automatic Door — automatic_door.ino
#include <ultrasonic.h>
#include <ESP32_Servo.h>
#define servoPin 13 // Declare the pin for the servo
#define trig 16//Declare echo pin of the ultrasonic
#define echo 17//Declare echo pin of the ultrasonic
ultrasonic myUltrasonic; // Create an ultrasonic sensor object
Servo servo; // Create a servo object
void setup() {
myUltrasonic.Init(trig,echo);// Ultrasonic sensor initialization
servo.attach(servoPin);// Initialize the servo
servo.write(5);// Move the servo to the initial position
}
void loop() {
// Read the value from the ultrasonic sensor:
float dis = myUltrasonic.Ranging();
if(dis < 10){// Check if someone is approaching
for(int angle = 5; angle <= 110; angle++){// Open the door
servo.write(angle);
delay(25);
}
delay(5000);// Wait for 5 seconds
for(int angle = 110; angle >= 5; angle--){// Close the door
servo.write(angle);
delay(25);
}
}
}
Password Access Control — password_access_control.ino
#include <ACB_KeyBoard_I2C.h>
#include <ESP32_Servo.h>
#define LED 19 // Declare the pin for the LED
#define buzzer 18 // Declare the pin for the buzzer
#define servoPin 13 // Declare the pin for the servo
Servo servo; // Create a servo object
ACB_KeyBoard_I2C kb;// Create a keypad object
char password[7] = "123456"; // Set the password for the lock
char input_password[7];// Store the entered password
char input;
void setup() {
pinMode(LED,OUTPUT); // Set the LED pin to output mode
pinMode(buzzer,OUTPUT);// Set the buzzer pin to output mode
servo.attach(servoPin);// Initialize the servo
servo.write(5);// Move the servo to the initial position
Serial.begin(115200);
}
void loop() {
Serial.print("Please enter a 6-digit password: ");
for(int i = 0;i<6;i++){// Loop to enter a 6-digit password
input = kb.getKey();// Get the value of the key
while(!input){// Wait for a key touched
input = kb.getKey();// Get the value of the key
}
Serial.print(input);
input_password[i] = input;// Store the value of the key in the character array
delay(500);
}
Serial.println();
// Compare the entered password with the set password
if(strcmp(input_password,password) == 0){
Serial.println("Correct password! Opening the door.");
door_open();// Open the door
}
else{
servo.detach();//disconnect servo
Serial.println("Incorrect password!");
tone(buzzer,800);// Activate the buzzer
digitalWrite(LED,HIGH);// Turn on the LED
delay(1000);
noTone(buzzer);// Turn off the buzzer
digitalWrite(LED,LOW);// Turn off the LED
}
}
void door_open(){ // Door opening function
servo.attach(servoPin);
for(int angle = 5;angle<=110;angle = angle+5){
servo.write(angle);
delay(25);
}
delay(2000);
for(int angle = 110;angle>=5;angle = angle-5){
servo.write(angle);
delay(25);
}
}
Automatic Drying Rack — automatic_drying_rack.ino
#include <ESP32_Servo.h>
#define servoPin 13 // Declare the servo pin
#define rainSensor 39 // Declare the rain sensor pin
#define PR 33 // Declare the light sensor pin
// Define the state variable representing the state of the clothes drying rack, true means indoors, false means outdoors
bool state = true;
Servo servo; // Create a servo object
void setup() {
servo.attach(servoPin); // Initialize the servo
pinMode(rainSensor,INPUT); // Set the rain sensor pin to input mode
pinMode(PR,INPUT); // Set the light sensor pin to input mode
Serial.begin(115200);
servo.write(5); // Move the servo to the initial position
}
void loop(){
int rainValue = analogRead(rainSensor); // Read the value of the rain sensor
int lightValue = analogRead(PR); // Read the value of the light sensor
Serial.println(rainValue);
Serial.println(lightValue);
// If the light value is less than 3000 and the rain value is less than 100, it means it's daytime and not raining
// Check if it's daytime and not raining
if(lightValue < 3000 && rainValue < 100) {
// It's daytime and not raining
if(state){// Check if the clothes drying rack is indoors
// Indoors
for(int angle = 5;angle<=120;angle++){// Extend the clothes drying rack
servo.write(angle);
delay(25);
}
}
state = false;// Set the state of the clothes drying rack to outdoors
}
else{// Nighttime or raining
if(!state){// Check if the clothes drying rack is outdoors
// Outdoors
for(int angle = 120;angle>=5;angle--){// Retract the clothes drying rack indoors
servo.write(angle);
delay(25);
}
state = true;// Set the state of the clothes drying rack to indoors
}
}
}
Automatic Pet Feeder — automatic_pet_feeder.ino
#include <Wire.h>
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h>
#include <ultrasonic.h>
#include <ESP32_Servo.h>
#define buzzer 18 // Declare the buzzer pin
#define servoPin 13 // Declare the servo pin
#define trig 16 // Declare echo pin of the ultrasonic
#define echo 17 // Declare echo pin of the ultrasonic
const int i2cAddress = 0x27; // Declare the I2C address of the LCD display
const int numRows = 2; // Number of rows in the LCD display
const int numCols = 16; // Number of columns in the LCD display
// Create an LCD display object:
hd44780_I2Cexp lcd(i2cAddress, numRows, numCols);
ultrasonic myUltrasonic; // Create an ultrasonic object
Servo servo; // Create a servo object
int timer = 0; // Define a variable to represent the timer
int last_time; // Record the total running time of the program up to this point
int h, m, s; // Define variables to represent hours, minutes, and seconds
void setup() {
Wire.begin();
lcd.begin(numCols, numRows); // Initialize the LCD display
lcd.backlight(); // Turn on the backlight of the display
delay(500);
lcd.clear(); // Clear the display
last_time = millis(); // Record the total running time of the program up to this point
Serial.begin(115200);
pinMode(buzzer, OUTPUT); // Set the buzzer to output mode
myUltrasonic.Init(trig, echo); // Initialize the ultrasonic sensor
servo.attach(servoPin); // Initialize the servo
servo.write(0); // Initialize the position of the servo
}
void loop() {
if (millis() - last_time > 1100) { // Check if 1 second has passed
timer++; // Increment the timer by 1
last_time = millis(); // Update the total running time of the program
}
Serial.println(timer);
s = timer % 60; // Calculate the seconds to display
m = (timer / 60) % 60; // Calculate the minutes to display
h = (timer / 3600) % 24; // Calculate the hours to display
lcd.setCursor(0, 0); // Display the timer on the LCD display
lcd.print("Timer:");
lcd.setCursor(6, 0);
lcd.print(h / 10);
lcd.print(h % 10);
lcd.print(":");
lcd.setCursor(9, 0);
lcd.print(m / 10);
lcd.print(m % 10);
lcd.print(":");
lcd.setCursor(12, 0);
lcd.print(s / 10);
lcd.print(s % 10);
lcd.setCursor(0, 1);
lcd.print("Feeding:");
lcd.setCursor(8, 1);
lcd.print("off");
if (timer == 5) { // Check if 5 seconds have passed
servo.detach(); // disconnect servo
tone(buzzer, 800); // Activate the buzzer
delay(1000); // Delay for 1 second
noTone(buzzer); // Turn off the buzzer
timer = 0; // Reset the timer
// Wait for the pet to approach:
while (myUltrasonic.Ranging() > 10);
lcd.setCursor(8, 1);
lcd.print("on ");
servo.attach(servoPin); // Start feeding
for (int angle = 0; angle <= 90; angle++) {
servo.write(angle);
delay(25);
}
delay(1000);
for (int angle = 90; angle >= 0; angle--) {
servo.write(angle);
delay(25);
}
delay(1000);
}
}
Automatic Watering System — automatic_watering_system.ino
#include <Wire.h>
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h>
#define moistureSensor 25 // Declare the soil moisture sensor pin
#define relay 23 // Declare the relay pin
const int i2cAddress = 0x27; // I2C address
const int numRows = 2; // Number of rows in the LCD1602
const int numCols = 16; // Number of columns in the LCD1602
hd44780_I2Cexp lcd(i2cAddress, numRows, numCols); // Create the display object
void setup(){
Wire.begin(); // Start I2C communication
lcd.begin(numCols, numRows); // Initialize the LCD display
lcd.backlight(); // Turn on the backlight
delay(500);
lcd.clear(); // Clear the LCD display
pinMode(relay,OUTPUT); // Set the relay to output mode
pinMode(moistureSensor,INPUT); // Set the soil moisture sensor to input mode
Serial.begin(115200);
}
void loop(){
// Read the value of the soil moisture sensor
int moisture_value = analogRead(moistureSensor);
Serial.println(moisture_value);
lcd.setCursor(0, 0);
lcd.print("H:");
lcd.print(moisture_value); // Display the soil moisture value on the LCD display
lcd.setCursor(0, 1);
lcd.print("Water:");
if(moisture_value<1000){
// Turn on the water pump for watering:
lcd.print("Turn on");
digitalWrite(relay,HIGH);
delay(500);
digitalWrite(relay,LOW);
}
else{
// Turn off the water pump:
lcd.print("Turn off");
digitalWrite(relay,LOW);
}
delay(1000);
lcd.clear();
}
07 Code Breakdown
Here is what each part of the code does. Read this after uploading.
Earthquake Alarm System
| Pin | Purpose |
|---|---|
| LED (19) | Visual alert |
| buzzer (18) | Sound alert |
| vibration (32) | Detects shaking or earthquake activity |
setup()
Configures the LED and buzzer as outputs, and the vibration sensor as an input.
loop()
Reads the vibration sensor value. If vibration is detected, it blinks the LED and activates the buzzer with rising/falling tones for 5 cycles, then turns the buzzer off after the alert sequence.
Fire Alarm System
| Pin | Purpose |
|---|---|
| MQ4 (25) | Detects gas leaks |
| flame (27) | Detects fire or flame |
| LED (19) | Visual warning |
| buzzer (18) | Audio alarm |
setup()
Configures the sensors as inputs and the LED and buzzer as outputs, then starts the serial monitor.
loop()
Reads the gas and flame sensor values. If gas exceeds the threshold or flame is detected, it triggers an alarm cycle (LED flashing plus buzzer tone sweep), repeats the sequence 5 times, then turns the buzzer off.
Automatic Door
| Library | Purpose |
|---|---|
| ultrasonic.h | Reads distance from the ultrasonic sensor |
| ESP32_Servo.h | Controls the door servo motor |
| Pin | Purpose |
|---|---|
| servoPin (13) | Controls door movement |
| trig / echo (16 / 17) | Detects distance of an approaching person |
setup()
Initializes the ultrasonic sensor and attaches the servo at the closed position.
loop()
Reads distance from the ultrasonic sensor. If a person is within 10 cm, it opens the door by rotating the servo, waits 5 seconds, then closes the door.
Password Access Control
| Library | Purpose |
|---|---|
| ACB_KeyBoard_I2C.h | Reads input from the touch keypad |
| ESP32_Servo.h | Controls the door lock servo |
| Pin | Purpose |
|---|---|
| LED (19) | Visual feedback on incorrect password |
| buzzer (18) | Audio feedback |
| servoPin (13) | Controls the lock mechanism |
Variables
password[7] stores the correct password. input_password[7] stores the user's input.
setup()
Initializes the LED, buzzer, servo, and keypad, and positions the servo in the locked state.
loop()
Waits for a 6-digit password entered via the keypad, compares it with the stored password. If correct, it opens the door with the servo motor; if incorrect, it flashes the LED and sounds the buzzer.
door_open()
Helper function that rotates the servo to unlock and then re-lock the door.
Automatic Drying Rack
| Library | Purpose |
|---|---|
| ESP32_Servo.h | Moves the rack in and out |
| Pin | Purpose |
|---|---|
| servoPin (13) | Moves the rack in/out |
| rainSensor (39) | Detects rainfall |
| PR (33) | Detects daylight levels |
Variables
state tracks the rack position (true = indoors, false = outdoors).
setup()
Attaches the servo to the motor, configures the rain and light sensors as inputs, and sets the rack initially indoors.
loop()
Reads the light and rain values. If it is daytime and not raining, it extends the rack outdoors; if night or raining, it retracts the rack indoors.
Automatic Pet Feeder
| Library | Purpose |
|---|---|
| Wire.h | I2C communication |
| hd44780.h / hd44780ioClass | Drives the I2C LCD display |
| ultrasonic.h | Detects pet presence |
| ESP32_Servo.h | Opens/closes the food container |
| Pin | Purpose |
|---|---|
| buzzer (18) | Audio alert for feeding |
| servoPin (13) | Opens/closes food container |
| trig / echo (16 / 17) | Detects pet presence |
Variables
timer, h, m, s track the feeding interval timer; myUltrasonic detects a pet near the feeder.
setup()
Initializes the LCD, ultrasonic sensor, buzzer, and servo, and starts the feeding timer at 0.
loop()
Updates the timer on the LCD. Every 5 seconds, it activates the buzzer and checks for pet presence. If a pet is detected, it rotates the servo to dispense food, then closes.
Automatic Watering System
| Library | Purpose |
|---|---|
| Wire.h | I2C communication |
| hd44780.h / hd44780ioClass | Drives the I2C LCD display |
| Pin | Purpose |
|---|---|
| moistureSensor (25) | Detects soil dryness |
| relay (23) | Controls the water pump |
setup()
Initializes the LCD, relay, and moisture sensor, and starts the serial monitor for data logging.
loop()
Reads the soil moisture sensor value. If the value is below 1000, it turns the pump ON to water the plant; otherwise the pump remains OFF. The status is displayed on the LCD.
08 Testing and Calibration
After uploading, verify each of the following to confirm the system is working correctly.
Earthquake Alarm System
Gently tap or shake the wooden board near the vibration sensor. The red LED should blink and the buzzer should sound a rising/falling tone for 5 cycles, then stop.
Fire Alarm System
Bring a small flame or gas source near the flame/MQ-4 sensors. The LED should flash and the buzzer should sound the same alarm cycle used in the Earthquake Alarm project.
Automatic Door
Approach the ultrasonic sensor within about 10 cm. The servo should rotate to open the door, hold for 5 seconds, then close automatically.
Password Access Control
Enter the default 6-digit password (123456) on the touch keypad. A correct entry should open the door via the servo; an incorrect entry should flash the LED and sound the buzzer.
Automatic Drying Rack
Cover the light sensor to simulate nighttime, or add a few drops of water to the raindrop sensor. The rack should retract indoors; under bright, dry conditions it should extend outdoors.
Automatic Pet Feeder
Watch the LCD timer count up. At 5 seconds, the buzzer should sound and the system should wait for the pet (or your hand) to approach within 10 cm before dispensing food via the servo.
Automatic Watering System
Check the moisture reading on the LCD. In dry soil (reading below 1000), the relay should briefly activate the water pump; in moist soil, the pump should stay off.
09 System Demonstration
The videos below show the working systems. Use these to verify your output matches what is expected.
Intelligent Security System — Earthquake Alarm & Automatic Door Demo
Smart Automatic System — Drying Rack, Pet Feeder & Watering System Demo
10 Conclusion
The Acebott Smart Home Edu Kit (Arduino Level 2) offers a practical and engaging way to explore the future of intelligent living. By combining sensors, actuators, and controllers into an accessible platform, it allows learners to understand how technology can transform homes into safer, more convenient, and more efficient environments. Its plug-and-play design lowers barriers to entry, while coding through the Arduino IDE builds essential problem-solving and programming skills.
Beyond individual projects, the kit encourages creativity and experimentation, giving students and hobbyists the tools to design their own smart solutions. From enhancing security to automating daily routines, the Acebott Kit demonstrates how IoT concepts can be applied to real-world needs, turning abstract theories into meaningful, hands-on experiences.
Whether used in classrooms, innovation labs, or at home, the Acebott Smart Home Edu Kit serves as a bridge between learning and application. More than just an educational resource, it inspires the next generation of innovators to imagine and create intelligent systems that will define the future of smart homes and sustainable living.
Possible Improvements and Future Enhancements
- Add Wi-Fi notifications (e.g. app or SMS alerts) for the Earthquake and Fire Alarm systems.
- Combine the Password Access Control and Automatic Door projects into a single unified entry system.
- Log soil moisture and watering history for the Automatic Watering System to track plant health over time.
11 References
- Acebott Official Tutorials — Smart Home Edu Kit (Arduino Level 2)
- Acebott Product Page — Smart Home Educational Kit (Arduino Level 2)
- Arduino IDE Official Documentation
- ESP32 Technical Reference Manual
- I2C LCD1602 Datasheet and Library Documentation
- MFRC522 RFID Module Datasheet and Arduino Library
- PIR Motion Sensor (HC-SR501) Datasheet
- Light Sensor Module Documentation
- Servo Motor (SG90) Technical Datasheet
12 Project Authors
- Francesca Rose Bejenia
- Kyla Jade Entorum
