Introduction: Mask Reminder
This machine is built to remind people to wear masks before going outdoor, especially during this COVID-19 pandemic. The machine uses a Photoresistance sensor to detect whether a person is passing. When it detects someone, the motor opens a mask box, reminding the user to wear a mask before going outside, creating a sound as well. However, if the user is already wearing a mask and does not want the machine to open or close and creating a sound, then the user could simply press the button beside.
Step 1: Prepare Supplies
To make this project, you need to prepare the following materials:
(The following websites are provided just for a recommendation of where to but the supplies, the prices may not be the best value. Please consider the prices by your own conditions.)
- One cardboard box (big enough to cut pieces which will be mentioned in the future steps)
- One servo motor
- One Arduino Leonardo
- One breadboard
- One button
- One Photoresistence sensor
- One speaker
- Two metal film resistors
Step 2: Connect the Wires
Before making any boxes or entering a code, connect all the wires and supplies together on a breadboard and Arduino board. The first picture is a simpler and easier version of where each wire or object should be connected. The second picture is my own Breadboard and how I connected it to the project. Even though the places may differ, the results are still the same.
Take note that in the first picture the resistor is a carbon film resistor (yellow color), however, the resistor that should be used is a metal film resistor (blue color). Also, it is optional whether to use tape to let the wires stick on the Photoresistance sensor. The wires could stick on its own, but personally I think it will connect better with tape.
Step 3: Making of the Mask Box (Optional)
This step is optional since some mask boxes are able to be lifted by the servo motor. To test whether the box could be lifted by the servo motor, let the servo motor move the opening of the box. If the opening of the box is unstable when the servo motor moves it, then you need to perform this step.
You will need to cut:
2 - 21cm x 15cm bases
2 - 7.5cm x 21cm sides
2 - 7.5cm x 15cm sides (one the sides needs to have a 2x4 hole on the left side, refer to the picture for more details)
After cutting these pieces, glue them all together, but for the opener only glue one side, which will be beside the hole
When the steps above are done, it is time to connect the objects with the box. The servo motor should be placed in the hole, with its part where the motor moves inside the box. You may adjust the position later when the code is typed in because the motor may be placed too high or low. The Photoresistance sensor should be taped on the left or right side of the box. The location differs from where your door is placed. If you have a location where you can place objects on the left while entering out of the door, the Photoresistance sensor should be placed on the left; if you have a location where you can place objects on the right while entering out of the door, the Photoresistance sensor should be placed on the right. At last, tape the speaker on the back of the box.
Step 4: Making of Button Box
In this step, you will need to cut:
1 - 7cm x 20cm base
2 - 20cm x 13cm sides
2 - 13cm x 7cm sides
After cutting these pieces, glue them all together, there should be a side that is open, that will be the place where you put the Arduino breadboard.
After gluing the pieces, on the biggest base, cut a circle on the middle with a diameter of 3cm, this will be the location where the button is placed. The button should be stuck on the hole, so it would not fall out after pressing.
Step 5: Enter the Code
Here is the code for the machine.
There are some points to take before using the code:
Since the brightness differs in every environment, the value set in the code (it Is mentioned inside) should be changed. To find the value you should key in the code, open the serial port to check about what number it shows when you are not close to the Photoresistance sensor. After that, set a value that is slightly lower than the average.
Also, if you want to change the sound of the speaker, change the second set of numbers on the line where the comments say the speaker is. Try not to set the Hertz over 2000, over that number will be a very disturbing sound and will be comfortable. To change the length of the sound the speaker makes, change the third set of numbers. 1000 = 1 second. This applies to all other machines that have delay time, you may change them if you want to.
After entering the code, the machine is finished! Have fun and be safe during this pandemic!