Secrets & Safes - Safe of Safeness

by Ben Girard in Workshop > Science

18 Views, 1 Favorites, 0 Comments

Secrets & Safes - Safe of Safeness

IMG_6298.jpeg

This product is called the SafeBox 2.0. This product is a safe box to keep small and valuable items.

How does it work?

This product is designed to make a noise and tell the owner is anyone is trying to take something from the safe box.

For example: if you have a phone in there, someone would try to take it out, if it isn’t you, it would keep making a noise until the owner stops it. If it is you, you would press a button to stop the noise and you could press another button to reset the alarm.

Link to Presentation on how it works:

https://prezi.com/view/9SN2d099isNUVDZfO8UJ/

Supplies

ir motion sensor.jpg
OIP.jpg

Box, Micro-bit, Infrared Motion Sensor, Extension Board, 3 Female-Female micro bit cables, battery

CAD the Box

IMG_0005.jpeg

This product took multiple iterations.

1st Iteration:

This box was wide and could fit the phone and a breadboard horizontally.

2nd Iteration:

This box was thinner so it could hold a breadboard horizontally and the phone vertically.

3rd and Final iteration:

The box was thin so it could hold the micro bit, the sensor, and a phone vertically.

The final iteration was the most ideal because the sensor was close to the phone so it could detect the movement, and it could hold the phone.

When you CAD your box, be sure to take in the size of the object and the Micro bit to ensure that both can fit.

Code the Software

unnamed.png

(Microsoft Make Code required) The software requires pretty simple code. First, you need to drag out a "forever loop" event handler. Then set a variable for the motion sensor. After, you'll need an if else statement. This is the majority of your code. Leave the if section blank and put the sound you want to play after triggered in the else section. The alarm (after triggered) won't stop playing, so you have to drag out an input block. In the event handler, set the volume to zero, and also tell it to stop all sounds. To rearm the safe, insert an input block for button B, and code it to reset. Afterwards, make sure your code matches the image above, then you should be all set (coding wise).

Assemble the Hardware

sketch thingy.png

When you assemble the Hardware, make sure you follow the wiring diagram above. This project requires an extension board to use it. First, you take a wire (all wires used were Female to Female) and attach it to the 5V pin for power. Connect that to one of the three pins on the IR sensor. Then, take another wire, and attach that to one of the digital pins (we chose pin 8). Connect that to the IR Sensor. Finally, take a wire and attach that to the ground pin. Hook it up to the Micro Bit, then you should be all set.

Put It All Together

IMG_6297.jpeg
IMG_0007.jpeg

This part is really simple. First, take you Micro bit, and put it into the box. Make sure you have it connected to a battery. Then tape the IR sensor to one of the side walls facing where you want your valuable to go. Finally put you valuable in.

Testing and Applying

IMG_0008.jpeg

Now, try to reach into the box, and grab your valuable. A sound should play after motion is detected. To turn off the sound, press button A. After turning off the sound, press button B to rearm the device.