Smart Door Closing Assistant

by Ray chen in Circuits > Arduino

53 Views, 0 Favorites, 0 Comments

Smart Door Closing Assistant

unnamed (3).jpg
關門提醒

This is a reminder device designed to alert you to close doors and windows. It uses a Hall effect magnetic sensor to detect whether a door or window is open. If the door or window remains open for more than ten seconds, the device will automatically emit an alarm sound, flash a red light, and play a song on the computer to notify the user that the door or window is still open, preventing insects from coming inside.

Supplies

Arduino Leonardo development board

Breadboard

Several jumper wires

Plastic corrugated board

LED light * 1

WS2812 LED strip * 5

Buzzer * 1

Magnet * 1

Hall effect magnetic sensor * 1

Computer * 1

Connect the Circuit

螢幕擷取畫面 2024-08-27 164238.png

1.LED Light: Use jumper wires to connect the LED light to digital pin 13 on the Arduino Leonardo.

2.Hall Effect Magnetic Sensor: Connect the signal pin of the Hall effect magnetic sensor to analog pin A5 on the Arduino.

3.WS2812 LED Strip: Connect the LED strip to digital pin 6.

Buzzer: Connect the buzzer to digital pin 3.

Build the Box

unnamed.jpg

1.Use the plastic corrugated board to create a box that can hold the development board and breadboard.

2.Drill holes in the box to allow the wires to pass through from the inside.

3.Connect the USB cable from inside the box to the computer, providing power to the Arduino, uploading the program, and controlling the keyboard.

4.Route the wires for the LED strip and Hall effect magnetic sensor out of the box and secure them on the outside.

Install the Door and Window Sensor Device

unnamed (2).jpg

1.Secure the magnetic sensor to the frame of the door or window.

2.Attach the magnet to the movable part of the door or window, ensuring that when the door or window is closed, the magnet is close to the sensor.

3.When the door or window is opened, the sensor will not detect the magnet, triggering the alarm system.

Upload the Program

Upload the program to the Arduino.

Testing

After uploading the program, ensre that the following conditions are met:

When the door or window is open for more than ten seconds, the buzzer is triggered, a red light flashes, and a song plays.

If the door or window remains open for more than ten seconds, the computer will automatically open a web browser.

After the browser opens, it will input a specific URL, so make sure the language settings are set to English beforehand.

When the door or window is closed again, the browser tab will automatically close.